@bongos/core 1.19.408 → 1.19.410

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 (32) hide show
  1. package/.bongos-core.json +50 -35
  2. package/clients/bongos-client/README.md +1 -1
  3. package/clients/bongos-client/bongos-client.global.js +4 -0
  4. package/clients/bongos-client/index.cjs +4 -0
  5. package/clients/bongos-client/index.d.ts +6 -1
  6. package/clients/bongos-client/index.mjs +4 -0
  7. package/docs/api/openapi.json +124 -4
  8. package/docs/api-reference.md +5 -3
  9. package/docs/copy-inventory.md +43 -36
  10. package/docs/copy-registry.json +122 -39
  11. package/migrations/core_229_goals_accepting_requests.sql +37 -0
  12. package/modules/dev-box/app/src/vendor/bongos-client.cjs +4 -0
  13. package/modules/hall-ui/public/goals-page.js +26 -2
  14. package/modules/hall-ui/public/goals-render.js +35 -0
  15. package/modules/lifecycle/db-goals.js +22 -1
  16. package/modules/lifecycle/db.js +4 -1
  17. package/modules/lifecycle/goal-edits.js +40 -0
  18. package/modules/lifecycle/routes/goal-route-authz.js +51 -1
  19. package/modules/lifecycle/routes/goals.js +46 -1
  20. package/modules/platform-identity/migrations/platform_identity_012_recent_ships.sql +40 -0
  21. package/modules/platform-identity/platform-identity.js +87 -6
  22. package/modules/platform-identity/routes/sso.js +10 -0
  23. package/modules/platform-identity/tests/platform-identity.mjs +7 -2
  24. package/package-lock.json +2 -2
  25. package/package.json +1 -1
  26. package/src/bongos/auth-admission.js +89 -8
  27. package/src/bongos/route-rank-check.js +6 -0
  28. package/src/bongos/routes/auth.js +21 -0
  29. package/src/module-api.js +5 -1
  30. package/tests/goal_membership_requests.mjs +154 -1
  31. package/tests/hub_recent_ships.mjs +373 -0
  32. package/tests/prose_edits.mjs +8 -4
@@ -182,16 +182,20 @@ await test('ROUTE SHAPE: the author gate is fail-closed and uses the array form
182
182
  assert.match(src, /captured_by != null/, 'and the author check treats a NULL author as not-you');
183
183
  });
184
184
 
185
- await test('ROUTE SHAPE: the goal + visibility handlers share ONE authority gate', () => {
186
- // Both were moved into goal-edits.js precisely because they are the same kind
187
- // of operation behind the same gate; this pins that they still are.
185
+ await test('ROUTE SHAPE: every goal-edit handler shares ONE authority gate', () => {
186
+ // Each was moved into goal-edits.js precisely because they are the same kind
187
+ // of operation behind the same gate; this pins that they still are. The count
188
+ // grows with the file — task 1002971 added the D6 accepting-requests toggle,
189
+ // the third write to a goal's own row behind authorizeGoalManagement.
188
190
  const src = readFileSync(new URL('../modules/lifecycle/goal-edits.js', import.meta.url), 'utf8');
189
- assert.equal((src.match(/authorizeGoalManagement\(/g) || []).length, 2, 'prose + visibility, both gated');
191
+ assert.equal((src.match(/authorizeGoalManagement\(/g) || []).length, 3, 'prose + visibility + accepting-requests, all gated');
190
192
  assert.equal(typeof goalEdits.goalProseHandler, 'function');
191
193
  assert.equal(typeof goalEdits.goalVisibilityHandler, 'function');
194
+ assert.equal(typeof goalEdits.goalAcceptingRequestsHandler, 'function');
192
195
  const routes = readFileSync(new URL('../modules/lifecycle/routes/goals.js', import.meta.url), 'utf8');
193
196
  assert.match(routes, /router\.patch\('\/goals\/:id',/, 'the REGISTRATION stays in the route file so route-rank-check sees it');
194
197
  assert.match(routes, /router\.patch\('\/goals\/:id\/visibility',/);
198
+ assert.match(routes, /router\.patch\('\/goals\/:id\/accepting-requests',/);
195
199
  });
196
200
 
197
201
  // ---- 5. THE HANDLERS ARE ACTUALLY INVOKED ---------------------------------