testing/data_exposure.ts view source
(surface_source: AppSurfaceSpec, admin_only_fields?: readonly string[], skip_routes?: readonly string[] | undefined): void import {assert_non_admin_schemas_no_admin_fields} from '@fuzdev/fuz_app/testing/data_exposure.js'; Assert that route output schemas a non-admin can reach — routes without an admin or keeper gate — don't contain admin-only field names. Reads both sides of each output, as assert_output_schemas_no_sensitive_fields does.
Routes only: the default blocklist matches by name (created_by,
updated_by), and RPC and WebSocket methods return domain shapes that
carry those columns legitimately (cells, invites a member created).
surface_source
the surface with the specs it was generated from
admin_only_fields?
field names no non-admin route output may carry
readonly string[]admin_only_field_blocklistskip_routes?
routes to skip, as 'METHOD /path'
readonly string[]returns
void throws
Error- when an output schema can't be written as JSON Schema on either side