The plugin compiler spawned esbuild through app.asar, and the subprocess imported the React client barrel. Point esbuild at the unpacked binary, add a react-free @paseo/plugin/server entry, and pass a typed PluginTheme so plugin UI follows the active theme on desktop and mobile.
12 lines
480 B
TypeScript
12 lines
480 B
TypeScript
import type { PluginAttachmentSearchPayload } from "@paseo/plugin/server";
|
|
import type { output as ZodOutput } from "zod";
|
|
import { searchIssuesRpc } from "./issues.shared";
|
|
import { createLinearIssueSearch } from "./linear";
|
|
|
|
export async function searchIssues({
|
|
query,
|
|
}: ZodOutput<typeof searchIssuesRpc.input>): Promise<PluginAttachmentSearchPayload> {
|
|
const linear = createLinearIssueSearch({ apiKey: process.env.LINEAR_API_KEY ?? "" });
|
|
return linear.search(query);
|
|
}
|