@fuzdev/fuz_app 0.86.0 → 0.88.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.
Files changed (106) hide show
  1. package/dist/actions/action_rpc.js +1 -1
  2. package/dist/actions/register_action_ws.js +1 -1
  3. package/dist/auth/CLAUDE.md +15 -0
  4. package/dist/auth/account_actions.js +1 -1
  5. package/dist/auth/account_route_schema.d.ts +146 -0
  6. package/dist/auth/account_route_schema.d.ts.map +1 -0
  7. package/dist/auth/account_route_schema.js +141 -0
  8. package/dist/auth/account_routes.d.ts +0 -79
  9. package/dist/auth/account_routes.d.ts.map +1 -1
  10. package/dist/auth/account_routes.js +15 -110
  11. package/dist/auth/audit_log_route_schema.d.ts +32 -0
  12. package/dist/auth/audit_log_route_schema.d.ts.map +1 -0
  13. package/dist/auth/audit_log_route_schema.js +36 -0
  14. package/dist/auth/audit_log_routes.d.ts.map +1 -1
  15. package/dist/auth/audit_log_routes.js +2 -12
  16. package/dist/auth/bearer_auth.js +1 -1
  17. package/dist/auth/bootstrap_route_schema.d.ts +85 -0
  18. package/dist/auth/bootstrap_route_schema.d.ts.map +1 -0
  19. package/dist/auth/bootstrap_route_schema.js +56 -0
  20. package/dist/auth/bootstrap_routes.d.ts +0 -20
  21. package/dist/auth/bootstrap_routes.d.ts.map +1 -1
  22. package/dist/auth/bootstrap_routes.js +4 -35
  23. package/dist/auth/signup_route_schema.d.ts +53 -0
  24. package/dist/auth/signup_route_schema.d.ts.map +1 -0
  25. package/dist/auth/signup_route_schema.js +59 -0
  26. package/dist/auth/signup_routes.d.ts +0 -26
  27. package/dist/auth/signup_routes.d.ts.map +1 -1
  28. package/dist/auth/signup_routes.js +8 -40
  29. package/dist/http/CLAUDE.md +2 -1
  30. package/dist/http/client_ip.d.ts +15 -0
  31. package/dist/http/client_ip.d.ts.map +1 -0
  32. package/dist/http/client_ip.js +13 -0
  33. package/dist/http/proxy.d.ts +0 -7
  34. package/dist/http/proxy.d.ts.map +1 -1
  35. package/dist/http/proxy.js +0 -7
  36. package/dist/realtime/sse.d.ts +0 -2
  37. package/dist/realtime/sse.d.ts.map +1 -1
  38. package/dist/realtime/sse.js +1 -2
  39. package/dist/realtime/sse_constants.d.ts +17 -0
  40. package/dist/realtime/sse_constants.d.ts.map +1 -0
  41. package/dist/realtime/sse_constants.js +16 -0
  42. package/dist/testing/CLAUDE.md +6 -3
  43. package/dist/testing/admin_integration.d.ts.map +1 -1
  44. package/dist/testing/admin_integration.js +1 -1
  45. package/dist/testing/app_server.d.ts +0 -15
  46. package/dist/testing/app_server.d.ts.map +1 -1
  47. package/dist/testing/app_server.js +1 -15
  48. package/dist/testing/audit_completeness.d.ts.map +1 -1
  49. package/dist/testing/audit_completeness.js +1 -1
  50. package/dist/testing/cross_backend/account_lifecycle.d.ts +5 -5
  51. package/dist/testing/cross_backend/account_lifecycle.d.ts.map +1 -1
  52. package/dist/testing/cross_backend/account_lifecycle.js +1 -1
  53. package/dist/testing/cross_backend/actor_lookup.d.ts +5 -5
  54. package/dist/testing/cross_backend/actor_lookup.d.ts.map +1 -1
  55. package/dist/testing/cross_backend/actor_search.d.ts +3 -3
  56. package/dist/testing/cross_backend/actor_search.d.ts.map +1 -1
  57. package/dist/testing/cross_backend/app_settings.d.ts +3 -3
  58. package/dist/testing/cross_backend/app_settings.d.ts.map +1 -1
  59. package/dist/testing/cross_backend/body_size.d.ts +10 -0
  60. package/dist/testing/cross_backend/body_size.d.ts.map +1 -0
  61. package/dist/testing/cross_backend/body_size.js +137 -0
  62. package/dist/testing/cross_backend/body_size_smuggling.d.ts +10 -0
  63. package/dist/testing/cross_backend/body_size_smuggling.d.ts.map +1 -0
  64. package/dist/testing/cross_backend/body_size_smuggling.js +138 -0
  65. package/dist/testing/cross_backend/cell_cross_helpers.d.ts +0 -11
  66. package/dist/testing/cross_backend/cell_cross_helpers.d.ts.map +1 -1
  67. package/dist/testing/cross_backend/cell_crud.d.ts +2 -2
  68. package/dist/testing/cross_backend/cell_crud.d.ts.map +1 -1
  69. package/dist/testing/cross_backend/cell_crud.js +1 -1
  70. package/dist/testing/cross_backend/cell_grant_role.d.ts +2 -2
  71. package/dist/testing/cross_backend/cell_grant_role.d.ts.map +1 -1
  72. package/dist/testing/cross_backend/cell_grant_role.js +1 -1
  73. package/dist/testing/cross_backend/cell_relations.d.ts +2 -2
  74. package/dist/testing/cross_backend/cell_relations.d.ts.map +1 -1
  75. package/dist/testing/cross_backend/cell_relations.js +1 -1
  76. package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
  77. package/dist/testing/cross_backend/conformance_table.js +8 -6
  78. package/dist/testing/cross_backend/fact_serving.d.ts +2 -3
  79. package/dist/testing/cross_backend/fact_serving.d.ts.map +1 -1
  80. package/dist/testing/cross_backend/in_process_setup.d.ts +143 -0
  81. package/dist/testing/cross_backend/in_process_setup.d.ts.map +1 -0
  82. package/dist/testing/cross_backend/in_process_setup.js +166 -0
  83. package/dist/testing/cross_backend/origin.d.ts +5 -5
  84. package/dist/testing/cross_backend/origin.d.ts.map +1 -1
  85. package/dist/testing/cross_backend/ready.d.ts +2 -7
  86. package/dist/testing/cross_backend/ready.d.ts.map +1 -1
  87. package/dist/testing/cross_backend/setup.d.ts +54 -135
  88. package/dist/testing/cross_backend/setup.d.ts.map +1 -1
  89. package/dist/testing/cross_backend/setup.js +11 -171
  90. package/dist/testing/cross_backend/sse_round_trip.js +1 -1
  91. package/dist/testing/cross_backend/testing_backdoor.d.ts +2 -2
  92. package/dist/testing/cross_backend/testing_backdoor.d.ts.map +1 -1
  93. package/dist/testing/cross_backend/testing_reset_actions.d.ts.map +1 -1
  94. package/dist/testing/cross_backend/testing_reset_actions.js +2 -1
  95. package/dist/testing/integration.js +2 -2
  96. package/dist/testing/middleware.d.ts.map +1 -1
  97. package/dist/testing/middleware.js +2 -1
  98. package/dist/testing/sse_round_trip.d.ts +1 -1
  99. package/dist/testing/sse_round_trip.d.ts.map +1 -1
  100. package/dist/testing/sse_round_trip.js +1 -1
  101. package/dist/testing/stubs.d.ts.map +1 -1
  102. package/dist/testing/stubs.js +7 -9
  103. package/dist/testing/test_credentials.d.ts +23 -0
  104. package/dist/testing/test_credentials.d.ts.map +1 -0
  105. package/dist/testing/test_credentials.js +22 -0
  106. package/package.json +2 -2
