Skip to content

Commit 28a0593

Browse files
committed
docs(auth): use the @default jsdoc tag for the auth option defaults
Convert the prose "Default: x" notes on the auth-related options introduced in this branch (`simpleAuth`, `otpParam`, `cli.auth`) to the `@default` tag, matching the convention used elsewhere in the definition types.
1 parent 8b6dc68 commit 28a0593

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

packages/devframe/src/client/rpc.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ export interface DevframeRpcClientOptions {
6262
* (OTP) for "magic link" auth (e.g. a link the dev server prints). When
6363
* present, the client exchanges the code for a token and removes the parameter
6464
* from the URL. Set `false` to disable — e.g. integrations that drive their
65-
* own authentication via `authenticateWithUrlOtp`. Default: `'devframe_otp'`.
65+
* own authentication via `authenticateWithUrlOtp`.
66+
*
67+
* @default 'devframe_otp'
6668
*/
6769
otpParam?: string | false
6870
/**
@@ -74,7 +76,9 @@ export interface DevframeRpcClientOptions {
7476
* block `prompt()` in cross-origin frames anyway.
7577
*
7678
* Set `false` to drive your own auth UI (a hub sets this on the plugin
77-
* connections it manages, alongside supplying the token). Default: `true`.
79+
* connections it manages, alongside supplying the token).
80+
*
81+
* @default true
7882
*/
7983
simpleAuth?: boolean
8084
wsOptions?: Partial<WsRpcChannelOptions>

packages/devframe/src/types/devframe.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ export interface DevframeCliOptions {
111111
/**
112112
* Authentication for the standalone dev server.
113113
*
114-
* - `undefined` / `true` (default) — the standalone adapters (`cli` /
115-
* `spa` / served `build`) auto-wire devframe's interactive OTP auth
114+
* - `undefined` / `true` — the standalone adapters (`cli` / `spa` /
115+
* served `build`) auto-wire devframe's interactive OTP auth
116116
* (`createInteractiveAuth`): an untrusted client can only reach
117117
* `anonymous:` methods until it exchanges the printed one-time code.
118118
* The adapter prints the code + magic-link banner once the server is
@@ -126,6 +126,8 @@ export interface DevframeCliOptions {
126126
*
127127
* Hosted adapters (`vite`, `embedded`) ignore this and defer to the host's
128128
* auth; `@vitejs/devtools` honors the equivalent `devtools.clientAuth`.
129+
*
130+
* @default true
129131
*/
130132
auth?: boolean | DevframeAuthHandler
131133
/**

0 commit comments

Comments
 (0)