@flowscripter/dynamic-plugin-framework 1.5.3 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +27 -1
  2. package/package.json +5 -1
  3. package/plugin.ts +3 -0
package/README.md CHANGED
@@ -183,6 +183,32 @@ terminal and a browser:
183
183
  - [Host Application](https://github.com/flowscripter/example-host-application)
184
184
  - [Host Webapp](https://github.com/flowscripter/example-host-webapp)
185
185
 
186
+ ## Imports
187
+
188
+ The package provides two entry points depending on your role:
189
+
190
+ **Plugin authors** only need the three plugin-side interfaces. Import from the
191
+ `/plugin` subpath to keep the host implementation out of your module graph:
192
+
193
+ ```typescript
194
+ import type {
195
+ Plugin,
196
+ ExtensionDescriptor,
197
+ ExtensionFactory,
198
+ } from "@flowscripter/dynamic-plugin-framework/plugin";
199
+ ```
200
+
201
+ **Host application authors** import from the main entry point, which exposes
202
+ the full API including concrete implementations:
203
+
204
+ ```typescript
205
+ import {
206
+ DefaultPluginManager,
207
+ UrlListPluginRepository,
208
+ } from "@flowscripter/dynamic-plugin-framework";
209
+ import type { ExtensionInfo, PluginManager } from "@flowscripter/dynamic-plugin-framework";
210
+ ```
211
+
186
212
  ## API
187
213
 
188
214
  The following diagram provides an overview of the `Plugin` API:
@@ -248,7 +274,7 @@ Format:
248
274
 
249
275
  Lint:
250
276
 
251
- `bunx oxlint index.ts src/ tests/`
277
+ `bunx oxlint index.ts plugin.ts src/ tests/`
252
278
 
253
279
  Generate HTML API Documentation:
254
280
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowscripter/dynamic-plugin-framework",
3
- "version": "1.5.3",
3
+ "version": "1.6.0",
4
4
  "description": "Dynamic plugin framework for Bun based on Javascript Modules and import() function",
5
5
  "keywords": [
6
6
  "bun",
@@ -17,6 +17,10 @@
17
17
  },
18
18
  "type": "module",
19
19
  "module": "index.ts",
20
+ "exports": {
21
+ ".": "./index.ts",
22
+ "./plugin": "./plugin.ts"
23
+ },
20
24
  "publishConfig": {
21
25
  "access": "public"
22
26
  },
package/plugin.ts ADDED
@@ -0,0 +1,3 @@
1
+ export type { default as ExtensionFactory } from "./src/api/plugin/ExtensionFactory.ts";
2
+ export type { default as ExtensionDescriptor } from "./src/api/plugin/ExtensionDescriptor.ts";
3
+ export type { default as Plugin } from "./src/api/plugin/Plugin.ts";