mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 00:48:27 +00:00
chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -3,8 +3,7 @@ import type { WizardPrompter } from "../wizard/prompts.js";
|
||||
|
||||
type OAuthPrompt = { message: string; placeholder?: string };
|
||||
|
||||
const validateRequiredInput = (value: string) =>
|
||||
value.trim().length > 0 ? undefined : "Required";
|
||||
const validateRequiredInput = (value: string) => (value.trim().length > 0 ? undefined : "Required");
|
||||
|
||||
export function createVpsAwareOAuthHandlers(params: {
|
||||
isRemote: boolean;
|
||||
@@ -19,17 +18,14 @@ export function createVpsAwareOAuthHandlers(params: {
|
||||
onPrompt: (prompt: OAuthPrompt) => Promise<string>;
|
||||
} {
|
||||
const manualPromptMessage =
|
||||
params.manualPromptMessage ??
|
||||
"Paste the redirect URL (or authorization code)";
|
||||
params.manualPromptMessage ?? "Paste the redirect URL (or authorization code)";
|
||||
let manualCodePromise: Promise<string> | undefined;
|
||||
|
||||
return {
|
||||
onAuth: async ({ url }) => {
|
||||
if (params.isRemote) {
|
||||
params.spin.stop("OAuth URL ready");
|
||||
params.runtime.log(
|
||||
`\nOpen this URL in your LOCAL browser:\n\n${url}\n`,
|
||||
);
|
||||
params.runtime.log(`\nOpen this URL in your LOCAL browser:\n\n${url}\n`);
|
||||
manualCodePromise = params.prompter
|
||||
.text({
|
||||
message: manualPromptMessage,
|
||||
|
||||
Reference in New Issue
Block a user