Skip to content

Commit 53533cc

Browse files
zrosenbauerclaude
andcommitted
fix(packages/core): rename custom builder param and update JSDoc
Rename `resolver` parameter to `fn` in AuthFactory.custom and buildCustom to complete the resolver→strategy vocabulary rename. Update JSDoc to list current interactive strategy names. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1249f71 commit 53533cc

File tree

1 file changed

+5
-5
lines changed
  • packages/core/src/middleware/auth

1 file changed

+5
-5
lines changed

packages/core/src/middleware/auth/auth.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface AuthFactory {
5656
readonly deviceCode: (options: DeviceCodeStrategyOptions) => DeviceCodeSourceConfig
5757
readonly token: (options?: TokenStrategyOptions) => TokenSourceConfig
5858
readonly apiKey: (options?: TokenStrategyOptions) => TokenSourceConfig
59-
readonly custom: (resolver: CustomStrategyFn) => CustomSourceConfig
59+
readonly custom: (fn: CustomStrategyFn) => CustomSourceConfig
6060
readonly headers: () => (ctx: Context) => Readonly<Record<string, string>>
6161
readonly require: (options?: AuthRequireOptions) => Middleware
6262
}
@@ -70,7 +70,7 @@ export interface AuthFactory {
7070
* 2. Dotenv — `.env` file (when configured)
7171
* 3. Env — `CLI_NAME_TOKEN`
7272
*
73-
* Interactive strategies (OAuth, prompt, custom) only run when the
73+
* Interactive strategies (OAuth, device-code, token, custom) only run when the
7474
* command handler explicitly calls `ctx.auth.login()`.
7575
*
7676
* @param options - Auth middleware configuration.
@@ -191,11 +191,11 @@ function buildToken(options?: TokenStrategyOptions): TokenSourceConfig {
191191
* Build a custom strategy config from a strategy function.
192192
*
193193
* @private
194-
* @param resolver - The custom strategy function.
194+
* @param fn - The custom strategy function.
195195
* @returns A CustomSourceConfig with `source: 'custom'`.
196196
*/
197-
function buildCustom(resolver: CustomStrategyFn): CustomSourceConfig {
198-
return { resolver, source: 'custom' as const }
197+
function buildCustom(fn: CustomStrategyFn): CustomSourceConfig {
198+
return { resolver: fn, source: 'custom' as const }
199199
}
200200

201201
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)