@fuzdev/fuz_app 0.93.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/actions/action_codegen.d.ts +18 -18
- package/dist/actions/action_codegen.js +30 -30
- package/dist/actions/action_event.js +1 -1
- package/dist/actions/action_event_helpers.d.ts +1 -1
- package/dist/actions/action_event_types.d.ts +1 -1
- package/dist/actions/action_rpc.d.ts +2 -2
- package/dist/actions/broadcast_api.d.ts +1 -1
- package/dist/actions/broadcast_api.js +1 -1
- package/dist/actions/perform_action.d.ts +2 -2
- package/dist/actions/register_action_ws.d.ts +2 -2
- package/dist/actions/register_action_ws.js +2 -2
- package/dist/actions/register_ws_endpoint.js +1 -1
- package/dist/actions/request_tracker.svelte.d.ts +1 -1
- package/dist/actions/request_tracker.svelte.js +1 -1
- package/dist/actions/rpc_client.d.ts +1 -1
- package/dist/actions/socket.svelte.d.ts +2 -2
- package/dist/actions/transports_ws.js +1 -1
- package/dist/actions/transports_ws_auth_guard.d.ts +1 -1
- package/dist/actions/transports_ws_backend.d.ts +1 -1
- package/dist/actions/transports_ws_backend.js +2 -2
- package/dist/auth/account_action_specs.js +1 -1
- package/dist/auth/account_schema.d.ts +1 -1
- package/dist/auth/account_schema.js +1 -1
- package/dist/auth/actor_lookup_action_specs.js +1 -1
- package/dist/auth/actor_lookup_queries.d.ts +1 -1
- package/dist/auth/actor_search_action_specs.js +1 -1
- package/dist/auth/actor_search_queries.d.ts +1 -1
- package/dist/auth/admin_action_specs.js +1 -1
- package/dist/auth/api_token.js +1 -1
- package/dist/auth/api_token_queries.d.ts +1 -1
- package/dist/auth/app_settings_schema.d.ts +1 -1
- package/dist/auth/app_settings_schema.js +1 -1
- package/dist/auth/audit_emitter.d.ts +2 -2
- package/dist/auth/audit_log_routes.d.ts +1 -1
- package/dist/auth/audit_log_schema.d.ts +1 -1
- package/dist/auth/audit_log_schema.js +2 -2
- package/dist/auth/bearer_auth.d.ts +1 -1
- package/dist/auth/bootstrap_account.d.ts +1 -1
- package/dist/auth/bootstrap_route_schema.js +1 -1
- package/dist/auth/bootstrap_routes.d.ts +1 -1
- package/dist/auth/bootstrap_routes.js +1 -1
- package/dist/auth/cell_action_specs.js +2 -2
- package/dist/auth/cell_audit_action_specs.js +1 -1
- package/dist/auth/cell_audit_metadata.js +1 -1
- package/dist/auth/cell_field_action_specs.js +1 -1
- package/dist/auth/cell_field_audit_metadata.js +1 -1
- package/dist/auth/cell_grant_action_specs.js +1 -1
- package/dist/auth/cell_grant_audit_metadata.js +1 -1
- package/dist/auth/cell_item_action_specs.d.ts +1 -1
- package/dist/auth/cell_item_action_specs.js +3 -3
- package/dist/auth/cell_item_audit_metadata.js +1 -1
- package/dist/auth/cell_relation_visibility.d.ts +1 -1
- package/dist/auth/cleanup.d.ts +1 -1
- package/dist/auth/daemon_token_middleware.d.ts +1 -1
- package/dist/auth/deps.d.ts +2 -2
- package/dist/auth/invite_schema.d.ts +1 -1
- package/dist/auth/invite_schema.js +1 -1
- package/dist/auth/request_context.d.ts +1 -1
- package/dist/auth/role_grant_offer_action_specs.js +1 -1
- package/dist/auth/role_grant_offer_notifications.d.ts +1 -1
- package/dist/auth/role_grant_offer_notifications.js +1 -1
- package/dist/auth/role_grant_offer_queries.d.ts +1 -1
- package/dist/auth/role_grant_offer_schema.d.ts +1 -1
- package/dist/auth/role_grant_offer_schema.js +1 -1
- package/dist/auth/role_grant_queries.d.ts +1 -1
- package/dist/auth/session_queries.d.ts +1 -1
- package/dist/auth/session_queries.js +1 -1
- package/dist/auth/signup_route_schema.js +1 -1
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.js +2 -2
- package/dist/cli/help.d.ts +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/logger.d.ts +1 -1
- package/dist/cli/logger.js +1 -1
- package/dist/db/CLAUDE.md +1 -1
- package/dist/db/cell_audit_queries.d.ts +1 -1
- package/dist/db/cell_field_queries.d.ts +1 -1
- package/dist/db/cell_grant_queries.d.ts +1 -1
- package/dist/db/cell_item_queries.d.ts +1 -1
- package/dist/db/cell_queries.d.ts +3 -3
- package/dist/db/cell_queries.js +1 -1
- package/dist/db/fact_disk_storage.d.ts +2 -2
- package/dist/db/fact_disk_storage.js +4 -4
- package/dist/db/fact_queries.d.ts +1 -1
- package/dist/db/fact_store.d.ts +3 -3
- package/dist/db/fact_store.js +2 -2
- package/dist/db/file_fact_url.d.ts +1 -1
- package/dist/db/file_fact_url.js +1 -1
- package/dist/db/migrate.js +1 -1
- package/dist/db/status.js +1 -1
- package/dist/http/auth_shape.js +2 -2
- package/dist/http/common_routes.d.ts +1 -1
- package/dist/http/db_routes.d.ts +1 -1
- package/dist/http/origin.js +1 -1
- package/dist/http/pending_effects.d.ts +1 -1
- package/dist/http/proxy.d.ts +1 -1
- package/dist/http/route_spec.d.ts +1 -1
- package/dist/rate_limiter.js +1 -1
- package/dist/realtime/sse.d.ts +1 -1
- package/dist/realtime/sse_auth_guard.d.ts +1 -1
- package/dist/runtime/deno.js +1 -1
- package/dist/server/app_backend.d.ts +1 -1
- package/dist/server/app_backend.js +1 -1
- package/dist/server/env.js +1 -1
- package/dist/server/fact_write.d.ts +2 -2
- package/dist/server/fact_write.js +1 -1
- package/dist/server/serve_fact_route.d.ts +1 -1
- package/dist/server/serve_fact_route.js +2 -2
- package/dist/server/startup.d.ts +1 -1
- package/dist/testing/CLAUDE.md +23 -5
- package/dist/testing/adversarial_input.js +1 -1
- package/dist/testing/app_server.d.ts +1 -1
- package/dist/testing/app_server.js +1 -1
- package/dist/testing/auth_apps.js +1 -1
- package/dist/testing/cross_backend/bench/bench_report.d.ts +1 -1
- package/dist/testing/cross_backend/bench/bench_report.js +2 -2
- package/dist/testing/cross_backend/bench/run_cross_impl_bench.d.ts +1 -1
- package/dist/testing/cross_backend/bench/run_cross_impl_bench.js +1 -1
- package/dist/testing/cross_backend/bootstrap_backend.d.ts +1 -1
- package/dist/testing/cross_backend/cell_relations.js +1 -1
- package/dist/testing/cross_backend/conformance_case.d.ts +4 -0
- package/dist/testing/cross_backend/conformance_case.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_case.js +26 -0
- package/dist/testing/cross_backend/conformance_table.d.ts +21 -0
- package/dist/testing/cross_backend/conformance_table.d.ts.map +1 -1
- package/dist/testing/cross_backend/conformance_table.js +109 -7
- package/dist/testing/cross_backend/create_cross_backend_global_setup.d.ts +1 -1
- package/dist/testing/cross_backend/create_dual_spawn_global_setup.d.ts +1 -1
- package/dist/testing/cross_backend/default_spine_surface.d.ts +1 -1
- package/dist/testing/cross_backend/fact_serving.js +1 -1
- package/dist/testing/cross_backend/setup.d.ts +1 -1
- package/dist/testing/cross_backend/setup.js +1 -1
- package/dist/testing/cross_backend/testing_reset_actions.js +2 -2
- package/dist/testing/cross_backend/testing_server_core.d.ts +1 -1
- package/dist/testing/cross_backend/testing_server_core.js +1 -1
- package/dist/testing/cross_backend/ws_round_trip.js +1 -1
- package/dist/testing/db.js +4 -4
- package/dist/testing/middleware.js +1 -1
- package/dist/testing/role_grant_helpers.d.ts +1 -1
- package/dist/testing/rpc_helpers.d.ts +18 -1
- package/dist/testing/rpc_helpers.d.ts.map +1 -1
- package/dist/testing/rpc_helpers.js +24 -2
- package/dist/testing/schema_generators.d.ts +1 -1
- package/dist/testing/schema_generators.js +1 -1
- package/dist/testing/stubs.js +1 -1
- package/dist/testing/testing_rate_limiter.d.ts +1 -1
- package/dist/testing/testing_rate_limiter.js +1 -1
- package/dist/testing/transports/bootstrap.d.ts +1 -1
- package/dist/testing/transports/bootstrap.js +1 -1
- package/dist/testing/ws_round_trip.d.ts +2 -2
- package/dist/testing/ws_round_trip.js +2 -2
- package/dist/ui/AdminSurface.svelte +1 -1
- package/dist/ui/AppShell.svelte +1 -1
- package/dist/ui/BootstrapForm.svelte +1 -1
- package/dist/ui/CLAUDE.md +1 -1
- package/dist/ui/ConfirmButton.svelte +2 -2
- package/dist/ui/ConfirmButton.svelte.d.ts +1 -1
- package/dist/ui/LoginForm.svelte +1 -1
- package/dist/ui/MenuLink.svelte +1 -1
- package/dist/ui/MenuLink.svelte.d.ts +1 -1
- package/dist/ui/PopoverButton.svelte +1 -1
- package/dist/ui/PopoverButton.svelte.d.ts +1 -1
- package/dist/ui/SignupForm.svelte +1 -1
- package/dist/ui/account_sessions_state.svelte.js +1 -1
- package/dist/ui/admin_accounts_state.svelte.d.ts +1 -1
- package/dist/ui/admin_accounts_state.svelte.js +1 -1
- package/dist/ui/admin_invites_state.svelte.d.ts +1 -1
- package/dist/ui/admin_invites_state.svelte.js +1 -1
- package/dist/ui/admin_sessions_state.svelte.d.ts +1 -1
- package/dist/ui/app_settings_state.svelte.js +1 -1
- package/dist/ui/async_slot.svelte.d.ts +2 -2
- package/dist/ui/async_slot.svelte.js +2 -2
- package/dist/ui/audit_log_state.svelte.js +1 -1
- package/dist/ui/auth_state.svelte.d.ts +1 -1
- package/dist/ui/auth_state.svelte.js +3 -3
- package/dist/ui/format_scope.js +1 -1
- package/dist/ui/popover.svelte.d.ts +1 -1
- package/dist/ui/popover.svelte.js +2 -2
- package/dist/ui/position_helpers.js +1 -1
- package/dist/ui/role_grant_offers_state.svelte.js +1 -1
- package/dist/ui/sidebar_state.svelte.js +1 -1
- package/dist/ui/table_state.svelte.d.ts +1 -1
- package/dist/ui/table_state.svelte.js +2 -2
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ import '../assert_dev_env.js';
|
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
15
|
* import {create_cross_backend_global_setup} from
|
|
16
|
-
* '@fuzdev/fuz_app/testing/cross_backend/create_cross_backend_global_setup.
|
|
16
|
+
* '@fuzdev/fuz_app/testing/cross_backend/create_cross_backend_global_setup.ts';
|
|
17
17
|
* import {deno_backend_config, rust_backend_config} from './my_backend_config.js';
|
|
18
18
|
* import './cross_test_types.js'; // augments inject('backend_handle')
|
|
19
19
|
*
|
|
@@ -17,7 +17,7 @@ import '../assert_dev_env.js';
|
|
|
17
17
|
*
|
|
18
18
|
* ```ts
|
|
19
19
|
* import {create_dual_spawn_global_setup} from
|
|
20
|
-
* '@fuzdev/fuz_app/testing/cross_backend/create_dual_spawn_global_setup.
|
|
20
|
+
* '@fuzdev/fuz_app/testing/cross_backend/create_dual_spawn_global_setup.ts';
|
|
21
21
|
* import {deno_backend_config, rust_backend_config} from './my_backend_config.js';
|
|
22
22
|
* import './cross_test_types.js'; // augments the two provide keys
|
|
23
23
|
*
|
|
@@ -23,7 +23,7 @@ import '../assert_dev_env.js';
|
|
|
23
23
|
*
|
|
24
24
|
* @module
|
|
25
25
|
*/
|
|
26
|
-
import type { Logger } from '@fuzdev/fuz_util/log.
|
|
26
|
+
import type { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
27
27
|
import type { NotificationSender } from '../../auth/role_grant_offer_notifications.js';
|
|
28
28
|
import { type RoleSchemaResult } from '../../auth/role_schema.js';
|
|
29
29
|
import { type SessionOptions } from '../../auth/session_cookie.js';
|
|
@@ -38,7 +38,7 @@ import '../assert_dev_env.js';
|
|
|
38
38
|
*/
|
|
39
39
|
import { describe, assert } from 'vitest';
|
|
40
40
|
import { z } from 'zod';
|
|
41
|
-
import { FactHashSchema } from '@fuzdev/fuz_util/fact_hash.
|
|
41
|
+
import { FactHashSchema } from '@fuzdev/fuz_util/fact_hash.ts';
|
|
42
42
|
import { CellCreateOutput } from '../../auth/cell_action_specs.js';
|
|
43
43
|
import { test_if } from './capabilities.js';
|
|
44
44
|
import { cross_rpc_call, expect_output } from './cell_cross_helpers.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
|
-
import { Uuid } from '@fuzdev/fuz_util/id.
|
|
2
|
+
import { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
3
3
|
import type { TestAccount } from '../app_server.js';
|
|
4
4
|
import type { BackendCapabilities } from './capabilities.js';
|
|
5
5
|
import { type FetchTransport } from '../transports/fetch_transport.js';
|
|
@@ -22,7 +22,7 @@ import '../assert_dev_env.js';
|
|
|
22
22
|
* @module
|
|
23
23
|
*/
|
|
24
24
|
import { z } from 'zod';
|
|
25
|
-
import { Uuid } from '@fuzdev/fuz_util/id.
|
|
25
|
+
import { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
26
26
|
import { DAEMON_TOKEN_HEADER } from '../../auth/daemon_token.js';
|
|
27
27
|
import { USERNAME_LENGTH_MAX } from '../../primitive_schemas.js';
|
|
28
28
|
import { DEFAULT_TEST_PASSWORD } from '../test_credentials.js';
|
|
@@ -66,8 +66,8 @@ import '../assert_dev_env.js';
|
|
|
66
66
|
* @module
|
|
67
67
|
*/
|
|
68
68
|
import { z } from 'zod';
|
|
69
|
-
import { Uuid } from '@fuzdev/fuz_util/id.
|
|
70
|
-
import { fact_hash_bytes, FactHashSchema } from '@fuzdev/fuz_util/fact_hash.
|
|
69
|
+
import { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
70
|
+
import { fact_hash_bytes, FactHashSchema } from '@fuzdev/fuz_util/fact_hash.ts';
|
|
71
71
|
import { rpc_action } from '../../actions/action_rpc.js';
|
|
72
72
|
import { query_put_fact } from '../../db/fact_queries.js';
|
|
73
73
|
import { ROLE_ADMIN, ROLE_KEEPER } from '../../auth/role_schema.js';
|
|
@@ -28,7 +28,7 @@ import '../assert_dev_env.js';
|
|
|
28
28
|
*/
|
|
29
29
|
import type { Context, Hono } from 'hono';
|
|
30
30
|
import type { UpgradeWebSocket } from 'hono/ws';
|
|
31
|
-
import { type Logger as LoggerType } from '@fuzdev/fuz_util/log.
|
|
31
|
+
import { type Logger as LoggerType } from '@fuzdev/fuz_util/log.ts';
|
|
32
32
|
import type { RuntimeDeps } from '../../runtime/deps.js';
|
|
33
33
|
/**
|
|
34
34
|
* Adapter-built handle to a bound HTTP server.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
|
-
import { Logger } from '@fuzdev/fuz_util/log.
|
|
2
|
+
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
3
3
|
import { write_daemon_info, read_daemon_info, is_daemon_running } from '../../cli/daemon.js';
|
|
4
4
|
/**
|
|
5
5
|
* Loopback bind hosts — the only ones the test binary may serve on. It ships
|
|
@@ -41,7 +41,7 @@ import '../assert_dev_env.js';
|
|
|
41
41
|
* @module
|
|
42
42
|
*/
|
|
43
43
|
import { assert, describe } from 'vitest';
|
|
44
|
-
import { assert_rejects } from '@fuzdev/fuz_util/testing.
|
|
44
|
+
import { assert_rejects } from '@fuzdev/fuz_util/testing.ts';
|
|
45
45
|
import { heartbeat_action_spec } from '../../actions/heartbeat.js';
|
|
46
46
|
import { account_session_revoke_all_action_spec } from '../../auth/account_action_specs.js';
|
|
47
47
|
import { create_ws_transport } from '../transports/ws_transport.js';
|
package/dist/testing/db.js
CHANGED
|
@@ -8,9 +8,9 @@ import './assert_dev_env.js';
|
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
10
10
|
* ```ts
|
|
11
|
-
* import {create_pglite_factory, create_pg_factory} from '@fuzdev/fuz_app/testing/db.
|
|
12
|
-
* import {run_migrations} from '@fuzdev/fuz_app/db/migrate.
|
|
13
|
-
* import {auth_migration_ns} from '@fuzdev/fuz_app/auth/migrations.
|
|
11
|
+
* import {create_pglite_factory, create_pg_factory} from '@fuzdev/fuz_app/testing/db.ts';
|
|
12
|
+
* import {run_migrations} from '@fuzdev/fuz_app/db/migrate.ts';
|
|
13
|
+
* import {auth_migration_ns} from '@fuzdev/fuz_app/auth/migrations.ts';
|
|
14
14
|
*
|
|
15
15
|
* const init_schema = async (db) => {
|
|
16
16
|
* await run_migrations(db, [auth_migration_ns]);
|
|
@@ -23,7 +23,7 @@ import './assert_dev_env.js';
|
|
|
23
23
|
* @module
|
|
24
24
|
*/
|
|
25
25
|
import { describe, beforeAll, beforeEach, afterAll } from 'vitest';
|
|
26
|
-
import { to_error_message } from '@fuzdev/fuz_util/error.
|
|
26
|
+
import { to_error_message } from '@fuzdev/fuz_util/error.ts';
|
|
27
27
|
import { create_pglite_db } from '../db/db_pglite.js';
|
|
28
28
|
import { assert_valid_sql_identifier } from '../db/sql_identifier.js';
|
|
29
29
|
import { create_pg_db } from '../db/db_pg.js';
|
|
@@ -10,7 +10,7 @@ import './assert_dev_env.js';
|
|
|
10
10
|
*/
|
|
11
11
|
import { vi, test, assert, describe } from 'vitest';
|
|
12
12
|
import { Hono } from 'hono';
|
|
13
|
-
import { Logger } from '@fuzdev/fuz_util/log.
|
|
13
|
+
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
14
14
|
import { create_bearer_auth_middleware } from '../auth/bearer_auth.js';
|
|
15
15
|
import { query_validate_api_token } from '../auth/api_token_queries.js';
|
|
16
16
|
import { query_account_by_id, query_actor_by_id, query_actors_by_account, } from '../auth/account_queries.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
|
-
import type { Uuid } from '@fuzdev/fuz_util/id.
|
|
2
|
+
import type { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
3
3
|
import type { TestAccount, TestApp } from './app_server.js';
|
|
4
4
|
import type { TestFixture } from './cross_backend/setup.js';
|
|
5
5
|
import { type RpcCallArgs } from './rpc_helpers.js';
|
|
@@ -90,14 +90,29 @@ export type RpcTestTransport = (url: string, init: RequestInit) => Promise<Respo
|
|
|
90
90
|
export declare const http_transport: (app: {
|
|
91
91
|
request: (input: string, init: RequestInit) => Promise<Response> | Response;
|
|
92
92
|
}) => RpcTestTransport;
|
|
93
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Snapshot a `Headers` object into a plain `Record` with lowercased keys
|
|
95
|
+
* (`Headers` iteration normalizes the casing already). Multiple values for one
|
|
96
|
+
* header collapse to the comma-joined form `Headers` exposes; `Set-Cookie` is
|
|
97
|
+
* the lone platform exception these call sites never assert on. Lets a
|
|
98
|
+
* response's headers travel back through `RpcCallResult` for header-level
|
|
99
|
+
* assertions (no-fingerprint, `expect.headers`).
|
|
100
|
+
*/
|
|
101
|
+
export declare const headers_to_record: (headers: Headers) => Record<string, string>;
|
|
102
|
+
/**
|
|
103
|
+
* Discriminated return from `rpc_call`. `status` is the HTTP status; `headers`
|
|
104
|
+
* is the response-headers snapshot (lowercased keys) so callers can assert
|
|
105
|
+
* header-level properties (e.g. no backend-fingerprinting headers).
|
|
106
|
+
*/
|
|
94
107
|
export type RpcCallResult = {
|
|
95
108
|
ok: true;
|
|
96
109
|
status: number;
|
|
110
|
+
headers: Record<string, string>;
|
|
97
111
|
result: unknown;
|
|
98
112
|
} | {
|
|
99
113
|
ok: false;
|
|
100
114
|
status: number;
|
|
115
|
+
headers: Record<string, string>;
|
|
101
116
|
error: {
|
|
102
117
|
code: number;
|
|
103
118
|
message: string;
|
|
@@ -172,10 +187,12 @@ export declare const rpc_call_non_browser: (args: Omit<RpcCallArgs, "suppress_de
|
|
|
172
187
|
export type RpcCallResultForSpec<TSpec extends RequestResponseActionSpec> = {
|
|
173
188
|
ok: true;
|
|
174
189
|
status: number;
|
|
190
|
+
headers: Record<string, string>;
|
|
175
191
|
result: z.infer<TSpec['output']>;
|
|
176
192
|
} | {
|
|
177
193
|
ok: false;
|
|
178
194
|
status: number;
|
|
195
|
+
headers: Record<string, string>;
|
|
179
196
|
error: {
|
|
180
197
|
code: number;
|
|
181
198
|
message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc_helpers.d.ts","sourceRoot":"../src/lib/","sources":["../../src/lib/testing/rpc_helpers.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAa7B,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,OAAO,EAIN,KAAK,gBAAgB,EACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,0BAA0B,CAAC;AACxD,OAAO,K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AAe,CAAC,KAC3C,MAYF,CAAC"}
|
|
@@ -126,6 +126,21 @@ export const assert_jsonrpc_success_response = (body, output_schema) => {
|
|
|
126
126
|
};
|
|
127
127
|
/** Adapt a `Hono`-style app into an `RpcTestTransport`. */
|
|
128
128
|
export const http_transport = (app) => async (url, init) => app.request(url, init);
|
|
129
|
+
/**
|
|
130
|
+
* Snapshot a `Headers` object into a plain `Record` with lowercased keys
|
|
131
|
+
* (`Headers` iteration normalizes the casing already). Multiple values for one
|
|
132
|
+
* header collapse to the comma-joined form `Headers` exposes; `Set-Cookie` is
|
|
133
|
+
* the lone platform exception these call sites never assert on. Lets a
|
|
134
|
+
* response's headers travel back through `RpcCallResult` for header-level
|
|
135
|
+
* assertions (no-fingerprint, `expect.headers`).
|
|
136
|
+
*/
|
|
137
|
+
export const headers_to_record = (headers) => {
|
|
138
|
+
const record = {};
|
|
139
|
+
headers.forEach((value, key) => {
|
|
140
|
+
record[key] = value;
|
|
141
|
+
});
|
|
142
|
+
return record;
|
|
143
|
+
};
|
|
129
144
|
/** Base default headers merged into every `rpc_call` request. */
|
|
130
145
|
const RPC_CALL_DEFAULT_HEADERS_BASE = {
|
|
131
146
|
host: 'localhost',
|
|
@@ -174,16 +189,18 @@ export const rpc_call = async (args) => {
|
|
|
174
189
|
}
|
|
175
190
|
const res = await (typeof app === 'function' ? app(url, init) : app.request(url, init));
|
|
176
191
|
const status = res.status;
|
|
192
|
+
const response_headers = headers_to_record(res.headers);
|
|
177
193
|
const body = await res.json();
|
|
178
194
|
const success = JsonrpcResponse.safeParse(body);
|
|
179
195
|
if (success.success) {
|
|
180
|
-
return { ok: true, status, result: success.data.result };
|
|
196
|
+
return { ok: true, status, headers: response_headers, result: success.data.result };
|
|
181
197
|
}
|
|
182
198
|
const error = JsonrpcErrorResponse.safeParse(body);
|
|
183
199
|
if (error.success) {
|
|
184
200
|
return {
|
|
185
201
|
ok: false,
|
|
186
202
|
status,
|
|
203
|
+
headers: response_headers,
|
|
187
204
|
error: {
|
|
188
205
|
code: error.data.error.code,
|
|
189
206
|
message: error.data.error.message,
|
|
@@ -226,7 +243,12 @@ export const rpc_call_for_spec = async (args) => {
|
|
|
226
243
|
if (!parsed.success) {
|
|
227
244
|
throw new Error(`rpc_call_for_spec(${spec.method}) result did not match spec.output: ${JSON.stringify(parsed.error.issues)}`);
|
|
228
245
|
}
|
|
229
|
-
return {
|
|
246
|
+
return {
|
|
247
|
+
ok: true,
|
|
248
|
+
status: res.status,
|
|
249
|
+
headers: res.headers,
|
|
250
|
+
result: parsed.data,
|
|
251
|
+
};
|
|
230
252
|
};
|
|
231
253
|
/**
|
|
232
254
|
* Same as `rpc_call` but parses the success `result` through the given
|
|
@@ -9,7 +9,7 @@ import './assert_dev_env.js';
|
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
|
-
import { type ZodFieldInfo } from '@fuzdev/fuz_util/zod.
|
|
12
|
+
import { type ZodFieldInfo } from '@fuzdev/fuz_util/zod.ts';
|
|
13
13
|
/**
|
|
14
14
|
* Detect format constraints on a field by converting to JSON Schema.
|
|
15
15
|
* Returns format string (e.g. 'uuid', 'email') or null.
|
|
@@ -9,7 +9,7 @@ import './assert_dev_env.js';
|
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
11
|
import { z } from 'zod';
|
|
12
|
-
import { zod_unwrap_def, zod_get_base_type, zod_unwrap_to_object, zod_extract_fields, } from '@fuzdev/fuz_util/zod.
|
|
12
|
+
import { zod_unwrap_def, zod_get_base_type, zod_unwrap_to_object, zod_extract_fields, } from '@fuzdev/fuz_util/zod.ts';
|
|
13
13
|
import { is_null_schema } from '../http/schema_helpers.js';
|
|
14
14
|
/**
|
|
15
15
|
* Detect format constraints on a field by converting to JSON Schema.
|
package/dist/testing/stubs.js
CHANGED
|
@@ -7,7 +7,7 @@ import './assert_dev_env.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import { Logger } from '@fuzdev/fuz_util/log.
|
|
10
|
+
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
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';
|
|
@@ -17,7 +17,7 @@ import './assert_dev_env.js';
|
|
|
17
17
|
* Usage in a test binary:
|
|
18
18
|
*
|
|
19
19
|
* ```ts
|
|
20
|
-
* import {TestingRateLimiter} from '@fuzdev/fuz_app/testing/testing_rate_limiter.
|
|
20
|
+
* import {TestingRateLimiter} from '@fuzdev/fuz_app/testing/testing_rate_limiter.ts';
|
|
21
21
|
*
|
|
22
22
|
* const limiter = new TestingRateLimiter(default_login_ip_rate_limit);
|
|
23
23
|
* await create_app_server({backend, ip_rate_limiter: limiter, ...});
|
|
@@ -17,7 +17,7 @@ import './assert_dev_env.js';
|
|
|
17
17
|
* Usage in a test binary:
|
|
18
18
|
*
|
|
19
19
|
* ```ts
|
|
20
|
-
* import {TestingRateLimiter} from '@fuzdev/fuz_app/testing/testing_rate_limiter.
|
|
20
|
+
* import {TestingRateLimiter} from '@fuzdev/fuz_app/testing/testing_rate_limiter.ts';
|
|
21
21
|
*
|
|
22
22
|
* const limiter = new TestingRateLimiter(default_login_ip_rate_limit);
|
|
23
23
|
* await create_app_server({backend, ip_rate_limiter: limiter, ...});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assert_dev_env.js';
|
|
2
|
-
import { Uuid } from '@fuzdev/fuz_util/id.
|
|
2
|
+
import { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
3
3
|
import type { BackendConfig } from '../cross_backend/backend_config.js';
|
|
4
4
|
import type { FetchTransport } from './fetch_transport.js';
|
|
5
5
|
/** Input for `bootstrap()`. */
|
|
@@ -19,7 +19,7 @@ import '../assert_dev_env.js';
|
|
|
19
19
|
* @module
|
|
20
20
|
*/
|
|
21
21
|
import { z } from 'zod';
|
|
22
|
-
import { Uuid } from '@fuzdev/fuz_util/id.
|
|
22
|
+
import { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
23
23
|
/**
|
|
24
24
|
* The `BootstrapOutput` envelope shape the cross-process bootstrap call
|
|
25
25
|
* cares about. Looser than the full `BootstrapOutput` Zod schema in
|
|
@@ -39,8 +39,8 @@ import './assert_dev_env.js';
|
|
|
39
39
|
*/
|
|
40
40
|
import type { Context } from 'hono';
|
|
41
41
|
import { WSContext, type UpgradeWebSocket, type WSEvents } from 'hono/ws';
|
|
42
|
-
import { Logger } from '@fuzdev/fuz_util/log.
|
|
43
|
-
import { type Uuid } from '@fuzdev/fuz_util/id.
|
|
42
|
+
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
43
|
+
import { type Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
44
44
|
import type { ActionSpecUnion } from '../actions/action_spec.js';
|
|
45
45
|
import type { Action } from '../actions/action_types.js';
|
|
46
46
|
import type { ActionEventEnvironment } from '../actions/action_event_types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './assert_dev_env.js';
|
|
2
2
|
import { WSContext, createWSMessageEvent, } from 'hono/ws';
|
|
3
|
-
import { Logger } from '@fuzdev/fuz_util/log.
|
|
4
|
-
import { create_uuid } from '@fuzdev/fuz_util/id.
|
|
3
|
+
import { Logger } from '@fuzdev/fuz_util/log.ts';
|
|
4
|
+
import { create_uuid } from '@fuzdev/fuz_util/id.ts';
|
|
5
5
|
import { ActionPeer } from '../actions/action_peer.js';
|
|
6
6
|
import { create_broadcast_api } from '../actions/broadcast_api.js';
|
|
7
7
|
import { register_action_ws } from '../actions/register_action_ws.js';
|
package/dist/ui/AppShell.svelte
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import type {Snippet} from 'svelte';
|
|
13
13
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
14
|
-
import {is_editable, swallow} from '@fuzdev/fuz_util/dom.
|
|
14
|
+
import {is_editable, swallow} from '@fuzdev/fuz_util/dom.ts';
|
|
15
15
|
|
|
16
16
|
import {SidebarState, sidebar_state_context} from './sidebar_state.svelte.js';
|
|
17
17
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import {goto} from '$app/navigation';
|
|
16
16
|
import {resolve} from '$app/paths';
|
|
17
17
|
import PendingButton from '@fuzdev/fuz_ui/PendingButton.svelte';
|
|
18
|
-
import {autofocus} from '@fuzdev/fuz_ui/autofocus.svelte.
|
|
18
|
+
import {autofocus} from '@fuzdev/fuz_ui/autofocus.svelte.ts';
|
|
19
19
|
|
|
20
20
|
import {Username} from '../primitive_schemas.js';
|
|
21
21
|
import {PASSWORD_LENGTH_MIN} from '../auth/password.js';
|
package/dist/ui/CLAUDE.md
CHANGED
|
@@ -68,7 +68,7 @@ their payload shapes are defined in `auth/role_grant_offer_notifications.ts`
|
|
|
68
68
|
### Context over props for shared deps
|
|
69
69
|
|
|
70
70
|
Auth, RPC adapters, sidebar, and role_grant offers all flow through
|
|
71
|
-
`create_context` from `@fuzdev/fuz_ui/context_helpers.
|
|
71
|
+
`create_context` from `@fuzdev/fuz_ui/context_helpers.ts`. Components
|
|
72
72
|
consume with `const x = x_context.get()` (or a `get_rpc`/`$derived`
|
|
73
73
|
pair when the value may change reactively). New shared state joins the
|
|
74
74
|
pattern rather than reintroducing prop-drilling.
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
import {DEV} from 'esm-env';
|
|
50
50
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
51
51
|
import type {ComponentProps, Snippet} from 'svelte';
|
|
52
|
-
import type {OmitStrict} from '@fuzdev/fuz_util/types.
|
|
53
|
-
import {icon_remove} from '@fuzdev/fuz_ui/icons.
|
|
52
|
+
import type {OmitStrict} from '@fuzdev/fuz_util/types.ts';
|
|
53
|
+
import {icon_remove} from '@fuzdev/fuz_ui/icons.ts';
|
|
54
54
|
import PendingAnimation from '@fuzdev/fuz_ui/PendingAnimation.svelte';
|
|
55
55
|
import Svg from '@fuzdev/fuz_ui/Svg.svelte';
|
|
56
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
2
2
|
import type { ComponentProps, Snippet } from 'svelte';
|
|
3
|
-
import type { OmitStrict } from '@fuzdev/fuz_util/types.
|
|
3
|
+
import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
|
|
4
4
|
import PopoverButton from './PopoverButton.svelte';
|
|
5
5
|
import type { Popover } from './popover.svelte.js';
|
|
6
6
|
type $$ComponentProps = OmitStrict<ComponentProps<typeof PopoverButton>, 'popover_content' | 'children'> & OmitStrict<SvelteHTMLElements['button'], 'children'> & {
|
package/dist/ui/LoginForm.svelte
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import {goto} from '$app/navigation';
|
|
12
12
|
import {resolve} from '$app/paths';
|
|
13
13
|
import PendingButton from '@fuzdev/fuz_ui/PendingButton.svelte';
|
|
14
|
-
import {autofocus} from '@fuzdev/fuz_ui/autofocus.svelte.
|
|
14
|
+
import {autofocus} from '@fuzdev/fuz_ui/autofocus.svelte.ts';
|
|
15
15
|
|
|
16
16
|
import {auth_state_context} from './auth_state.svelte.js';
|
|
17
17
|
import {FormState} from './form_state.svelte.js';
|
package/dist/ui/MenuLink.svelte
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
23
23
|
import {page} from '$app/state';
|
|
24
24
|
import {resolve} from '$app/paths';
|
|
25
|
-
import type {OmitStrict} from '@fuzdev/fuz_util/types.
|
|
25
|
+
import type {OmitStrict} from '@fuzdev/fuz_util/types.ts';
|
|
26
26
|
|
|
27
27
|
const {
|
|
28
28
|
path,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import type { Snippet } from 'svelte';
|
|
20
20
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
21
|
-
import type { OmitStrict } from '@fuzdev/fuz_util/types.
|
|
21
|
+
import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
|
|
22
22
|
type $$ComponentProps = OmitStrict<SvelteHTMLElements['a'], 'href' | 'children'> & {
|
|
23
23
|
/** Route path passed to `resolve` from `$app/paths` to compute `href`. */
|
|
24
24
|
path: string;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
import type {SvelteHTMLElements} from 'svelte/elements';
|
|
47
47
|
import type {Snippet} from 'svelte';
|
|
48
48
|
import {scale} from 'svelte/transition';
|
|
49
|
-
import type {OmitStrict} from '@fuzdev/fuz_util/types.
|
|
49
|
+
import type {OmitStrict} from '@fuzdev/fuz_util/types.ts';
|
|
50
50
|
|
|
51
51
|
import {Popover} from './popover.svelte.js';
|
|
52
52
|
import type {Position, Alignment} from './position_helpers.js';
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
*/
|
|
44
44
|
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
45
45
|
import type { Snippet } from 'svelte';
|
|
46
|
-
import type { OmitStrict } from '@fuzdev/fuz_util/types.
|
|
46
|
+
import type { OmitStrict } from '@fuzdev/fuz_util/types.ts';
|
|
47
47
|
import { Popover } from './popover.svelte.js';
|
|
48
48
|
import type { Position, Alignment } from './position_helpers.js';
|
|
49
49
|
type $$ComponentProps = OmitStrict<SvelteHTMLElements['button'], 'children'> & {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import {goto} from '$app/navigation';
|
|
15
15
|
import {resolve} from '$app/paths';
|
|
16
16
|
import PendingButton from '@fuzdev/fuz_ui/PendingButton.svelte';
|
|
17
|
-
import {autofocus} from '@fuzdev/fuz_ui/autofocus.svelte.
|
|
17
|
+
import {autofocus} from '@fuzdev/fuz_ui/autofocus.svelte.ts';
|
|
18
18
|
|
|
19
19
|
import {Username} from '../primitive_schemas.js';
|
|
20
20
|
import {PASSWORD_LENGTH_MIN} from '../auth/password.js';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module
|
|
13
13
|
*/
|
|
14
|
-
import { create_context } from '@fuzdev/fuz_ui/context_helpers.
|
|
14
|
+
import { create_context } from '@fuzdev/fuz_ui/context_helpers.ts';
|
|
15
15
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
16
16
|
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
|
|
17
17
|
/**
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
-
import type { Uuid } from '@fuzdev/fuz_util/id.
|
|
15
|
+
import type { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
16
16
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
17
17
|
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
|
|
18
18
|
import type { AdminAccountEntryJson } from '../auth/account_schema.js';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
|
-
import { create_context } from '@fuzdev/fuz_ui/context_helpers.
|
|
15
|
+
import { create_context } from '@fuzdev/fuz_ui/context_helpers.ts';
|
|
16
16
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
17
17
|
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
|
|
18
18
|
/**
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import type { Uuid } from '@fuzdev/fuz_util/id.
|
|
16
|
+
import type { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
17
17
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
18
18
|
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
|
|
19
19
|
import type { InviteWithUsernamesJson } from '../auth/invite_schema.js';
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* @module
|
|
15
15
|
*/
|
|
16
|
-
import { create_context } from '@fuzdev/fuz_ui/context_helpers.
|
|
16
|
+
import { create_context } from '@fuzdev/fuz_ui/context_helpers.ts';
|
|
17
17
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
18
18
|
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
|
|
19
19
|
/**
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module
|
|
16
16
|
*/
|
|
17
|
-
import type { Uuid } from '@fuzdev/fuz_util/id.
|
|
17
|
+
import type { Uuid } from '@fuzdev/fuz_util/id.ts';
|
|
18
18
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
19
19
|
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
|
|
20
20
|
import type { AdminAccountsRpc } from './admin_accounts_state.svelte.js';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module
|
|
13
13
|
*/
|
|
14
|
-
import { create_context } from '@fuzdev/fuz_ui/context_helpers.
|
|
14
|
+
import { create_context } from '@fuzdev/fuz_ui/context_helpers.ts';
|
|
15
15
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
16
16
|
/**
|
|
17
17
|
* Svelte context carrying the reactive `AppSettingsRpc` accessor. Mirrors
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Core surface:
|
|
12
12
|
*
|
|
13
13
|
* - **Explicit four-value `status`** — `AsyncStatus` from
|
|
14
|
-
* `@fuzdev/fuz_util/async.
|
|
14
|
+
* `@fuzdev/fuz_util/async.ts`: `'initial' | 'pending' | 'success' |
|
|
15
15
|
* 'failure'`. `loading: false, error: null` would be ambiguous
|
|
16
16
|
* between "never tried" and "succeeded once and now resting"; the
|
|
17
17
|
* four-value status removes the need for a per-class `submitted` /
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
*
|
|
59
59
|
* @module
|
|
60
60
|
*/
|
|
61
|
-
import type { AsyncStatus } from '@fuzdev/fuz_util/async.
|
|
61
|
+
import type { AsyncStatus } from '@fuzdev/fuz_util/async.ts';
|
|
62
62
|
export interface AsyncSlotOptions<T, E = string> {
|
|
63
63
|
/**
|
|
64
64
|
* Seed `data` and put the slot in `'success'` before any `run()`. Useful
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Core surface:
|
|
12
12
|
*
|
|
13
13
|
* - **Explicit four-value `status`** — `AsyncStatus` from
|
|
14
|
-
* `@fuzdev/fuz_util/async.
|
|
14
|
+
* `@fuzdev/fuz_util/async.ts`: `'initial' | 'pending' | 'success' |
|
|
15
15
|
* 'failure'`. `loading: false, error: null` would be ambiguous
|
|
16
16
|
* between "never tried" and "succeeded once and now resting"; the
|
|
17
17
|
* four-value status removes the need for a per-class `submitted` /
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
*
|
|
59
59
|
* @module
|
|
60
60
|
*/
|
|
61
|
-
import { to_error_message } from '@fuzdev/fuz_util/error.
|
|
61
|
+
import { to_error_message } from '@fuzdev/fuz_util/error.ts';
|
|
62
62
|
/**
|
|
63
63
|
* Reactive container for a single async operation.
|
|
64
64
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @module
|
|
14
14
|
*/
|
|
15
15
|
import { DEV } from 'esm-env';
|
|
16
|
-
import { create_context } from '@fuzdev/fuz_ui/context_helpers.
|
|
16
|
+
import { create_context } from '@fuzdev/fuz_ui/context_helpers.ts';
|
|
17
17
|
import { AsyncSlot } from './async_slot.svelte.js';
|
|
18
18
|
/**
|
|
19
19
|
* Svelte context carrying the reactive `AuditLogRpc` accessor. Mirrors
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @example
|
|
11
11
|
* ```svelte
|
|
12
12
|
* <script lang="ts">
|
|
13
|
-
* import {AuthState, auth_state_context} from '@fuzdev/fuz_app/ui/auth_state.svelte.
|
|
13
|
+
* import {AuthState, auth_state_context} from '@fuzdev/fuz_app/ui/auth_state.svelte.ts';
|
|
14
14
|
*
|
|
15
15
|
* const auth = new AuthState();
|
|
16
16
|
* auth_state_context.set(auth);
|