@fuzdev/fuz_app 0.103.0 → 0.105.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/dist/actions/CLAUDE.md +2 -2
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +2 -2
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +3 -3
- package/dist/actions/action_dispatcher.d.ts.map +1 -1
- package/dist/actions/action_dispatcher.js +3 -3
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +11 -11
- package/dist/actions/action_event_data.d.ts.map +1 -1
- package/dist/actions/action_event_data.js +2 -2
- package/dist/actions/action_event_helpers.d.ts.map +1 -1
- package/dist/actions/action_event_helpers.js +2 -2
- package/dist/actions/action_event_types.d.ts.map +1 -1
- package/dist/actions/action_event_types.js +4 -4
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +13 -13
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +6 -6
- package/dist/actions/action_types.d.ts.map +1 -1
- package/dist/actions/broadcast_api.d.ts.map +1 -1
- package/dist/actions/broadcast_api.js +1 -1
- package/dist/actions/cancel.d.ts.map +1 -1
- package/dist/actions/cancel.js +3 -3
- package/dist/actions/compile_action_registry.d.ts.map +1 -1
- package/dist/actions/frontend_rpc_client.d.ts.map +1 -1
- package/dist/actions/frontend_rpc_client.js +3 -3
- package/dist/actions/heartbeat.d.ts.map +1 -1
- package/dist/actions/heartbeat.js +2 -2
- package/dist/actions/peer_ping.d.ts.map +1 -1
- package/dist/actions/peer_ping.js +6 -6
- package/dist/actions/peer_request.d.ts.map +1 -1
- package/dist/actions/perform_action.d.ts.map +1 -1
- package/dist/actions/perform_action.js +13 -13
- package/dist/actions/protocol.d.ts.map +1 -1
- package/dist/actions/protocol.js +1 -1
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +14 -11
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +3 -3
- package/dist/actions/request_tracker.svelte.d.ts.map +1 -1
- package/dist/actions/request_tracker.svelte.js +2 -2
- package/dist/actions/rpc_client.d.ts.map +1 -1
- package/dist/actions/rpc_client.js +7 -7
- package/dist/actions/socket.svelte.d.ts.map +1 -1
- package/dist/actions/socket.svelte.js +4 -3
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +7 -7
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/transports_ws.js +3 -3
- package/dist/actions/transports_ws_auth_guard.d.ts +4 -4
- package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
- package/dist/actions/transports_ws_auth_guard.js +5 -5
- package/dist/actions/transports_ws_backend.d.ts.map +1 -1
- package/dist/actions/transports_ws_backend.js +2 -2
- package/dist/actions/ws_endpoint_spec.d.ts +2 -2
- package/dist/actions/ws_endpoint_spec.d.ts.map +1 -1
- package/dist/auth/CLAUDE.md +40 -18
- package/dist/auth/account_action_specs.d.ts +4 -4
- package/dist/auth/account_action_specs.d.ts.map +1 -1
- package/dist/auth/account_action_specs.js +18 -19
- package/dist/auth/account_actions.d.ts +3 -3
- package/dist/auth/account_actions.d.ts.map +1 -1
- package/dist/auth/account_actions.js +10 -10
- package/dist/auth/account_queries.d.ts.map +1 -1
- package/dist/auth/account_queries.js +6 -6
- package/dist/auth/account_route_schema.d.ts.map +1 -1
- package/dist/auth/account_route_schema.js +19 -19
- package/dist/auth/account_routes.d.ts +2 -2
- package/dist/auth/account_routes.d.ts.map +1 -1
- package/dist/auth/account_routes.js +27 -27
- package/dist/auth/account_schema.d.ts +13 -2
- package/dist/auth/account_schema.d.ts.map +1 -1
- package/dist/auth/account_schema.js +22 -11
- package/dist/auth/actor_lookup_action_specs.d.ts.map +1 -1
- package/dist/auth/actor_lookup_action_specs.js +5 -5
- package/dist/auth/actor_lookup_actions.d.ts +4 -2
- package/dist/auth/actor_lookup_actions.d.ts.map +1 -1
- package/dist/auth/actor_lookup_actions.js +3 -3
- package/dist/auth/actor_lookup_queries.d.ts.map +1 -1
- package/dist/auth/actor_search_action_specs.d.ts.map +1 -1
- package/dist/auth/actor_search_action_specs.js +6 -6
- package/dist/auth/actor_search_actions.d.ts +4 -2
- package/dist/auth/actor_search_actions.d.ts.map +1 -1
- package/dist/auth/actor_search_actions.js +5 -5
- package/dist/auth/actor_search_queries.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.d.ts +2 -2
- package/dist/auth/admin_action_specs.d.ts.map +1 -1
- package/dist/auth/admin_action_specs.js +55 -55
- package/dist/auth/admin_actions.d.ts +5 -5
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +45 -44
- package/dist/auth/all_action_spec_registries.d.ts.map +1 -1
- package/dist/auth/all_action_spec_registries.js +1 -1
- package/dist/auth/all_cell_actions.d.ts.map +1 -1
- package/dist/auth/all_cell_actions.js +1 -1
- package/dist/auth/api_token.d.ts.map +1 -1
- package/dist/auth/api_token_queries.d.ts +7 -2
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +8 -3
- package/dist/auth/app_settings_queries.d.ts.map +1 -1
- package/dist/auth/app_settings_schema.d.ts.map +1 -1
- package/dist/auth/app_settings_schema.js +3 -3
- package/dist/auth/audit_emitter.d.ts +28 -20
- package/dist/auth/audit_emitter.d.ts.map +1 -1
- package/dist/auth/audit_emitter.js +37 -19
- package/dist/auth/audit_log_ddl.js +1 -1
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +2 -2
- package/dist/auth/audit_log_route_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_route_schema.js +1 -1
- package/dist/auth/audit_log_routes.d.ts.map +1 -1
- package/dist/auth/audit_log_routes.js +3 -3
- package/dist/auth/audit_log_schema.d.ts +2 -2
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +69 -68
- package/dist/auth/auth_ddl.js +3 -3
- package/dist/auth/auth_guard_resolver.d.ts.map +1 -1
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +5 -5
- package/dist/auth/bootstrap_route_schema.d.ts.map +1 -1
- package/dist/auth/bootstrap_route_schema.js +6 -6
- package/dist/auth/bootstrap_routes.d.ts.map +1 -1
- package/dist/auth/bootstrap_routes.js +7 -7
- package/dist/auth/cell_action_specs.d.ts +227 -2
- package/dist/auth/cell_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_action_specs.js +117 -39
- package/dist/auth/cell_actions.d.ts +34 -11
- package/dist/auth/cell_actions.d.ts.map +1 -1
- package/dist/auth/cell_actions.js +155 -41
- package/dist/auth/cell_audit_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_audit_action_specs.js +4 -4
- package/dist/auth/cell_audit_actions.d.ts.map +1 -1
- package/dist/auth/cell_audit_actions.js +3 -3
- 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 +7 -6
- package/dist/auth/cell_audit_metadata.d.ts +15 -0
- package/dist/auth/cell_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_audit_metadata.js +13 -2
- package/dist/auth/cell_authorize.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.d.ts.map +1 -1
- package/dist/auth/cell_data_schema.js +1 -1
- package/dist/auth/cell_field_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_field_action_specs.js +16 -16
- package/dist/auth/cell_field_actions.d.ts +2 -2
- package/dist/auth/cell_field_actions.d.ts.map +1 -1
- package/dist/auth/cell_field_actions.js +11 -11
- package/dist/auth/cell_field_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_field_audit_metadata.js +2 -2
- package/dist/auth/cell_grant_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_grant_action_specs.js +15 -15
- package/dist/auth/cell_grant_actions.d.ts +2 -2
- package/dist/auth/cell_grant_actions.d.ts.map +1 -1
- package/dist/auth/cell_grant_actions.js +12 -12
- package/dist/auth/cell_grant_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +3 -3
- package/dist/auth/cell_item_action_specs.d.ts +6 -2
- package/dist/auth/cell_item_action_specs.d.ts.map +1 -1
- package/dist/auth/cell_item_action_specs.js +25 -21
- package/dist/auth/cell_item_actions.d.ts +2 -2
- package/dist/auth/cell_item_actions.d.ts.map +1 -1
- package/dist/auth/cell_item_actions.js +14 -14
- package/dist/auth/cell_item_audit_metadata.d.ts.map +1 -1
- package/dist/auth/cell_item_audit_metadata.js +3 -3
- package/dist/auth/cell_relation_visibility.d.ts.map +1 -1
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +2 -2
- package/dist/auth/credential_type_schema.d.ts.map +1 -1
- package/dist/auth/credential_type_schema.js +5 -5
- package/dist/auth/daemon_token.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +2 -2
- package/dist/auth/deps.d.ts +20 -5
- package/dist/auth/deps.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.d.ts.map +1 -1
- package/dist/auth/grant_path_schema.js +8 -8
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_schema.d.ts.map +1 -1
- package/dist/auth/invite_schema.js +2 -2
- package/dist/auth/keyring.d.ts.map +1 -1
- package/dist/auth/keyring.js +1 -1
- package/dist/auth/middleware.d.ts.map +1 -1
- package/dist/auth/middleware.js +7 -7
- package/dist/auth/migrations.d.ts.map +1 -1
- package/dist/auth/migrations.js +22 -20
- package/dist/auth/password.d.ts.map +1 -1
- package/dist/auth/password_argon2.d.ts.map +1 -1
- package/dist/auth/password_argon2.js +2 -2
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +7 -7
- package/dist/auth/role_grant_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +35 -35
- package/dist/auth/role_grant_offer_actions.d.ts +7 -4
- package/dist/auth/role_grant_offer_actions.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_actions.js +43 -43
- package/dist/auth/role_grant_offer_notifications.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_notifications.js +13 -13
- package/dist/auth/role_grant_offer_queries.d.ts +1 -1
- package/dist/auth/role_grant_offer_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_queries.js +11 -11
- package/dist/auth/role_grant_offer_schema.d.ts.map +1 -1
- package/dist/auth/role_grant_offer_schema.js +7 -7
- package/dist/auth/role_grant_queries.d.ts.map +1 -1
- package/dist/auth/role_grant_queries.js +3 -3
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +7 -7
- package/dist/auth/scope_kind_schema.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.d.ts.map +1 -1
- package/dist/auth/self_service_role_action_specs.js +5 -5
- package/dist/auth/self_service_role_actions.d.ts +3 -3
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +9 -9
- package/dist/auth/session_cookie.d.ts.map +1 -1
- package/dist/auth/session_cookie.js +3 -3
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +4 -4
- package/dist/auth/session_queries.d.ts +14 -4
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +13 -3
- package/dist/auth/signup_route_schema.d.ts.map +1 -1
- package/dist/auth/signup_route_schema.js +6 -6
- package/dist/auth/signup_routes.d.ts.map +1 -1
- package/dist/auth/signup_routes.js +11 -11
- package/dist/auth/standard_action_specs.d.ts.map +1 -1
- package/dist/auth/standard_action_specs.js +1 -1
- package/dist/auth/standard_rpc_actions.d.ts +4 -4
- package/dist/auth/standard_rpc_actions.d.ts.map +1 -1
- package/dist/auth/standard_rpc_actions.js +3 -3
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/daemon.d.ts.map +1 -1
- package/dist/cli/daemon.js +3 -3
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/logger.d.ts.map +1 -1
- package/dist/cli/logger.js +1 -1
- package/dist/cli/util.d.ts.map +1 -1
- package/dist/cli/util.js +1 -1
- package/dist/db/CLAUDE.md +16 -6
- package/dist/db/cell_audit_queries.d.ts.map +1 -1
- package/dist/db/cell_audit_queries.js +1 -1
- package/dist/db/cell_ddl.d.ts +14 -1
- package/dist/db/cell_ddl.d.ts.map +1 -1
- package/dist/db/cell_ddl.js +26 -6
- package/dist/db/cell_field_queries.d.ts.map +1 -1
- package/dist/db/cell_grant_queries.d.ts.map +1 -1
- package/dist/db/cell_grant_queries.js +1 -1
- package/dist/db/cell_history_ddl.d.ts.map +1 -1
- package/dist/db/cell_history_ddl.js +4 -4
- package/dist/db/cell_item_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.d.ts +46 -1
- package/dist/db/cell_queries.d.ts.map +1 -1
- package/dist/db/cell_queries.js +42 -5
- package/dist/db/create_db.d.ts.map +1 -1
- package/dist/db/create_db.js +1 -1
- package/dist/db/db.d.ts.map +1 -1
- package/dist/db/db_pg.d.ts.map +1 -1
- package/dist/db/db_pg.js +1 -1
- package/dist/db/db_pglite.d.ts.map +1 -1
- package/dist/db/db_pglite.js +1 -1
- package/dist/db/fact_ddl.d.ts.map +1 -1
- package/dist/db/fact_ddl.js +3 -3
- package/dist/db/fact_disk_storage.d.ts +1 -1
- package/dist/db/fact_disk_storage.d.ts.map +1 -1
- package/dist/db/fact_disk_storage.js +6 -6
- package/dist/db/fact_queries.d.ts +1 -1
- package/dist/db/fact_queries.d.ts.map +1 -1
- package/dist/db/fact_queries.js +2 -2
- package/dist/db/fact_store.d.ts +1 -1
- package/dist/db/fact_store.d.ts.map +1 -1
- package/dist/db/fact_store.js +9 -9
- package/dist/db/fact_store_errors.d.ts.map +1 -1
- package/dist/db/file_fact_url.d.ts +1 -1
- package/dist/db/file_fact_url.d.ts.map +1 -1
- package/dist/db/file_fact_url.js +1 -1
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/pg_error.d.ts.map +1 -1
- package/dist/db/query_deps.d.ts.map +1 -1
- package/dist/db/schema_ready.d.ts.map +1 -1
- package/dist/db/schema_ready.js +2 -2
- package/dist/db/status.d.ts.map +1 -1
- package/dist/db/status.js +6 -6
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +6 -6
- package/dist/env/dotenv.d.ts.map +1 -1
- package/dist/env/load.d.ts.map +1 -1
- package/dist/env/resolve.d.ts.map +1 -1
- package/dist/hono_context.d.ts.map +1 -1
- package/dist/hono_context.js +2 -2
- package/dist/http/auth_shape.d.ts.map +1 -1
- package/dist/http/auth_shape.js +6 -6
- package/dist/http/client_ip.d.ts.map +1 -1
- package/dist/http/common_routes.d.ts.map +1 -1
- package/dist/http/common_routes.js +8 -8
- package/dist/http/db_routes.d.ts.map +1 -1
- package/dist/http/db_routes.js +27 -23
- package/dist/http/error_schemas.d.ts +1 -1
- package/dist/http/error_schemas.d.ts.map +1 -1
- package/dist/http/error_schemas.js +13 -13
- package/dist/http/jsonrpc.d.ts.map +1 -1
- package/dist/http/jsonrpc.js +9 -9
- package/dist/http/jsonrpc_errors.d.ts.map +1 -1
- package/dist/http/jsonrpc_errors.js +21 -21
- package/dist/http/jsonrpc_helpers.d.ts.map +1 -1
- package/dist/http/jsonrpc_helpers.js +7 -7
- package/dist/http/middleware_spec.d.ts.map +1 -1
- package/dist/http/origin.d.ts.map +1 -1
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +1 -1
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +6 -6
- package/dist/http/schema_helpers.d.ts.map +1 -1
- package/dist/http/schema_helpers.js +1 -1
- package/dist/http/surface.d.ts.map +1 -1
- package/dist/http/surface.js +11 -11
- package/dist/http/surface_query.d.ts.map +1 -1
- package/dist/http/surface_query.js +1 -1
- package/dist/primitive_schemas.d.ts.map +1 -1
- package/dist/primitive_schemas.js +1 -1
- package/dist/rate_limiter.d.ts.map +1 -1
- package/dist/rate_limiter.js +4 -4
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +2 -2
- package/dist/realtime/sse_auth_guard.d.ts +4 -4
- package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
- package/dist/realtime/sse_auth_guard.js +8 -8
- package/dist/realtime/subscriber_registry.d.ts.map +1 -1
- package/dist/runtime/deno.d.ts.map +1 -1
- package/dist/runtime/deno.js +7 -7
- package/dist/runtime/deps.d.ts.map +1 -1
- package/dist/runtime/fs.d.ts.map +1 -1
- package/dist/runtime/mock.d.ts.map +1 -1
- package/dist/runtime/mock.js +3 -3
- package/dist/runtime/node.d.ts.map +1 -1
- package/dist/runtime/node.js +7 -7
- package/dist/schema_meta.d.ts.map +1 -1
- package/dist/server/app_backend.d.ts +3 -3
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +3 -3
- package/dist/server/app_server.d.ts +6 -6
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +32 -32
- package/dist/server/app_server_context.d.ts.map +1 -1
- package/dist/server/env.d.ts.map +1 -1
- package/dist/server/env.js +9 -9
- package/dist/server/fact_write.d.ts +1 -1
- package/dist/server/fact_write.d.ts.map +1 -1
- package/dist/server/fact_write.js +2 -1
- package/dist/server/file_fact_fetcher.d.ts.map +1 -1
- package/dist/server/file_fact_fetcher.js +1 -1
- package/dist/server/serve_fact_route.d.ts.map +1 -1
- package/dist/server/serve_fact_route.js +15 -13
- package/dist/server/startup.d.ts.map +1 -1
- package/dist/server/static.d.ts.map +1 -1
- package/dist/server/validate_nginx.js +1 -1
- package/dist/server/x_accel.d.ts.map +1 -1
- package/dist/server/x_accel.js +1 -1
- package/dist/testing/CLAUDE.md +27 -18
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +62 -62
- package/dist/testing/adversarial_404.d.ts.map +1 -1
- package/dist/testing/adversarial_404.js +1 -1
- package/dist/testing/adversarial_headers.d.ts.map +1 -1
- package/dist/testing/adversarial_headers.js +15 -15
- package/dist/testing/adversarial_input.d.ts.map +1 -1
- package/dist/testing/adversarial_input.js +22 -22
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +32 -32
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/attack_surface.d.ts.map +1 -1
- package/dist/testing/attack_surface.js +12 -12
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +41 -41
- package/dist/testing/audit_drift_guard.d.ts +3 -1
- package/dist/testing/audit_drift_guard.d.ts.map +1 -1
- package/dist/testing/audit_drift_guard.js +12 -6
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +4 -4
- package/dist/testing/bootstrap_success.d.ts.map +1 -1
- package/dist/testing/bootstrap_success.js +11 -11
- package/dist/testing/connection_closer_helpers.d.ts.map +1 -1
- package/dist/testing/connection_closer_helpers.js +1 -1
- package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
- package/dist/testing/cross_backend/account_lifecycle.js +1 -1
- package/dist/testing/cross_backend/action_manifest.d.ts.map +1 -1
- package/dist/testing/cross_backend/action_manifest.js +4 -4
- package/dist/testing/cross_backend/action_manifest_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_lookup.js +3 -3
- package/dist/testing/cross_backend/actor_search.d.ts.map +1 -1
- package/dist/testing/cross_backend/actor_search.js +5 -5
- package/dist/testing/cross_backend/app_settings.d.ts.map +1 -1
- package/dist/testing/cross_backend/app_settings.js +6 -6
- package/dist/testing/cross_backend/backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/bench_report.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/bench_report.js +5 -5
- package/dist/testing/cross_backend/bench/run_cross_impl_bench.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/run_cross_impl_bench.js +2 -2
- package/dist/testing/cross_backend/bench/scenario.d.ts.map +1 -1
- package/dist/testing/cross_backend/bench/scenario.js +1 -1
- package/dist/testing/cross_backend/body_size.d.ts.map +1 -1
- package/dist/testing/cross_backend/body_size.js +1 -1
- package/dist/testing/cross_backend/bootstrap_backend.d.ts.map +1 -1
- package/dist/testing/cross_backend/bootstrap_backend.js +2 -2
- package/dist/testing/cross_backend/build_test_backend_paths.js +1 -1
- package/dist/testing/cross_backend/capabilities.js +2 -2
- package/dist/testing/cross_backend/cell_cross_helpers.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_crud.js +5 -2
- package/dist/testing/cross_backend/cell_gated_create.d.ts +24 -0
- package/dist/testing/cross_backend/cell_gated_create.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_gated_create.js +178 -35
- package/dist/testing/cross_backend/cell_grant_role.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_grant_role.js +2 -2
- package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
- package/dist/testing/cross_backend/cell_relations.js +13 -13
- package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_case.js +11 -11
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +11 -11
- package/dist/testing/cross_backend/cookie_attributes.d.ts.map +1 -1
- package/dist/testing/cross_backend/cookie_attributes.js +4 -4
- package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts +1 -1
- package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/create_cross_backend_global_setup.js +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.js +1 -1
- package/dist/testing/cross_backend/credential_header_robustness.js +1 -1
- package/dist/testing/cross_backend/default_backend_configs.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_backend_configs.js +12 -12
- package/dist/testing/cross_backend/default_spine_surface.d.ts.map +1 -1
- package/dist/testing/cross_backend/default_spine_surface.js +9 -9
- package/dist/testing/cross_backend/expected_schema.json +3 -0
- package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
- package/dist/testing/cross_backend/fact_serving.js +2 -2
- package/dist/testing/cross_backend/full_spine_mount.d.ts.map +1 -1
- package/dist/testing/cross_backend/full_spine_mount.js +11 -8
- package/dist/testing/cross_backend/identity_parity.d.ts.map +1 -1
- package/dist/testing/cross_backend/identity_parity.js +28 -24
- package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/in_process_setup.js +9 -9
- package/dist/testing/cross_backend/login_security.d.ts.map +1 -1
- package/dist/testing/cross_backend/login_security.js +2 -2
- package/dist/testing/cross_backend/make_cross_backend_project.d.ts +1 -1
- package/dist/testing/cross_backend/make_cross_backend_project.d.ts.map +1 -1
- package/dist/testing/cross_backend/make_cross_backend_project.js +3 -3
- package/dist/testing/cross_backend/method_coverage.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin.d.ts.map +1 -1
- package/dist/testing/cross_backend/origin.js +4 -4
- package/dist/testing/cross_backend/peer_ping_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/peer_ping_ws.js +6 -6
- package/dist/testing/cross_backend/ready.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_enumeration.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_enumeration.js +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.d.ts.map +1 -1
- package/dist/testing/cross_backend/role_grant_offer_notification_ws.js +1 -1
- package/dist/testing/cross_backend/role_grant_participation.d.ts.map +1 -1
- 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 -5
- package/dist/testing/cross_backend/setup.d.ts.map +1 -1
- package/dist/testing/cross_backend/setup.js +36 -36
- package/dist/testing/cross_backend/spawn_backend.d.ts.map +1 -1
- package/dist/testing/cross_backend/spawn_backend.js +1 -1
- package/dist/testing/cross_backend/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/sse_round_trip.js +10 -7
- package/dist/testing/cross_backend/standard.d.ts.map +1 -1
- package/dist/testing/cross_backend/standard.js +5 -5
- package/dist/testing/cross_backend/test_cell_gated_create_authorize.d.ts +12 -7
- 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 +54 -15
- package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_backdoor.js +7 -7
- package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +24 -23
- package/dist/testing/cross_backend/testing_server_bun.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_bun.js +3 -3
- 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_deno.d.ts.map +1 -1
- package/dist/testing/cross_backend/testing_server_deno.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 +3 -3
- package/dist/testing/cross_backend/ts_spine_backend_config.d.ts.map +1 -1
- package/dist/testing/cross_backend/ts_spine_backend_config.js +13 -13
- package/dist/testing/cross_backend/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +2 -2
- package/dist/testing/data_exposure.d.ts.map +1 -1
- package/dist/testing/data_exposure.js +8 -8
- package/dist/testing/db.d.ts.map +1 -1
- package/dist/testing/db.js +3 -3
- package/dist/testing/db_entities.d.ts.map +1 -1
- package/dist/testing/db_entities.js +1 -1
- package/dist/testing/entities.d.ts.map +1 -1
- package/dist/testing/entities.js +5 -5
- package/dist/testing/error_coverage.d.ts.map +1 -1
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +106 -106
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +3 -3
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +11 -11
- package/dist/testing/mock_fs.js +1 -1
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +23 -23
- package/dist/testing/role_grant_helpers.d.ts.map +1 -1
- package/dist/testing/role_grant_helpers.js +3 -3
- package/dist/testing/round_trip.d.ts.map +1 -1
- package/dist/testing/round_trip.js +6 -6
- package/dist/testing/rpc_attack_surface.d.ts.map +1 -1
- package/dist/testing/rpc_attack_surface.js +12 -12
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +11 -11
- package/dist/testing/rpc_round_trip.d.ts.map +1 -1
- package/dist/testing/rpc_round_trip.js +3 -3
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +3 -3
- package/dist/testing/schema_introspect.d.ts.map +1 -1
- package/dist/testing/schema_introspect.js +12 -12
- package/dist/testing/schema_parity.d.ts.map +1 -1
- package/dist/testing/schema_parity.js +7 -7
- package/dist/testing/schema_ready_fixture.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +8 -8
- package/dist/testing/standard.d.ts.map +1 -1
- package/dist/testing/standard.js +8 -8
- package/dist/testing/stubs.d.ts +6 -6
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +26 -23
- package/dist/testing/surface_invariants.d.ts.map +1 -1
- package/dist/testing/surface_invariants.js +5 -5
- package/dist/testing/testing_rate_limiter.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.d.ts.map +1 -1
- package/dist/testing/transports/bootstrap.js +4 -4
- package/dist/testing/transports/fetch_transport.d.ts.map +1 -1
- package/dist/testing/transports/sse_frame_reader.d.ts.map +1 -1
- package/dist/testing/transports/sse_transport.js +1 -1
- package/dist/testing/transports/ws_client.d.ts.map +1 -1
- package/dist/testing/transports/ws_client.js +1 -1
- package/dist/testing/transports/ws_transport.js +4 -4
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/testing/ws_round_trip.js +21 -21
- package/dist/ui/AccountSessions.svelte +11 -11
- package/dist/ui/AdminAccounts.svelte +10 -10
- package/dist/ui/AdminAuditLog.svelte +14 -14
- package/dist/ui/AdminInvites.svelte +13 -13
- package/dist/ui/AdminOverview.svelte +22 -22
- package/dist/ui/AdminRoleGrantHistory.svelte +11 -11
- package/dist/ui/AdminSessions.svelte +12 -12
- package/dist/ui/AdminSettings.svelte +1 -1
- package/dist/ui/AdminSurface.svelte +3 -3
- package/dist/ui/AppShell.svelte +8 -8
- package/dist/ui/AppShell.svelte.d.ts.map +1 -1
- package/dist/ui/BootstrapForm.svelte +9 -9
- package/dist/ui/CLAUDE.md +1 -1
- package/dist/ui/ColumnLayout.svelte +2 -2
- package/dist/ui/ColumnLayout.svelte.d.ts.map +1 -1
- package/dist/ui/ConfirmButton.svelte +8 -8
- package/dist/ui/ConfirmButton.svelte.d.ts.map +1 -1
- package/dist/ui/Datatable.svelte +6 -6
- package/dist/ui/Datatable.svelte.d.ts.map +1 -1
- package/dist/ui/LoginForm.svelte +6 -6
- package/dist/ui/LogoutButton.svelte +2 -2
- package/dist/ui/LogoutButton.svelte.d.ts.map +1 -1
- package/dist/ui/MenuLink.svelte +5 -5
- package/dist/ui/MenuLink.svelte.d.ts.map +1 -1
- package/dist/ui/OpenSignupToggle.svelte +2 -2
- package/dist/ui/PopoverButton.svelte +10 -10
- package/dist/ui/PopoverButton.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferForm.svelte +8 -11
- package/dist/ui/RoleGrantOfferForm.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferHistory.svelte +11 -11
- package/dist/ui/RoleGrantOfferHistory.svelte.d.ts.map +1 -1
- package/dist/ui/RoleGrantOfferInbox.svelte +6 -6
- package/dist/ui/RoleGrantOfferInbox.svelte.d.ts.map +1 -1
- package/dist/ui/SignupForm.svelte +9 -9
- package/dist/ui/SurfaceExplorer.svelte +11 -11
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/account_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +2 -2
- package/dist/ui/admin_invites_state.svelte.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.d.ts.map +1 -1
- package/dist/ui/admin_rpc_adapters.js +5 -5
- package/dist/ui/admin_sessions_state.svelte.d.ts.map +1 -1
- package/dist/ui/app_settings_state.svelte.d.ts.map +1 -1
- package/dist/ui/async_slot.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +1 -1
- package/dist/ui/auth_state.svelte.js +4 -4
- package/dist/ui/form_state.svelte.d.ts.map +1 -1
- package/dist/ui/format_scope.d.ts.map +1 -1
- package/dist/ui/keyed_async_slot.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.js +1 -1
- package/dist/ui/position_helpers.js +1 -1
- package/dist/ui/role_grant_offers_state.svelte.d.ts.map +1 -1
- package/dist/ui/role_grant_offers_state.svelte.js +1 -1
- package/dist/ui/table_state.svelte.d.ts.map +1 -1
- package/dist/ui/ui_fetch.d.ts.map +1 -1
- package/dist/ui/ui_format.js +2 -2
- package/package.json +13 -12
|
@@ -17,11 +17,11 @@ import './assert_dev_env.js';
|
|
|
17
17
|
* @module
|
|
18
18
|
*/
|
|
19
19
|
import { describe, test, assert, afterAll } from 'vitest';
|
|
20
|
-
import { find_auth_route, assert_response_matches_spec, assert_no_error_info_leakage
|
|
21
|
-
import { find_rpc_action, rpc_call_for_spec, require_rpc_endpoint_path, resolve_rpc_endpoints_for_setup
|
|
22
|
-
import { ErrorCoverageCollector, assert_error_coverage, DEFAULT_INTEGRATION_ERROR_COVERAGE
|
|
20
|
+
import { find_auth_route, assert_response_matches_spec, assert_no_error_info_leakage } from './integration_helpers.js';
|
|
21
|
+
import { find_rpc_action, rpc_call_for_spec, require_rpc_endpoint_path, resolve_rpc_endpoints_for_setup } from './rpc_helpers.js';
|
|
22
|
+
import { ErrorCoverageCollector, assert_error_coverage, DEFAULT_INTEGRATION_ERROR_COVERAGE } from './error_coverage.js';
|
|
23
23
|
import { is_public_auth } from '../http/auth_shape.js';
|
|
24
|
-
import { account_verify_action_spec, account_session_list_action_spec, account_session_revoke_action_spec, account_session_revoke_all_action_spec, account_token_create_action_spec, account_token_list_action_spec, account_token_revoke_action_spec
|
|
24
|
+
import { account_verify_action_spec, account_session_list_action_spec, account_session_revoke_action_spec, account_session_revoke_all_action_spec, account_token_create_action_spec, account_token_list_action_spec, account_token_revoke_action_spec } from '../auth/account_action_specs.js';
|
|
25
25
|
import { invite_create_action_spec } from '../auth/admin_action_specs.js';
|
|
26
26
|
import { LoginOutput, AccountStatusOutput } from '../auth/account_route_schema.js';
|
|
27
27
|
import { test_if } from './cross_backend/capabilities.js';
|
|
@@ -99,7 +99,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
99
99
|
// (same spirit as the [401, 403, 429] ignore in the attack-surface
|
|
100
100
|
// tightness defaults); otherwise #10 adding /logout's 403 to the spine
|
|
101
101
|
// surface tips the ratio under threshold here though the gate is tested.
|
|
102
|
-
ignore_statuses: [403]
|
|
102
|
+
ignore_statuses: [403]
|
|
103
103
|
});
|
|
104
104
|
});
|
|
105
105
|
// --- 1. Login/logout lifecycle ---
|
|
@@ -113,12 +113,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
113
113
|
headers: {
|
|
114
114
|
host: 'localhost',
|
|
115
115
|
origin: 'http://localhost:5173',
|
|
116
|
-
'content-type': 'application/json'
|
|
116
|
+
'content-type': 'application/json'
|
|
117
117
|
},
|
|
118
118
|
body: JSON.stringify({
|
|
119
119
|
username: fixture.account.username,
|
|
120
|
-
password: DEFAULT_TEST_PASSWORD
|
|
121
|
-
})
|
|
120
|
+
password: DEFAULT_TEST_PASSWORD
|
|
121
|
+
})
|
|
122
122
|
});
|
|
123
123
|
assert.strictEqual(res.status, 200);
|
|
124
124
|
const body = await res.json();
|
|
@@ -136,12 +136,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
136
136
|
headers: {
|
|
137
137
|
host: 'localhost',
|
|
138
138
|
origin: 'http://localhost:5173',
|
|
139
|
-
'content-type': 'application/json'
|
|
139
|
+
'content-type': 'application/json'
|
|
140
140
|
},
|
|
141
141
|
body: JSON.stringify({
|
|
142
142
|
username: fixture.account.username,
|
|
143
|
-
password: 'wrong-password'
|
|
144
|
-
})
|
|
143
|
+
password: 'wrong-password'
|
|
144
|
+
})
|
|
145
145
|
});
|
|
146
146
|
assert.strictEqual(res.status, 401);
|
|
147
147
|
const body = await res.clone().json();
|
|
@@ -157,12 +157,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
157
157
|
headers: {
|
|
158
158
|
host: 'localhost',
|
|
159
159
|
origin: 'http://localhost:5173',
|
|
160
|
-
'content-type': 'application/json'
|
|
160
|
+
'content-type': 'application/json'
|
|
161
161
|
},
|
|
162
162
|
body: JSON.stringify({
|
|
163
163
|
username: 'nonexistent_user',
|
|
164
|
-
password: DEFAULT_TEST_PASSWORD
|
|
165
|
-
})
|
|
164
|
+
password: DEFAULT_TEST_PASSWORD
|
|
165
|
+
})
|
|
166
166
|
});
|
|
167
167
|
assert.strictEqual(res.status, 401);
|
|
168
168
|
const body = await res.clone().json();
|
|
@@ -178,12 +178,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
178
178
|
headers: {
|
|
179
179
|
host: 'localhost',
|
|
180
180
|
origin: 'http://localhost:5173',
|
|
181
|
-
'content-type': 'application/json'
|
|
181
|
+
'content-type': 'application/json'
|
|
182
182
|
},
|
|
183
183
|
body: JSON.stringify({
|
|
184
184
|
username: ` ${fixture.account.username} `,
|
|
185
|
-
password: DEFAULT_TEST_PASSWORD
|
|
186
|
-
})
|
|
185
|
+
password: DEFAULT_TEST_PASSWORD
|
|
186
|
+
})
|
|
187
187
|
});
|
|
188
188
|
assert.strictEqual(res.status, 200);
|
|
189
189
|
const body = await res.json();
|
|
@@ -201,12 +201,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
201
201
|
headers: {
|
|
202
202
|
host: 'localhost',
|
|
203
203
|
origin: 'http://localhost:5173',
|
|
204
|
-
'content-type': 'application/json'
|
|
204
|
+
'content-type': 'application/json'
|
|
205
205
|
},
|
|
206
206
|
body: JSON.stringify({
|
|
207
207
|
username: fixture.account.username,
|
|
208
|
-
password: DEFAULT_TEST_PASSWORD
|
|
209
|
-
})
|
|
208
|
+
password: DEFAULT_TEST_PASSWORD
|
|
209
|
+
})
|
|
210
210
|
});
|
|
211
211
|
assert.strictEqual(login_res.status, 200);
|
|
212
212
|
// Extract cookie from Set-Cookie
|
|
@@ -218,7 +218,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
218
218
|
const create_headers = () => ({
|
|
219
219
|
host: 'localhost',
|
|
220
220
|
origin: 'http://localhost:5173',
|
|
221
|
-
cookie: `${cookie_name}=${login_cookie}
|
|
221
|
+
cookie: `${cookie_name}=${login_cookie}`
|
|
222
222
|
});
|
|
223
223
|
// Verify works
|
|
224
224
|
const verify_res = await rpc_call_for_spec({
|
|
@@ -226,13 +226,13 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
226
226
|
path: rpc_path,
|
|
227
227
|
spec: account_verify_action_spec,
|
|
228
228
|
params: undefined,
|
|
229
|
-
headers: create_headers()
|
|
229
|
+
headers: create_headers()
|
|
230
230
|
});
|
|
231
231
|
assert.strictEqual(verify_res.status, 200);
|
|
232
232
|
// Logout
|
|
233
233
|
const logout_res = await fixture.transport(logout_route.path, {
|
|
234
234
|
method: 'POST',
|
|
235
|
-
headers: create_headers()
|
|
235
|
+
headers: create_headers()
|
|
236
236
|
});
|
|
237
237
|
assert.strictEqual(logout_res.status, 200);
|
|
238
238
|
const logout_body = await logout_res.json();
|
|
@@ -244,7 +244,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
244
244
|
path: rpc_path,
|
|
245
245
|
spec: account_verify_action_spec,
|
|
246
246
|
params: undefined,
|
|
247
|
-
headers: create_headers()
|
|
247
|
+
headers: create_headers()
|
|
248
248
|
});
|
|
249
249
|
assert.strictEqual(verify_after.status, 401);
|
|
250
250
|
});
|
|
@@ -260,9 +260,9 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
260
260
|
headers: {
|
|
261
261
|
host: 'localhost',
|
|
262
262
|
origin: 'http://localhost:5173',
|
|
263
|
-
'content-type': 'application/json'
|
|
263
|
+
'content-type': 'application/json'
|
|
264
264
|
},
|
|
265
|
-
body: JSON.stringify({ username, password })
|
|
265
|
+
body: JSON.stringify({ username, password })
|
|
266
266
|
});
|
|
267
267
|
// wrong password for existing user
|
|
268
268
|
const wrong_pw_res = await make_login(fixture.account.username, 'wrong-password-999');
|
|
@@ -291,12 +291,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
291
291
|
headers: {
|
|
292
292
|
host: 'localhost',
|
|
293
293
|
origin: 'http://localhost:5173',
|
|
294
|
-
'content-type': 'application/json'
|
|
294
|
+
'content-type': 'application/json'
|
|
295
295
|
},
|
|
296
296
|
body: JSON.stringify({
|
|
297
297
|
username: fixture.account.username,
|
|
298
|
-
password: DEFAULT_TEST_PASSWORD
|
|
299
|
-
})
|
|
298
|
+
password: DEFAULT_TEST_PASSWORD
|
|
299
|
+
})
|
|
300
300
|
});
|
|
301
301
|
assert.strictEqual(res.status, 200);
|
|
302
302
|
const body = await res.json();
|
|
@@ -332,7 +332,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
332
332
|
const status_path = login_route.path.replace(/\/login$/, '/status');
|
|
333
333
|
const res = await fixture.transport(status_path, {
|
|
334
334
|
method: 'GET',
|
|
335
|
-
headers: fixture.create_session_headers({ host: 'localhost' })
|
|
335
|
+
headers: fixture.create_session_headers({ host: 'localhost' })
|
|
336
336
|
});
|
|
337
337
|
assert.strictEqual(res.status, 200, `expected 200 from ${status_path} — capabilities.account_status is true, so the ` +
|
|
338
338
|
`account surface must bundle GET /status. A 404 means the backend declares the ` +
|
|
@@ -356,12 +356,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
356
356
|
headers: {
|
|
357
357
|
host: 'localhost',
|
|
358
358
|
origin: 'http://localhost:5173',
|
|
359
|
-
'content-type': 'application/json'
|
|
359
|
+
'content-type': 'application/json'
|
|
360
360
|
},
|
|
361
361
|
body: JSON.stringify({
|
|
362
362
|
username: fixture.account.username,
|
|
363
|
-
password: DEFAULT_TEST_PASSWORD
|
|
364
|
-
})
|
|
363
|
+
password: DEFAULT_TEST_PASSWORD
|
|
364
|
+
})
|
|
365
365
|
});
|
|
366
366
|
assert.strictEqual(res.status, 200);
|
|
367
367
|
const set_cookie = res.headers.get('set-cookie');
|
|
@@ -382,7 +382,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
382
382
|
path: rpc_path,
|
|
383
383
|
spec: account_verify_action_spec,
|
|
384
384
|
params: undefined,
|
|
385
|
-
headers: { host: 'localhost' }
|
|
385
|
+
headers: { host: 'localhost' }
|
|
386
386
|
});
|
|
387
387
|
assert.strictEqual(res.status, 401);
|
|
388
388
|
});
|
|
@@ -393,7 +393,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
393
393
|
path: rpc_path,
|
|
394
394
|
spec: account_verify_action_spec,
|
|
395
395
|
params: undefined,
|
|
396
|
-
headers: { cookie: `${cookie_name}=random_garbage_value` }
|
|
396
|
+
headers: { cookie: `${cookie_name}=random_garbage_value` }
|
|
397
397
|
});
|
|
398
398
|
assert.strictEqual(res.status, 401);
|
|
399
399
|
});
|
|
@@ -415,7 +415,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
415
415
|
path: rpc_path,
|
|
416
416
|
spec: account_session_list_action_spec,
|
|
417
417
|
params: undefined,
|
|
418
|
-
headers
|
|
418
|
+
headers
|
|
419
419
|
});
|
|
420
420
|
assert.ok(list_res.ok, 'account_session_list should succeed');
|
|
421
421
|
assert.ok(list_res.result.sessions.length >= 1);
|
|
@@ -426,7 +426,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
426
426
|
path: rpc_path,
|
|
427
427
|
spec: account_session_revoke_action_spec,
|
|
428
428
|
params: { session_id },
|
|
429
|
-
headers
|
|
429
|
+
headers
|
|
430
430
|
});
|
|
431
431
|
assert.ok(revoke_res.ok, 'account_session_revoke should succeed');
|
|
432
432
|
assert.strictEqual(revoke_res.result.ok, true);
|
|
@@ -437,7 +437,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
437
437
|
path: rpc_path,
|
|
438
438
|
spec: account_verify_action_spec,
|
|
439
439
|
params: undefined,
|
|
440
|
-
headers
|
|
440
|
+
headers
|
|
441
441
|
});
|
|
442
442
|
assert.strictEqual(after.status, 401);
|
|
443
443
|
});
|
|
@@ -450,7 +450,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
450
450
|
path: rpc_path,
|
|
451
451
|
spec: account_verify_action_spec,
|
|
452
452
|
params: undefined,
|
|
453
|
-
headers
|
|
453
|
+
headers
|
|
454
454
|
});
|
|
455
455
|
assert.strictEqual(before.status, 200);
|
|
456
456
|
// Revoke all sessions
|
|
@@ -459,7 +459,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
459
459
|
path: rpc_path,
|
|
460
460
|
spec: account_session_revoke_all_action_spec,
|
|
461
461
|
params: undefined,
|
|
462
|
-
headers
|
|
462
|
+
headers
|
|
463
463
|
});
|
|
464
464
|
assert.ok(revoke_res.ok, 'account_session_revoke_all should succeed');
|
|
465
465
|
// Verify fails after revocation
|
|
@@ -468,7 +468,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
468
468
|
path: rpc_path,
|
|
469
469
|
spec: account_verify_action_spec,
|
|
470
470
|
params: undefined,
|
|
471
|
-
headers
|
|
471
|
+
headers
|
|
472
472
|
});
|
|
473
473
|
assert.strictEqual(after.status, 401);
|
|
474
474
|
});
|
|
@@ -482,7 +482,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
482
482
|
assert.ok(login_route, 'Expected POST /login route — ensure create_route_specs includes account routes');
|
|
483
483
|
assert.ok(password_route, 'Expected POST /password route — ensure create_route_specs includes account routes');
|
|
484
484
|
const headers = fixture.create_session_headers({
|
|
485
|
-
'content-type': 'application/json'
|
|
485
|
+
'content-type': 'application/json'
|
|
486
486
|
});
|
|
487
487
|
// Change password
|
|
488
488
|
const change_res = await fixture.transport(password_route.path, {
|
|
@@ -490,8 +490,8 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
490
490
|
headers,
|
|
491
491
|
body: JSON.stringify({
|
|
492
492
|
current_password: DEFAULT_TEST_PASSWORD,
|
|
493
|
-
new_password: 'new-password-456'
|
|
494
|
-
})
|
|
493
|
+
new_password: 'new-password-456'
|
|
494
|
+
})
|
|
495
495
|
});
|
|
496
496
|
assert.strictEqual(change_res.status, 200);
|
|
497
497
|
const change_body = await change_res.json();
|
|
@@ -504,7 +504,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
504
504
|
path: rpc_path,
|
|
505
505
|
spec: account_verify_action_spec,
|
|
506
506
|
params: undefined,
|
|
507
|
-
headers: fixture.create_session_headers()
|
|
507
|
+
headers: fixture.create_session_headers()
|
|
508
508
|
});
|
|
509
509
|
assert.strictEqual(verify_after.status, 401);
|
|
510
510
|
// Login with new password works
|
|
@@ -513,12 +513,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
513
513
|
headers: {
|
|
514
514
|
host: 'localhost',
|
|
515
515
|
origin: 'http://localhost:5173',
|
|
516
|
-
'content-type': 'application/json'
|
|
516
|
+
'content-type': 'application/json'
|
|
517
517
|
},
|
|
518
518
|
body: JSON.stringify({
|
|
519
519
|
username: fixture.account.username,
|
|
520
|
-
password: 'new-password-456'
|
|
521
|
-
})
|
|
520
|
+
password: 'new-password-456'
|
|
521
|
+
})
|
|
522
522
|
});
|
|
523
523
|
assert.strictEqual(login_res.status, 200);
|
|
524
524
|
const login_body = await login_res.json();
|
|
@@ -531,12 +531,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
531
531
|
const res = await fixture.transport(password_route.path, {
|
|
532
532
|
method: 'POST',
|
|
533
533
|
headers: fixture.create_session_headers({
|
|
534
|
-
'content-type': 'application/json'
|
|
534
|
+
'content-type': 'application/json'
|
|
535
535
|
}),
|
|
536
536
|
body: JSON.stringify({
|
|
537
537
|
current_password: 'wrong-password-999',
|
|
538
|
-
new_password: 'new-password-456'
|
|
539
|
-
})
|
|
538
|
+
new_password: 'new-password-456'
|
|
539
|
+
})
|
|
540
540
|
});
|
|
541
541
|
assert.strictEqual(res.status, 401);
|
|
542
542
|
error_collector.record(route_specs, 'POST', password_route.path, 401);
|
|
@@ -546,7 +546,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
546
546
|
path: rpc_path,
|
|
547
547
|
spec: account_verify_action_spec,
|
|
548
548
|
params: undefined,
|
|
549
|
-
headers: fixture.create_session_headers()
|
|
549
|
+
headers: fixture.create_session_headers()
|
|
550
550
|
});
|
|
551
551
|
assert.strictEqual(verify_res.status, 200);
|
|
552
552
|
});
|
|
@@ -565,7 +565,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
565
565
|
path: rpc_path,
|
|
566
566
|
spec: account_verify_action_spec,
|
|
567
567
|
params: undefined,
|
|
568
|
-
headers: fixture.create_session_headers()
|
|
568
|
+
headers: fixture.create_session_headers()
|
|
569
569
|
});
|
|
570
570
|
assert.strictEqual(res.status, 200);
|
|
571
571
|
});
|
|
@@ -580,7 +580,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
580
580
|
spec: account_verify_action_spec,
|
|
581
581
|
params: undefined,
|
|
582
582
|
headers: fixture.create_bearer_headers(),
|
|
583
|
-
suppress_default_origin: true
|
|
583
|
+
suppress_default_origin: true
|
|
584
584
|
});
|
|
585
585
|
assert.strictEqual(res.status, 200);
|
|
586
586
|
});
|
|
@@ -595,7 +595,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
595
595
|
spec: account_verify_action_spec,
|
|
596
596
|
params: undefined,
|
|
597
597
|
headers: { authorization: 'Bearer secret_fuz_token_invalid' },
|
|
598
|
-
suppress_default_origin: true
|
|
598
|
+
suppress_default_origin: true
|
|
599
599
|
});
|
|
600
600
|
assert.strictEqual(res.status, 401);
|
|
601
601
|
});
|
|
@@ -611,7 +611,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
611
611
|
spec: account_verify_action_spec,
|
|
612
612
|
params: undefined,
|
|
613
613
|
headers: bearer_headers,
|
|
614
|
-
suppress_default_origin: true
|
|
614
|
+
suppress_default_origin: true
|
|
615
615
|
});
|
|
616
616
|
assert.strictEqual(ok_res.status, 200);
|
|
617
617
|
// With Origin — bearer silently discarded (browser context), falls through to no auth.
|
|
@@ -620,7 +620,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
620
620
|
path: rpc_path,
|
|
621
621
|
spec: account_verify_action_spec,
|
|
622
622
|
params: undefined,
|
|
623
|
-
headers: { ...bearer_headers, origin: 'http://localhost:5173' }
|
|
623
|
+
headers: { ...bearer_headers, origin: 'http://localhost:5173' }
|
|
624
624
|
});
|
|
625
625
|
assert.strictEqual(res.status, 401);
|
|
626
626
|
});
|
|
@@ -635,7 +635,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
635
635
|
path: rpc_path,
|
|
636
636
|
spec: account_token_create_action_spec,
|
|
637
637
|
params: { name: 'test-revoke' },
|
|
638
|
-
headers: fixture.create_session_headers()
|
|
638
|
+
headers: fixture.create_session_headers()
|
|
639
639
|
});
|
|
640
640
|
assert.ok(create_res.ok, 'account_token_create should succeed');
|
|
641
641
|
const { token, id } = create_res.result;
|
|
@@ -650,7 +650,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
650
650
|
spec: account_verify_action_spec,
|
|
651
651
|
params: undefined,
|
|
652
652
|
headers: { authorization: `Bearer ${token}` },
|
|
653
|
-
suppress_default_origin: true
|
|
653
|
+
suppress_default_origin: true
|
|
654
654
|
});
|
|
655
655
|
assert.strictEqual(use_res.status, 200);
|
|
656
656
|
// Revoke via RPC
|
|
@@ -659,7 +659,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
659
659
|
path: rpc_path,
|
|
660
660
|
spec: account_token_revoke_action_spec,
|
|
661
661
|
params: { token_id: id },
|
|
662
|
-
headers: fixture.create_session_headers()
|
|
662
|
+
headers: fixture.create_session_headers()
|
|
663
663
|
});
|
|
664
664
|
assert.ok(revoke_res.ok, 'account_token_revoke should succeed');
|
|
665
665
|
// Token should no longer work — fresh transport same reason as
|
|
@@ -670,7 +670,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
670
670
|
spec: account_verify_action_spec,
|
|
671
671
|
params: undefined,
|
|
672
672
|
headers: { authorization: `Bearer ${token}` },
|
|
673
|
-
suppress_default_origin: true
|
|
673
|
+
suppress_default_origin: true
|
|
674
674
|
});
|
|
675
675
|
assert.strictEqual(after_res.status, 401);
|
|
676
676
|
});
|
|
@@ -703,7 +703,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
703
703
|
const non_admin = await fixture.create_account({ username: 'non_admin_admin_probe' });
|
|
704
704
|
const res = await fixture.transport(admin_route.path, {
|
|
705
705
|
method: admin_route.method,
|
|
706
|
-
headers: { cookie: `${cookie_name}=${non_admin.session_cookie}` }
|
|
706
|
+
headers: { cookie: `${cookie_name}=${non_admin.session_cookie}` }
|
|
707
707
|
});
|
|
708
708
|
assert.strictEqual(res.status, 403);
|
|
709
709
|
const body = await res.json();
|
|
@@ -719,7 +719,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
719
719
|
path: rpc_path,
|
|
720
720
|
spec: account_session_revoke_all_action_spec,
|
|
721
721
|
params: undefined,
|
|
722
|
-
headers: fixture.create_session_headers()
|
|
722
|
+
headers: fixture.create_session_headers()
|
|
723
723
|
});
|
|
724
724
|
assert.ok(revoke_res.ok, 'account_session_revoke_all should succeed');
|
|
725
725
|
// User B's session should still work
|
|
@@ -728,7 +728,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
728
728
|
path: rpc_path,
|
|
729
729
|
spec: account_verify_action_spec,
|
|
730
730
|
params: undefined,
|
|
731
|
-
headers: { cookie: `${cookie_name}=${user_b.session_cookie}` }
|
|
731
|
+
headers: { cookie: `${cookie_name}=${user_b.session_cookie}` }
|
|
732
732
|
});
|
|
733
733
|
assert.strictEqual(verify_b.status, 200);
|
|
734
734
|
});
|
|
@@ -742,7 +742,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
742
742
|
path: rpc_path,
|
|
743
743
|
spec: account_session_list_action_spec,
|
|
744
744
|
params: undefined,
|
|
745
|
-
headers: user_b_headers
|
|
745
|
+
headers: user_b_headers
|
|
746
746
|
});
|
|
747
747
|
assert.ok(list_res.ok, 'account_session_list should succeed');
|
|
748
748
|
assert.ok(list_res.result.sessions.length >= 1);
|
|
@@ -753,7 +753,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
753
753
|
path: rpc_path,
|
|
754
754
|
spec: account_session_revoke_action_spec,
|
|
755
755
|
params: { session_id: session_id_b },
|
|
756
|
-
headers: fixture.create_session_headers()
|
|
756
|
+
headers: fixture.create_session_headers()
|
|
757
757
|
});
|
|
758
758
|
assert.ok(revoke_res.ok, 'account_session_revoke should succeed');
|
|
759
759
|
assert.strictEqual(revoke_res.result.revoked, false, 'Should not revoke another account session');
|
|
@@ -763,7 +763,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
763
763
|
path: rpc_path,
|
|
764
764
|
spec: account_verify_action_spec,
|
|
765
765
|
params: undefined,
|
|
766
|
-
headers: user_b_headers
|
|
766
|
+
headers: user_b_headers
|
|
767
767
|
});
|
|
768
768
|
assert.strictEqual(verify_b.status, 200);
|
|
769
769
|
});
|
|
@@ -777,7 +777,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
777
777
|
path: rpc_path,
|
|
778
778
|
spec: account_token_list_action_spec,
|
|
779
779
|
params: undefined,
|
|
780
|
-
headers: user_b_headers
|
|
780
|
+
headers: user_b_headers
|
|
781
781
|
});
|
|
782
782
|
assert.ok(list_res.ok, 'account_token_list should succeed');
|
|
783
783
|
assert.ok(list_res.result.tokens.length >= 1);
|
|
@@ -788,7 +788,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
788
788
|
path: rpc_path,
|
|
789
789
|
spec: account_token_revoke_action_spec,
|
|
790
790
|
params: { token_id: token_id_b },
|
|
791
|
-
headers: fixture.create_session_headers()
|
|
791
|
+
headers: fixture.create_session_headers()
|
|
792
792
|
});
|
|
793
793
|
assert.ok(revoke_res.ok, 'account_token_revoke should succeed');
|
|
794
794
|
assert.strictEqual(revoke_res.result.revoked, false, 'Should not revoke another account token');
|
|
@@ -799,7 +799,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
799
799
|
spec: account_verify_action_spec,
|
|
800
800
|
params: undefined,
|
|
801
801
|
headers: { authorization: `Bearer ${user_b.api_token}` },
|
|
802
|
-
suppress_default_origin: true
|
|
802
|
+
suppress_default_origin: true
|
|
803
803
|
});
|
|
804
804
|
assert.strictEqual(verify_b.status, 200);
|
|
805
805
|
});
|
|
@@ -812,7 +812,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
812
812
|
path: rpc_path,
|
|
813
813
|
spec: account_session_list_action_spec,
|
|
814
814
|
params: undefined,
|
|
815
|
-
headers: fixture.create_session_headers()
|
|
815
|
+
headers: fixture.create_session_headers()
|
|
816
816
|
});
|
|
817
817
|
assert.ok(res.ok, 'account_session_list should succeed');
|
|
818
818
|
// Sessions should only belong to user A's account
|
|
@@ -829,7 +829,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
829
829
|
path: rpc_path,
|
|
830
830
|
spec: account_token_list_action_spec,
|
|
831
831
|
params: undefined,
|
|
832
|
-
headers: fixture.create_session_headers()
|
|
832
|
+
headers: fixture.create_session_headers()
|
|
833
833
|
});
|
|
834
834
|
assert.ok(res.ok, 'account_token_list should succeed');
|
|
835
835
|
// Tokens should only belong to user A's account
|
|
@@ -853,12 +853,12 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
853
853
|
headers: {
|
|
854
854
|
host: 'localhost',
|
|
855
855
|
origin: 'http://localhost:5173',
|
|
856
|
-
'content-type': 'application/json'
|
|
856
|
+
'content-type': 'application/json'
|
|
857
857
|
},
|
|
858
858
|
body: JSON.stringify({
|
|
859
859
|
username: 'nonexistent_user_xyz',
|
|
860
|
-
password: 'any-password'
|
|
861
|
-
})
|
|
860
|
+
password: 'any-password'
|
|
861
|
+
})
|
|
862
862
|
});
|
|
863
863
|
assert.strictEqual(res.status, 401);
|
|
864
864
|
await assert_response_matches_spec(route_specs, 'POST', login_route.path, res);
|
|
@@ -870,7 +870,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
870
870
|
const res = await fixture.transport(logout_route.path, {
|
|
871
871
|
method: 'POST',
|
|
872
872
|
headers: fixture.create_session_headers({ 'content-type': 'application/json' }),
|
|
873
|
-
body: JSON.stringify({})
|
|
873
|
+
body: JSON.stringify({})
|
|
874
874
|
});
|
|
875
875
|
assert.strictEqual(res.status, 200);
|
|
876
876
|
await assert_response_matches_spec(route_specs, 'POST', logout_route.path, res);
|
|
@@ -884,9 +884,9 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
884
884
|
headers: {
|
|
885
885
|
host: 'localhost',
|
|
886
886
|
origin: 'http://localhost:5173',
|
|
887
|
-
'content-type': 'application/json'
|
|
887
|
+
'content-type': 'application/json'
|
|
888
888
|
},
|
|
889
|
-
body: JSON.stringify({})
|
|
889
|
+
body: JSON.stringify({})
|
|
890
890
|
});
|
|
891
891
|
assert.strictEqual(res.status, 401);
|
|
892
892
|
await assert_response_matches_spec(route_specs, 'POST', logout_route.path, res);
|
|
@@ -916,7 +916,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
916
916
|
path: rpc_path,
|
|
917
917
|
spec: account_session_list_action_spec,
|
|
918
918
|
params: undefined,
|
|
919
|
-
headers: { host: 'localhost' }
|
|
919
|
+
headers: { host: 'localhost' }
|
|
920
920
|
});
|
|
921
921
|
assert.strictEqual(session_list.status, 401);
|
|
922
922
|
error_collector.record(route_specs, 'POST', rpc_path, 401);
|
|
@@ -925,7 +925,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
925
925
|
path: rpc_path,
|
|
926
926
|
spec: account_session_revoke_all_action_spec,
|
|
927
927
|
params: undefined,
|
|
928
|
-
headers: { host: 'localhost' }
|
|
928
|
+
headers: { host: 'localhost' }
|
|
929
929
|
});
|
|
930
930
|
assert.strictEqual(session_revoke_all.status, 401);
|
|
931
931
|
error_collector.record(route_specs, 'POST', rpc_path, 401);
|
|
@@ -934,7 +934,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
934
934
|
path: rpc_path,
|
|
935
935
|
spec: account_token_list_action_spec,
|
|
936
936
|
params: undefined,
|
|
937
|
-
headers: { host: 'localhost' }
|
|
937
|
+
headers: { host: 'localhost' }
|
|
938
938
|
});
|
|
939
939
|
assert.strictEqual(token_list.status, 401);
|
|
940
940
|
error_collector.record(route_specs, 'POST', rpc_path, 401);
|
|
@@ -943,7 +943,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
943
943
|
path: rpc_path,
|
|
944
944
|
spec: account_token_create_action_spec,
|
|
945
945
|
params: { name: 'unauth-probe' },
|
|
946
|
-
headers: { host: 'localhost' }
|
|
946
|
+
headers: { host: 'localhost' }
|
|
947
947
|
});
|
|
948
948
|
assert.strictEqual(token_create.status, 401);
|
|
949
949
|
error_collector.record(route_specs, 'POST', rpc_path, 401);
|
|
@@ -952,7 +952,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
952
952
|
path: rpc_path,
|
|
953
953
|
spec: account_verify_action_spec,
|
|
954
954
|
params: undefined,
|
|
955
|
-
headers: { host: 'localhost' }
|
|
955
|
+
headers: { host: 'localhost' }
|
|
956
956
|
});
|
|
957
957
|
assert.strictEqual(verify.status, 401);
|
|
958
958
|
error_collector.record(route_specs, 'POST', rpc_path, 401);
|
|
@@ -962,7 +962,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
962
962
|
const res = await unauthed(logout_route.path, {
|
|
963
963
|
method: 'POST',
|
|
964
964
|
headers: { host: 'localhost', 'content-type': 'application/json' },
|
|
965
|
-
body: JSON.stringify({})
|
|
965
|
+
body: JSON.stringify({})
|
|
966
966
|
});
|
|
967
967
|
assert.strictEqual(res.status, 401, 'POST /logout without auth should return 401');
|
|
968
968
|
error_collector.record(route_specs, 'POST', logout_route.path, 401);
|
|
@@ -978,7 +978,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
978
978
|
path: rpc_path,
|
|
979
979
|
spec: account_verify_action_spec,
|
|
980
980
|
params: undefined,
|
|
981
|
-
headers: { host: 'localhost' }
|
|
981
|
+
headers: { host: 'localhost' }
|
|
982
982
|
});
|
|
983
983
|
assert.strictEqual(res.status, 401);
|
|
984
984
|
assert.ok(!res.ok);
|
|
@@ -1003,11 +1003,11 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1003
1003
|
const logout_route = find_auth_route(route_specs, '/logout', 'POST');
|
|
1004
1004
|
assert.ok(logout_route, 'Expected POST /logout route — ensure create_route_specs includes account routes');
|
|
1005
1005
|
const bearer_headers = fixture.create_bearer_headers({
|
|
1006
|
-
'content-type': 'application/json'
|
|
1006
|
+
'content-type': 'application/json'
|
|
1007
1007
|
});
|
|
1008
1008
|
const res = await fixture.fresh_transport()(logout_route.path, {
|
|
1009
1009
|
method: 'POST',
|
|
1010
|
-
headers: { ...bearer_headers, origin: 'http://localhost:5173' }
|
|
1010
|
+
headers: { ...bearer_headers, origin: 'http://localhost:5173' }
|
|
1011
1011
|
});
|
|
1012
1012
|
assert.strictEqual(res.status, 401, 'Bearer with Origin should be discarded → unauthenticated');
|
|
1013
1013
|
error_collector.record(route_specs, 'POST', logout_route.path, 401);
|
|
@@ -1017,11 +1017,11 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1017
1017
|
const password_route = find_auth_route(route_specs, '/password', 'POST');
|
|
1018
1018
|
assert.ok(password_route, 'Expected POST /password route — ensure create_route_specs includes account routes');
|
|
1019
1019
|
const bearer_headers = fixture.create_bearer_headers({
|
|
1020
|
-
'content-type': 'application/json'
|
|
1020
|
+
'content-type': 'application/json'
|
|
1021
1021
|
});
|
|
1022
1022
|
const res = await fixture.fresh_transport()(password_route.path, {
|
|
1023
1023
|
method: 'POST',
|
|
1024
|
-
headers: { ...bearer_headers, referer: 'http://localhost:5173/admin' }
|
|
1024
|
+
headers: { ...bearer_headers, referer: 'http://localhost:5173/admin' }
|
|
1025
1025
|
});
|
|
1026
1026
|
assert.strictEqual(res.status, 401, 'Bearer with Referer should be discarded → unauthenticated');
|
|
1027
1027
|
error_collector.record(route_specs, 'POST', password_route.path, 401);
|
|
@@ -1039,7 +1039,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1039
1039
|
path: rpc_path,
|
|
1040
1040
|
spec: account_token_create_action_spec,
|
|
1041
1041
|
params: { name: 'test-token' },
|
|
1042
|
-
headers: fixture.create_session_headers()
|
|
1042
|
+
headers: fixture.create_session_headers()
|
|
1043
1043
|
});
|
|
1044
1044
|
assert.ok(create_res.ok, 'account_token_create should succeed');
|
|
1045
1045
|
const { token: raw_token } = create_res.result;
|
|
@@ -1051,7 +1051,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1051
1051
|
spec: account_verify_action_spec,
|
|
1052
1052
|
params: undefined,
|
|
1053
1053
|
headers: { authorization: `Bearer ${raw_token}` },
|
|
1054
|
-
suppress_default_origin: true
|
|
1054
|
+
suppress_default_origin: true
|
|
1055
1055
|
});
|
|
1056
1056
|
assert.strictEqual(verify_before.status, 200, 'Bearer token should work before password change');
|
|
1057
1057
|
// Change password (still REST)
|
|
@@ -1060,8 +1060,8 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1060
1060
|
headers: fixture.create_session_headers({ 'content-type': 'application/json' }),
|
|
1061
1061
|
body: JSON.stringify({
|
|
1062
1062
|
current_password: DEFAULT_TEST_PASSWORD,
|
|
1063
|
-
new_password: 'new-password-456'
|
|
1064
|
-
})
|
|
1063
|
+
new_password: 'new-password-456'
|
|
1064
|
+
})
|
|
1065
1065
|
});
|
|
1066
1066
|
assert.strictEqual(change_res.status, 200);
|
|
1067
1067
|
const change_body = await change_res.json();
|
|
@@ -1074,7 +1074,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1074
1074
|
spec: account_verify_action_spec,
|
|
1075
1075
|
params: undefined,
|
|
1076
1076
|
headers: { authorization: `Bearer ${raw_token}` },
|
|
1077
|
-
suppress_default_origin: true
|
|
1077
|
+
suppress_default_origin: true
|
|
1078
1078
|
});
|
|
1079
1079
|
assert.strictEqual(verify_after.status, 401, 'Bearer token should be rejected after password change');
|
|
1080
1080
|
});
|
|
@@ -1108,7 +1108,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1108
1108
|
path: rpc_path,
|
|
1109
1109
|
spec: invite_create_action_spec,
|
|
1110
1110
|
params: { email: 'alice@example.com' },
|
|
1111
|
-
headers: fixture.create_session_headers()
|
|
1111
|
+
headers: fixture.create_session_headers()
|
|
1112
1112
|
});
|
|
1113
1113
|
assert.ok(invite_res.ok, `invite_create failed: ${invite_res.ok ? '' : JSON.stringify(invite_res.error)}`);
|
|
1114
1114
|
// Try to sign up with a different email — should fail (no matching invite)
|
|
@@ -1117,13 +1117,13 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1117
1117
|
headers: {
|
|
1118
1118
|
host: 'localhost',
|
|
1119
1119
|
origin: 'http://localhost:5173',
|
|
1120
|
-
'content-type': 'application/json'
|
|
1120
|
+
'content-type': 'application/json'
|
|
1121
1121
|
},
|
|
1122
1122
|
body: JSON.stringify({
|
|
1123
1123
|
username: 'eve_attacker',
|
|
1124
1124
|
password: 'test-password-123456',
|
|
1125
|
-
email: 'eve@attacker.com'
|
|
1126
|
-
})
|
|
1125
|
+
email: 'eve@attacker.com'
|
|
1126
|
+
})
|
|
1127
1127
|
});
|
|
1128
1128
|
assert.strictEqual(signup_res.status, 403, 'Signup with non-matching email should be rejected');
|
|
1129
1129
|
const body = await signup_res.json();
|
|
@@ -1160,7 +1160,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1160
1160
|
path: rpc_path,
|
|
1161
1161
|
spec: invite_create_action_spec,
|
|
1162
1162
|
params: { email: test_email },
|
|
1163
|
-
headers: admin_headers
|
|
1163
|
+
headers: admin_headers
|
|
1164
1164
|
});
|
|
1165
1165
|
assert.ok(invite_res.ok, `invite_create failed: ${invite_res.ok ? '' : JSON.stringify(invite_res.error)}`);
|
|
1166
1166
|
// Attempt 1: signup with a non-matching email (no invite match) → 403
|
|
@@ -1169,13 +1169,13 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1169
1169
|
headers: {
|
|
1170
1170
|
host: 'localhost',
|
|
1171
1171
|
origin: 'http://localhost:5173',
|
|
1172
|
-
'content-type': 'application/json'
|
|
1172
|
+
'content-type': 'application/json'
|
|
1173
1173
|
},
|
|
1174
1174
|
body: JSON.stringify({
|
|
1175
1175
|
username: 'nomatch_user',
|
|
1176
1176
|
password: 'test-password-123456',
|
|
1177
|
-
email: 'wrong-email@example.com'
|
|
1178
|
-
})
|
|
1177
|
+
email: 'wrong-email@example.com'
|
|
1178
|
+
})
|
|
1179
1179
|
});
|
|
1180
1180
|
assert.strictEqual(no_match_res.status, 403, 'Expected 403 for non-matching invite');
|
|
1181
1181
|
const no_match_body = await no_match_res.json();
|
|
@@ -1186,7 +1186,7 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1186
1186
|
path: rpc_path,
|
|
1187
1187
|
spec: invite_create_action_spec,
|
|
1188
1188
|
params: { email: conflict_email },
|
|
1189
|
-
headers: admin_headers
|
|
1189
|
+
headers: admin_headers
|
|
1190
1190
|
});
|
|
1191
1191
|
assert.ok(invite2_res.ok, `invite2_create failed: ${invite2_res.ok ? '' : JSON.stringify(invite2_res.error)}`);
|
|
1192
1192
|
// Attempt 2: signup with the invited email but a colliding username → 409
|
|
@@ -1195,13 +1195,13 @@ export const describe_standard_integration_tests = (options) => {
|
|
|
1195
1195
|
headers: {
|
|
1196
1196
|
host: 'localhost',
|
|
1197
1197
|
origin: 'http://localhost:5173',
|
|
1198
|
-
'content-type': 'application/json'
|
|
1198
|
+
'content-type': 'application/json'
|
|
1199
1199
|
},
|
|
1200
1200
|
body: JSON.stringify({
|
|
1201
1201
|
username: existing_user.account.username,
|
|
1202
1202
|
password: 'test-password-123456',
|
|
1203
|
-
email: conflict_email
|
|
1204
|
-
})
|
|
1203
|
+
email: conflict_email
|
|
1204
|
+
})
|
|
1205
1205
|
});
|
|
1206
1206
|
assert.strictEqual(conflict_res.status, 409, 'Expected 409 for username conflict');
|
|
1207
1207
|
const conflict_body = await conflict_res.json();
|