feat(browser-ext): move browser extension to browser-ext/ and update API client to tRPC
- Create browser-ext/ with full extension code (MV3 manifest, background service worker, content script, popup, options page) - Add tRPC API client that communicates with unified monolith endpoints - Implement cache, settings, and phishing detection utilities - Create extension tRPC router in web app (getAuthStatus, linkDevice, reportPhishing) - Configure Vite build with manifest V3 support - Write unit tests for cache, phishing detector, and API client - All 20 tests passing, TypeScript lint clean
This commit is contained in:
15
web/src/server/api/schemas/extension.ts
Normal file
15
web/src/server/api/schemas/extension.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { object, string, optional } from "valibot";
|
||||
|
||||
export const GetAuthStatusSchema = object({
|
||||
apiKey: optional(string()),
|
||||
});
|
||||
|
||||
export const LinkDeviceSchema = object({
|
||||
extensionId: string(),
|
||||
deviceName: optional(string()),
|
||||
});
|
||||
|
||||
export const ReportPhishingSchema = object({
|
||||
url: string(),
|
||||
source: optional(string()),
|
||||
});
|
||||
Reference in New Issue
Block a user