feat: full-stack MCP surface — client template, npm CI, 13 repos
- build.py: vendor templates/client into mcp/templates/client with client.json manifest (16 kinds); register drone-npm as a third CI shape (types: pypi/npm/docker); root *.py stale doc numbers fixed - registry.py: registry://client resource + list_client_components / get_client_component / get_client_template tools; build prompt gains the client scaffold step (docs://modules/ui_admin); compliance prompt covers npm packages; drone docs describe all three shapes - repos.json (+mcp): doc-weaver, react-auth, react-openapi (npm Type B, package.json version source), vet (app Type C, VERSION) - docs: 90_drone_pipelines gains Type B npm section; 91_versioning covers package.json as a version source; 94_repository_inventory gains the npm package table and services/apps Type C; lib index updated Verified: bundle regen (24 modules, client 16, drone 3, repos 13); registry client readers exercised against the vendored bundle.
This commit is contained in:
29
standards/mcp/templates/client/src/openapi-config.ts
Normal file
29
standards/mcp/templates/client/src/openapi-config.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Runtime OpenAPI configuration.
|
||||
*
|
||||
* Reads the API base URL from `import.meta.env.VITE_API_BASE_URL` and points
|
||||
* `@aetoskia/react-openapi` at `${base}/openapi.json`, sets the app title,
|
||||
* and wires the auth token from `@aetoskia/react-auth` into every API call.
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
import type { SpecConfiguration } from "@aetoskia/react-openapi";
|
||||
import { tokenStore } from "@aetoskia/react-auth";
|
||||
|
||||
const apiBase = import.meta.env.VITE_API_BASE_URL;
|
||||
|
||||
/**
|
||||
* The `SpecConfiguration` passed to `AppProvider`.
|
||||
*
|
||||
* - `specUrl` / `baseApiUrl` - derived from `VITE_API_BASE_URL`.
|
||||
* - `title` - replace "App Title" with your application's name.
|
||||
* - `getToken` - supplies the JWT from `@aetoskia/react-auth` to every
|
||||
* request made through `getApi()` / `useResource()`.
|
||||
*/
|
||||
export const specConfiguration: SpecConfiguration = {
|
||||
specUrl: `${apiBase}/openapi.json`,
|
||||
baseApiUrl: apiBase,
|
||||
title: "App Title",
|
||||
getToken: () => tokenStore.get(),
|
||||
};
|
||||
Reference in New Issue
Block a user