@fuzdev/fuz_app 0.51.0 → 0.52.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 +14 -1
- package/dist/actions/action_bridge.d.ts +3 -1
- package/dist/actions/action_bridge.d.ts.map +1 -1
- package/dist/actions/action_bridge.js +3 -1
- package/dist/actions/action_codegen.d.ts +18 -8
- package/dist/actions/action_codegen.d.ts.map +1 -1
- package/dist/actions/action_codegen.js +18 -8
- package/dist/actions/action_event.d.ts +44 -1
- package/dist/actions/action_event.d.ts.map +1 -1
- package/dist/actions/action_event.js +44 -1
- package/dist/actions/action_event_helpers.d.ts +26 -0
- package/dist/actions/action_event_helpers.d.ts.map +1 -1
- package/dist/actions/action_event_helpers.js +26 -1
- package/dist/actions/action_peer.d.ts +17 -0
- package/dist/actions/action_peer.d.ts.map +1 -1
- package/dist/actions/action_peer.js +8 -0
- package/dist/actions/action_registry.d.ts +1 -1
- package/dist/actions/action_registry.js +1 -1
- package/dist/actions/action_rpc.d.ts +4 -0
- package/dist/actions/action_rpc.d.ts.map +1 -1
- package/dist/actions/action_rpc.js +4 -0
- package/dist/actions/action_spec.d.ts +22 -2
- package/dist/actions/action_spec.d.ts.map +1 -1
- package/dist/actions/action_spec.js +16 -2
- package/dist/actions/register_action_ws.d.ts +3 -0
- package/dist/actions/register_action_ws.d.ts.map +1 -1
- package/dist/actions/register_action_ws.js +3 -0
- package/dist/actions/register_ws_endpoint.d.ts +3 -0
- package/dist/actions/register_ws_endpoint.d.ts.map +1 -1
- package/dist/actions/register_ws_endpoint.js +3 -0
- package/dist/actions/request_tracker.svelte.d.ts +14 -1
- package/dist/actions/request_tracker.svelte.d.ts.map +1 -1
- package/dist/actions/request_tracker.svelte.js +14 -1
- package/dist/actions/socket.svelte.d.ts +35 -15
- package/dist/actions/socket.svelte.d.ts.map +1 -1
- package/dist/actions/socket.svelte.js +33 -13
- package/dist/actions/transports.d.ts +12 -3
- package/dist/actions/transports.d.ts.map +1 -1
- package/dist/actions/transports.js +16 -7
- package/dist/actions/transports_http.d.ts +7 -0
- package/dist/actions/transports_http.d.ts.map +1 -1
- package/dist/actions/transports_http.js +7 -0
- package/dist/actions/transports_ws.d.ts +13 -0
- package/dist/actions/transports_ws.d.ts.map +1 -1
- package/dist/actions/transports_ws.js +13 -0
- package/dist/actions/transports_ws_auth_guard.d.ts +6 -2
- package/dist/actions/transports_ws_auth_guard.d.ts.map +1 -1
- package/dist/actions/transports_ws_auth_guard.js +6 -2
- package/dist/actions/transports_ws_backend.d.ts +14 -1
- package/dist/actions/transports_ws_backend.d.ts.map +1 -1
- package/dist/actions/transports_ws_backend.js +14 -1
- package/dist/auth/CLAUDE.md +40 -4
- 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 +10 -0
- package/dist/auth/admin_actions.d.ts +1 -0
- package/dist/auth/admin_actions.d.ts.map +1 -1
- package/dist/auth/admin_actions.js +1 -0
- package/dist/auth/api_token_queries.d.ts +7 -0
- package/dist/auth/api_token_queries.d.ts.map +1 -1
- package/dist/auth/api_token_queries.js +7 -0
- package/dist/auth/app_settings_queries.d.ts +4 -0
- package/dist/auth/app_settings_queries.d.ts.map +1 -1
- package/dist/auth/app_settings_queries.js +4 -0
- package/dist/auth/audit_log_queries.d.ts +6 -0
- package/dist/auth/audit_log_queries.d.ts.map +1 -1
- package/dist/auth/audit_log_queries.js +6 -0
- package/dist/auth/audit_log_schema.d.ts +2 -0
- package/dist/auth/audit_log_schema.d.ts.map +1 -1
- package/dist/auth/audit_log_schema.js +134 -55
- package/dist/auth/bearer_auth.d.ts +2 -0
- package/dist/auth/bearer_auth.d.ts.map +1 -1
- package/dist/auth/bearer_auth.js +2 -0
- package/dist/auth/bootstrap_account.d.ts +3 -0
- package/dist/auth/bootstrap_account.d.ts.map +1 -1
- package/dist/auth/bootstrap_account.js +3 -0
- package/dist/auth/cleanup.d.ts +6 -0
- package/dist/auth/cleanup.d.ts.map +1 -1
- package/dist/auth/cleanup.js +6 -0
- package/dist/auth/daemon_token_middleware.d.ts +4 -0
- package/dist/auth/daemon_token_middleware.d.ts.map +1 -1
- package/dist/auth/daemon_token_middleware.js +4 -0
- package/dist/auth/invite_queries.d.ts +4 -0
- package/dist/auth/invite_queries.d.ts.map +1 -1
- package/dist/auth/invite_queries.js +4 -0
- package/dist/auth/permit_offer_action_specs.d.ts +5 -0
- package/dist/auth/permit_offer_action_specs.d.ts.map +1 -1
- package/dist/auth/permit_offer_action_specs.js +10 -0
- package/dist/auth/permit_offer_queries.d.ts +19 -0
- package/dist/auth/permit_offer_queries.d.ts.map +1 -1
- package/dist/auth/permit_offer_queries.js +19 -0
- package/dist/auth/permit_queries.d.ts +8 -0
- package/dist/auth/permit_queries.d.ts.map +1 -1
- package/dist/auth/permit_queries.js +8 -0
- package/dist/auth/request_context.d.ts +1 -0
- package/dist/auth/request_context.d.ts.map +1 -1
- package/dist/auth/request_context.js +1 -0
- package/dist/auth/role_schema.d.ts +2 -0
- package/dist/auth/role_schema.d.ts.map +1 -1
- package/dist/auth/role_schema.js +2 -0
- package/dist/auth/self_service_role_actions.d.ts +1 -0
- package/dist/auth/self_service_role_actions.d.ts.map +1 -1
- package/dist/auth/self_service_role_actions.js +1 -0
- package/dist/auth/session_lifecycle.d.ts +3 -0
- package/dist/auth/session_lifecycle.d.ts.map +1 -1
- package/dist/auth/session_lifecycle.js +3 -0
- package/dist/auth/session_middleware.d.ts +5 -0
- package/dist/auth/session_middleware.d.ts.map +1 -1
- package/dist/auth/session_middleware.js +5 -0
- package/dist/auth/session_queries.d.ts +9 -0
- package/dist/auth/session_queries.d.ts.map +1 -1
- package/dist/auth/session_queries.js +9 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +2 -0
- package/dist/cli/daemon.d.ts +6 -1
- package/dist/cli/daemon.d.ts.map +1 -1
- package/dist/cli/daemon.js +6 -1
- package/dist/db/assert_row.d.ts +2 -1
- package/dist/db/assert_row.d.ts.map +1 -1
- package/dist/db/assert_row.js +2 -1
- package/dist/db/create_db.d.ts +3 -0
- package/dist/db/create_db.d.ts.map +1 -1
- package/dist/db/create_db.js +3 -0
- package/dist/db/db.d.ts +19 -4
- package/dist/db/db.d.ts.map +1 -1
- package/dist/db/db.js +18 -3
- package/dist/db/db_pg.d.ts +2 -1
- package/dist/db/db_pg.d.ts.map +1 -1
- package/dist/db/db_pg.js +5 -3
- package/dist/db/db_pglite.d.ts +3 -2
- package/dist/db/db_pglite.d.ts.map +1 -1
- package/dist/db/db_pglite.js +3 -2
- package/dist/db/migrate.d.ts +8 -4
- package/dist/db/migrate.d.ts.map +1 -1
- package/dist/db/migrate.js +6 -2
- package/dist/db/sql_identifier.d.ts +2 -1
- package/dist/db/sql_identifier.d.ts.map +1 -1
- package/dist/db/sql_identifier.js +2 -1
- package/dist/db/status.d.ts +4 -1
- package/dist/db/status.d.ts.map +1 -1
- package/dist/db/status.js +5 -2
- package/dist/dev/setup.d.ts +18 -2
- package/dist/dev/setup.d.ts.map +1 -1
- package/dist/dev/setup.js +18 -2
- package/dist/env/dotenv.d.ts +2 -1
- package/dist/env/dotenv.d.ts.map +1 -1
- package/dist/env/dotenv.js +2 -1
- package/dist/env/load.d.ts +1 -1
- package/dist/env/load.js +1 -1
- package/dist/env/resolve.d.ts +1 -1
- package/dist/env/resolve.js +1 -1
- package/dist/env/update_env_variable.d.ts +2 -0
- package/dist/env/update_env_variable.d.ts.map +1 -1
- package/dist/env/update_env_variable.js +2 -0
- package/dist/http/pending_effects.d.ts +4 -0
- package/dist/http/pending_effects.d.ts.map +1 -1
- package/dist/http/pending_effects.js +4 -0
- package/dist/http/proxy.d.ts +3 -0
- package/dist/http/proxy.d.ts.map +1 -1
- package/dist/http/proxy.js +3 -0
- package/dist/http/route_spec.d.ts +1 -0
- package/dist/http/route_spec.d.ts.map +1 -1
- package/dist/http/route_spec.js +7 -0
- package/dist/rate_limiter.d.ts +14 -1
- package/dist/rate_limiter.d.ts.map +1 -1
- package/dist/rate_limiter.js +14 -1
- package/dist/realtime/sse.d.ts +7 -1
- package/dist/realtime/sse.d.ts.map +1 -1
- package/dist/realtime/sse.js +3 -1
- package/dist/realtime/sse_auth_guard.d.ts +21 -21
- package/dist/realtime/sse_auth_guard.d.ts.map +1 -1
- package/dist/realtime/sse_auth_guard.js +24 -24
- package/dist/realtime/subscriber_registry.d.ts +4 -2
- package/dist/realtime/subscriber_registry.d.ts.map +1 -1
- package/dist/realtime/subscriber_registry.js +4 -2
- package/dist/runtime/fs.d.ts +5 -0
- package/dist/runtime/fs.d.ts.map +1 -1
- package/dist/runtime/fs.js +5 -0
- package/dist/runtime/mock.d.ts +6 -0
- package/dist/runtime/mock.d.ts.map +1 -1
- package/dist/runtime/mock.js +6 -0
- package/dist/server/app_backend.d.ts +1 -0
- package/dist/server/app_backend.d.ts.map +1 -1
- package/dist/server/app_backend.js +1 -0
- package/dist/server/app_server.d.ts +4 -0
- package/dist/server/app_server.d.ts.map +1 -1
- package/dist/server/app_server.js +4 -0
- package/dist/server/validate_nginx.d.ts +3 -0
- package/dist/server/validate_nginx.d.ts.map +1 -1
- package/dist/testing/admin_integration.d.ts +5 -0
- package/dist/testing/admin_integration.d.ts.map +1 -1
- package/dist/testing/admin_integration.js +5 -0
- package/dist/testing/adversarial_headers.d.ts +5 -3
- package/dist/testing/adversarial_headers.d.ts.map +1 -1
- package/dist/testing/adversarial_headers.js +5 -3
- package/dist/testing/adversarial_input.d.ts +4 -0
- package/dist/testing/adversarial_input.d.ts.map +1 -1
- package/dist/testing/adversarial_input.js +4 -0
- package/dist/testing/app_server.d.ts +3 -0
- package/dist/testing/app_server.d.ts.map +1 -1
- package/dist/testing/app_server.js +11 -0
- package/dist/testing/assertions.d.ts +23 -7
- package/dist/testing/assertions.d.ts.map +1 -1
- package/dist/testing/assertions.js +23 -7
- package/dist/testing/audit_completeness.d.ts +4 -0
- package/dist/testing/audit_completeness.d.ts.map +1 -1
- package/dist/testing/audit_completeness.js +4 -0
- package/dist/testing/auth_apps.d.ts +3 -0
- package/dist/testing/auth_apps.d.ts.map +1 -1
- package/dist/testing/auth_apps.js +3 -0
- package/dist/testing/db.d.ts +9 -1
- package/dist/testing/db.d.ts.map +1 -1
- package/dist/testing/db.js +9 -1
- package/dist/testing/error_coverage.d.ts +9 -0
- package/dist/testing/error_coverage.d.ts.map +1 -1
- package/dist/testing/error_coverage.js +9 -0
- package/dist/testing/integration.d.ts +4 -0
- package/dist/testing/integration.d.ts.map +1 -1
- package/dist/testing/integration.js +4 -0
- package/dist/testing/integration_helpers.d.ts +10 -4
- package/dist/testing/integration_helpers.d.ts.map +1 -1
- package/dist/testing/integration_helpers.js +10 -4
- package/dist/testing/middleware.d.ts +5 -0
- package/dist/testing/middleware.d.ts.map +1 -1
- package/dist/testing/middleware.js +5 -0
- package/dist/testing/rate_limiting.d.ts +3 -0
- package/dist/testing/rate_limiting.d.ts.map +1 -1
- package/dist/testing/rate_limiting.js +3 -0
- package/dist/testing/rpc_helpers.d.ts +21 -8
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +21 -8
- package/dist/testing/schema_generators.d.ts +7 -2
- package/dist/testing/schema_generators.d.ts.map +1 -1
- package/dist/testing/schema_generators.js +7 -2
- package/dist/testing/sse_round_trip.d.ts +3 -0
- package/dist/testing/sse_round_trip.d.ts.map +1 -1
- package/dist/testing/sse_round_trip.js +3 -0
- package/dist/testing/stubs.d.ts +7 -0
- package/dist/testing/stubs.d.ts.map +1 -1
- package/dist/testing/stubs.js +7 -0
- package/dist/testing/surface_invariants.d.ts +14 -0
- package/dist/testing/surface_invariants.d.ts.map +1 -1
- package/dist/testing/surface_invariants.js +14 -0
- package/dist/testing/ws_round_trip.d.ts +13 -1
- package/dist/testing/ws_round_trip.d.ts.map +1 -1
- package/dist/ui/AccountSessions.svelte +9 -0
- package/dist/ui/AccountSessions.svelte.d.ts.map +1 -1
- package/dist/ui/AdminAccounts.svelte +10 -0
- package/dist/ui/AdminAccounts.svelte.d.ts.map +1 -1
- package/dist/ui/AdminAuditLog.svelte +10 -0
- package/dist/ui/AdminAuditLog.svelte.d.ts.map +1 -1
- package/dist/ui/AdminInvites.svelte +9 -0
- package/dist/ui/AdminInvites.svelte.d.ts.map +1 -1
- package/dist/ui/AdminOverview.svelte +10 -0
- package/dist/ui/AdminOverview.svelte.d.ts.map +1 -1
- package/dist/ui/AdminPermitHistory.svelte +9 -0
- package/dist/ui/AdminPermitHistory.svelte.d.ts.map +1 -1
- package/dist/ui/AdminSessions.svelte +10 -0
- package/dist/ui/AdminSessions.svelte.d.ts.map +1 -1
- package/dist/ui/AdminSettings.svelte +9 -0
- package/dist/ui/AdminSettings.svelte.d.ts.map +1 -1
- package/dist/ui/AdminSurface.svelte +9 -0
- package/dist/ui/AdminSurface.svelte.d.ts.map +1 -1
- package/dist/ui/AppShell.svelte +24 -0
- package/dist/ui/AppShell.svelte.d.ts +23 -0
- package/dist/ui/AppShell.svelte.d.ts.map +1 -1
- package/dist/ui/BootstrapForm.svelte +17 -0
- package/dist/ui/BootstrapForm.svelte.d.ts +4 -0
- package/dist/ui/BootstrapForm.svelte.d.ts.map +1 -1
- package/dist/ui/ColumnLayout.svelte +11 -0
- package/dist/ui/ColumnLayout.svelte.d.ts +10 -0
- package/dist/ui/ColumnLayout.svelte.d.ts.map +1 -1
- package/dist/ui/Datatable.svelte +18 -0
- package/dist/ui/Datatable.svelte.d.ts +17 -0
- package/dist/ui/Datatable.svelte.d.ts.map +1 -1
- package/dist/ui/LoginForm.svelte +18 -0
- package/dist/ui/LoginForm.svelte.d.ts +9 -0
- package/dist/ui/LoginForm.svelte.d.ts.map +1 -1
- package/dist/ui/LogoutButton.svelte +9 -0
- package/dist/ui/LogoutButton.svelte.d.ts +8 -0
- package/dist/ui/LogoutButton.svelte.d.ts.map +1 -1
- package/dist/ui/MenuLink.svelte +10 -0
- package/dist/ui/MenuLink.svelte.d.ts +9 -0
- package/dist/ui/MenuLink.svelte.d.ts.map +1 -1
- package/dist/ui/OpenSignupToggle.svelte +9 -0
- package/dist/ui/OpenSignupToggle.svelte.d.ts.map +1 -1
- package/dist/ui/SignupForm.svelte +16 -0
- package/dist/ui/SignupForm.svelte.d.ts +4 -0
- package/dist/ui/SignupForm.svelte.d.ts.map +1 -1
- package/dist/ui/SurfaceExplorer.svelte +9 -0
- package/dist/ui/SurfaceExplorer.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.d.ts +6 -1
- package/dist/ui/audit_log_state.svelte.d.ts.map +1 -1
- package/dist/ui/audit_log_state.svelte.js +6 -1
- package/dist/ui/auth_state.svelte.d.ts +16 -4
- package/dist/ui/auth_state.svelte.d.ts.map +1 -1
- package/dist/ui/auth_state.svelte.js +16 -4
- package/dist/ui/form_state.svelte.d.ts +9 -0
- package/dist/ui/form_state.svelte.d.ts.map +1 -1
- package/dist/ui/form_state.svelte.js +9 -0
- package/dist/ui/loadable.svelte.d.ts +6 -1
- package/dist/ui/loadable.svelte.d.ts.map +1 -1
- package/dist/ui/loadable.svelte.js +6 -1
- package/dist/ui/permit_offers_state.svelte.d.ts +2 -0
- package/dist/ui/permit_offers_state.svelte.d.ts.map +1 -1
- package/dist/ui/permit_offers_state.svelte.js +2 -0
- package/dist/ui/popover.svelte.d.ts +17 -4
- package/dist/ui/popover.svelte.d.ts.map +1 -1
- package/dist/ui/popover.svelte.js +17 -4
- package/dist/ui/position_helpers.d.ts +1 -0
- package/dist/ui/position_helpers.d.ts.map +1 -1
- package/dist/ui/position_helpers.js +1 -0
- package/dist/ui/sidebar_state.svelte.d.ts +22 -9
- package/dist/ui/sidebar_state.svelte.d.ts.map +1 -1
- package/dist/ui/sidebar_state.svelte.js +17 -2
- package/dist/ui/table_state.svelte.d.ts +14 -0
- package/dist/ui/table_state.svelte.d.ts.map +1 -1
- package/dist/ui/table_state.svelte.js +14 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriber_registry.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/realtime/subscriber_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAExC,MAAM,WAAW,UAAU,CAAC,CAAC;IAC5B,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;IACrB,sEAAsE;IACtE,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC7B,mDAAmD;IACnD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,qEAAqE;IACrE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC3B;AAED,wCAAwC;AACxC,MAAM,WAAW,yBAAyB;IACzC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,kDAAkD;AAClD,MAAM,WAAW,gBAAgB;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBAAa,kBAAkB,CAAC,CAAC;;gBAIpB,OAAO,CAAC,EAAE,yBAAyB;IAI/C,oCAAoC;IACpC,IAAI,KAAK,IAAI,MAAM,CAElB;IAED
|
|
1
|
+
{"version":3,"file":"subscriber_registry.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/realtime/subscriber_registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;A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|
|
74
|
-
* @param options - channel filter and identity slots (scope + groups)
|
|
74
|
+
* @param options - channel filter and identity slots (`scope` + `groups`)
|
|
75
75
|
* @returns unsubscribe function
|
|
76
|
+
* @mutates registry - adds the new subscriber; closes oldest matching subscribers when `max_per_scope` is exceeded
|
|
76
77
|
*/
|
|
77
78
|
subscribe(stream, options) {
|
|
78
79
|
const channels = options?.channels && options.channels.length > 0 ? new Set(options.channels) : null;
|
|
@@ -112,8 +113,9 @@ export class SubscriberRegistry {
|
|
|
112
113
|
* Use for auth revocation — when a user's permissions change, close their
|
|
113
114
|
* SSE connections so they must reconnect and re-authenticate.
|
|
114
115
|
*
|
|
115
|
-
* @param identity - the identity key to match (checked against scope and groups)
|
|
116
|
+
* @param identity - the identity key to match (checked against `scope` and `groups`)
|
|
116
117
|
* @returns the number of subscribers closed
|
|
118
|
+
* @mutates registry - removes matching subscribers and closes their streams
|
|
117
119
|
*/
|
|
118
120
|
close_by_identity(identity) {
|
|
119
121
|
// collect first, then close — avoids mutating the Set during iteration
|
package/dist/runtime/fs.d.ts
CHANGED
|
@@ -7,9 +7,14 @@ import type { FsWriteDeps } from './deps.js';
|
|
|
7
7
|
/**
|
|
8
8
|
* Write a file atomically via temp file + rename.
|
|
9
9
|
*
|
|
10
|
+
* Writes to `<path>.tmp` then renames over `path` so readers either see the
|
|
11
|
+
* old contents or the full new contents — never a partial write.
|
|
12
|
+
*
|
|
10
13
|
* @param deps - deps with file write capabilities
|
|
11
14
|
* @param path - destination file path
|
|
12
15
|
* @param content - file contents to write
|
|
16
|
+
* @mutates filesystem - creates `<path>.tmp` then renames it to `path`
|
|
17
|
+
* @throws if `write_text_file` or `rename` rejects (permissions, disk full, cross-device rename, etc.)
|
|
13
18
|
*/
|
|
14
19
|
export declare const write_file_atomic: (deps: Pick<FsWriteDeps, "write_text_file" | "rename">, path: string, content: string) => Promise<void>;
|
|
15
20
|
//# sourceMappingURL=fs.d.ts.map
|
package/dist/runtime/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/runtime/fs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"fs.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/runtime/fs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,GAC7B,MAAM,IAAI,CAAC,WAAW,EAAE,iBAAiB,GAAG,QAAQ,CAAC,EACrD,MAAM,MAAM,EACZ,SAAS,MAAM,KACb,OAAO,CAAC,IAAI,CAId,CAAC"}
|
package/dist/runtime/fs.js
CHANGED
|
@@ -6,9 +6,14 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Write a file atomically via temp file + rename.
|
|
8
8
|
*
|
|
9
|
+
* Writes to `<path>.tmp` then renames over `path` so readers either see the
|
|
10
|
+
* old contents or the full new contents — never a partial write.
|
|
11
|
+
*
|
|
9
12
|
* @param deps - deps with file write capabilities
|
|
10
13
|
* @param path - destination file path
|
|
11
14
|
* @param content - file contents to write
|
|
15
|
+
* @mutates filesystem - creates `<path>.tmp` then renames it to `path`
|
|
16
|
+
* @throws if `write_text_file` or `rename` rejects (permissions, disk full, cross-device rename, etc.)
|
|
12
17
|
*/
|
|
13
18
|
export const write_file_atomic = async (deps, path, content) => {
|
|
14
19
|
const temp_path = path + '.tmp';
|
package/dist/runtime/mock.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface MockRuntime extends RuntimeDeps {
|
|
|
50
50
|
/**
|
|
51
51
|
* Create a mock `RuntimeDeps` for testing.
|
|
52
52
|
*
|
|
53
|
+
* The mock `exit` records the code on `exit_calls` and throws `MockExitError`
|
|
54
|
+
* (so the never-returning contract holds in tests). `fetch` throws `TypeError`
|
|
55
|
+
* when no `mock_fetch_responses` pattern matches the request URL.
|
|
56
|
+
*
|
|
53
57
|
* @param args - CLI arguments
|
|
54
58
|
* @returns `MockRuntime` with controllable state
|
|
55
59
|
*
|
|
@@ -70,6 +74,7 @@ export declare const create_mock_runtime: (args?: Array<string>) => MockRuntime;
|
|
|
70
74
|
* Reset a mock runtime to initial state.
|
|
71
75
|
*
|
|
72
76
|
* @param runtime - `MockRuntime` to reset
|
|
77
|
+
* @mutates runtime - clears all mock state (env, fs, dirs, exit/command/stdout/fetch call records, mock results, stdin buffer)
|
|
73
78
|
*/
|
|
74
79
|
export declare const reset_mock_runtime: (runtime: MockRuntime) => void;
|
|
75
80
|
/**
|
|
@@ -77,6 +82,7 @@ export declare const reset_mock_runtime: (runtime: MockRuntime) => void;
|
|
|
77
82
|
*
|
|
78
83
|
* @param runtime - `MockRuntime` to configure
|
|
79
84
|
* @param input - string to provide as stdin input
|
|
85
|
+
* @mutates `runtime.stdin_buffer`
|
|
80
86
|
*/
|
|
81
87
|
export declare const set_mock_stdin: (runtime: MockRuntime, input: string) => void;
|
|
82
88
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/runtime/mock.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAC,WAAW,EAAc,aAAa,EAAE,iBAAiB,EAAC,MAAM,WAAW,CAAC;AAIzF;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC/C,kCAAkC;IAClC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,0CAA0C;IAC1C,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,+CAA+C;IAC/C,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACvC,mCAAmC;IACnC,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,cAAc,GAAI,SAAS,WAAW,EAAE,OAAO,MAAM,KAAG,IAEpE,CAAC;AAEF;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,IAAI,EAAE,MAAM;CAKxB"}
|
package/dist/runtime/mock.js
CHANGED
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
/**
|
|
11
11
|
* Create a mock `RuntimeDeps` for testing.
|
|
12
12
|
*
|
|
13
|
+
* The mock `exit` records the code on `exit_calls` and throws `MockExitError`
|
|
14
|
+
* (so the never-returning contract holds in tests). `fetch` throws `TypeError`
|
|
15
|
+
* when no `mock_fetch_responses` pattern matches the request URL.
|
|
16
|
+
*
|
|
13
17
|
* @param args - CLI arguments
|
|
14
18
|
* @returns `MockRuntime` with controllable state
|
|
15
19
|
*
|
|
@@ -257,6 +261,7 @@ export const create_mock_runtime = (args = []) => {
|
|
|
257
261
|
* Reset a mock runtime to initial state.
|
|
258
262
|
*
|
|
259
263
|
* @param runtime - `MockRuntime` to reset
|
|
264
|
+
* @mutates runtime - clears all mock state (env, fs, dirs, exit/command/stdout/fetch call records, mock results, stdin buffer)
|
|
260
265
|
*/
|
|
261
266
|
export const reset_mock_runtime = (runtime) => {
|
|
262
267
|
runtime.mock_env.clear();
|
|
@@ -277,6 +282,7 @@ export const reset_mock_runtime = (runtime) => {
|
|
|
277
282
|
*
|
|
278
283
|
* @param runtime - `MockRuntime` to configure
|
|
279
284
|
* @param input - string to provide as stdin input
|
|
285
|
+
* @mutates `runtime.stdin_buffer`
|
|
280
286
|
*/
|
|
281
287
|
export const set_mock_stdin = (runtime, input) => {
|
|
282
288
|
runtime.stdin_buffer = new TextEncoder().encode(input);
|
|
@@ -89,6 +89,7 @@ export interface CreateAppBackendOptions {
|
|
|
89
89
|
*
|
|
90
90
|
* @param options - keyring, password deps, optional database URL, and optional `migration_namespaces`
|
|
91
91
|
* @returns app backend with deps, database metadata, and combined migration results
|
|
92
|
+
* @throws Error if `migration_namespaces` contains the reserved `'fuz_auth'` namespace
|
|
92
93
|
*/
|
|
93
94
|
export declare const create_app_backend: (options: CreateAppBackendOptions) => Promise<AppBackend>;
|
|
94
95
|
//# sourceMappingURL=app_backend.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_backend.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/app_backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AAE/C,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAC,cAAc,EAAE,aAAa,EAAC,MAAM,6BAA6B,CAAC;AAC/E,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAiB,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAI/F;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,oIAAoI;IACpI,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC3D,iEAAiE;IACjE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACvC,+DAA+D;IAC/D,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACnD,2B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UAAU;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,oIAAoI;IACpI,QAAQ,CAAC,iBAAiB,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC3D,iEAAiE;IACjE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,uBAAuB;IACvC,+DAA+D;IAC/D,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAC;IACnD,2BAA2B;IAC3B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,qBAAqB;IACrB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,iFAAiF;IACjF,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAChD;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CACzD;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAU,SAAS,uBAAuB,KAAG,OAAO,CAAC,UAAU,CAoC7F,CAAC"}
|
|
@@ -23,6 +23,7 @@ import { create_db } from '../db/create_db.js';
|
|
|
23
23
|
*
|
|
24
24
|
* @param options - keyring, password deps, optional database URL, and optional `migration_namespaces`
|
|
25
25
|
* @returns app backend with deps, database metadata, and combined migration results
|
|
26
|
+
* @throws Error if `migration_namespaces` contains the reserved `'fuz_auth'` namespace
|
|
26
27
|
*/
|
|
27
28
|
export const create_app_backend = async (options) => {
|
|
28
29
|
const { database_url, keyring, password, stat, read_text_file, delete_file } = options;
|
|
@@ -206,6 +206,10 @@ export declare const DEFAULT_MAX_BODY_SIZE: number;
|
|
|
206
206
|
* static serving. Database migrations belong to the backend lifecycle —
|
|
207
207
|
* pass `migration_namespaces` to `create_app_backend`.
|
|
208
208
|
*
|
|
209
|
+
* When `audit_log_sse` is set, shallow-copies `backend.deps` with a composed
|
|
210
|
+
* `on_audit_event` that fans out to the SSE registry and the original
|
|
211
|
+
* callback — `backend.deps` itself is not mutated.
|
|
212
|
+
*
|
|
209
213
|
* @param options - server configuration
|
|
210
214
|
* @returns assembled Hono app, backend, surface build, and bootstrap status
|
|
211
215
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/app_server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAC,IAAI,EAAE,KAAK,OAAO,EAAC,MAAM,MAAM,CAAC;AAGxC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAEN,KAAK,cAAc,EAEnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAGN,KAAK,WAAW,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAGN,KAAK,WAAW,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EA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2BAA2B,EAAE,WAAW,GAAG,IAAI,CAAC;IAChD,2EAA2E;IAC3E,YAAY,EAAE,WAAW,CAAC;IAC1B,oFAAoF;IACpF,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;CAC9B;AAED,uCAAuC;AACvC,MAAM,WAAW,SAAS;IACzB,GAAG,EAAE,IAAI,CAAC;IACV,wEAAwE;IACxE,YAAY,EAAE,cAAc,CAAC;IAC7B,gBAAgB,EAAE,eAAe,CAAC;IAClC,2EAA2E;IAC3E,YAAY,EAAE,WAAW,CAAC;IAC1B,oGAAoG;IACpG,iBAAiB,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAClD,oFAAoF;IACpF,SAAS,EAAE,WAAW,GAAG,IAAI,CAAC;IAC9B,mEAAmE;IACnE,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B;AAED,gDAAgD;AAChD,eAAO,MAAM,qBAAqB,QAAc,CAAC;AAEjD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,GAAU,SAAS,gBAAgB,KAAG,OAAO,CAAC,SAAS,CA4PpF,CAAC"}
|
|
@@ -40,6 +40,10 @@ export const DEFAULT_MAX_BODY_SIZE = 1024 * 1024;
|
|
|
40
40
|
* static serving. Database migrations belong to the backend lifecycle —
|
|
41
41
|
* pass `migration_namespaces` to `create_app_backend`.
|
|
42
42
|
*
|
|
43
|
+
* When `audit_log_sse` is set, shallow-copies `backend.deps` with a composed
|
|
44
|
+
* `on_audit_event` that fans out to the SSE registry and the original
|
|
45
|
+
* callback — `backend.deps` itself is not mutated.
|
|
46
|
+
*
|
|
43
47
|
* @param options - server configuration
|
|
44
48
|
* @returns assembled Hono app, backend, surface build, and bootstrap status
|
|
45
49
|
*/
|
|
@@ -12,8 +12,11 @@
|
|
|
12
12
|
* Result of validating an nginx config template string.
|
|
13
13
|
*/
|
|
14
14
|
export interface NginxValidationResult {
|
|
15
|
+
/** True when no errors were detected. Warnings do not affect this flag. */
|
|
15
16
|
ok: boolean;
|
|
17
|
+
/** Non-fatal issues — missing optional headers, weakened defaults, etc. */
|
|
16
18
|
warnings: Array<string>;
|
|
19
|
+
/** Fatal issues — missing `/api` block, missing required security headers, etc. */
|
|
17
20
|
errors: Array<string>;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate_nginx.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/validate_nginx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB;AAgGD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,KAAG,qBA+FtD,CAAC"}
|
|
1
|
+
{"version":3,"file":"validate_nginx.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/server/validate_nginx.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,2EAA2E;IAC3E,EAAE,EAAE,OAAO,CAAC;IACZ,2EAA2E;IAC3E,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,mFAAmF;IACnF,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB;AAgGD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,MAAM,KAAG,qBA+FtD,CAAC"}
|
|
@@ -55,6 +55,11 @@ export interface StandardAdminIntegrationTestOptions {
|
|
|
55
55
|
* for the suites that cover it.
|
|
56
56
|
*
|
|
57
57
|
* @param options - session config, route factory, role schema, RPC endpoints
|
|
58
|
+
* @throws Error at setup time when `options.rpc_endpoints` is empty — admin
|
|
59
|
+
* permit grant/revoke, session/token revoke-all, and audit-log reads are
|
|
60
|
+
* all RPC-only since the 2026-04-22 migration. Hard-fails via
|
|
61
|
+
* `require_rpc_endpoint_path` so consumers see a clear setup error rather
|
|
62
|
+
* than `method not found` mid-suite.
|
|
58
63
|
*/
|
|
59
64
|
export declare const describe_standard_admin_integration_tests: (options: StandardAdminIntegrationTestOptions) => void;
|
|
60
65
|
//# sourceMappingURL=admin_integration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin_integration.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/admin_integration.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAgC7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAA0B,KAAK,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAA6C,KAAK,eAAe,EAAC,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,SAAS,CAAC;AASjB,OAAO,EAKN,KAAK,uBAAuB,EAC5B,MAAM,kBAAkB,CAAC;AAqB1B;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD,4CAA4C;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,wDAAwD;IACxD,kBAAkB,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAChE,4GAA4G;IAC5G,KAAK,EAAE,gBAAgB,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE,uBAAuB,CAAC;IACvC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAChC;AAgCD
|
|
1
|
+
{"version":3,"file":"admin_integration.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/admin_integration.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAgC7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAA0B,KAAK,gBAAgB,EAAC,MAAM,wBAAwB,CAAC;AAEtF,OAAO,EAA6C,KAAK,eAAe,EAAC,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,SAAS,CAAC;AASjB,OAAO,EAKN,KAAK,uBAAuB,EAC5B,MAAM,kBAAkB,CAAC;AAqB1B;;GAEG;AACH,MAAM,WAAW,mCAAmC;IACnD,4CAA4C;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,wDAAwD;IACxD,kBAAkB,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAChE,4GAA4G;IAC5G,KAAK,EAAE,gBAAgB,CAAC;IACxB;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE,uBAAuB,CAAC;IACvC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAChC;AAgCD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,yCAAyC,GACrD,SAAS,mCAAmC,KAC1C,IAy1BF,CAAC"}
|
|
@@ -73,6 +73,11 @@ const build_admin_test_app_options = (options, db, roles) => ({
|
|
|
73
73
|
* for the suites that cover it.
|
|
74
74
|
*
|
|
75
75
|
* @param options - session config, route factory, role schema, RPC endpoints
|
|
76
|
+
* @throws Error at setup time when `options.rpc_endpoints` is empty — admin
|
|
77
|
+
* permit grant/revoke, session/token revoke-all, and audit-log reads are
|
|
78
|
+
* all RPC-only since the 2026-04-22 migration. Hard-fails via
|
|
79
|
+
* `require_rpc_endpoint_path` so consumers see a clear setup error rather
|
|
80
|
+
* than `method not found` mid-suite.
|
|
76
81
|
*/
|
|
77
82
|
export const describe_standard_admin_integration_tests = (options) => {
|
|
78
83
|
// Hard-fail early so consumers see a clear setup error instead of a
|
|
@@ -23,9 +23,11 @@ export declare const create_standard_adversarial_cases: (allowed_origin: string)
|
|
|
23
23
|
* Create a middleware stack app with standard adversarial header tests.
|
|
24
24
|
*
|
|
25
25
|
* Convenience wrapper combining `create_test_middleware_stack_app`
|
|
26
|
-
* and `create_standard_adversarial_cases`.
|
|
27
|
-
*
|
|
28
|
-
* `mock_validate`
|
|
26
|
+
* and `create_standard_adversarial_cases`. Generates one `test()` per case
|
|
27
|
+
* inside a `describe()` block — asserts body content for both error and
|
|
28
|
+
* success cases, and verifies that `mock_validate` was (or was not) reached
|
|
29
|
+
* per the case's `validate_expectation` flag, ensuring earlier middleware
|
|
30
|
+
* actually short-circuits before token validation in the rejection cases.
|
|
29
31
|
*
|
|
30
32
|
* @param suite_name - the describe block name
|
|
31
33
|
* @param options - middleware stack configuration
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial_headers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_headers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAY7B,OAAO,KAAK,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAG3B,OAAO,EAGN,KAAK,0BAA0B,EAC/B,MAAM,iBAAiB,CAAC;AAIzB,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+GAA+G;IAC/G,qBAAqB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IAClC,qGAAqG;IACrG,oBAAoB,EAAE,QAAQ,GAAG,YAAY,CAAC;CAC9C;AAID;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,GAC7C,gBAAgB,MAAM,KACpB,KAAK,CAAC,qBAAqB,CA+D7B,CAAC;AAIF
|
|
1
|
+
{"version":3,"file":"adversarial_headers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_headers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAY7B,OAAO,KAAK,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAG3B,OAAO,EAGN,KAAK,0BAA0B,EAC/B,MAAM,iBAAiB,CAAC;AAIzB,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,+GAA+G;IAC/G,qBAAqB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC;IAClC,qGAAqG;IACrG,oBAAoB,EAAE,QAAQ,GAAG,YAAY,CAAC;CAC9C;AAID;;;;;GAKG;AACH,eAAO,MAAM,iCAAiC,GAC7C,gBAAgB,MAAM,KACpB,KAAK,CAAC,qBAAqB,CA+D7B,CAAC;AAIF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qCAAqC,GACjD,YAAY,MAAM,EAClB,SAAS,0BAA0B,EACnC,gBAAgB,MAAM,EACtB,cAAc,KAAK,CAAC,qBAAqB,CAAC,KACxC,IAkCF,CAAC"}
|
|
@@ -86,9 +86,11 @@ export const create_standard_adversarial_cases = (allowed_origin) => [
|
|
|
86
86
|
* Create a middleware stack app with standard adversarial header tests.
|
|
87
87
|
*
|
|
88
88
|
* Convenience wrapper combining `create_test_middleware_stack_app`
|
|
89
|
-
* and `create_standard_adversarial_cases`.
|
|
90
|
-
*
|
|
91
|
-
* `mock_validate`
|
|
89
|
+
* and `create_standard_adversarial_cases`. Generates one `test()` per case
|
|
90
|
+
* inside a `describe()` block — asserts body content for both error and
|
|
91
|
+
* success cases, and verifies that `mock_validate` was (or was not) reached
|
|
92
|
+
* per the case's `validate_expectation` flag, ensuring earlier middleware
|
|
93
|
+
* actually short-circuits before token validation in the rejection cases.
|
|
92
94
|
*
|
|
93
95
|
* @param suite_name - the describe block name
|
|
94
96
|
* @param options - middleware stack configuration
|
|
@@ -24,6 +24,10 @@ interface QueryTestCase {
|
|
|
24
24
|
* - One wrong-type value per field
|
|
25
25
|
* - Null for required non-nullable fields
|
|
26
26
|
* - One format violation per constrained field
|
|
27
|
+
*
|
|
28
|
+
* @throws Error if the seed body built by `generate_valid_value` fails
|
|
29
|
+
* `input_schema.safeParse` — surfaces broken generation logic with the
|
|
30
|
+
* Zod issues path rather than producing nonsense adversarial cases.
|
|
27
31
|
*/
|
|
28
32
|
export declare const generate_input_test_cases: (input_schema: z.ZodType) => Array<InputTestCase>;
|
|
29
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adversarial_input.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_input.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAUtB,OAAO,EAEN,0BAA0B,EAC1B,uBAAuB,EAGvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AA8ChE,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,OAAO,0BAA0B,GAAG,OAAO,uBAAuB,CAAC;CACnF;AAED,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAID
|
|
1
|
+
{"version":3,"file":"adversarial_input.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/adversarial_input.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAiB7B,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAUtB,OAAO,EAEN,0BAA0B,EAC1B,uBAAuB,EAGvB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAC,sBAAsB,EAAC,MAAM,qBAAqB,CAAC;AA8ChE,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,EAAE,OAAO,0BAA0B,GAAG,OAAO,uBAAuB,CAAC;CACnF;AAED,UAAU,cAAc;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED,UAAU,aAAa;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAID;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc,CAAC,CAAC,OAAO,KAAG,KAAK,CAAC,aAAa,CAyLtF,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,eAAe,CAAC,CAAC,SAAS,KAAG,KAAK,CAAC,cAAc,CA+B3F,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc,CAAC,CAAC,SAAS,KAAG,KAAK,CAAC,aAAa,CA4CxF,CAAC;AAqBF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,GAAI,SAAS,sBAAsB,KAAG,IA4M5E,CAAC"}
|
|
@@ -68,6 +68,10 @@ const format_violation = (format) => {
|
|
|
68
68
|
* - One wrong-type value per field
|
|
69
69
|
* - Null for required non-nullable fields
|
|
70
70
|
* - One format violation per constrained field
|
|
71
|
+
*
|
|
72
|
+
* @throws Error if the seed body built by `generate_valid_value` fails
|
|
73
|
+
* `input_schema.safeParse` — surfaces broken generation logic with the
|
|
74
|
+
* Zod issues path rather than producing nonsense adversarial cases.
|
|
71
75
|
*/
|
|
72
76
|
export const generate_input_test_cases = (input_schema) => {
|
|
73
77
|
if (is_null_schema(input_schema))
|
|
@@ -51,6 +51,9 @@ export interface BootstrapTestAccountOptions {
|
|
|
51
51
|
* Creates an account with actor, grants roles, creates an API token,
|
|
52
52
|
* creates a session, and signs a session cookie. Shared by
|
|
53
53
|
* `create_test_app_server` and `TestApp.create_account`.
|
|
54
|
+
*
|
|
55
|
+
* @mutates the underlying `options.db` — inserts rows into `account`, `actor`,
|
|
56
|
+
* `permit` (one per role), `api_token`, and `auth_session`.
|
|
54
57
|
*/
|
|
55
58
|
export declare const bootstrap_test_account: (options: BootstrapTestAccountOptions) => Promise<{
|
|
56
59
|
account: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_server.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/app_server.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,wBAAwB,CAAC;AAGjD,OAAO,E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,IAAI,CAAC;IACV,OAAO,EAAE,aAAa,CAAC;IACvB,YAAY,EAAE,cAAc,CAAC;IAC7B,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9B,kEAAkE;IAClE,sBAAsB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnF,gEAAgE;IAChE,qBAAqB,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClF,iEAAiE;IACjE,2BAA2B,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxF,qDAAqD;IACrD,cAAc,EAAE,CAAC,OAAO,CAAC,EAAE;QAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KACtB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAC3B,8DAA8D;IAC9D,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,GAAU,SAAS,oBAAoB,KAAG,OAAO,CAAC,OAAO,CAyGpF,CAAC"}
|
|
@@ -40,6 +40,9 @@ const fallback_pglite_factory = create_pglite_factory(async (db) => {
|
|
|
40
40
|
* Creates an account with actor, grants roles, creates an API token,
|
|
41
41
|
* creates a session, and signs a session cookie. Shared by
|
|
42
42
|
* `create_test_app_server` and `TestApp.create_account`.
|
|
43
|
+
*
|
|
44
|
+
* @mutates the underlying `options.db` — inserts rows into `account`, `actor`,
|
|
45
|
+
* `permit` (one per role), `api_token`, and `auth_session`.
|
|
43
46
|
*/
|
|
44
47
|
export const bootstrap_test_account = async (options) => {
|
|
45
48
|
const { db, keyring, session_options, password, username = 'keeper', password_value = 'test-password-123', roles = [], } = options;
|
|
@@ -84,6 +87,14 @@ export const bootstrap_test_account = async (options) => {
|
|
|
84
87
|
*
|
|
85
88
|
* @param options - session options and optional overrides
|
|
86
89
|
* @returns a `TestAppServer` ready for HTTP testing
|
|
90
|
+
* @mutates the underlying database — when `db` is supplied, resets singleton
|
|
91
|
+
* state (`bootstrap_lock.bootstrapped`, `app_settings.open_signup`) before
|
|
92
|
+
* bootstrapping; in either branch inserts an account, actor, role permits,
|
|
93
|
+
* API token, and session row. When `audit_log_config` is provided, also
|
|
94
|
+
* sets `backend.deps.audit_log_config` so `create_app_server`'s shallow
|
|
95
|
+
* spread picks it up.
|
|
96
|
+
* @throws Error if `create_validated_keyring(TEST_COOKIE_SECRET)` rejects —
|
|
97
|
+
* should never happen with the literal stub but surfaced eagerly.
|
|
87
98
|
*/
|
|
88
99
|
/** Silent logger for tests — suppresses all output. */
|
|
89
100
|
const test_log = new Logger('test', { level: 'off' });
|
|
@@ -13,8 +13,15 @@ export declare const resolve_fixture_path: (filename: string, import_meta_url: s
|
|
|
13
13
|
/**
|
|
14
14
|
* Compare live surface against a committed snapshot JSON file.
|
|
15
15
|
*
|
|
16
|
+
* Failure message instructs the developer to run `gro gen` to update the
|
|
17
|
+
* snapshot — every fuz_app consumer wires the snapshot through a `*.gen.ts`
|
|
18
|
+
* file so regeneration goes through the same pipeline as the rest of the
|
|
19
|
+
* generated artifacts.
|
|
20
|
+
*
|
|
16
21
|
* @param surface - the live surface to check
|
|
17
22
|
* @param snapshot_path - absolute path to the committed JSON snapshot
|
|
23
|
+
* @throws AssertionError if the live surface does not deep-equal the snapshot,
|
|
24
|
+
* or `Error` if the snapshot file is unreadable / malformed JSON.
|
|
18
25
|
*/
|
|
19
26
|
export declare const assert_surface_matches_snapshot: (surface: AppSurface, snapshot_path: string) => void;
|
|
20
27
|
/**
|
|
@@ -28,21 +35,19 @@ export declare const assert_surface_deterministic: (build_surface: () => AppSurf
|
|
|
28
35
|
*
|
|
29
36
|
* @param surface - the app surface to check
|
|
30
37
|
* @param expected_public - format: `['GET /health', 'POST /api/account/login']`
|
|
38
|
+
* @throws AssertionError if the live surface has public routes not in
|
|
39
|
+
* `expected_public`, or if any entry in `expected_public` is missing from
|
|
40
|
+
* the live surface.
|
|
31
41
|
*/
|
|
32
42
|
export declare const assert_only_expected_public_routes: (surface: AppSurface, expected_public: Array<string>) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Verify every route under a path prefix has the exact expected middleware stack.
|
|
35
|
-
*
|
|
36
|
-
* @param surface - the app surface to check
|
|
37
|
-
* @param path_prefix - prefix to filter routes (e.g. `'/api/'`)
|
|
38
|
-
* @param expected_middleware - the exact middleware names in order
|
|
39
|
-
*/
|
|
40
43
|
/**
|
|
41
44
|
* Look up the merged error schema for a route+status from a pre-built schema lookup.
|
|
42
45
|
*
|
|
43
46
|
* @param lookup - map from `"METHOD /path"` to merged error schemas
|
|
44
47
|
* @param route - the surface route to look up
|
|
45
48
|
* @param status - HTTP status code
|
|
49
|
+
* @returns the Zod schema for that route+status, or `undefined` when no error
|
|
50
|
+
* schema is declared for the status code
|
|
46
51
|
*/
|
|
47
52
|
export declare const get_route_error_schema: (lookup: Map<string, RouteErrorSchemas>, route: AppSurfaceRoute, status: number) => z.ZodType | undefined;
|
|
48
53
|
/**
|
|
@@ -55,7 +60,18 @@ export declare const get_route_error_schema: (lookup: Map<string, RouteErrorSche
|
|
|
55
60
|
* @param route - the surface route to validate against
|
|
56
61
|
* @param status - expected HTTP status code
|
|
57
62
|
* @param body - the parsed response body to validate
|
|
63
|
+
* @throws AssertionError if no schema is declared for the route+status pair.
|
|
64
|
+
* @throws ZodError if the body does not satisfy the declared schema.
|
|
58
65
|
*/
|
|
59
66
|
export declare const assert_error_schema_valid: (lookup: Map<string, RouteErrorSchemas>, route: AppSurfaceRoute, status: number, body: unknown) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Verify every route under a path prefix has the exact expected middleware stack.
|
|
69
|
+
*
|
|
70
|
+
* @param surface - the app surface to check
|
|
71
|
+
* @param path_prefix - prefix to filter routes (e.g. `'/api/'`)
|
|
72
|
+
* @param expected_middleware - the exact middleware names in order
|
|
73
|
+
* @throws AssertionError if no routes match `path_prefix`, or if any matching
|
|
74
|
+
* route's `applicable_middleware` does not deep-equal `expected_middleware`.
|
|
75
|
+
*/
|
|
60
76
|
export declare const assert_full_middleware_stack: (surface: AppSurface, path_prefix: string, expected_middleware: Array<string>) => void;
|
|
61
77
|
//# sourceMappingURL=assertions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assertions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAe7B,OAAO,KAAK,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,EAAE,iBAAiB,MAAM,KAAG,MACtB,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"assertions.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAe7B,OAAO,KAAK,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAE3B,OAAO,KAAK,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,EAAE,iBAAiB,MAAM,KAAG,MACtB,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,+BAA+B,GAC3C,SAAS,UAAU,EACnB,eAAe,MAAM,KACnB,IAOF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,eAAe,MAAM,UAAU,KAAG,IAE9E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kCAAkC,GAC9C,SAAS,UAAU,EACnB,iBAAiB,KAAK,CAAC,MAAM,CAAC,KAC5B,IAWF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GAClC,QAAQ,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACtC,OAAO,eAAe,EACtB,QAAQ,MAAM,KACZ,CAAC,CAAC,OAAO,GAAG,SAGd,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,yBAAyB,GACrC,QAAQ,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACtC,OAAO,eAAe,EACtB,QAAQ,MAAM,EACd,MAAM,OAAO,KACX,IAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B,GACxC,SAAS,UAAU,EACnB,aAAa,MAAM,EACnB,qBAAqB,KAAK,CAAC,MAAM,CAAC,KAChC,IAUF,CAAC"}
|
|
@@ -22,8 +22,15 @@ export const resolve_fixture_path = (filename, import_meta_url) => resolve(dirna
|
|
|
22
22
|
/**
|
|
23
23
|
* Compare live surface against a committed snapshot JSON file.
|
|
24
24
|
*
|
|
25
|
+
* Failure message instructs the developer to run `gro gen` to update the
|
|
26
|
+
* snapshot — every fuz_app consumer wires the snapshot through a `*.gen.ts`
|
|
27
|
+
* file so regeneration goes through the same pipeline as the rest of the
|
|
28
|
+
* generated artifacts.
|
|
29
|
+
*
|
|
25
30
|
* @param surface - the live surface to check
|
|
26
31
|
* @param snapshot_path - absolute path to the committed JSON snapshot
|
|
32
|
+
* @throws AssertionError if the live surface does not deep-equal the snapshot,
|
|
33
|
+
* or `Error` if the snapshot file is unreadable / malformed JSON.
|
|
27
34
|
*/
|
|
28
35
|
export const assert_surface_matches_snapshot = (surface, snapshot_path) => {
|
|
29
36
|
const committed = JSON.parse(readFileSync(snapshot_path, 'utf-8'));
|
|
@@ -42,6 +49,9 @@ export const assert_surface_deterministic = (build_surface) => {
|
|
|
42
49
|
*
|
|
43
50
|
* @param surface - the app surface to check
|
|
44
51
|
* @param expected_public - format: `['GET /health', 'POST /api/account/login']`
|
|
52
|
+
* @throws AssertionError if the live surface has public routes not in
|
|
53
|
+
* `expected_public`, or if any entry in `expected_public` is missing from
|
|
54
|
+
* the live surface.
|
|
45
55
|
*/
|
|
46
56
|
export const assert_only_expected_public_routes = (surface, expected_public) => {
|
|
47
57
|
const expected = new Set(expected_public);
|
|
@@ -53,19 +63,14 @@ export const assert_only_expected_public_routes = (surface, expected_public) =>
|
|
|
53
63
|
assert.strictEqual(unexpected.length, 0, `Unexpected public routes: ${unexpected.join(', ')}`);
|
|
54
64
|
assert.strictEqual(missing.length, 0, `Expected public routes missing: ${missing.join(', ')}`);
|
|
55
65
|
};
|
|
56
|
-
/**
|
|
57
|
-
* Verify every route under a path prefix has the exact expected middleware stack.
|
|
58
|
-
*
|
|
59
|
-
* @param surface - the app surface to check
|
|
60
|
-
* @param path_prefix - prefix to filter routes (e.g. `'/api/'`)
|
|
61
|
-
* @param expected_middleware - the exact middleware names in order
|
|
62
|
-
*/
|
|
63
66
|
/**
|
|
64
67
|
* Look up the merged error schema for a route+status from a pre-built schema lookup.
|
|
65
68
|
*
|
|
66
69
|
* @param lookup - map from `"METHOD /path"` to merged error schemas
|
|
67
70
|
* @param route - the surface route to look up
|
|
68
71
|
* @param status - HTTP status code
|
|
72
|
+
* @returns the Zod schema for that route+status, or `undefined` when no error
|
|
73
|
+
* schema is declared for the status code
|
|
69
74
|
*/
|
|
70
75
|
export const get_route_error_schema = (lookup, route, status) => {
|
|
71
76
|
const key = `${route.method} ${route.path}`;
|
|
@@ -81,12 +86,23 @@ export const get_route_error_schema = (lookup, route, status) => {
|
|
|
81
86
|
* @param route - the surface route to validate against
|
|
82
87
|
* @param status - expected HTTP status code
|
|
83
88
|
* @param body - the parsed response body to validate
|
|
89
|
+
* @throws AssertionError if no schema is declared for the route+status pair.
|
|
90
|
+
* @throws ZodError if the body does not satisfy the declared schema.
|
|
84
91
|
*/
|
|
85
92
|
export const assert_error_schema_valid = (lookup, route, status, body) => {
|
|
86
93
|
const schema = get_route_error_schema(lookup, route, status);
|
|
87
94
|
assert.ok(schema, `missing error schema for ${status} on ${route.method} ${route.path}`);
|
|
88
95
|
schema.parse(body);
|
|
89
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Verify every route under a path prefix has the exact expected middleware stack.
|
|
99
|
+
*
|
|
100
|
+
* @param surface - the app surface to check
|
|
101
|
+
* @param path_prefix - prefix to filter routes (e.g. `'/api/'`)
|
|
102
|
+
* @param expected_middleware - the exact middleware names in order
|
|
103
|
+
* @throws AssertionError if no routes match `path_prefix`, or if any matching
|
|
104
|
+
* route's `applicable_middleware` does not deep-equal `expected_middleware`.
|
|
105
|
+
*/
|
|
90
106
|
export const assert_full_middleware_stack = (surface, path_prefix, expected_middleware) => {
|
|
91
107
|
const routes = surface.routes.filter((r) => r.path.startsWith(path_prefix));
|
|
92
108
|
assert.ok(routes.length > 0, `No routes found under ${path_prefix}`);
|
|
@@ -39,6 +39,10 @@ export interface AuditCompletenessTestOptions {
|
|
|
39
39
|
* database, then queries the `audit_log` table to verify events.
|
|
40
40
|
*
|
|
41
41
|
* @param options - session config, route factory, and optional overrides
|
|
42
|
+
* @throws Error at setup time when `options.rpc_endpoints` is empty — the
|
|
43
|
+
* mutation-audit tests drive permit flow, session/token revoke-all, and
|
|
44
|
+
* invite create/delete through their RPC action specs. Hard-fails via
|
|
45
|
+
* `require_rpc_endpoint_path`.
|
|
42
46
|
*/
|
|
43
47
|
export declare const describe_audit_completeness_tests: (options: AuditCompletenessTestOptions) => void;
|
|
44
48
|
//# sourceMappingURL=audit_completeness.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit_completeness.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/audit_completeness.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAkB7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAIrD,OAAO,EAGN,KAAK,eAAe,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,SAAS,CAAC;AAKjB,OAAO,EAIN,KAAK,uBAAuB,EAC5B,MAAM,kBAAkB,CAAC;AAsB1B;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C,4CAA4C;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,wDAAwD;IACxD,kBAAkB,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAChE;;;;;;;;;;;OAWG;IACH,aAAa,EAAE,uBAAuB,CAAC;IACvC,iDAAiD;IACjD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qEAAqE;IACrE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAChC;AAoDD
|
|
1
|
+
{"version":3,"file":"audit_completeness.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/audit_completeness.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAkB7B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAIrD,OAAO,EAGN,KAAK,eAAe,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIN,KAAK,SAAS,EACd,MAAM,SAAS,CAAC;AAKjB,OAAO,EAIN,KAAK,uBAAuB,EAC5B,MAAM,kBAAkB,CAAC;AAsB1B;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC5C,4CAA4C;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACxC,wDAAwD;IACxD,kBAAkB,EAAE,CAAC,GAAG,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAChE;;;;;;;;;;;OAWG;IACH,aAAa,EAAE,uBAAuB,CAAC;IACvC,iDAAiD;IACjD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qEAAqE;IACrE,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;CAChC;AAoDD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iCAAiC,GAAI,SAAS,4BAA4B,KAAG,IAyezF,CAAC"}
|
|
@@ -64,6 +64,10 @@ const json_session_headers = (test_app, extra) => test_app.create_session_header
|
|
|
64
64
|
* database, then queries the `audit_log` table to verify events.
|
|
65
65
|
*
|
|
66
66
|
* @param options - session config, route factory, and optional overrides
|
|
67
|
+
* @throws Error at setup time when `options.rpc_endpoints` is empty — the
|
|
68
|
+
* mutation-audit tests drive permit flow, session/token revoke-all, and
|
|
69
|
+
* invite create/delete through their RPC action specs. Hard-fails via
|
|
70
|
+
* `require_rpc_endpoint_path`.
|
|
67
71
|
*/
|
|
68
72
|
export const describe_audit_completeness_tests = (options) => {
|
|
69
73
|
// Hard-fail early so consumers see a clear setup error instead of a
|
|
@@ -48,6 +48,9 @@ export declare const create_auth_test_apps: (route_specs: Array<RouteSpec>, role
|
|
|
48
48
|
* @param apps - the pre-built auth test apps
|
|
49
49
|
* @param auth - the route's auth options
|
|
50
50
|
* @returns the correctly-authenticated Hono app
|
|
51
|
+
* @throws Error if `auth.type === 'role'` and `auth.role` is not present in
|
|
52
|
+
* `apps.by_role` — surfaces a missing entry in the `roles` array passed to
|
|
53
|
+
* `create_auth_test_apps`.
|
|
51
54
|
*/
|
|
52
55
|
export declare const select_auth_app: (apps: AuthTestApps, auth: RouteAuth) => Hono;
|
|
53
56
|
/** Replace Hono route params (`:foo`) with dummy values for HTTP testing. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_apps.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/auth_apps.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAI5E;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,OAAO,MAAM,KAAG,cAI1D,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GACtC,aAAa,KAAK,CAAC,SAAS,CAAC,EAC7B,WAAW,cAAc,EACzB,kBAAkB,cAAc,KAC9B,IAkBF,CAAC;AAEF,sFAAsF;AACtF,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GACjC,aAAa,KAAK,CAAC,SAAS,CAAC,EAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,KAClB,YAeF,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"auth_apps.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/auth_apps.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;GAOG;AAEH,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAG1B,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAI5E;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,GAAI,OAAO,MAAM,KAAG,cAI1D,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GACtC,aAAa,KAAK,CAAC,SAAS,CAAC,EAC7B,WAAW,cAAc,EACzB,kBAAkB,cAAc,KAC9B,IAkBF,CAAC;AAEF,sFAAsF;AACtF,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,IAAI,CAAC;IACb,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GACjC,aAAa,KAAK,CAAC,SAAS,CAAC,EAC7B,OAAO,KAAK,CAAC,MAAM,CAAC,KAClB,YAeF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,YAAY,EAAE,MAAM,SAAS,KAAG,IAcrE,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,KAAG,MAA4C,CAAC"}
|
|
@@ -72,6 +72,9 @@ export const create_auth_test_apps = (route_specs, roles) => {
|
|
|
72
72
|
* @param apps - the pre-built auth test apps
|
|
73
73
|
* @param auth - the route's auth options
|
|
74
74
|
* @returns the correctly-authenticated Hono app
|
|
75
|
+
* @throws Error if `auth.type === 'role'` and `auth.role` is not present in
|
|
76
|
+
* `apps.by_role` — surfaces a missing entry in the `roles` array passed to
|
|
77
|
+
* `create_auth_test_apps`.
|
|
75
78
|
*/
|
|
76
79
|
export const select_auth_app = (apps, auth) => {
|
|
77
80
|
switch (auth.type) {
|