@bongos/core 1.21.182 → 1.22.1
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 +157 -137
- package/docs/copy-inventory.md +165 -165
- package/docs/copy-registry.json +184 -184
- package/docs/module-api-changelog.md +10 -0
- package/docs/page-inventory.json +35 -26
- package/docs/page-readings.json +389 -388
- package/modules/hall-ui/public/approval-queue.js +3 -3
- package/modules/hall-ui/public/atlas.html +2 -1
- package/modules/hall-ui/public/atlas.js +1 -1
- package/modules/hall-ui/public/blockers.html +3 -4
- package/modules/hall-ui/public/board-room.html +2 -2
- package/modules/hall-ui/public/brand-holes.js +3 -3
- package/modules/hall-ui/public/city.html +2 -1
- package/modules/hall-ui/public/collab.html +2 -2
- package/modules/hall-ui/public/commands.html +2 -2
- package/modules/hall-ui/public/commands.js +1 -2
- package/modules/hall-ui/public/copy-desk.html +2 -2
- package/modules/hall-ui/public/core-move-notice.js +1 -5
- package/modules/hall-ui/public/craft-mode.js +1 -5
- package/modules/hall-ui/public/criterion-uat-ui.js +3 -3
- package/modules/hall-ui/public/deploy.html +2 -2
- package/modules/hall-ui/public/diagrams.html +2 -1
- package/modules/hall-ui/public/dom-utils.js +15 -6
- package/modules/hall-ui/public/drachmae.html +2 -1
- package/modules/hall-ui/public/fleet-costs.js +3 -2
- package/modules/hall-ui/public/fleet.html +2 -2
- package/modules/hall-ui/public/founding-mark.js +1 -6
- package/modules/hall-ui/public/gate.html +2 -2
- package/modules/hall-ui/public/goal-map.html +2 -1
- package/modules/hall-ui/public/goals.html +2 -2
- package/modules/hall-ui/public/government.html +2 -2
- package/modules/hall-ui/public/hall-ask.js +3 -3
- package/modules/hall-ui/public/hall-kit.js +3 -5
- package/modules/hall-ui/public/hall-visual.js +3 -5
- package/modules/hall-ui/public/idea.html +2 -2
- package/modules/hall-ui/public/ideas.html +2 -2
- package/modules/hall-ui/public/index.html +2 -2
- package/modules/hall-ui/public/lightbulb.js +1 -5
- package/modules/hall-ui/public/md-reader.js +1 -8
- package/modules/hall-ui/public/modules.html +2 -2
- package/modules/hall-ui/public/my-agents.html +2 -2
- package/modules/hall-ui/public/my-agents.js +3 -1
- package/modules/hall-ui/public/page-notes.js +1 -5
- package/modules/hall-ui/public/paintbrush.js +1 -5
- package/modules/hall-ui/public/palette.js +1 -5
- package/modules/hall-ui/public/primer.html +2 -1
- package/modules/hall-ui/public/primer.js +1 -1
- package/modules/hall-ui/public/profile-crafts.js +3 -5
- package/modules/hall-ui/public/profile.html +2 -3
- package/modules/hall-ui/public/project-settings.html +2 -2
- package/modules/hall-ui/public/ranks.html +2 -3
- package/modules/hall-ui/public/roadmap.html +2 -2
- package/modules/hall-ui/public/roster.html +3 -4
- package/modules/hall-ui/public/sessions.html +2 -3
- package/modules/hall-ui/public/settings.html +2 -3
- package/modules/hall-ui/public/shell.js +1 -5
- package/modules/hall-ui/public/sky-data.js +1 -1
- package/modules/hall-ui/public/street.html +2 -1
- package/modules/hall-ui/public/studio.html +2 -2
- package/modules/hall-ui/public/task-detail.js +1 -6
- package/modules/hall-ui/public/task-lib.js +3 -8
- package/modules/hall-ui/public/task.html +2 -3
- package/modules/hall-ui/public/thinking.html +2 -1
- package/modules/hall-ui/public/tweak-editor.html +2 -2
- package/modules/hall-ui/public/vote-control.js +1 -1
- package/modules/hall-ui/public/watch.html +2 -3
- package/modules/hall-ui/public/welcome-boot.js +3 -5
- package/modules/hall-ui/public/work.html +2 -3
- package/modules/lifecycle/ship-card.js +1 -4
- package/modules/npm-release/preview/proxy.js +2 -3
- package/modules/npm-release/public/task-widget.js +1 -1
- package/modules/platform-identity/routes/sso.js +1 -3
- package/modules/provisioning/routes/callback-page.js +2 -6
- package/modules/public-landing/public/projects.html +3 -5
- package/modules/raise/raise.js +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +20 -12
- package/scripts/bongos/escape-helper-guard.js +147 -0
- package/scripts/bongos/fitness.js +3 -2
- package/scripts/bongos/key-card.js +1 -4
- package/scripts/bongos/review-sheet.js +1 -3
- package/scripts/bongos/start.js +1 -1
- package/scripts/bongos/status.js +1 -1
- package/scripts/gds/escape-helper-guard.js +6 -0
- package/scripts/status-mirror-sync.js +2 -3
- package/src/bongos/module-scope-map.js +1 -0
- package/src/bongos/platform-visibility-gate.js +2 -3
- package/src/bongos/prelaunch-gate.js +2 -3
- package/src/bongos/routes/auth.js +1 -5
- package/src/bongos/serve-internal.js +2 -6
- package/src/html-escape.js +26 -0
- package/src/module-api.js +9 -1
- package/tests/blockers_kit_pager.mjs +2 -2
- package/tests/blockers_page_ui.mjs +2 -2
- package/tests/core_move_notice.mjs +3 -1
- package/tests/core_update_banner.mjs +2 -0
- package/tests/core_upgrade_owner_door.mjs +2 -0
- package/tests/craft_mode.mjs +2 -0
- package/tests/craft_mode_nav.mjs +3 -0
- package/tests/craft_review_mode.mjs +3 -2
- package/tests/criterion_ref_status.mjs +7 -2
- package/tests/curve_kind_overlay.mjs +2 -1
- package/tests/founding_mode.mjs +10 -2
- package/tests/github_install_nudge.mjs +4 -1
- package/tests/goal_map_page.mjs +2 -2
- package/tests/hall_approval_queue.mjs +2 -2
- package/tests/hall_city.mjs +1 -1
- package/tests/hall_fullscreen.mjs +2 -0
- package/tests/hall_gov_real_site.mjs +2 -0
- package/tests/hall_kit_charts.mjs +2 -1
- package/tests/hall_my_agents.mjs +3 -2
- package/tests/hall_nav.mjs +2 -0
- package/tests/hall_palette.mjs +2 -2
- package/tests/hall_reading_world.mjs +3 -1
- package/tests/hall_reference_world.mjs +2 -1
- package/tests/hall_signout.mjs +2 -0
- package/tests/hall_street.mjs +1 -1
- package/tests/hall_studio_world.mjs +3 -1
- package/tests/hall_tweak_editor.mjs +2 -1
- package/tests/helpers.mjs +17 -2
- package/tests/html_escape.mjs +149 -0
- package/tests/lightbulb.mjs +2 -0
- package/tests/module_api.mjs +1 -0
- package/tests/module_store_howto.mjs +2 -1
- package/tests/nav_permission_atoms.mjs +1 -1
- package/tests/npm_release_where.mjs +2 -1
- package/tests/page_notes_panel.mjs +4 -3
- package/tests/paintbrush.mjs +2 -1
- package/tests/profile_connections_ui.mjs +2 -1
- package/tests/profile_role_headline.mjs +2 -2
- package/tests/profile_role_tabs.mjs +2 -2
- package/tests/projects_hub_repo_private.mjs +4 -0
- package/tests/terms_acceptance.mjs +1 -0
- package/tests/welcome_boot_browser.mjs +1 -1
|
@@ -58,6 +58,7 @@ import vm from 'node:vm';
|
|
|
58
58
|
import { readFileSync } from 'node:fs';
|
|
59
59
|
import { fileURLToPath } from 'node:url';
|
|
60
60
|
import { dirname, join } from 'node:path';
|
|
61
|
+
import { realOTB } from './helpers.mjs';
|
|
61
62
|
// The REAL predicates, not a copy. accountFloor() below used to spell these
|
|
62
63
|
// itself, which made it a hand-maintained mirror of account-visibility.js —
|
|
63
64
|
// and it drifted the moment ADR 0213 made consent two columns. Imported, the
|
|
@@ -498,7 +499,7 @@ function boot({ transport, hub = HUB } = {}) {
|
|
|
498
499
|
window: {
|
|
499
500
|
OTBAsk: require('../modules/hall-ui/public/hall-ask.js'),
|
|
500
501
|
BongosClient: { createClient: () => api },
|
|
501
|
-
OTB: { $, escapeHtml, fmtDate: (d) => String(d).slice(0, 10), toast: (m) => toasts.push(m), hubOrigin: () => hub },
|
|
502
|
+
OTB: { ...realOTB(), $, escapeHtml, fmtDate: (d) => String(d).slice(0, 10), toast: (m) => toasts.push(m), hubOrigin: () => hub },
|
|
502
503
|
OTBKit: {
|
|
503
504
|
makePager: (prefix, key) => ({ prefix, key, page: 1, perPage: 25 }),
|
|
504
505
|
makeLedger: ({ mount, rowHtml, emptyMsg }) => ({
|
|
@@ -20,7 +20,7 @@ import fs from 'node:fs';
|
|
|
20
20
|
import path from 'node:path';
|
|
21
21
|
import vm from 'node:vm';
|
|
22
22
|
import { fileURLToPath } from 'node:url';
|
|
23
|
-
import { makeRunner } from './helpers.mjs';
|
|
23
|
+
import { makeRunner, realOTB } from './helpers.mjs';
|
|
24
24
|
|
|
25
25
|
process.env.NODE_ENV = 'test';
|
|
26
26
|
const require = createRequire(import.meta.url);
|
|
@@ -129,7 +129,7 @@ async function boot(profileData) {
|
|
|
129
129
|
// The real kit draws the surface bars; the section rail needs a real DOM and
|
|
130
130
|
// is not what this suite is about, so it is left out (profile.js skips it).
|
|
131
131
|
OTBKit: { ...OTBKit, makeSectionRail: undefined },
|
|
132
|
-
OTB: {
|
|
132
|
+
OTB: { ...realOTB(),
|
|
133
133
|
$, escapeHtml,
|
|
134
134
|
fmtNum: (n) => Number(n || 0).toLocaleString('en-US'),
|
|
135
135
|
fmtDate: (d) => String(d).slice(0, 10),
|
|
@@ -22,7 +22,7 @@ import os from 'node:os';
|
|
|
22
22
|
import path from 'node:path';
|
|
23
23
|
import vm from 'node:vm';
|
|
24
24
|
import { fileURLToPath } from 'node:url';
|
|
25
|
-
import { makeRunner, bootProfilePage, settle } from './helpers.mjs';
|
|
25
|
+
import { makeRunner, bootProfilePage, settle, realOTB } from './helpers.mjs';
|
|
26
26
|
|
|
27
27
|
process.env.NODE_ENV = 'test';
|
|
28
28
|
const require = createRequire(import.meta.url);
|
|
@@ -95,7 +95,7 @@ await test('the route: signed in only, a bad id refused, paged, and it asks for
|
|
|
95
95
|
// ---- 2. the ideator's trail -------------------------------------------------
|
|
96
96
|
|
|
97
97
|
function loadCrafts() {
|
|
98
|
-
const sandbox = { window: {}, console };
|
|
98
|
+
const sandbox = { window: { OTB: realOTB() }, console };
|
|
99
99
|
sandbox.globalThis = sandbox;
|
|
100
100
|
vm.createContext(sandbox);
|
|
101
101
|
for (const f of ['idea-objects.js', 'profile-crafts.js']) {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { strict as assert } from 'node:assert';
|
|
18
18
|
import { readFileSync } from 'node:fs';
|
|
19
19
|
import vm from 'node:vm';
|
|
20
|
+
import { realOTB } from './helpers.mjs';
|
|
20
21
|
|
|
21
22
|
const HUB = readFileSync(new URL('../modules/public-landing/public/projects.html', import.meta.url), 'utf8').replace(/\r\n/g, '\n');
|
|
22
23
|
|
|
@@ -30,6 +31,8 @@ async function ta(name, fn) {
|
|
|
30
31
|
function grab(head) {
|
|
31
32
|
const at = HUB.indexOf(`\n ${head}`);
|
|
32
33
|
assert.ok(at >= 0, `${head} must exist`);
|
|
34
|
+
const line = HUB.slice(at, HUB.indexOf('\n', at + 1));
|
|
35
|
+
if (/\}\s*$/.test(line)) return line; // a one-line declaration (esc, task 1004876)
|
|
33
36
|
const end = HUB.indexOf('\n }', at + 1);
|
|
34
37
|
const close = HUB.slice(end, end + 5) === '\n };' ? end + 5 : end + 4;
|
|
35
38
|
return HUB.slice(at, close);
|
|
@@ -50,6 +53,7 @@ function world({ reply = RECEIPT } = {}) {
|
|
|
50
53
|
API: '/api/bongos', manageId: '18', manageInst: null, manageRepo: null,
|
|
51
54
|
mRepoPrivSeen: false, mRepoPrivState: '',
|
|
52
55
|
$: (id) => els[id],
|
|
56
|
+
window: { OTB: realOTB() }, // the page loads dom-utils.js first (task 1004876)
|
|
53
57
|
document: { querySelector: () => null },
|
|
54
58
|
jsonOrEmpty: (res) => res.json(),
|
|
55
59
|
apiError: (data) => (data && data.error) || {},
|
|
@@ -400,6 +400,7 @@ require.cache[moduleApiPath] = {
|
|
|
400
400
|
resolveEnv: () => null,
|
|
401
401
|
userAgent: () => 'cloud-bongos-tests',
|
|
402
402
|
LIVE_RANK_LADDER: ['xenos', 'thetes', 'metic', 'archon'],
|
|
403
|
+
escapeHtml: require('../src/html-escape.js').escapeHtml, // the doorway's one escaper (task 1004876)
|
|
403
404
|
},
|
|
404
405
|
};
|
|
405
406
|
|
|
@@ -33,7 +33,7 @@ const INDEX = fs.readFileSync(path.join(HALL, 'index.html'), 'utf8')
|
|
|
33
33
|
.replace(/<script\b[^>]*>[\s\S]*?<\/script>/g, '')
|
|
34
34
|
.replace(/\{\{[^}]*\}\}/g, '');
|
|
35
35
|
const STUB = '<script>window.__BRANDING__ = { identity: { worldName: "Harbor" } }; window.BongosClient = { createClient: () => ({ request: async () => ({ ok: false, status: 404, data: null }) }) };</script>';
|
|
36
|
-
const SCRIPTS = ['shell-trail.js', 'craft-mode.js', 'welcome-boot.js', 'shell.js']
|
|
36
|
+
const SCRIPTS = ['dom-utils.js', 'shell-trail.js', 'craft-mode.js', 'welcome-boot.js', 'shell.js'] // dom-utils first, as on the real page (task 1004876)
|
|
37
37
|
.map((f) => `<script src="/builders/${f}"></script>`).join('');
|
|
38
38
|
const PAGE = INDEX.replace('</body>', STUB + SCRIPTS + '</body>');
|
|
39
39
|
|