@flowscripter/plugin-api
v2.0.2
Published
Flowscripter plugin API: interfaces for command and component plugins
Readme
plugin-api
Flowscripter plugin API: interfaces for command and component plugins
Work in progress.
Bun Module Usage
Add the module:
bun add @flowscripter/plugin-api
Use the module:
import {
createComponentPlugin,
type ComponentFactory,
type Datastore,
} from "@flowscripter/plugin-api";
const datastoreFactory: ComponentFactory<unknown, Datastore> = {
create: async () => ({
config: {},
async *getAllDataEntries() {},
}),
};
const plugin = createComponentPlugin({ datastoreFactory });Development
Install dependencies:
bun install
Build (produces dist/ for Node.js and TypeScript consumers; Bun uses raw source directly):
bun run build
Test:
bun test
Format:
bunx oxfmt
Lint:
bunx oxlint index.ts src/ tests/
Generate HTML API Documentation:
bunx typedoc index.ts
Documentation
Overview
Sample mermaid diagram to test rendering in markdown:
classDiagram
Foo <|-- BarAPI
Link to auto-generated API docs:
License
MIT © Flowscripter
