You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sub-task of #179. Subtractive pass: re-privatize the public surface and remove the isCollectionInfo runtime cast now that endpoint.csapi(id) (D1b) exists.
Goal
Restore OgcApiEndpoint.root and OgcApiEndpoint.getCollectionDocument to private visibility and delete the isCollectionInfo runtime cast. Migrate every internal call site to the new factory entry from D1b. After this commit, the public API matches the original ogc-client surface (no leaked CSAPI plumbing).
Tasks
Migrate every internal consumer of endpoint.root / endpoint.getCollectionDocument to use endpoint.csapi(id) (D1b) where appropriate, or refactor through a private helper.
Change root and getCollectionDocument visibility back to private.
Delete the isCollectionInfo runtime cast.
Update or remove tests that asserted on the public surface of root / getCollectionDocument.
Run typecheck after each migrated module — TypeScript will cascade visibility errors and they need to be resolved in lockstep.
Acceptance
root and getCollectionDocument are private
isCollectionInfo runtime cast deleted
No remaining external references to endpoint.root / endpoint.getCollectionDocument in src/** (excluding the class itself) or app/**
npm run typecheck clean
npm run lint clean
npm run test:browser clean (CSAPI scope)
Existing CSAPI tests that previously routed via endpoint.root now route via endpoint.csapi() and still pass
Out of scope
Adding new tests for endpoint.csapi() — that was D1b
src/ogc-api/endpoint.ts — public get root → private get root; public getCollectionDocument(id) → private getCollectionDocument(id). These were temporarily promoted to public in commit 20a35d2 for the previous async factory; with D1b''s csapi() facade they are no longer part of the package surface.
src/ogc-api/endpoint.spec.ts — deleted the redundant describe(''getCollectionDocument'') block (the only external caller). Its conformance assertion (iot-sensors carries ogc-cs:systems) is already covered by D1b''s csapi() happy-path test asserting builder.availableResources ⊇ ''systems''. The two jest.spyOn(endpoint, ''getCollectionDocument'') calls in the csapi() error-path tests are now jest.spyOn(endpoint as any, ''getCollectionDocument'') since the target is private; this is test-only and intentional — those tests validate csapi()''s try/catch wrapping by stubbing the internal collaborator.
Sub-finding (already verified in D1b): the isCollectionInfo runtime cast is gone — git grep -n isCollectionInfo -- src/ returns 0 matches. Removed when factory.ts was reshaped to value-shaped inputs in a41ce07. No further action required for that line item.
Activity
Sam-Bolling commentedon Apr 30, 2026
D1c shipped in commit
02cf405.Changes:
src/ogc-api/endpoint.ts—public get root→private get root;public getCollectionDocument(id)→private getCollectionDocument(id). These were temporarily promoted to public in commit20a35d2for the previous async factory; with D1b''scsapi()facade they are no longer part of the package surface.src/ogc-api/endpoint.spec.ts— deleted the redundantdescribe(''getCollectionDocument'')block (the only external caller). Its conformance assertion (iot-sensorscarriesogc-cs:systems) is already covered by D1b''scsapi()happy-path test assertingbuilder.availableResources⊇''systems''. The twojest.spyOn(endpoint, ''getCollectionDocument'')calls in thecsapi()error-path tests are nowjest.spyOn(endpoint as any, ''getCollectionDocument'')since the target is private; this is test-only and intentional — those tests validatecsapi()''s try/catch wrapping by stubbing the internal collaborator.Sub-finding (already verified in D1b): the
isCollectionInforuntime cast is gone —git grep -n isCollectionInfo -- src/returns 0 matches. Removed whenfactory.tswas reshaped to value-shaped inputs ina41ce07. No further action required for that line item.Verification:
npx tsc --noEmit→ cleannpx eslint src/ogc-api/{endpoint,endpoint.spec}.ts→ cleannpx prettier --check→ cleanendpoint.spec+factory.spec) → 93/93 passed (was 94 in D1b — minus the deleted redundant block)npx jest src/ogc-api src/shared/mime-type --forceExit→ 1519/1519 passed, 36 suitesClosing as completed. Proceeding to D1d/#185 (closeout) on next trigger.
feat(endpoint): add OgcApiEndpoint.csapi(); reshape createCSAPIBuilde…
refactor(endpoint): re-privatize root and getCollectionDocument (D1c/#…