@fuzdev/fuz_app 0.149.0 → 0.151.0
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.
- package/README.md +1 -1
- package/dist/actions/CLAUDE.md +327 -300
- package/dist/actions/action_bridge.d.ts +5 -79
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +4 -74
- package/dist/actions/action_codegen.d.ts +8 -166
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +19 -95
- package/dist/actions/action_dispatcher.d.ts +10 -0
- package/dist/actions/action_dispatcher.d.ts.map +1 -1
- package/dist/actions/action_dispatcher.js +9 -6
- package/dist/actions/action_event.d.ts +1 -2
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +7 -13
- package/dist/actions/action_event_helpers.d.ts +1 -40
- package/dist/actions/action_event_helpers.d.ts.map +1 -1
- package/dist/actions/action_event_helpers.js +1 -25
- package/dist/actions/action_event_types.d.ts +1 -1
- package/dist/actions/action_event_types.d.ts.map +1 -1
- package/dist/actions/action_rpc.d.ts +10 -215
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +56 -111
- package/dist/actions/action_spec.d.ts +2 -2
- package/dist/actions/action_spec.js +2 -2
- package/dist/actions/action_types.d.ts +229 -8
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/action_types.js +56 -5
- package/dist/actions/broadcast_api.d.ts +22 -17
- package/dist/actions/broadcast_api.d.ts.map +1 -1
- package/dist/actions/broadcast_api.js +16 -27
- package/dist/actions/cancel.d.ts +4 -13
- package/dist/actions/cancel.d.ts.map +1 -1
- package/dist/actions/cancel.js +5 -17
- package/dist/actions/compile_action_registry.d.ts +1 -2
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/connection_closer.d.ts +120 -50
- package/dist/actions/connection_closer.d.ts.map +1 -1
- package/dist/actions/connection_closer.js +139 -31
- package/dist/actions/{transports_ws_backend.d.ts → connection_registry.d.ts} +120 -132
- package/dist/actions/connection_registry.d.ts.map +1 -0
- package/dist/actions/{transports_ws_backend.js → connection_registry.js} +149 -152
- package/dist/actions/frontend_rpc_client.d.ts +52 -2
- package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
- package/dist/actions/frontend_rpc_client.js +42 -4
- package/dist/actions/peer_ping.d.ts +7 -9
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +6 -8
- package/dist/actions/peer_request.d.ts +6 -5
- package/dist/actions/peer_request.d.ts.map +1 -1
- package/dist/actions/peer_request.js +6 -5
- package/dist/actions/perform_action.d.ts +36 -28
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +60 -31
- package/dist/actions/protocol.d.ts +14 -0
- package/dist/actions/protocol.d.ts.map +1 -1
- package/dist/actions/protocol.js +18 -0
- package/dist/actions/register_action_ws.d.ts +137 -292
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +155 -903
- package/dist/actions/socket.svelte.d.ts +9 -0
- package/dist/actions/socket.svelte.d.ts.map +1 -1
- package/dist/actions/socket.svelte.js +16 -5
- package/dist/actions/transports.d.ts +88 -34
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +76 -76
- package/dist/actions/transports_http.d.ts +48 -12
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +75 -44
- package/dist/actions/transports_ws.d.ts +29 -0
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/transports_ws.js +34 -8
- package/dist/actions/ws_endpoint_spec.d.ts +53 -76
- package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
- package/dist/actions/ws_endpoint_spec.js +27 -10
- package/dist/actions/ws_outbound_writer.d.ts +3 -3
- package/dist/actions/ws_outbound_writer.js +3 -3
- package/dist/actions/ws_socket_session.d.ts +321 -0
- package/dist/actions/ws_socket_session.d.ts.map +1 -0
- package/dist/actions/ws_socket_session.js +783 -0
- package/dist/auth/CLAUDE.md +132 -68
- package/dist/auth/account_action_specs.d.ts +2 -0
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_actions.d.ts +1 -1
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +9 -3
- package/dist/auth/account_queries.d.ts +10 -0
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +27 -17
- package/dist/auth/account_routes.d.ts +2 -1
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +14 -17
- package/dist/auth/account_schema.d.ts +5 -5
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +5 -2
- package/dist/auth/actor_lookup_actions.d.ts +1 -1
- package/dist/auth/actor_lookup_actions.d.ts.map +1 -1
- package/dist/auth/actor_lookup_actions.js +1 -1
- package/dist/auth/actor_lookup_queries.d.ts +3 -2
- package/dist/auth/actor_lookup_queries.d.ts.map +1 -1
- package/dist/auth/actor_lookup_queries.js +6 -3
- package/dist/auth/actor_search_action_specs.d.ts.map +1 -1
- package/dist/auth/actor_search_action_specs.js +2 -1
- package/dist/auth/actor_search_actions.d.ts +1 -1
- package/dist/auth/actor_search_actions.d.ts.map +1 -1
- package/dist/auth/actor_search_actions.js +1 -1
- package/dist/auth/actor_search_queries.d.ts +10 -7
- package/dist/auth/actor_search_queries.d.ts.map +1 -1
- package/dist/auth/actor_search_queries.js +18 -11
- package/dist/auth/admin_action_specs.d.ts +4 -4
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +7 -5
- package/dist/auth/admin_actions.d.ts +1 -1
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +47 -48
- package/dist/auth/all_cell_actions.d.ts +14 -3
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +2 -1
- package/dist/auth/api_token_queries.d.ts +1 -0
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +1 -0
- package/dist/auth/audit_emitter.d.ts +12 -6
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +11 -5
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +3 -2
- package/dist/auth/audit_log_routes.d.ts +20 -11
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +49 -29
- package/dist/auth/audit_log_schema.d.ts +14 -21
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +19 -23
- package/dist/auth/bearer_auth.d.ts +7 -4
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +21 -15
- package/dist/auth/bootstrap_account.d.ts +25 -1
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +37 -4
- package/dist/auth/bootstrap_routes.d.ts +3 -2
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +5 -4
- package/dist/auth/cell_action_helpers.d.ts +89 -0
- package/dist/auth/cell_action_helpers.d.ts.map +1 -0
- package/dist/auth/cell_action_helpers.js +113 -0
- package/dist/auth/cell_action_specs.d.ts +215 -15
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +103 -16
- package/dist/auth/cell_actions.d.ts +58 -27
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +206 -161
- package/dist/auth/cell_audit_actions.d.ts +1 -1
- package/dist/auth/cell_audit_actions.d.ts.map +1 -1
- package/dist/auth/cell_audit_actions.js +3 -12
- package/dist/auth/cell_audit_events.d.ts +1 -1
- package/dist/auth/cell_audit_events.d.ts.map +1 -1
- package/dist/auth/cell_audit_events.js +3 -2
- package/dist/auth/cell_audit_metadata.d.ts +12 -1
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +11 -1
- package/dist/auth/cell_field_actions.d.ts +1 -1
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +16 -66
- package/dist/auth/cell_grant_action_specs.d.ts +9 -2
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +10 -3
- package/dist/auth/cell_grant_actions.d.ts +105 -11
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +81 -56
- package/dist/auth/cell_grant_audit_metadata.d.ts +6 -3
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +7 -4
- package/dist/auth/cell_item_actions.d.ts +1 -1
- package/dist/auth/cell_item_actions.d.ts.map +1 -1
- package/dist/auth/cell_item_actions.js +21 -82
- package/dist/auth/cleanup.d.ts +1 -1
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +6 -3
- package/dist/auth/credential_deadline.d.ts +3 -3
- package/dist/auth/credential_deadline.js +3 -3
- package/dist/auth/credential_type_schema.d.ts +8 -7
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +8 -7
- package/dist/auth/daemon_token_middleware.d.ts +12 -6
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +28 -17
- package/dist/auth/deps.d.ts +4 -4
- package/dist/auth/fail_floor.d.ts +55 -0
- package/dist/auth/fail_floor.d.ts.map +1 -0
- package/dist/auth/fail_floor.js +63 -0
- package/dist/auth/invite_queries.d.ts +3 -15
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +3 -21
- package/dist/auth/middleware.d.ts +12 -7
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +42 -29
- package/dist/auth/migrations.d.ts +5 -33
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +9 -16
- package/dist/auth/request_context.d.ts +101 -71
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +137 -140
- package/dist/auth/resolved_auth.d.ts +122 -36
- package/dist/auth/resolved_auth.d.ts.map +1 -1
- package/dist/auth/resolved_auth.js +89 -38
- package/dist/auth/role_grant_offer_action_specs.d.ts +117 -16
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +51 -16
- package/dist/auth/role_grant_offer_actions.d.ts +22 -11
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +72 -19
- package/dist/auth/role_grant_offer_notifications.d.ts +6 -5
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +4 -3
- package/dist/auth/role_grant_offer_queries.d.ts +20 -5
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +40 -37
- package/dist/auth/role_grant_queries.d.ts +44 -76
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +73 -118
- package/dist/auth/role_grant_sql.d.ts +42 -0
- package/dist/auth/role_grant_sql.d.ts.map +1 -0
- package/dist/auth/role_grant_sql.js +54 -0
- package/dist/auth/role_schema.d.ts +14 -8
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +6 -3
- package/dist/auth/scope_kind_schema.d.ts +1 -1
- package/dist/auth/scope_kind_schema.js +1 -1
- package/dist/auth/self_service_role_actions.d.ts +1 -1
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +21 -1
- package/dist/auth/session_queries.d.ts +2 -1
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +2 -1
- package/dist/auth/signup_routes.d.ts +2 -1
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +14 -13
- package/dist/auth/standard_rpc_actions.d.ts +1 -1
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/token_scope.d.ts +19 -46
- package/dist/auth/token_scope.d.ts.map +1 -1
- package/dist/auth/token_scope.js +23 -41
- package/dist/db/CLAUDE.md +18 -6
- package/dist/db/cell_ddl.d.ts +5 -134
- package/dist/db/cell_ddl.d.ts.map +1 -1
- package/dist/db/cell_ddl.js +28 -17
- package/dist/db/cell_field_queries.d.ts +0 -13
- package/dist/db/cell_field_queries.d.ts.map +1 -1
- package/dist/db/cell_field_queries.js +0 -16
- package/dist/db/cell_grant_queries.d.ts +10 -5
- package/dist/db/cell_grant_queries.d.ts.map +1 -1
- package/dist/db/cell_grant_queries.js +13 -7
- package/dist/db/cell_item_queries.d.ts +0 -7
- package/dist/db/cell_item_queries.d.ts.map +1 -1
- package/dist/db/cell_item_queries.js +0 -10
- package/dist/db/cell_queries.d.ts +65 -55
- package/dist/db/cell_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.js +85 -62
- package/dist/db/cell_view_sql.d.ts +1 -6
- package/dist/db/cell_view_sql.d.ts.map +1 -1
- package/dist/db/cell_view_sql.js +1 -2
- package/dist/db/fact_ddl.d.ts +5 -30
- package/dist/db/fact_ddl.d.ts.map +1 -1
- package/dist/db/fact_ddl.js +14 -13
- package/dist/db/fact_store.d.ts +11 -0
- package/dist/db/fact_store.d.ts.map +1 -1
- package/dist/db/fact_store.js +4 -1
- package/dist/db/migrate.d.ts +44 -6
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +63 -4
- package/dist/dev/setup.d.ts +18 -14
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +42 -39
- package/dist/env/dotenv.d.ts +2 -2
- package/dist/env/dotenv.js +2 -2
- package/dist/env/update_env_variable.d.ts +33 -21
- package/dist/env/update_env_variable.d.ts.map +1 -1
- package/dist/env/update_env_variable.js +54 -35
- package/dist/hono_context.d.ts +15 -90
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +9 -56
- package/dist/http/CLAUDE.md +35 -20
- package/dist/http/auth_shape.d.ts +1 -8
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +6 -12
- package/dist/http/body_limit.d.ts +3 -1
- package/dist/http/body_limit.d.ts.map +1 -1
- package/dist/http/body_limit.js +6 -1
- package/dist/http/common_routes.d.ts.map +1 -1
- package/dist/http/common_routes.js +3 -2
- package/dist/http/db_routes.d.ts +3 -3
- package/dist/http/db_routes.js +3 -3
- package/dist/http/error_schemas.d.ts +1 -2
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +1 -2
- package/dist/http/health_schema.d.ts +16 -0
- package/dist/http/health_schema.d.ts.map +1 -0
- package/dist/http/health_schema.js +12 -0
- package/dist/http/jsonrpc.d.ts +9 -0
- package/dist/http/jsonrpc.d.ts.map +1 -1
- package/dist/http/jsonrpc.js +17 -0
- package/dist/http/jsonrpc_errors.d.ts +22 -2
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +70 -23
- package/dist/http/jsonrpc_helpers.d.ts +60 -17
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +67 -25
- package/dist/http/origin.d.ts +30 -1
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/origin.js +46 -9
- package/dist/http/origin_wildcard.d.ts +97 -0
- package/dist/http/origin_wildcard.d.ts.map +1 -0
- package/dist/http/origin_wildcard.js +142 -0
- package/dist/http/pending_effects.d.ts +28 -0
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/pending_effects.js +32 -1
- package/dist/http/proxy.d.ts +4 -2
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +7 -2
- package/dist/http/route_spec.d.ts +4 -3
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +54 -45
- package/dist/http/surface.d.ts +4 -2
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +7 -4
- package/dist/http/surface_query.d.ts +9 -50
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +48 -94
- package/dist/realtime/audit_log_sse.d.ts +180 -0
- package/dist/realtime/audit_log_sse.d.ts.map +1 -0
- package/dist/realtime/audit_log_sse.js +154 -0
- package/dist/realtime/sse.d.ts +21 -6
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +33 -10
- package/dist/realtime/sse_constants.d.ts +29 -2
- package/dist/realtime/sse_constants.d.ts.map +1 -1
- package/dist/realtime/sse_constants.js +35 -2
- package/dist/realtime/{subscriber_registry.d.ts → sse_registry.d.ts} +12 -12
- package/dist/realtime/sse_registry.d.ts.map +1 -0
- package/dist/realtime/{subscriber_registry.js → sse_registry.js} +4 -4
- package/dist/schema_meta.d.ts +52 -1
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/schema_meta.js +123 -6
- package/dist/sensitivity.d.ts +9 -3
- package/dist/sensitivity.d.ts.map +1 -1
- package/dist/sensitivity.js +3 -2
- package/dist/server/app_backend.d.ts +8 -5
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +6 -12
- package/dist/server/app_server.d.ts +73 -54
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +115 -78
- package/dist/server/app_server_context.d.ts +1 -1
- package/dist/server/app_server_context.d.ts.map +1 -1
- package/dist/server/env.d.ts +24 -20
- package/dist/server/env.d.ts.map +1 -1
- package/dist/server/env.js +24 -34
- package/dist/server/serve_fact_route.d.ts +12 -16
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +59 -34
- package/dist/server/static.d.ts.map +1 -1
- package/dist/server/static.js +2 -2
- package/dist/testing/CLAUDE.md +213 -179
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +10 -19
- package/dist/testing/adversarial_headers.d.ts.map +1 -1
- package/dist/testing/adversarial_headers.js +8 -0
- package/dist/testing/app_server.d.ts +9 -75
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +31 -112
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +3 -4
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +4 -5
- package/dist/testing/auth_apps.d.ts +3 -3
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +9 -6
- package/dist/testing/connection_closer_helpers.d.ts +8 -16
- package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
- package/dist/testing/connection_closer_helpers.js +7 -20
- package/dist/testing/cross_backend/action_manifest.d.ts +15 -4
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +13 -3
- package/dist/testing/cross_backend/action_manifest_parity.d.ts +15 -7
- package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest_parity.js +8 -1
- package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_lookup.js +27 -0
- package/dist/testing/cross_backend/body_size.d.ts.map +1 -1
- package/dist/testing/cross_backend/body_size.js +25 -22
- package/dist/testing/cross_backend/build_test_backend_paths.d.ts +22 -3
- package/dist/testing/cross_backend/build_test_backend_paths.d.ts.map +1 -1
- package/dist/testing/cross_backend/build_test_backend_paths.js +34 -11
- package/dist/testing/cross_backend/capabilities.d.ts +15 -8
- package/dist/testing/cross_backend/capabilities.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.js +109 -13
- package/dist/testing/cross_backend/cell_grant_role.js +2 -2
- package/dist/testing/cross_backend/cell_grant_steward.d.ts +4 -0
- package/dist/testing/cross_backend/cell_grant_steward.d.ts.map +1 -0
- package/dist/testing/cross_backend/cell_grant_steward.js +120 -0
- package/dist/testing/cross_backend/cell_moderate.d.ts +7 -1
- package/dist/testing/cross_backend/cell_moderate.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_moderate.js +68 -4
- package/dist/testing/cross_backend/cell_ref_admission.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_ref_admission.js +18 -9
- package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_relations.js +21 -0
- package/dist/testing/cross_backend/conformance_table.d.ts +6 -1
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +12 -10
- package/dist/testing/cross_backend/default_backend_configs.d.ts +18 -4
- package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_backend_configs.js +29 -9
- package/dist/testing/cross_backend/default_spine_surface.d.ts +7 -7
- package/dist/testing/cross_backend/default_spine_surface.js +2 -2
- package/dist/testing/cross_backend/differential.d.ts +7 -0
- package/dist/testing/cross_backend/differential.d.ts.map +1 -1
- package/dist/testing/cross_backend/differential.js +17 -0
- package/dist/testing/cross_backend/expected_schema.json +1 -0
- package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
- package/dist/testing/cross_backend/fact_serving.js +48 -0
- package/dist/testing/cross_backend/full_spine_mount.d.ts +3 -4
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +13 -5
- package/dist/testing/cross_backend/origin_scope.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin_scope.js +5 -13
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +29 -4
- package/dist/testing/cross_backend/postgres_database.d.ts +32 -0
- package/dist/testing/cross_backend/postgres_database.d.ts.map +1 -1
- package/dist/testing/cross_backend/postgres_database.js +56 -1
- package/dist/testing/cross_backend/query_shape.d.ts.map +1 -1
- package/dist/testing/cross_backend/query_shape.js +18 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_lifecycle.js +96 -2
- package/dist/testing/cross_backend/rpc_success_fixtures.js +2 -2
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts +1 -1
- package/dist/testing/cross_backend/rust_spine_consumer_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts +17 -5
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/rust_spine_stub_backend_config.js +5 -4
- package/dist/testing/cross_backend/session_cap.d.ts +8 -0
- package/dist/testing/cross_backend/session_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/session_cap.js +66 -2
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +5 -4
- package/dist/testing/cross_backend/spine_suites.d.ts +4 -1
- package/dist/testing/cross_backend/spine_suites.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_suites.js +21 -0
- package/dist/testing/cross_backend/spine_surface_constants.d.ts +22 -7
- package/dist/testing/cross_backend/spine_surface_constants.d.ts.map +1 -1
- package/dist/testing/cross_backend/spine_surface_constants.js +22 -7
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +4 -3
- package/dist/testing/cross_backend/standard.d.ts +6 -12
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts +18 -19
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts.map +1 -1
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.js +66 -42
- package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.d.ts +8 -0
- package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.d.ts.map +1 -0
- package/dist/testing/cross_backend/test_cell_grant_steward_revoke_authorize.js +22 -0
- package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_backdoor.js +4 -6
- package/dist/testing/cross_backend/testing_origin_check.d.ts +1 -1
- package/dist/testing/cross_backend/testing_origin_check.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_origin_check.js +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.d.ts +10 -5
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +7 -6
- package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_bun.js +5 -4
- package/dist/testing/cross_backend/testing_server_core.d.ts +6 -7
- package/dist/testing/cross_backend/testing_server_core.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_core.js +1 -1
- package/dist/testing/cross_backend/testing_server_node.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_node.js +13 -2
- package/dist/testing/cross_backend/token_lifetime.d.ts.map +1 -1
- package/dist/testing/cross_backend/token_lifetime.js +68 -0
- package/dist/testing/cross_backend/transport_composition.d.ts +1 -1
- package/dist/testing/cross_backend/transport_composition.d.ts.map +1 -1
- package/dist/testing/cross_backend/transport_composition.js +48 -6
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts +16 -2
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/ts_spine_backend_config.js +11 -8
- package/dist/testing/cross_backend/ws_action_rate_limit.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_action_rate_limit.js +30 -12
- package/dist/testing/cross_backend/ws_connection_cap.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_connection_cap.js +5 -7
- package/dist/testing/cross_backend/ws_endpoint.d.ts +2 -3
- package/dist/testing/cross_backend/ws_endpoint.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_envelope.d.ts +17 -0
- package/dist/testing/cross_backend/ws_envelope.d.ts.map +1 -0
- package/dist/testing/cross_backend/ws_envelope.js +172 -0
- package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts +16 -0
- package/dist/testing/cross_backend/ws_inbound_dispatch.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_inbound_dispatch.js +8 -4
- package/dist/testing/cross_backend/ws_outbound_overflow.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_outbound_overflow.js +5 -8
- package/dist/testing/cross_backend/ws_role_gated.js +2 -2
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +6 -4
- package/dist/{cli/daemon.d.ts → testing/daemon_info.d.ts} +15 -47
- package/dist/testing/daemon_info.d.ts.map +1 -0
- package/dist/testing/daemon_info.js +108 -0
- package/dist/testing/daemon_token_rotation.js +1 -1
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +3 -4
- package/dist/testing/db.js +2 -2
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +35 -65
- package/dist/testing/integration_helpers.d.ts +0 -15
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +2 -42
- package/dist/testing/middleware.d.ts +20 -12
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +49 -40
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +13 -22
- package/dist/testing/resolved_auth.d.ts +30 -0
- package/dist/testing/resolved_auth.d.ts.map +1 -0
- package/dist/testing/resolved_auth.js +41 -0
- package/dist/testing/rpc_envelope_cases.d.ts.map +1 -1
- package/dist/testing/rpc_envelope_cases.js +3 -0
- package/dist/testing/rpc_helpers.d.ts +1 -1
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +2 -1
- package/dist/testing/sse_round_trip.d.ts +5 -4
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +2 -2
- package/dist/testing/stubs.d.ts +2 -2
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +24 -21
- package/dist/testing/test_origin.d.ts +25 -0
- package/dist/testing/test_origin.d.ts.map +1 -0
- package/dist/testing/test_origin.js +28 -0
- package/dist/testing/transports/raw_http.d.ts +54 -0
- package/dist/testing/transports/raw_http.d.ts.map +1 -1
- package/dist/testing/transports/raw_http.js +58 -0
- package/dist/testing/transports/ws_raw_client.d.ts +8 -0
- package/dist/testing/transports/ws_raw_client.d.ts.map +1 -1
- package/dist/testing/transports/ws_raw_client.js +13 -0
- package/dist/testing/transports/ws_transport.d.ts +15 -2
- package/dist/testing/transports/ws_transport.d.ts.map +1 -1
- package/dist/testing/transports/ws_transport.js +4 -2
- package/dist/testing/ws_round_trip.d.ts +27 -25
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +34 -26
- package/dist/ui/AccountSessions.svelte +48 -19
- package/dist/ui/AccountSessions.svelte.d.ts +2 -17
- package/dist/ui/AccountSessions.svelte.d.ts.map +1 -1
- package/dist/ui/AdminAccounts.svelte +6 -1
- package/dist/ui/AdminAuditLog.svelte +61 -22
- package/dist/ui/AdminAuditLog.svelte.d.ts.map +1 -1
- package/dist/ui/AdminInvites.svelte +1 -1
- package/dist/ui/AdminOverview.svelte +76 -37
- package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
- package/dist/ui/AdminRoleGrantHistory.svelte +6 -1
- package/dist/ui/AdminSessions.svelte +1 -1
- package/dist/ui/AppShell.svelte +3 -2
- package/dist/ui/AppShell.svelte.d.ts +3 -2
- package/dist/ui/AppShell.svelte.d.ts.map +1 -1
- package/dist/ui/CLAUDE.md +121 -35
- package/dist/ui/Datatable.svelte +33 -18
- package/dist/ui/Datatable.svelte.d.ts +2 -14
- package/dist/ui/Datatable.svelte.d.ts.map +1 -1
- package/dist/ui/OpenSignupToggle.svelte +10 -1
- package/dist/ui/OpenSignupToggle.svelte.d.ts.map +1 -1
- package/dist/ui/PopoverButton.svelte +13 -8
- package/dist/ui/PopoverButton.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferForm.svelte +3 -2
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts +3 -2
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferHistory.svelte +3 -3
- package/dist/ui/RoleGrantOfferInbox.svelte +19 -15
- package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -1
- package/dist/ui/SurfaceExplorer.svelte +66 -27
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.d.ts +7 -14
- package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts +14 -9
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +6 -4
- package/dist/ui/admin_invites_state.svelte.d.ts +2 -2
- package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.d.ts +9 -9
- package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.js +9 -9
- package/dist/ui/app_settings_state.svelte.d.ts +2 -2
- package/dist/ui/app_settings_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.d.ts +70 -13
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +239 -47
- package/dist/ui/backend_probe.svelte.d.ts +93 -0
- package/dist/ui/backend_probe.svelte.d.ts.map +1 -0
- package/dist/ui/backend_probe.svelte.js +140 -0
- package/dist/ui/format_scope.d.ts +7 -7
- package/dist/ui/format_scope.d.ts.map +1 -1
- package/dist/ui/format_scope.js +4 -4
- package/dist/ui/keyed_async_slot.svelte.d.ts +2 -2
- package/dist/ui/keyed_async_slot.svelte.js +2 -2
- package/dist/ui/popover.svelte.d.ts +18 -19
- package/dist/ui/popover.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.js +103 -16
- package/dist/ui/role_grant_offers_state.svelte.d.ts +41 -46
- package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -1
- package/dist/ui/role_grant_offers_state.svelte.js +37 -19
- package/dist/ui/ui_format.d.ts +17 -0
- package/dist/ui/ui_format.d.ts.map +1 -1
- package/dist/ui/ui_format.js +20 -0
- package/package.json +2 -1
- package/dist/actions/register_ws_endpoint.d.ts +0 -79
- package/dist/actions/register_ws_endpoint.d.ts.map +0 -1
- package/dist/actions/register_ws_endpoint.js +0 -109
- package/dist/actions/transports_ws_auth_guard.d.ts +0 -94
- package/dist/actions/transports_ws_auth_guard.d.ts.map +0 -1
- package/dist/actions/transports_ws_auth_guard.js +0 -138
- package/dist/actions/transports_ws_backend.d.ts.map +0 -1
- package/dist/cli/args.d.ts +0 -55
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js +0 -100
- package/dist/cli/config.d.ts +0 -47
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.js +0 -77
- package/dist/cli/daemon.d.ts.map +0 -1
- package/dist/cli/daemon.js +0 -181
- package/dist/cli/help.d.ts +0 -124
- package/dist/cli/help.d.ts.map +0 -1
- package/dist/cli/help.js +0 -215
- package/dist/cli/logger.d.ts +0 -46
- package/dist/cli/logger.d.ts.map +0 -1
- package/dist/cli/logger.js +0 -48
- package/dist/cli/util.d.ts +0 -36
- package/dist/cli/util.d.ts.map +0 -1
- package/dist/cli/util.js +0 -50
- package/dist/realtime/sse_auth_guard.d.ts +0 -197
- package/dist/realtime/sse_auth_guard.d.ts.map +0 -1
- package/dist/realtime/sse_auth_guard.js +0 -238
- package/dist/realtime/subscriber_registry.d.ts.map +0 -1
- package/dist/testing/bootstrap_success.d.ts +0 -29
- package/dist/testing/bootstrap_success.d.ts.map +0 -1
- package/dist/testing/bootstrap_success.js +0 -144
- package/dist/testing/mock_fs.d.ts +0 -20
- package/dist/testing/mock_fs.d.ts.map +0 -1
- package/dist/testing/mock_fs.js +0 -28
- package/dist/testing/standard.d.ts +0 -122
- package/dist/testing/standard.d.ts.map +0 -1
- package/dist/testing/standard.js +0 -73
- package/dist/testing/testing_rate_limiter.d.ts +0 -65
- package/dist/testing/testing_rate_limiter.d.ts.map +0 -1
- package/dist/testing/testing_rate_limiter.js +0 -80
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { DEV } from 'esm-env';
|
|
11
|
-
import { JSONRPC_VERSION } from './jsonrpc.js';
|
|
12
|
-
import {
|
|
11
|
+
import { JsonrpcRequest, JSONRPC_VERSION } from './jsonrpc.js';
|
|
12
|
+
import { JSONRPC_ERROR_CODES, dev_only, jsonrpc_error_messages, to_thrown_jsonrpc_error } from './jsonrpc_errors.js';
|
|
13
13
|
// --- Message builders ---
|
|
14
14
|
/** Creates a JSON-RPC request message. */
|
|
15
15
|
export const create_jsonrpc_request = (method, params, id) => {
|
|
@@ -48,17 +48,21 @@ export const create_jsonrpc_error_response = (id, error) => ({
|
|
|
48
48
|
});
|
|
49
49
|
/**
|
|
50
50
|
* Creates a JSON-RPC error response from any error.
|
|
51
|
-
* Handles `ThrownJsonrpcError`
|
|
52
|
-
*
|
|
51
|
+
* Handles a thrown JSON-RPC error — a `ThrownJsonrpcError` from any copy of
|
|
52
|
+
* fuz_app, recognized by its brand (`to_thrown_jsonrpc_error`) — by
|
|
53
|
+
* preserving its code/message/data, and maps any other `Error`, a foreign
|
|
54
|
+
* class carrying a JSON-RPC `code` included, to internal_error, with its
|
|
55
|
+
* message and stack in DEV.
|
|
53
56
|
*/
|
|
54
57
|
export const create_jsonrpc_error_response_from_thrown = (id, error) => {
|
|
55
58
|
let code = JSONRPC_ERROR_CODES.internal_error;
|
|
56
59
|
let message = 'internal server error';
|
|
57
60
|
let data = undefined;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
const thrown = to_thrown_jsonrpc_error(error);
|
|
62
|
+
if (thrown) {
|
|
63
|
+
code = thrown.code;
|
|
64
|
+
message = thrown.message;
|
|
65
|
+
data = thrown.data;
|
|
62
66
|
}
|
|
63
67
|
else if (error instanceof Error) {
|
|
64
68
|
if (DEV) {
|
|
@@ -87,10 +91,6 @@ export const is_jsonrpc_object = (message) => typeof message === 'object' &&
|
|
|
87
91
|
message !== null &&
|
|
88
92
|
!Array.isArray(message) &&
|
|
89
93
|
message.jsonrpc === JSONRPC_VERSION;
|
|
90
|
-
/** Checks if a value is any valid JSON-RPC message or batch array. */
|
|
91
|
-
export const is_jsonrpc_message = (message) => Array.isArray(message)
|
|
92
|
-
? message.length > 0 && message.every((m) => is_jsonrpc_object(m))
|
|
93
|
-
: is_jsonrpc_object(message);
|
|
94
94
|
/** Checks if a value is a JSON-RPC request (has method + id). */
|
|
95
95
|
export const is_jsonrpc_request = (message) => is_jsonrpc_object(message) && 'method' in message && 'id' in message;
|
|
96
96
|
/** Checks if a value is a JSON-RPC notification (has method, no id). */
|
|
@@ -110,19 +110,6 @@ export const to_jsonrpc_message_id = (message_or_id) => {
|
|
|
110
110
|
const maybe_id = typeof message_or_id === 'object' ? message_or_id.id : message_or_id;
|
|
111
111
|
return is_jsonrpc_request_id(maybe_id) ? maybe_id : null;
|
|
112
112
|
};
|
|
113
|
-
/**
|
|
114
|
-
* The id an error response to a rejected envelope can echo: the frame's
|
|
115
|
-
* `id` when the frame is an object carrying a valid one, else `null`.
|
|
116
|
-
*
|
|
117
|
-
* Unlike `to_jsonrpc_message_id`, a scalar frame (`5`, `"x"`) is never read
|
|
118
|
-
* as its own id — a non-object body has no id to echo, which is the Rust
|
|
119
|
-
* twin's `classify` answer too. Both transports use this for the
|
|
120
|
-
* `invalid_request` reply.
|
|
121
|
-
*
|
|
122
|
-
* @param frame - the parsed body, of any shape
|
|
123
|
-
* @returns the echoable id, or `null`
|
|
124
|
-
*/
|
|
125
|
-
export const to_jsonrpc_envelope_id = (frame) => typeof frame === 'object' ? to_jsonrpc_message_id(frame) : null;
|
|
126
113
|
/**
|
|
127
114
|
* Normalizes input to JSON-RPC params format.
|
|
128
115
|
* Returns `undefined` for null/undefined, wraps primitives in `{value}`.
|
|
@@ -136,3 +123,58 @@ export const to_jsonrpc_params = (input) => {
|
|
|
136
123
|
}
|
|
137
124
|
return { value: input };
|
|
138
125
|
};
|
|
126
|
+
/**
|
|
127
|
+
* Classify a parsed JSON value as a JSON-RPC message, in the Rust twin's
|
|
128
|
+
* order: version, then the `method` axis (none, or a non-string one: a
|
|
129
|
+
* response or invalid), then `id` (none: a notification), then the request
|
|
130
|
+
* envelope (`JsonrpcRequest` — string or number `id`, `params` absent or an
|
|
131
|
+
* object).
|
|
132
|
+
*
|
|
133
|
+
* The `method` axis is string-typed like the twin, whose
|
|
134
|
+
* `obj.get("method").and_then(Value::as_str)` reads a present non-string
|
|
135
|
+
* `method` as absent — so `{id, method: 123, result}` is a response on both
|
|
136
|
+
* sides. The `result` / `error` exclusive-or refuses a frame carrying both.
|
|
137
|
+
*
|
|
138
|
+
* Every `invalid` is `invalid_request`. Its `id` is the frame's own when the
|
|
139
|
+
* frame is an object carrying a string or number one, else `null` — a
|
|
140
|
+
* non-object frame (an array included) has none. A refused request envelope
|
|
141
|
+
* carries the schema's issues in DEV, as `data.issues`; nothing else carries
|
|
142
|
+
* data.
|
|
143
|
+
*
|
|
144
|
+
* @param json - the parsed frame or body, of any shape
|
|
145
|
+
* @returns the classification
|
|
146
|
+
*/
|
|
147
|
+
export const classify_jsonrpc_message = (json) => {
|
|
148
|
+
// an array falls through to the version check, with no `id` to echo
|
|
149
|
+
if (typeof json !== 'object' || json === null) {
|
|
150
|
+
return { kind: 'invalid', id: null, error: jsonrpc_error_messages.invalid_request() };
|
|
151
|
+
}
|
|
152
|
+
const frame = json;
|
|
153
|
+
const id = to_jsonrpc_message_id(frame);
|
|
154
|
+
if (frame.jsonrpc !== JSONRPC_VERSION) {
|
|
155
|
+
return { kind: 'invalid', id, error: jsonrpc_error_messages.invalid_request() };
|
|
156
|
+
}
|
|
157
|
+
const { method } = frame;
|
|
158
|
+
if (typeof method !== 'string') {
|
|
159
|
+
if (id !== null && 'result' in frame !== 'error' in frame) {
|
|
160
|
+
return { kind: 'response', response: frame };
|
|
161
|
+
}
|
|
162
|
+
// a non-string `method` beside an `id` is a malformed request — the
|
|
163
|
+
// envelope schema below refuses it with its issues
|
|
164
|
+
if (!('method' in frame && 'id' in frame)) {
|
|
165
|
+
return { kind: 'invalid', id, error: jsonrpc_error_messages.invalid_request() };
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else if (!('id' in frame)) {
|
|
169
|
+
return { kind: 'notification', method, params: frame.params };
|
|
170
|
+
}
|
|
171
|
+
const parsed = JsonrpcRequest.safeParse(frame);
|
|
172
|
+
if (!parsed.success) {
|
|
173
|
+
return {
|
|
174
|
+
kind: 'invalid',
|
|
175
|
+
id,
|
|
176
|
+
error: jsonrpc_error_messages.invalid_request(dev_only({ issues: parsed.error.issues }))
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return { kind: 'request', request: parsed.data };
|
|
180
|
+
};
|
package/dist/http/origin.d.ts
CHANGED
|
@@ -129,13 +129,42 @@ export declare const format_allowed_origins_error: (error: AllowedOriginsError)
|
|
|
129
129
|
* entry is reported, not just the first.
|
|
130
130
|
*
|
|
131
131
|
* @param raw - the comma-separated allowlist value
|
|
132
|
-
* @returns the matchers
|
|
132
|
+
* @returns the matchers and the patterns they were parsed from, or every refusal —
|
|
133
|
+
* `no_origins` when the value is blank
|
|
133
134
|
*/
|
|
134
135
|
export declare const parse_allowed_origins: (raw: string) => Result<{
|
|
135
136
|
origins: Array<RegExp>;
|
|
137
|
+
patterns: Array<OriginPattern>;
|
|
136
138
|
}, {
|
|
137
139
|
errors: Array<AllowedOriginsError>;
|
|
138
140
|
}>;
|
|
141
|
+
/**
|
|
142
|
+
* One validated allowlist entry, as `parse_allowed_origins` parsed it — the
|
|
143
|
+
* twin of the Rust `fuz_http::OriginPattern`.
|
|
144
|
+
*/
|
|
145
|
+
export interface OriginPattern {
|
|
146
|
+
/** The entry as written (trimmed). */
|
|
147
|
+
readonly entry: string;
|
|
148
|
+
/** The matcher `should_allow_origin` tests. */
|
|
149
|
+
readonly regexp: RegExp;
|
|
150
|
+
/**
|
|
151
|
+
* The host as parsed, lowercased: `.`-joined labels (a `*` label as `*`), or
|
|
152
|
+
* a bracketed IPv6 literal.
|
|
153
|
+
*/
|
|
154
|
+
readonly host: string;
|
|
155
|
+
/** The host's labels, lowercased; `null` for a bracketed IPv6 host, which is exact. */
|
|
156
|
+
readonly host_labels: ReadonlyArray<string> | null;
|
|
157
|
+
/** No port, `:*` (any port, or none), or one exact port. */
|
|
158
|
+
readonly port: 'absent' | 'any' | 'exact';
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The pattern `regexp` was parsed from, when `parse_allowed_origins` (of any
|
|
162
|
+
* fuz_app copy) built it.
|
|
163
|
+
*
|
|
164
|
+
* @param regexp - a matcher from an allowlist
|
|
165
|
+
* @returns its `OriginPattern`, or `undefined` for a matcher built another way
|
|
166
|
+
*/
|
|
167
|
+
export declare const origin_pattern_of: (regexp: RegExp) => OriginPattern | undefined;
|
|
139
168
|
/**
|
|
140
169
|
* Tests if an `Origin` value matches any of the allowed patterns.
|
|
141
170
|
* Pattern matching is case-insensitive (web hosts and schemes are). A value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"origin.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/origin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC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B,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACnD,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;CAC1C;AAWD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM,KAAG,aAAa,GAAG,SAGlE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC/B,QAAQ,MAAM,EACd,kBAAkB,aAAa,CAAC,MAAM,CAAC,KACrC,OAAqF,CAAC;AAEzF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,qBAAqB,GAEhC,kBAAkB,aAAa,CAAC,MAAM,CAAC,EACvC,aAAY,aAAa,CAAC,kBAAkB,CAAM,KAChD,OAaF,CAAC"}
|
package/dist/http/origin.js
CHANGED
|
@@ -142,25 +142,50 @@ const trim_ascii_whitespace = (value) => value.replace(ASCII_WHITESPACE_EDGES, '
|
|
|
142
142
|
* entry is reported, not just the first.
|
|
143
143
|
*
|
|
144
144
|
* @param raw - the comma-separated allowlist value
|
|
145
|
-
* @returns the matchers
|
|
145
|
+
* @returns the matchers and the patterns they were parsed from, or every refusal —
|
|
146
|
+
* `no_origins` when the value is blank
|
|
146
147
|
*/
|
|
147
148
|
export const parse_allowed_origins = (raw) => {
|
|
148
149
|
if (trim_ascii_whitespace(raw) === '') {
|
|
149
150
|
return { ok: false, errors: [{ kind: 'no_origins' }] };
|
|
150
151
|
}
|
|
151
|
-
const
|
|
152
|
+
const patterns = [];
|
|
152
153
|
const errors = [];
|
|
153
154
|
raw.split(',').forEach((part, i) => {
|
|
154
155
|
const entry = trim_ascii_whitespace(part);
|
|
155
|
-
const parsed =
|
|
156
|
+
const parsed = parse_origin_pattern(entry);
|
|
156
157
|
if (typeof parsed === 'string') {
|
|
157
158
|
errors.push({ kind: parsed, index: i + 1, entry });
|
|
158
159
|
}
|
|
159
160
|
else {
|
|
160
|
-
|
|
161
|
+
patterns.push(parsed);
|
|
161
162
|
}
|
|
162
163
|
});
|
|
163
|
-
|
|
164
|
+
if (errors.length > 0)
|
|
165
|
+
return { ok: false, errors };
|
|
166
|
+
for (const pattern of patterns) {
|
|
167
|
+
Object.defineProperty(pattern.regexp, ORIGIN_PATTERN_BRAND, { value: pattern });
|
|
168
|
+
}
|
|
169
|
+
return { ok: true, origins: patterns.map((p) => p.regexp), patterns };
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Realm-global brand on each matcher `parse_allowed_origins` returns, holding
|
|
173
|
+
* the `OriginPattern` it was parsed from (a non-enumerable property).
|
|
174
|
+
* `Symbol.for` makes every copy of this module that one process resolves mint
|
|
175
|
+
* the same key, so `origin_pattern_of` reads a matcher parsed by any copy of
|
|
176
|
+
* fuz_app. A matcher built any other way has none.
|
|
177
|
+
*/
|
|
178
|
+
const ORIGIN_PATTERN_BRAND = Symbol.for('@fuzdev/fuz_app/OriginPattern');
|
|
179
|
+
/**
|
|
180
|
+
* The pattern `regexp` was parsed from, when `parse_allowed_origins` (of any
|
|
181
|
+
* fuz_app copy) built it.
|
|
182
|
+
*
|
|
183
|
+
* @param regexp - a matcher from an allowlist
|
|
184
|
+
* @returns its `OriginPattern`, or `undefined` for a matcher built another way
|
|
185
|
+
*/
|
|
186
|
+
export const origin_pattern_of = (regexp) => {
|
|
187
|
+
const pattern = regexp[ORIGIN_PATTERN_BRAND];
|
|
188
|
+
return typeof pattern === 'object' && pattern !== null ? pattern : undefined;
|
|
164
189
|
};
|
|
165
190
|
/**
|
|
166
191
|
* Tests if an `Origin` value matches any of the allowed patterns.
|
|
@@ -210,15 +235,15 @@ export const verify_request_source = (allowed_patterns, carve_outs = []) => (c,
|
|
|
210
235
|
return next();
|
|
211
236
|
};
|
|
212
237
|
/**
|
|
213
|
-
* Validates one trimmed entry and
|
|
214
|
-
* refusal. The checks run in a fixed order and the first that fails names the
|
|
238
|
+
* Validates one trimmed entry and parses it — its matcher and its shape — or
|
|
239
|
+
* names its refusal. The checks run in a fixed order and the first that fails names the
|
|
215
240
|
* kind — the Rust spine runs the same order, so both name the same kind.
|
|
216
241
|
*
|
|
217
242
|
* The compiled regex is `^scheme://host(:port)?$`, case-insensitive: an exact
|
|
218
243
|
* label matches itself, a `*` label `[^./:]+` (one non-empty label), a `:*`
|
|
219
244
|
* port `(:\d+)?`.
|
|
220
245
|
*/
|
|
221
|
-
const
|
|
246
|
+
const parse_origin_pattern = (entry) => {
|
|
222
247
|
if (entry === '')
|
|
223
248
|
return 'empty_entry';
|
|
224
249
|
if (!VISIBLE_ASCII.test(entry))
|
|
@@ -235,6 +260,8 @@ const origin_pattern_to_regexp = (entry) => {
|
|
|
235
260
|
if (authority.includes('@'))
|
|
236
261
|
return 'has_userinfo';
|
|
237
262
|
let host_source;
|
|
263
|
+
let host_text;
|
|
264
|
+
let host_labels;
|
|
238
265
|
let port;
|
|
239
266
|
if (authority.startsWith('[')) {
|
|
240
267
|
const end = authority.indexOf(']');
|
|
@@ -254,6 +281,8 @@ const origin_pattern_to_regexp = (entry) => {
|
|
|
254
281
|
return 'invalid_after_ipv6';
|
|
255
282
|
}
|
|
256
283
|
host_source = escape_regexp(authority.slice(0, end + 1));
|
|
284
|
+
host_text = authority.slice(0, end + 1).toLowerCase();
|
|
285
|
+
host_labels = null;
|
|
257
286
|
}
|
|
258
287
|
else {
|
|
259
288
|
const colon = authority.lastIndexOf(':');
|
|
@@ -273,6 +302,8 @@ const origin_pattern_to_regexp = (entry) => {
|
|
|
273
302
|
host_source = labels
|
|
274
303
|
.map((label) => (label === '*' ? '[^./:]+' : escape_regexp(label)))
|
|
275
304
|
.join('\\.');
|
|
305
|
+
host_labels = labels.map((label) => label.toLowerCase());
|
|
306
|
+
host_text = host_labels.join('.');
|
|
276
307
|
}
|
|
277
308
|
let port_source = '';
|
|
278
309
|
if (port === '*') {
|
|
@@ -285,7 +316,13 @@ const origin_pattern_to_regexp = (entry) => {
|
|
|
285
316
|
return 'default_port';
|
|
286
317
|
port_source = ':' + port;
|
|
287
318
|
}
|
|
288
|
-
return
|
|
319
|
+
return {
|
|
320
|
+
entry,
|
|
321
|
+
regexp: new RegExp('^' + escape_regexp(scheme + '://') + host_source + port_source + '$', 'i'),
|
|
322
|
+
host: host_text,
|
|
323
|
+
host_labels,
|
|
324
|
+
port: port === null ? 'absent' : port === '*' ? 'any' : 'exact'
|
|
325
|
+
};
|
|
289
326
|
};
|
|
290
327
|
/**
|
|
291
328
|
* True when `inner` (a bracketed host without its brackets) is an IPv6 address
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wildcard allowlist entries — refused at server assembly unless the operator
|
|
3
|
+
* opts in (`FUZ_ALLOW_ORIGIN_WILDCARDS=true`), and said aloud on every boot
|
|
4
|
+
* that admits them. Twin of the Rust `fuz_http::origin_wildcard`, word for
|
|
5
|
+
* word.
|
|
6
|
+
*
|
|
7
|
+
* Wildcards are origin syntax an operator may want, but each one admits pages
|
|
8
|
+
* the server does not serve, and the server trusts them all. The forms, as
|
|
9
|
+
* `parse_allowed_origins` matches them (`OriginWildcard`):
|
|
10
|
+
*
|
|
11
|
+
* - **port** (`:*`) — the host at any port, or none;
|
|
12
|
+
* - **host** — each `*` label is any one label, in any position
|
|
13
|
+
* (`https://*.example.com`, `https://example.*`), and a host that is all
|
|
14
|
+
* `*` labels (`http://*`, `https://*.*`) is every host with that many
|
|
15
|
+
* labels — four of them cover every IPv4 address;
|
|
16
|
+
* - **both** (`http://*:*`, `https://*.example.com:*`).
|
|
17
|
+
*
|
|
18
|
+
* A bracketed IPv6 host is exact, so it takes only the port form.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
import type { Result } from '@fuzdev/fuz_util/result.ts';
|
|
23
|
+
import { type OriginPattern } from './origin.js';
|
|
24
|
+
/** The env var the allowlist is read from (`BaseServerEnv`). */
|
|
25
|
+
export declare const ALLOWED_ORIGINS_VAR = "FUZ_ALLOWED_ORIGINS";
|
|
26
|
+
/**
|
|
27
|
+
* The env var that admits wildcard allowlist entries: exactly `true` admits
|
|
28
|
+
* them, exactly `false` (or unset) refuses them, and anything else fails the
|
|
29
|
+
* env schema (`BaseServerEnv`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const ALLOW_ORIGIN_WILDCARDS_VAR = "FUZ_ALLOW_ORIGIN_WILDCARDS";
|
|
32
|
+
/** How much of a pattern's host its `*` labels leave open. */
|
|
33
|
+
export type HostWildcard =
|
|
34
|
+
/** Some labels are fixed (`*.example.com`, `example.*`). */
|
|
35
|
+
{
|
|
36
|
+
kind: 'partial';
|
|
37
|
+
}
|
|
38
|
+
/** No label is fixed (`*`, `*.*`): every host of `labels` labels. */
|
|
39
|
+
| {
|
|
40
|
+
kind: 'whole';
|
|
41
|
+
labels: number;
|
|
42
|
+
};
|
|
43
|
+
/** The wildcards an `OriginPattern` holds — `origin_wildcard_kind`. */
|
|
44
|
+
export type OriginWildcard = {
|
|
45
|
+
kind: 'port';
|
|
46
|
+
} | {
|
|
47
|
+
kind: 'host';
|
|
48
|
+
host: HostWildcard;
|
|
49
|
+
} | {
|
|
50
|
+
kind: 'host_and_port';
|
|
51
|
+
host: HostWildcard;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Which wildcards `pattern` holds, `null` for an exact entry.
|
|
55
|
+
*
|
|
56
|
+
* @param pattern - a parsed allowlist entry
|
|
57
|
+
* @returns its wildcard shape, or `null`
|
|
58
|
+
*/
|
|
59
|
+
export declare const origin_wildcard_kind: (pattern: OriginPattern) => OriginWildcard | null;
|
|
60
|
+
/**
|
|
61
|
+
* What a wildcard in `pattern` admits — the text `admit_origin_wildcards`
|
|
62
|
+
* warns or refuses with; `null` for an exact entry. The TS spine mounts no
|
|
63
|
+
* `Host` check and adds no note, so this is the Rust text with
|
|
64
|
+
* `OriginWildcardOptions::DEFAULT`.
|
|
65
|
+
*
|
|
66
|
+
* @param pattern - a parsed allowlist entry
|
|
67
|
+
* @returns the text, or `null`
|
|
68
|
+
*/
|
|
69
|
+
export declare const origin_wildcard_warning: (pattern: OriginPattern) => string | null;
|
|
70
|
+
/** One wildcard entry an allowlist holds, with what it admits. */
|
|
71
|
+
export interface OriginWildcardEntry {
|
|
72
|
+
readonly entry: string;
|
|
73
|
+
readonly warning: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Admit `origins`' wildcard entries when `allowed`, returning what each admits
|
|
77
|
+
* for the caller to warn with; an exact list passes either way with none.
|
|
78
|
+
* Classifies the matchers `parse_allowed_origins` built (`origin_pattern_of`,
|
|
79
|
+
* read through a realm-global brand, so a second fuz_app copy's matchers
|
|
80
|
+
* classify too). A matcher built any other way can't be classified, so it is
|
|
81
|
+
* refused whatever `allowed` says — build the list with
|
|
82
|
+
* `parse_allowed_origins`.
|
|
83
|
+
*
|
|
84
|
+
* @param origins - the allowlist's matchers
|
|
85
|
+
* @param allowed - whether the operator opted in (`FUZ_ALLOW_ORIGIN_WILDCARDS=true`)
|
|
86
|
+
* @param origins_var - what the list is called in the refusal: the env var it
|
|
87
|
+
* was read from, or the option that carried it
|
|
88
|
+
* @returns the wildcard entries admitted, or the refusal — naming each
|
|
89
|
+
* unclassifiable matcher, or else each wildcard entry, what it admits, and
|
|
90
|
+
* the flag (the Rust spine's boot error, word for word)
|
|
91
|
+
*/
|
|
92
|
+
export declare const admit_origin_wildcards: (origins: ReadonlyArray<RegExp>, allowed: boolean, origins_var?: string) => Result<{
|
|
93
|
+
wildcards: Array<OriginWildcardEntry>;
|
|
94
|
+
}, {
|
|
95
|
+
message: string;
|
|
96
|
+
}>;
|
|
97
|
+
//# sourceMappingURL=origin_wildcard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"origin_wildcard.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/origin_wildcard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAqB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEpE,gEAAgE;AAChE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAEzD;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AAEvE,8DAA8D;AAC9D,MAAM,MAAM,YAAY;AACvB,4DAA4D;AAC1D;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE;AACrB,qEAAqE;GACnE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,uEAAuE;AACvE,MAAM,MAAM,cAAc,GACvB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,YAAY,CAAA;CAAE,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,aAAa,KAAG,cAAc,GAAG,IAc9E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAAI,SAAS,aAAa,KAAG,MAAM,GAAG,IAkCzE,CAAC;AAEF,kEAAkE;AAClE,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,GAClC,SAAS,aAAa,CAAC,MAAM,CAAC,EAC9B,SAAS,OAAO,EAChB,cAAa,MAA4B,KACvC,MAAM,CAAC;IAAE,SAAS,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAA;CAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CA8BvE,CAAC"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wildcard allowlist entries — refused at server assembly unless the operator
|
|
3
|
+
* opts in (`FUZ_ALLOW_ORIGIN_WILDCARDS=true`), and said aloud on every boot
|
|
4
|
+
* that admits them. Twin of the Rust `fuz_http::origin_wildcard`, word for
|
|
5
|
+
* word.
|
|
6
|
+
*
|
|
7
|
+
* Wildcards are origin syntax an operator may want, but each one admits pages
|
|
8
|
+
* the server does not serve, and the server trusts them all. The forms, as
|
|
9
|
+
* `parse_allowed_origins` matches them (`OriginWildcard`):
|
|
10
|
+
*
|
|
11
|
+
* - **port** (`:*`) — the host at any port, or none;
|
|
12
|
+
* - **host** — each `*` label is any one label, in any position
|
|
13
|
+
* (`https://*.example.com`, `https://example.*`), and a host that is all
|
|
14
|
+
* `*` labels (`http://*`, `https://*.*`) is every host with that many
|
|
15
|
+
* labels — four of them cover every IPv4 address;
|
|
16
|
+
* - **both** (`http://*:*`, `https://*.example.com:*`).
|
|
17
|
+
*
|
|
18
|
+
* A bracketed IPv6 host is exact, so it takes only the port form.
|
|
19
|
+
*
|
|
20
|
+
* @module
|
|
21
|
+
*/
|
|
22
|
+
import { origin_pattern_of } from './origin.js';
|
|
23
|
+
/** The env var the allowlist is read from (`BaseServerEnv`). */
|
|
24
|
+
export const ALLOWED_ORIGINS_VAR = 'FUZ_ALLOWED_ORIGINS';
|
|
25
|
+
/**
|
|
26
|
+
* The env var that admits wildcard allowlist entries: exactly `true` admits
|
|
27
|
+
* them, exactly `false` (or unset) refuses them, and anything else fails the
|
|
28
|
+
* env schema (`BaseServerEnv`).
|
|
29
|
+
*/
|
|
30
|
+
export const ALLOW_ORIGIN_WILDCARDS_VAR = 'FUZ_ALLOW_ORIGIN_WILDCARDS';
|
|
31
|
+
/**
|
|
32
|
+
* Which wildcards `pattern` holds, `null` for an exact entry.
|
|
33
|
+
*
|
|
34
|
+
* @param pattern - a parsed allowlist entry
|
|
35
|
+
* @returns its wildcard shape, or `null`
|
|
36
|
+
*/
|
|
37
|
+
export const origin_wildcard_kind = (pattern) => {
|
|
38
|
+
let host = null;
|
|
39
|
+
if (pattern.host_labels !== null) {
|
|
40
|
+
const any = pattern.host_labels.filter((label) => label === '*').length;
|
|
41
|
+
if (any > 0) {
|
|
42
|
+
host =
|
|
43
|
+
any < pattern.host_labels.length
|
|
44
|
+
? { kind: 'partial' }
|
|
45
|
+
: { kind: 'whole', labels: pattern.host_labels.length };
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const any_port = pattern.port === 'any';
|
|
49
|
+
if (host === null)
|
|
50
|
+
return any_port ? { kind: 'port' } : null;
|
|
51
|
+
return any_port ? { kind: 'host_and_port', host } : { kind: 'host', host };
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* What a wildcard in `pattern` admits — the text `admit_origin_wildcards`
|
|
55
|
+
* warns or refuses with; `null` for an exact entry. The TS spine mounts no
|
|
56
|
+
* `Host` check and adds no note, so this is the Rust text with
|
|
57
|
+
* `OriginWildcardOptions::DEFAULT`.
|
|
58
|
+
*
|
|
59
|
+
* @param pattern - a parsed allowlist entry
|
|
60
|
+
* @returns the text, or `null`
|
|
61
|
+
*/
|
|
62
|
+
export const origin_wildcard_warning = (pattern) => {
|
|
63
|
+
const wildcard = origin_wildcard_kind(pattern);
|
|
64
|
+
if (wildcard === null)
|
|
65
|
+
return null;
|
|
66
|
+
const { host } = pattern;
|
|
67
|
+
const kind = wildcard.kind === 'port'
|
|
68
|
+
? 'port wildcard'
|
|
69
|
+
: wildcard.kind === 'host'
|
|
70
|
+
? 'host wildcard'
|
|
71
|
+
: 'host and port wildcard';
|
|
72
|
+
const host_wildcard = wildcard.kind === 'port' ? null : wildcard.host;
|
|
73
|
+
let hosts;
|
|
74
|
+
if (host_wildcard === null) {
|
|
75
|
+
hosts = `\`${host}\``;
|
|
76
|
+
}
|
|
77
|
+
else if (host_wildcard.kind === 'partial') {
|
|
78
|
+
hosts = `ANY host matching \`${host}\` (each \`*\` is any one label)`;
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
const { labels } = host_wildcard;
|
|
82
|
+
const every = labels === 1
|
|
83
|
+
? 'every single-label name, `localhost` included'
|
|
84
|
+
: labels === 4
|
|
85
|
+
? 'every IPv4 address and every four-label hostname'
|
|
86
|
+
: `every hostname of ${labels} labels`;
|
|
87
|
+
hosts = `ANY host of that shape (no label of \`${host}\` is fixed: ${every})`;
|
|
88
|
+
}
|
|
89
|
+
const ports = pattern.port === 'any' ? 'ANY port on ' : pattern.port === 'exact' ? 'that port on ' : '';
|
|
90
|
+
return (`${kind}: a page served from ${ports}${hosts} is an allowed origin. The server trusts ` +
|
|
91
|
+
'every such page: one that is same-site with the host you log in at carries the ' +
|
|
92
|
+
'session cookie, and with it can call the API and open the WebSocket. ' +
|
|
93
|
+
'Name exact origins unless every such page is trusted');
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Admit `origins`' wildcard entries when `allowed`, returning what each admits
|
|
97
|
+
* for the caller to warn with; an exact list passes either way with none.
|
|
98
|
+
* Classifies the matchers `parse_allowed_origins` built (`origin_pattern_of`,
|
|
99
|
+
* read through a realm-global brand, so a second fuz_app copy's matchers
|
|
100
|
+
* classify too). A matcher built any other way can't be classified, so it is
|
|
101
|
+
* refused whatever `allowed` says — build the list with
|
|
102
|
+
* `parse_allowed_origins`.
|
|
103
|
+
*
|
|
104
|
+
* @param origins - the allowlist's matchers
|
|
105
|
+
* @param allowed - whether the operator opted in (`FUZ_ALLOW_ORIGIN_WILDCARDS=true`)
|
|
106
|
+
* @param origins_var - what the list is called in the refusal: the env var it
|
|
107
|
+
* was read from, or the option that carried it
|
|
108
|
+
* @returns the wildcard entries admitted, or the refusal — naming each
|
|
109
|
+
* unclassifiable matcher, or else each wildcard entry, what it admits, and
|
|
110
|
+
* the flag (the Rust spine's boot error, word for word)
|
|
111
|
+
*/
|
|
112
|
+
export const admit_origin_wildcards = (origins, allowed, origins_var = ALLOWED_ORIGINS_VAR) => {
|
|
113
|
+
const wildcards = [];
|
|
114
|
+
const unparsed = [];
|
|
115
|
+
for (const regexp of origins) {
|
|
116
|
+
const pattern = origin_pattern_of(regexp);
|
|
117
|
+
if (!pattern) {
|
|
118
|
+
unparsed.push(regexp);
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
const warning = origin_wildcard_warning(pattern);
|
|
122
|
+
if (warning)
|
|
123
|
+
wildcards.push({ entry: pattern.entry, warning });
|
|
124
|
+
}
|
|
125
|
+
if (unparsed.length > 0) {
|
|
126
|
+
const matchers = unparsed.map((r) => `\`${String(r)}\``).join(', ');
|
|
127
|
+
return {
|
|
128
|
+
ok: false,
|
|
129
|
+
message: `${origins_var} holds a matcher \`parse_allowed_origins\` did not build, ` +
|
|
130
|
+
`so its wildcards can't be checked: ${matchers}. ` +
|
|
131
|
+
'Build the list with `parse_allowed_origins`.'
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
if (wildcards.length === 0 || allowed)
|
|
135
|
+
return { ok: true, wildcards };
|
|
136
|
+
const entries = wildcards.map((w) => `\`${w.entry}\`: ${w.warning}.`).join(' ');
|
|
137
|
+
return {
|
|
138
|
+
ok: false,
|
|
139
|
+
message: `${origins_var} holds a wildcard entry, refused unless ` +
|
|
140
|
+
`${ALLOW_ORIGIN_WILDCARDS_VAR}=true. ${entries}`
|
|
141
|
+
};
|
|
142
|
+
};
|
|
@@ -40,6 +40,17 @@
|
|
|
40
40
|
* @module
|
|
41
41
|
*/
|
|
42
42
|
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
43
|
+
/**
|
|
44
|
+
* Context passed to `on_effect_error` when an eager pending effect rejects.
|
|
45
|
+
*/
|
|
46
|
+
export interface EffectErrorContext {
|
|
47
|
+
/** The transport whose request spawned the effect. */
|
|
48
|
+
transport: 'http' | 'ws';
|
|
49
|
+
/** HTTP method of the request, or the JSON-RPC method of the WS frame. */
|
|
50
|
+
method: string;
|
|
51
|
+
/** URL path of the request, or the mount path of the WS endpoint. */
|
|
52
|
+
path: string;
|
|
53
|
+
}
|
|
43
54
|
/**
|
|
44
55
|
* Minimal structural context required by `emit_after_commit` — just the
|
|
45
56
|
* deferred queue. Both `RouteContext` and `ActionContext` satisfy this.
|
|
@@ -126,4 +137,21 @@ export declare const flush_pending_effects: (effects: ReadonlyArray<Promise<void
|
|
|
126
137
|
* rejects.
|
|
127
138
|
*/
|
|
128
139
|
export declare const flush_post_commit_effects: (effects: ReadonlyArray<() => void | Promise<void>>, log: Logger) => Promise<void>;
|
|
140
|
+
/**
|
|
141
|
+
* Drain both queues of one request or WS frame — the single flush every
|
|
142
|
+
* transport runs after its handler returns.
|
|
143
|
+
*
|
|
144
|
+
* The deferred thunks are invoked before the eager writes are awaited, so a
|
|
145
|
+
* revocation's connection close never sits behind a slow audit INSERT; a thunk
|
|
146
|
+
* that needs a write awaits it itself. Eager rejections are logged and passed
|
|
147
|
+
* to `on_rejection` (the server's `on_effect_error`). The caller picks whether
|
|
148
|
+
* to await the returned promise — HTTP awaits it in test mode only, WS awaits
|
|
149
|
+
* it per frame after the reply is sent. Never rejects.
|
|
150
|
+
*
|
|
151
|
+
* @param pending_effects - the eager queue of in-flight pool writes
|
|
152
|
+
* @param post_commit_effects - the deferred thunks queued by `emit_after_commit`
|
|
153
|
+
* @param log - receives every rejection and thunk failure
|
|
154
|
+
* @param on_rejection - optional fan-out for each eager rejection
|
|
155
|
+
*/
|
|
156
|
+
export declare const flush_request_effects: (pending_effects: ReadonlyArray<Promise<void>>, post_commit_effects: ReadonlyArray<() => void | Promise<void>>, log: Logger, on_rejection?: (reason: unknown) => void) => Promise<void>;
|
|
129
157
|
//# sourceMappingURL=pending_effects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pending_effects.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/pending_effects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACtC,mBAAmB,EAAE,KAAK,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,iBAAiB,GAC7B,KAAK,sBAAsB,EAC3B,IAAI,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAC5B,IAEF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,kCAAkC,GAAU,CAAC,EACzD,qBAAqB,KAAK,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,EAClE,UAAU,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,KAC5B,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAQpB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GACjC,SAAS,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EACrC,KAAK,MAAM,EACX,eAAe,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,KACtC,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"pending_effects.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/pending_effects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,y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C,OAAO,CAAC,IAAI,CAAC,CAAC,EAC7C,qBAAqB,aAAa,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAC9D,KAAK,MAAM,EACX,eAAe,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,KACtC,OAAO,CAAC,IAAI,CAKd,CAAC"}
|
|
@@ -124,7 +124,16 @@ export const flush_pending_effects = async (effects, log, on_rejection) => {
|
|
|
124
124
|
for (const result of results) {
|
|
125
125
|
if (result.status === 'rejected') {
|
|
126
126
|
log.error('pending effect rejected:', result.reason);
|
|
127
|
-
on_rejection
|
|
127
|
+
if (on_rejection) {
|
|
128
|
+
// a throwing callback must not make the flush reject — the WS frame
|
|
129
|
+
// flush runs in a `finally` its adapter does not await
|
|
130
|
+
try {
|
|
131
|
+
on_rejection(result.reason);
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
log.error('on_effect_error threw:', err);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
128
137
|
}
|
|
129
138
|
}
|
|
130
139
|
};
|
|
@@ -155,3 +164,25 @@ export const flush_post_commit_effects = async (effects, log) => {
|
|
|
155
164
|
if (promises.length)
|
|
156
165
|
await Promise.allSettled(promises);
|
|
157
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* Drain both queues of one request or WS frame — the single flush every
|
|
169
|
+
* transport runs after its handler returns.
|
|
170
|
+
*
|
|
171
|
+
* The deferred thunks are invoked before the eager writes are awaited, so a
|
|
172
|
+
* revocation's connection close never sits behind a slow audit INSERT; a thunk
|
|
173
|
+
* that needs a write awaits it itself. Eager rejections are logged and passed
|
|
174
|
+
* to `on_rejection` (the server's `on_effect_error`). The caller picks whether
|
|
175
|
+
* to await the returned promise — HTTP awaits it in test mode only, WS awaits
|
|
176
|
+
* it per frame after the reply is sent. Never rejects.
|
|
177
|
+
*
|
|
178
|
+
* @param pending_effects - the eager queue of in-flight pool writes
|
|
179
|
+
* @param post_commit_effects - the deferred thunks queued by `emit_after_commit`
|
|
180
|
+
* @param log - receives every rejection and thunk failure
|
|
181
|
+
* @param on_rejection - optional fan-out for each eager rejection
|
|
182
|
+
*/
|
|
183
|
+
export const flush_request_effects = async (pending_effects, post_commit_effects, log, on_rejection) => {
|
|
184
|
+
// deferred first — invoked before the eager writes are awaited
|
|
185
|
+
const deferred = flush_post_commit_effects(post_commit_effects, log);
|
|
186
|
+
await flush_pending_effects(pending_effects, log, on_rejection);
|
|
187
|
+
await deferred;
|
|
188
|
+
};
|
package/dist/http/proxy.d.ts
CHANGED
|
@@ -56,10 +56,12 @@ export type ParsedProxy = {
|
|
|
56
56
|
*
|
|
57
57
|
* Accepts plain IPs (`'127.0.0.1'`, `'::1'`) and CIDR notation (`'10.0.0.0/8'`, `'fe80::/10'`).
|
|
58
58
|
* Plain IPs are normalized (lowercase, IPv4-mapped IPv6 stripped) and validated.
|
|
59
|
-
* CIDR prefixes are validated against address family bounds.
|
|
59
|
+
* CIDR prefixes are validated against address family bounds. A `/0` prefix is
|
|
60
|
+
* refused for either family: it trusts every client as a proxy, so the client's
|
|
61
|
+
* own `X-Forwarded-For` would choose the IP every per-IP limiter keys on.
|
|
60
62
|
*
|
|
61
63
|
* @param entry - IP address or CIDR notation
|
|
62
|
-
* @throws Error on invalid IP, invalid CIDR network,
|
|
64
|
+
* @throws Error on invalid IP, invalid CIDR network, NaN/negative/over-range prefix, or a `/0` prefix
|
|
63
65
|
*/
|
|
64
66
|
export declare const parse_proxy_entry: (entry: string) => ParsedProxy;
|
|
65
67
|
/**
|
package/dist/http/proxy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/http/proxy.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,C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