History

feat: plugin API routes + frontend component registration

OpenAPI plugin now has three sub-path exports: - @executor/plugin-openapi (SDK plugin, unchanged) - @executor/plugin-openapi/api (HTTP routes + handlers) - OpenApiGroup: previewSpec, addSpec, listSpecs, removeSpec endpoints - OpenApiHandlers: Effect HttpApiBuilder handlers - OpenApiExtensionService: Context tag for wiring - @executor/plugin-openapi/react (React components + atoms) - OpenApiClient: typed AtomHttpApi client (core + openapi routes) - Atoms: openApiSpecsAtom, previewOpenApiSpec, addOpenApiSpec, removeOpenApiSpec - openApiSourcePlugin: implements SourcePlugin contract - Lazy-loaded components: AddOpenApiSource (multi-step), EditOpenApiSource, OpenApiSourceSummary Shared infrastructure: - @executor/api: addGroup() composes plugin HttpApiGroups with CoreExecutorApi - @executor/react: SourcePlugin contract type for shell↔plugin UI composition Shell owns layout/nav/common actions, plugin owns content within typed frames Pattern: plugins use addGroup() + AtomHttpApi.Tag to get typed query/mutation atoms for both core and plugin-specific routes. Peer deps with optional metadata so SDK-only consumers don't pull in React. 10 packages typecheck clean, 21 OpenAPI tests passing.

Rhys Sullivan committed 7 months ago

Commit 1ddae2a1 parent f973e3218 files · +416 −6Browse files

Showing the changes to packages/plugins/openapi/src/react/source-plugin.ts (1 of 18 files). Show all

Unified · Split

packages/plugins/openapi/src/react/source-plugin.ts+14−0
@@ -0,0 +1,14 @@
1import { lazy } from "react";
2import type { SourcePlugin } from "@executor/react";
3
4// ---------------------------------------------------------------------------
5// OpenAPI source plugin — lazy-loaded components
6// ---------------------------------------------------------------------------
7
8export const openApiSourcePlugin: SourcePlugin = {
9 key: "openapi",
10 label: "OpenAPI",
11 add: lazy(() => import("./AddOpenApiSource")),
12 edit: lazy(() => import("./EditOpenApiSource")),
13 summary: lazy(() => import("./OpenApiSourceSummary")),
14};