mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Plugins/google-gemini-cli-auth: migrate to scoped plugin-sdk imports
This commit is contained in:
@@ -3,7 +3,7 @@ import {
|
|||||||
emptyPluginConfigSchema,
|
emptyPluginConfigSchema,
|
||||||
type OpenClawPluginApi,
|
type OpenClawPluginApi,
|
||||||
type ProviderAuthContext,
|
type ProviderAuthContext,
|
||||||
} from "openclaw/plugin-sdk/core";
|
} from "openclaw/plugin-sdk/google-gemini-cli-auth";
|
||||||
import { loginGeminiCliOAuth } from "./oauth.js";
|
import { loginGeminiCliOAuth } from "./oauth.js";
|
||||||
|
|
||||||
const PROVIDER_ID = "google-gemini-cli";
|
const PROVIDER_ID = "google-gemini-cli";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { join, parse } from "node:path";
|
import { join, parse } from "node:path";
|
||||||
import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";
|
import { describe, expect, it, vi, beforeEach, afterEach } from "vitest";
|
||||||
|
|
||||||
vi.mock("openclaw/plugin-sdk", () => ({
|
vi.mock("openclaw/plugin-sdk/google-gemini-cli-auth", () => ({
|
||||||
isWSL2Sync: () => false,
|
isWSL2Sync: () => false,
|
||||||
fetchWithSsrFGuard: async (params: {
|
fetchWithSsrFGuard: async (params: {
|
||||||
url: string;
|
url: string;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { createHash, randomBytes } from "node:crypto";
|
|||||||
import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
||||||
import { createServer } from "node:http";
|
import { createServer } from "node:http";
|
||||||
import { delimiter, dirname, join } from "node:path";
|
import { delimiter, dirname, join } from "node:path";
|
||||||
import { fetchWithSsrFGuard, isWSL2Sync } from "openclaw/plugin-sdk/compat";
|
import { fetchWithSsrFGuard, isWSL2Sync } from "openclaw/plugin-sdk/google-gemini-cli-auth";
|
||||||
|
|
||||||
const CLIENT_ID_KEYS = ["OPENCLAW_GEMINI_OAUTH_CLIENT_ID", "GEMINI_CLI_OAUTH_CLIENT_ID"];
|
const CLIENT_ID_KEYS = ["OPENCLAW_GEMINI_OAUTH_CLIENT_ID", "GEMINI_CLI_OAUTH_CLIENT_ID"];
|
||||||
const CLIENT_SECRET_KEYS = [
|
const CLIENT_SECRET_KEYS = [
|
||||||
|
|||||||
Reference in New Issue
Block a user