@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.
Files changed (135) hide show
  1. package/.bongos-core.json +157 -137
  2. package/docs/copy-inventory.md +165 -165
  3. package/docs/copy-registry.json +184 -184
  4. package/docs/module-api-changelog.md +10 -0
  5. package/docs/page-inventory.json +35 -26
  6. package/docs/page-readings.json +389 -388
  7. package/modules/hall-ui/public/approval-queue.js +3 -3
  8. package/modules/hall-ui/public/atlas.html +2 -1
  9. package/modules/hall-ui/public/atlas.js +1 -1
  10. package/modules/hall-ui/public/blockers.html +3 -4
  11. package/modules/hall-ui/public/board-room.html +2 -2
  12. package/modules/hall-ui/public/brand-holes.js +3 -3
  13. package/modules/hall-ui/public/city.html +2 -1
  14. package/modules/hall-ui/public/collab.html +2 -2
  15. package/modules/hall-ui/public/commands.html +2 -2
  16. package/modules/hall-ui/public/commands.js +1 -2
  17. package/modules/hall-ui/public/copy-desk.html +2 -2
  18. package/modules/hall-ui/public/core-move-notice.js +1 -5
  19. package/modules/hall-ui/public/craft-mode.js +1 -5
  20. package/modules/hall-ui/public/criterion-uat-ui.js +3 -3
  21. package/modules/hall-ui/public/deploy.html +2 -2
  22. package/modules/hall-ui/public/diagrams.html +2 -1
  23. package/modules/hall-ui/public/dom-utils.js +15 -6
  24. package/modules/hall-ui/public/drachmae.html +2 -1
  25. package/modules/hall-ui/public/fleet-costs.js +3 -2
  26. package/modules/hall-ui/public/fleet.html +2 -2
  27. package/modules/hall-ui/public/founding-mark.js +1 -6
  28. package/modules/hall-ui/public/gate.html +2 -2
  29. package/modules/hall-ui/public/goal-map.html +2 -1
  30. package/modules/hall-ui/public/goals.html +2 -2
  31. package/modules/hall-ui/public/government.html +2 -2
  32. package/modules/hall-ui/public/hall-ask.js +3 -3
  33. package/modules/hall-ui/public/hall-kit.js +3 -5
  34. package/modules/hall-ui/public/hall-visual.js +3 -5
  35. package/modules/hall-ui/public/idea.html +2 -2
  36. package/modules/hall-ui/public/ideas.html +2 -2
  37. package/modules/hall-ui/public/index.html +2 -2
  38. package/modules/hall-ui/public/lightbulb.js +1 -5
  39. package/modules/hall-ui/public/md-reader.js +1 -8
  40. package/modules/hall-ui/public/modules.html +2 -2
  41. package/modules/hall-ui/public/my-agents.html +2 -2
  42. package/modules/hall-ui/public/my-agents.js +3 -1
  43. package/modules/hall-ui/public/page-notes.js +1 -5
  44. package/modules/hall-ui/public/paintbrush.js +1 -5
  45. package/modules/hall-ui/public/palette.js +1 -5
  46. package/modules/hall-ui/public/primer.html +2 -1
  47. package/modules/hall-ui/public/primer.js +1 -1
  48. package/modules/hall-ui/public/profile-crafts.js +3 -5
  49. package/modules/hall-ui/public/profile.html +2 -3
  50. package/modules/hall-ui/public/project-settings.html +2 -2
  51. package/modules/hall-ui/public/ranks.html +2 -3
  52. package/modules/hall-ui/public/roadmap.html +2 -2
  53. package/modules/hall-ui/public/roster.html +3 -4
  54. package/modules/hall-ui/public/sessions.html +2 -3
  55. package/modules/hall-ui/public/settings.html +2 -3
  56. package/modules/hall-ui/public/shell.js +1 -5
  57. package/modules/hall-ui/public/sky-data.js +1 -1
  58. package/modules/hall-ui/public/street.html +2 -1
  59. package/modules/hall-ui/public/studio.html +2 -2
  60. package/modules/hall-ui/public/task-detail.js +1 -6
  61. package/modules/hall-ui/public/task-lib.js +3 -8
  62. package/modules/hall-ui/public/task.html +2 -3
  63. package/modules/hall-ui/public/thinking.html +2 -1
  64. package/modules/hall-ui/public/tweak-editor.html +2 -2
  65. package/modules/hall-ui/public/vote-control.js +1 -1
  66. package/modules/hall-ui/public/watch.html +2 -3
  67. package/modules/hall-ui/public/welcome-boot.js +3 -5
  68. package/modules/hall-ui/public/work.html +2 -3
  69. package/modules/lifecycle/ship-card.js +1 -4
  70. package/modules/npm-release/preview/proxy.js +2 -3
  71. package/modules/npm-release/public/task-widget.js +1 -1
  72. package/modules/platform-identity/routes/sso.js +1 -3
  73. package/modules/provisioning/routes/callback-page.js +2 -6
  74. package/modules/public-landing/public/projects.html +3 -5
  75. package/modules/raise/raise.js +1 -1
  76. package/package-lock.json +2 -2
  77. package/package.json +1 -1
  78. package/release-notes.json +20 -12
  79. package/scripts/bongos/escape-helper-guard.js +147 -0
  80. package/scripts/bongos/fitness.js +3 -2
  81. package/scripts/bongos/key-card.js +1 -4
  82. package/scripts/bongos/review-sheet.js +1 -3
  83. package/scripts/bongos/start.js +1 -1
  84. package/scripts/bongos/status.js +1 -1
  85. package/scripts/gds/escape-helper-guard.js +6 -0
  86. package/scripts/status-mirror-sync.js +2 -3
  87. package/src/bongos/module-scope-map.js +1 -0
  88. package/src/bongos/platform-visibility-gate.js +2 -3
  89. package/src/bongos/prelaunch-gate.js +2 -3
  90. package/src/bongos/routes/auth.js +1 -5
  91. package/src/bongos/serve-internal.js +2 -6
  92. package/src/html-escape.js +26 -0
  93. package/src/module-api.js +9 -1
  94. package/tests/blockers_kit_pager.mjs +2 -2
  95. package/tests/blockers_page_ui.mjs +2 -2
  96. package/tests/core_move_notice.mjs +3 -1
  97. package/tests/core_update_banner.mjs +2 -0
  98. package/tests/core_upgrade_owner_door.mjs +2 -0
  99. package/tests/craft_mode.mjs +2 -0
  100. package/tests/craft_mode_nav.mjs +3 -0
  101. package/tests/craft_review_mode.mjs +3 -2
  102. package/tests/criterion_ref_status.mjs +7 -2
  103. package/tests/curve_kind_overlay.mjs +2 -1
  104. package/tests/founding_mode.mjs +10 -2
  105. package/tests/github_install_nudge.mjs +4 -1
  106. package/tests/goal_map_page.mjs +2 -2
  107. package/tests/hall_approval_queue.mjs +2 -2
  108. package/tests/hall_city.mjs +1 -1
  109. package/tests/hall_fullscreen.mjs +2 -0
  110. package/tests/hall_gov_real_site.mjs +2 -0
  111. package/tests/hall_kit_charts.mjs +2 -1
  112. package/tests/hall_my_agents.mjs +3 -2
  113. package/tests/hall_nav.mjs +2 -0
  114. package/tests/hall_palette.mjs +2 -2
  115. package/tests/hall_reading_world.mjs +3 -1
  116. package/tests/hall_reference_world.mjs +2 -1
  117. package/tests/hall_signout.mjs +2 -0
  118. package/tests/hall_street.mjs +1 -1
  119. package/tests/hall_studio_world.mjs +3 -1
  120. package/tests/hall_tweak_editor.mjs +2 -1
  121. package/tests/helpers.mjs +17 -2
  122. package/tests/html_escape.mjs +149 -0
  123. package/tests/lightbulb.mjs +2 -0
  124. package/tests/module_api.mjs +1 -0
  125. package/tests/module_store_howto.mjs +2 -1
  126. package/tests/nav_permission_atoms.mjs +1 -1
  127. package/tests/npm_release_where.mjs +2 -1
  128. package/tests/page_notes_panel.mjs +4 -3
  129. package/tests/paintbrush.mjs +2 -1
  130. package/tests/profile_connections_ui.mjs +2 -1
  131. package/tests/profile_role_headline.mjs +2 -2
  132. package/tests/profile_role_tabs.mjs +2 -2
  133. package/tests/projects_hub_repo_private.mjs +4 -0
  134. package/tests/terms_acceptance.mjs +1 -0
  135. 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