System requirements
| Requirement | Minimum version |
|---|---|
| Node.js | >=18.0.0 |
| npm | >=9.0.0 |
| TypeScript | Any version compatible with your project (TypeScript >=5.x recommended) |
Install
Run the following command in your plugin project directory:Import
Import the core types and base class from the root package entry:TypeScript configuration
The package ships TypeScript declarations atdist/@types/index.d.ts. This path is declared in package.json under both the types field and the exports["."].types field, so TypeScript resolves types automatically when you import from @anikitenko/fdo-sdk.
No additional paths or typeRoots configuration is required. A minimal tsconfig.json for a plugin project:
tsconfig.json
If TypeScript cannot resolve the types, verify that
node_modules/@anikitenko/fdo-sdk/dist/@types/index.d.ts exists. The declaration files are included in the published package under dist/**/*.d.ts.Distribution mode
Thepackage.json exports map is:
require condition is populated. ESM import of the bundle is not a supported path.
Peer dependency: electron
electron is declared as a peer dependency. It is not bundled into the SDK runtime artifact. FDO provides the Electron runtime; you do not need to install Electron in your plugin project.
If your plugin tooling (for example, a type checker or bundler) warns about a missing
electron peer, you can add electron as a dev dependency in your plugin project to satisfy the resolution. The SDK itself does not import Electron at runtime.What is included in the published package
The following paths are included when you install from npm:| Path | Contents |
|---|---|
dist/**/*.js | Runtime bundle (dist/fdo-sdk.bundle.js) |
dist/**/*.d.ts | TypeScript declaration files under dist/@types/ |
dist/**/*.json | DOM metadata (dist/dom-metadata.json) |
docs/**/*.md | SDK documentation for offline reference |
examples/ | Working plugin examples and fixture scaffolds |
examples/ directory includes production-oriented fixture files you can use as starting points:
examples/fixtures/minimal-plugin.fixture.ts— smallest valid plugin scaffoldexamples/fixtures/operator-kubernetes-plugin.fixture.ts— Kubernetes operator patternexamples/fixtures/operator-terraform-plugin.fixture.ts— Terraform operator patternexamples/fixtures/operator-custom-tool-plugin.fixture.ts— generic custom tool scope