|
13 | 13 | * `/auth/me/localization` for regional defaults, and `core`'s auth gate |
14 | 14 | * allow-lists `/me/apps` + `/me/localization` as endpoints a gated user MUST |
15 | 15 | * still reach to bootstrap the remediation UI. #4079 lifted them out from under |
16 | | - * `registerStandardEndpoints` (which covers only DUPLICATE supply — raw `/data` |
17 | | - * CRUD and a discovery the dispatcher/REST own) so the flag could not take the |
18 | | - * console down with it. |
| 16 | + * `registerStandardEndpoints`, which also gated a DUPLICATE `/data` CRUD + |
| 17 | + * discovery surface, so that flag could not take the console down with it. That |
| 18 | + * surface and the flag have since been deleted (#4073); these three are all the |
| 19 | + * plugin serves beyond the socket. |
19 | 20 | * |
20 | 21 | * That split fixed the flag but left the supply still welded to |
21 | 22 | * {@link HonoServerPlugin}: a host that stands up a bare {@link HonoHttpServer} |
@@ -405,13 +406,14 @@ export function annotateEffectiveApiOperations( |
405 | 406 | } |
406 | 407 |
|
407 | 408 | /** |
408 | | - * Build the session → `ExecutionContext` resolver the current-user endpoints — |
409 | | - * and the plugin's standalone `/data` CRUD surface — both need. |
| 409 | + * Build the session → `ExecutionContext` resolver the current-user endpoints |
| 410 | + * need. |
410 | 411 | * |
411 | | - * Extracted from `registerDiscoveryAndCrudEndpoints` when the current-user |
412 | | - * endpoints stopped being gated on `registerStandardEndpoints` (#4073): they |
413 | | - * resolve the same principal the `/data` routes do, and one resolver is the |
414 | | - * only way the two groups can agree on who the caller is. |
| 412 | + * Extracted from `registerDiscoveryAndCrudEndpoints` when these endpoints |
| 413 | + * stopped being gated on `registerStandardEndpoints` (#4073), so the two groups |
| 414 | + * would agree on who the caller is. That surface has since been deleted and |
| 415 | + * these endpoints are the only remaining caller — kept as a named export |
| 416 | + * because the serverless host path (cloud#924) composes it directly. |
415 | 417 | */ |
416 | 418 | export function makeExecutionContextResolver(ctx: CurrentUserEndpointsContext) { |
417 | 419 | const getObjectQL = () => ctx.getService<IDataEngine>('objectql'); |
@@ -600,21 +602,19 @@ export function makeExecutionContextResolver(ctx: CurrentUserEndpointsContext) { |
600 | 602 | * Register the current-user endpoints — `/auth/me/permissions`, |
601 | 603 | * `/auth/me/localization` and `/me/apps` — on `rawApp`. |
602 | 604 | * |
603 | | - * When {@link HonoServerPlugin} drives this, it is UNCONDITIONAL, unlike the |
604 | | - * plugin's CRUD + discovery block (#4073). Those two groups used to ride on one |
605 | | - * `registerStandardEndpoints` flag, which conflated two opposite things. The flag |
606 | | - * covers DUPLICATE supply — raw `/data` CRUD that `@objectstack/rest` also serves |
607 | | - * (and, being registered first, really serves), plus a discovery that the |
608 | | - * dispatcher/REST own (#4018). These three are the opposite: nothing else in the |
609 | | - * platform mounts them. `packages/rest` and `packages/runtime` register no |
610 | | - * `/me/*` route at all, the console reads `/auth/me/permissions` for its whole |
611 | | - * permission layer and `/auth/me/localization` for regional defaults, and |
| 605 | + * When {@link HonoServerPlugin} drives this, it is UNCONDITIONAL — and these are |
| 606 | + * now the only routes it mounts beyond the socket itself. |
| 607 | + * |
| 608 | + * They used to ride on the `registerStandardEndpoints` flag alongside a raw |
| 609 | + * `/data` CRUD + discovery surface, one flag over two opposite things (#4073). |
| 610 | + * That surface was DUPLICATE supply and has been deleted; these three are the |
| 611 | + * opposite and could not be. Nothing else in the platform mounts them: |
| 612 | + * `packages/rest` and `packages/runtime` register no `/me/*` route at all, the |
| 613 | + * console reads `/auth/me/permissions` for its whole permission layer and |
| 614 | + * `/auth/me/localization` for regional defaults, and |
612 | 615 | * `core/security/auth-gate.ts` allow-lists `/me/apps` + `/me/localization` as |
613 | | - * endpoints a gated user MUST still reach to bootstrap the remediation UI. |
614 | | - * `os serve` gets them only because `registerStandardEndpoints` defaults to true |
615 | | - * (`cli/src/commands/serve.ts` passes just `{ port }`), so turning that flag off |
616 | | - * — or retiring the convenience surface it names — would have taken the console |
617 | | - * down with it. |
| 616 | + * endpoints a gated user MUST still reach to bootstrap the remediation UI. The |
| 617 | + * split (#4144) had to land before the deletion for exactly that reason. |
618 | 618 | * |
619 | 619 | * IDEMPOTENT: returns `false` and registers nothing when all three paths are |
620 | 620 | * already served. That is what lets a host call this eagerly on its own raw app |
|
0 commit comments