mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 12:41:12 +00:00
fix(auth): lazy-load provider oauth helpers
This commit is contained in:
3
src/plugin-sdk/provider-auth-login.runtime.ts
Normal file
3
src/plugin-sdk/provider-auth-login.runtime.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export { loginChutes } from "../commands/chutes-oauth.js";
|
||||
export { loginOpenAICodexOAuth } from "../plugins/provider-openai-codex-oauth.js";
|
||||
export { githubCopilotLoginCommand } from "../providers/github-copilot-auth.js";
|
||||
@@ -1,5 +1,16 @@
|
||||
// Public interactive auth/login helpers for provider plugins.
|
||||
|
||||
export { githubCopilotLoginCommand } from "../providers/github-copilot-auth.js";
|
||||
export { loginChutes } from "../commands/chutes-oauth.js";
|
||||
export { loginOpenAICodexOAuth } from "../plugins/provider-openai-codex-oauth.js";
|
||||
import { createLazyRuntimeMethodBinder, createLazyRuntimeModule } from "../shared/lazy-runtime.js";
|
||||
|
||||
const loadProviderAuthLoginRuntime = createLazyRuntimeModule(
|
||||
() => import("./provider-auth-login.runtime.js"),
|
||||
);
|
||||
const bindProviderAuthLoginRuntime = createLazyRuntimeMethodBinder(loadProviderAuthLoginRuntime);
|
||||
|
||||
export const githubCopilotLoginCommand = bindProviderAuthLoginRuntime(
|
||||
(runtime) => runtime.githubCopilotLoginCommand,
|
||||
);
|
||||
export const loginChutes = bindProviderAuthLoginRuntime((runtime) => runtime.loginChutes);
|
||||
export const loginOpenAICodexOAuth = bindProviderAuthLoginRuntime(
|
||||
(runtime) => runtime.loginOpenAICodexOAuth,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user