Unified · Split
| @@ -11,6 +11,7 @@ · 10 unmodified lines | ||
| 11 | 11 | "@executor/plugin-google-discovery": "workspace:*", |
| 12 | 12 | "@executor/plugin-graphql": "workspace:*", |
| 13 | 13 | "@executor/plugin-mcp": "workspace:*", |
| 14 | + "@executor/plugin-onepassword": "workspace:*", | |
| 14 | 15 | "@executor/plugin-openapi": "workspace:*", |
| 15 | 16 | "@executor/react": "workspace:*", |
| 16 | 17 | "@executor/sdk": "workspace:*", |
| @@ -1,6 +1,17 @@ | ||
| 1 | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | 2 | import { SourcesPage } from "@executor/react/pages/sources"; |
| 3 | +import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | |
| 4 | +import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | |
| 5 | +import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | |
| 6 | +import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | |
| 7 | + | |
| 8 | +const sourcePlugins = [ | |
| 9 | + openApiSourcePlugin, | |
| 10 | + mcpSourcePlugin, | |
| 11 | + googleDiscoverySourcePlugin, | |
| 12 | + graphqlSourcePlugin, | |
| 13 | +]; | |
| 3 | 14 | |
| 4 | 15 | export const Route = createFileRoute("/")({ |
| 5 | − component: SourcesPage, | |
| 16 | + component: () => <SourcesPage sourcePlugins={sourcePlugins} />, | |
| 6 | 17 | }); |
| @@ -1,6 +1,9 @@ | ||
| 1 | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | 2 | import { SecretsPage } from "@executor/react/pages/secrets"; |
| 3 | +import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react"; | |
| 4 | + | |
| 5 | +const secretProviderPlugins = [onePasswordSecretProviderPlugin]; | |
| 3 | 6 | |
| 4 | 7 | export const Route = createFileRoute("/secrets")({ |
| 5 | − component: SecretsPage, | |
| 8 | + component: () => <SecretsPage secretProviderPlugins={secretProviderPlugins} />, | |
| 6 | 9 | }); |
| @@ -1,6 +1,17 @@ | ||
| 1 | 1 | import { Schema } from "effect"; |
| 2 | 2 | import { createFileRoute } from "@tanstack/react-router"; |
| 3 | 3 | import { SourcesAddPage } from "@executor/react/pages/sources-add"; |
| 4 | +import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | |
| 5 | +import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | |
| 6 | +import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | |
| 7 | +import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | |
| 8 | + | |
| 9 | +const sourcePlugins = [ | |
| 10 | + openApiSourcePlugin, | |
| 11 | + mcpSourcePlugin, | |
| 12 | + googleDiscoverySourcePlugin, | |
| 13 | + graphqlSourcePlugin, | |
| 14 | +]; | |
| 4 | 15 | |
| 5 | 16 | const SearchParams = Schema.standardSchemaV1( |
| 6 | 17 | Schema.Struct({ |
| @@ -14,6 +25,6 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({ · 7 unmodified lines | ||
| 14 | 25 | component: () => { |
| 15 | 26 | const { pluginKey } = Route.useParams(); |
| 16 | 27 | const { url, preset } = Route.useSearch(); |
| 17 | − return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} />; | |
| 28 | + return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} sourcePlugins={sourcePlugins} />; | |
| 18 | 29 | }, |
| 19 | 30 | }); |
| @@ -1,6 +1,17 @@ | ||
| 1 | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | 2 | import { SourcesPage } from "@executor/react/pages/sources"; |
| 3 | +import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | |
| 4 | +import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | |
| 5 | +import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | |
| 6 | +import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | |
| 7 | + | |
| 8 | +const sourcePlugins = [ | |
| 9 | + openApiSourcePlugin, | |
| 10 | + mcpSourcePlugin, | |
| 11 | + googleDiscoverySourcePlugin, | |
| 12 | + graphqlSourcePlugin, | |
| 13 | +]; | |
| 3 | 14 | |
| 4 | 15 | export const Route = createFileRoute("/")({ |
| 5 | − component: SourcesPage, | |
| 16 | + component: () => <SourcesPage sourcePlugins={sourcePlugins} />, | |
| 6 | 17 | }); |
| @@ -1,6 +1,9 @@ | ||
| 1 | 1 | import { createFileRoute } from "@tanstack/react-router"; |
| 2 | 2 | import { SecretsPage } from "@executor/react/pages/secrets"; |
| 3 | +import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react"; | |
| 4 | + | |
| 5 | +const secretProviderPlugins = [onePasswordSecretProviderPlugin]; | |
| 3 | 6 | |
| 4 | 7 | export const Route = createFileRoute("/secrets")({ |
| 5 | − component: SecretsPage, | |
| 8 | + component: () => <SecretsPage secretProviderPlugins={secretProviderPlugins} />, | |
| 6 | 9 | }); |
| @@ -1,6 +1,17 @@ | ||
| 1 | 1 | import { Schema } from "effect"; |
| 2 | 2 | import { createFileRoute } from "@tanstack/react-router"; |
| 3 | 3 | import { SourcesAddPage } from "@executor/react/pages/sources-add"; |
| 4 | +import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | |
| 5 | +import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | |
| 6 | +import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | |
| 7 | +import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | |
| 8 | + | |
| 9 | +const sourcePlugins = [ | |
| 10 | + openApiSourcePlugin, | |
| 11 | + mcpSourcePlugin, | |
| 12 | + googleDiscoverySourcePlugin, | |
| 13 | + graphqlSourcePlugin, | |
| 14 | +]; | |
| 4 | 15 | |
| 5 | 16 | const SearchParams = Schema.standardSchemaV1( |
| 6 | 17 | Schema.Struct({ |
| @@ -14,6 +25,6 @@ export const Route = createFileRoute("/sources/add/$pluginKey")({ · 7 unmodified lines | ||
| 14 | 25 | component: () => { |
| 15 | 26 | const { pluginKey } = Route.useParams(); |
| 16 | 27 | const { url, preset } = Route.useSearch(); |
| 17 | − return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} />; | |
| 28 | + return <SourcesAddPage pluginKey={pluginKey} url={url} preset={preset} sourcePlugins={sourcePlugins} />; | |
| 18 | 29 | }, |
| 19 | 30 | }); |
| @@ -50,6 +50,7 @@ · 49 unmodified lines | ||
| 50 | 50 | "@executor/plugin-google-discovery": "workspace:*", |
| 51 | 51 | "@executor/plugin-graphql": "workspace:*", |
| 52 | 52 | "@executor/plugin-mcp": "workspace:*", |
| 53 | + "@executor/plugin-onepassword": "workspace:*", | |
| 53 | 54 | "@executor/plugin-openapi": "workspace:*", |
| 54 | 55 | "@executor/react": "workspace:*", |
| 55 | 56 | "@executor/sdk": "workspace:*", |
| @@ -515,11 +516,6 @@ · 459 unmodified lines | ||
| 515 | 516 | "@effect-atom/atom-react": "^0.5.0", |
| 516 | 517 | "@effect/platform": "catalog:", |
| 517 | 518 | "@executor/api": "workspace:*", |
| 518 | − "@executor/plugin-google-discovery": "workspace:*", | |
| 519 | − "@executor/plugin-graphql": "workspace:*", | |
| 520 | − "@executor/plugin-mcp": "workspace:*", | |
| 521 | − "@executor/plugin-onepassword": "workspace:*", | |
| 522 | − "@executor/plugin-openapi": "workspace:*", | |
| 523 | 519 | "@executor/sdk": "workspace:*", |
| 524 | 520 | "@shikijs/langs": "^4.0.2", |
| 525 | 521 | "@shikijs/themes": "^4.0.2", |
| @@ -17,11 +17,6 @@ · 16 unmodified lines | ||
| 17 | 17 | "@effect/platform": "catalog:", |
| 18 | 18 | "@effect-atom/atom-react": "^0.5.0", |
| 19 | 19 | "@executor/api": "workspace:*", |
| 20 | − "@executor/plugin-google-discovery": "workspace:*", | |
| 21 | − "@executor/plugin-graphql": "workspace:*", | |
| 22 | − "@executor/plugin-mcp": "workspace:*", | |
| 23 | − "@executor/plugin-onepassword": "workspace:*", | |
| 24 | − "@executor/plugin-openapi": "workspace:*", | |
| 25 | 20 | "@executor/sdk": "workspace:*", |
| 26 | 21 | "@tanstack/react-router": "catalog:", |
| 27 | 22 | "@shikijs/langs": "^4.0.2", |
| @@ -4,7 +4,6 @@ import { secretsAtom, setSecret, removeSecret } from "../api/atoms"; · 3 unmodified lines | ||
| 4 | 4 | import type { SecretProviderPlugin } from "../plugins/secret-provider-plugin"; |
| 5 | 5 | import { SecretId } from "@executor/sdk"; |
| 6 | 6 | import { useScope } from "../hooks/use-scope"; |
| 7 | −import { onePasswordSecretProviderPlugin } from "@executor/plugin-onepassword/react"; | |
| 8 | 7 | import { |
| 9 | 8 | Dialog, |
| 10 | 9 | DialogContent, |
| @@ -256,19 +255,12 @@ function SecretRow(props: { · 245 unmodified lines | ||
| 256 | 255 | ); |
| 257 | 256 | } |
| 258 | 257 | |
| 259 | −// --------------------------------------------------------------------------- | |
| 260 | −// Secret provider plugins | |
| 261 | −// --------------------------------------------------------------------------- | |
| 262 | − | |
| 263 | −const secretProviderPlugins: SecretProviderPlugin[] = [ | |
| 264 | − onePasswordSecretProviderPlugin, | |
| 265 | −]; | |
| 266 | − | |
| 267 | 258 | // --------------------------------------------------------------------------- |
| 268 | 259 | // Page |
| 269 | 260 | // --------------------------------------------------------------------------- |
| 270 | 261 | |
| 271 | −export function SecretsPage() { | |
| 262 | +export function SecretsPage(props: { secretProviderPlugins: readonly SecretProviderPlugin[] }) { | |
| 263 | + const { secretProviderPlugins } = props; | |
| 272 | 264 | const [addOpen, setAddOpen] = useState(false); |
| 273 | 265 | const scopeId = useScope(); |
| 274 | 266 | const secrets = useAtomValue(secretsAtom(scopeId)); |
| @@ -4,21 +4,6 @@ import type { SourcePlugin } from "../plugins/source-plugin"; · 3 unmodified lines | ||
| 4 | 4 | import { useAtomRefresh } from "@effect-atom/atom-react"; |
| 5 | 5 | import { sourcesAtom } from "../api/atoms"; |
| 6 | 6 | import { useScope } from "../hooks/use-scope"; |
| 7 | −import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | |
| 8 | −import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | |
| 9 | −import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | |
| 10 | −import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | |
| 11 | − | |
| 12 | −// --------------------------------------------------------------------------- | |
| 13 | −// Registered source plugins | |
| 14 | −// --------------------------------------------------------------------------- | |
| 15 | − | |
| 16 | −const sourcePlugins: SourcePlugin[] = [ | |
| 17 | − openApiSourcePlugin, | |
| 18 | − mcpSourcePlugin, | |
| 19 | − googleDiscoverySourcePlugin, | |
| 20 | − graphqlSourcePlugin, | |
| 21 | −]; | |
| 22 | 7 | |
| 23 | 8 | // --------------------------------------------------------------------------- |
| 24 | 9 | // Page |
| @@ -28,8 +13,9 @@ export function SourcesAddPage(props: { · 3 unmodified lines | ||
| 28 | 13 | pluginKey: string; |
| 29 | 14 | url?: string; |
| 30 | 15 | preset?: string; |
| 16 | + sourcePlugins: readonly SourcePlugin[]; | |
| 31 | 17 | }) { |
| 32 | − const { pluginKey, url, preset } = props; | |
| 18 | + const { pluginKey, url, preset, sourcePlugins } = props; | |
| 33 | 19 | const scopeId = useScope(); |
| 34 | 20 | const refreshSources = useAtomRefresh(sourcesAtom(scopeId)); |
| 35 | 21 | const navigate = useNavigate(); |
| @@ -4,23 +4,8 @@ import { Result, useAtomValue, useAtomSet } from "@effect-atom/atom-react"; · 3 unmodified lines | ||
| 4 | 4 | import { sourcesAtom, detectSource } from "../api/atoms"; |
| 5 | 5 | import { useScope } from "../hooks/use-scope"; |
| 6 | 6 | import type { SourcePlugin, SourcePreset } from "../plugins/source-plugin"; |
| 7 | −import { openApiSourcePlugin } from "@executor/plugin-openapi/react"; | |
| 8 | −import { mcpSourcePlugin } from "@executor/plugin-mcp/react"; | |
| 9 | −import { googleDiscoverySourcePlugin } from "@executor/plugin-google-discovery/react"; | |
| 10 | −import { graphqlSourcePlugin } from "@executor/plugin-graphql/react"; | |
| 11 | 7 | import { McpInstallCard } from "../components/mcp-install-card"; |
| 12 | 8 | |
| 13 | −// --------------------------------------------------------------------------- | |
| 14 | −// Registered source plugins | |
| 15 | −// --------------------------------------------------------------------------- | |
| 16 | − | |
| 17 | −const sourcePlugins: SourcePlugin[] = [ | |
| 18 | − openApiSourcePlugin, | |
| 19 | − mcpSourcePlugin, | |
| 20 | − googleDiscoverySourcePlugin, | |
| 21 | − graphqlSourcePlugin, | |
| 22 | −]; | |
| 23 | − | |
| 24 | 9 | const KIND_TO_PLUGIN_KEY: Record<string, string> = { |
| 25 | 10 | openapi: "openapi", |
| 26 | 11 | mcp: "mcp", |
| @@ -32,7 +17,8 @@ const KIND_TO_PLUGIN_KEY: Record<string, string> = { · 5 unmodified lines | ||
| 32 | 17 | // Page |
| 33 | 18 | // --------------------------------------------------------------------------- |
| 34 | 19 | |
| 35 | −export function SourcesPage() { | |
| 20 | +export function SourcesPage(props: { sourcePlugins: readonly SourcePlugin[] }) { | |
| 21 | + const { sourcePlugins } = props; | |
| 36 | 22 | const [url, setUrl] = useState(""); |
| 37 | 23 | const [detecting, setDetecting] = useState(false); |
| 38 | 24 | const [error, setError] = useState<string | null>(null); |