@@ -11,7 +11,7 @@ import { Logger } from '@fuzdev/fuz_util/log.js';
11
11
  import { ApiError, RateLimitError } from '../http/error_schemas.js';
12
12
  import { Db } from '../db/db.js';
13
13
  import { prefix_route_specs } from '../http/route_spec.js';
14
- import { create_bootstrap_route_specs } from '../auth/bootstrap_routes.js';
14
+ import { bootstrap_route_shape } from '../auth/bootstrap_route_schema.js';
15
15
  import { create_rpc_endpoint } from '../actions/action_rpc.js';
16
16
  import { create_app_surface_spec, } from '../http/surface.js';
17
17
  import { AUDIT_LOG_SSE_MAX_PER_SCOPE } from '../realtime/sse_auth_guard.js';
@@ -244,14 +244,12 @@ export const create_test_app_surface_spec = (options) => {
244
244
  // short-circuits to 403 ALREADY_BOOTSTRAPPED, which is what surface tests
245
245
  // assert on. Live token_path is passed through for shape symmetry only.
246
246
  const bootstrap_route_specs = options.bootstrap && options.bootstrap.mode !== 'disabled'
247
- ? prefix_route_specs(options.bootstrap.route_prefix ?? '/api/account', create_bootstrap_route_specs(ctx.deps, {
248
- session_options: options.session_options,
249
- bootstrap_status: {
250
- available: false,
251
- token_path: options.bootstrap.mode === 'live' ? options.bootstrap.token_path : null,
252
- },
253
- ip_rate_limiter: null,
254
- }))
247
+ ? prefix_route_specs(options.bootstrap.route_prefix ?? '/api/account', [
248
+ // Surface generation reads the route shape only — the live hono
249
+ // handler never runs here, so a stub satisfies the RouteSpec type
250
+ // without pulling the in-process Hono app onto cross-process consumers.
251
+ { ...bootstrap_route_shape, handler: stub_handler },
252
+ ])
255
253
  : [];
256
254
  const route_specs = [...consumer_routes, ...rpc_route_specs, ...bootstrap_route_specs];
257
255
  let middleware_specs = create_stub_api_middleware();
@@ -0,0 +1,23 @@
1
+ import './assert_dev_env.js';
2
+ /**
3
+ * Shared test credential constants — deliberately hono-free.
4
+ *
5
+ * `DEFAULT_TEST_PASSWORD` is the single source of truth for the password
6
+ * the in-process and cross-process test fixtures bootstrap and log in with.
7
+ * It lives in this leaf module (rather than `app_server.ts`) so the
8
+ * cross-process setup helpers can import it **without** pulling in the
9
+ * in-process Hono test app — `app_server.ts` transitively reaches
10
+ * `create_app_server` (`new Hono()`), so any value import from it forces the
11
+ * optional `hono` peer onto Rust-only consumers whose cross-process suites
12
+ * never spawn the TS backend.
13
+ *
14
+ * Single-sourcing the constant keeps the in-process bootstrap, the
15
+ * cross-process `mint_account` signup/login, and the integration suite's
16
+ * hardcoded login bodies from drifting — a divergence becomes a typecheck
17
+ * miss rather than a runtime password mismatch.
18
+ *
19
+ * @module
20
+ */
21
+ /** Default password for test-bootstrapped accounts. */
22
+ export declare const DEFAULT_TEST_PASSWORD = "test-password-123";
23
+ //# sourceMappingURL=test_credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test_credentials.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/test_credentials.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,uDAAuD;AACvD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import './assert_dev_env.js';
2
+ /**
3
+ * Shared test credential constants — deliberately hono-free.
4
+ *
5
+ * `DEFAULT_TEST_PASSWORD` is the single source of truth for the password
6
+ * the in-process and cross-process test fixtures bootstrap and log in with.
7
+ * It lives in this leaf module (rather than `app_server.ts`) so the
8
+ * cross-process setup helpers can import it **without** pulling in the
9
+ * in-process Hono test app — `app_server.ts` transitively reaches
10
+ * `create_app_server` (`new Hono()`), so any value import from it forces the
11
+ * optional `hono` peer onto Rust-only consumers whose cross-process suites
12
+ * never spawn the TS backend.
13
+ *
14
+ * Single-sourcing the constant keeps the in-process bootstrap, the
15
+ * cross-process `mint_account` signup/login, and the integration suite's
16
+ * hardcoded login bodies from drifting — a divergence becomes a typecheck
17
+ * miss rather than a runtime password mismatch.
18
+ *
19
+ * @module
20
+ */
21
+ /** Default password for test-bootstrapped accounts. */
22
+ export const DEFAULT_TEST_PASSWORD = 'test-password-123';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuzdev/fuz_app",
3
- "version": "0.86.0",
3
+ "version": "0.88.0",
4
4
  "description": "fullstack app library",
5
5
  "glyph": "🗝",
6
6
  "logo": "logo.svg",
@@ -70,7 +70,7 @@
70
70
  "@electric-sql/pglite": "^0.4.5",
71
71
  "@fuzdev/blake3_wasm": "^0.1.1",
72
72
  "@fuzdev/fuz_code": "^0.46.0",
73
- "@fuzdev/fuz_css": "^0.63.0",
73
+ "@fuzdev/fuz_css": "^0.63.2",
74
74
  "@fuzdev/fuz_ui": "^0.205.0",
75
75
  "@fuzdev/fuz_util": "^0.65.1",
76
76
  "@fuzdev/gro": "^0.204.0",