- 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.
30 lines
973 B
TypeScript
30 lines
973 B
TypeScript
/**
|
|
* 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(),
|
|
};
|