@flowscripter/example-host-application 1.0.0 → 1.1.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.
@@ -8,6 +8,7 @@ permissions:
8
8
  pull-requests: write
9
9
  id-token: write
10
10
  pages: write
11
+ packages: write
11
12
  jobs:
12
13
  call-release-bun-executable:
13
14
  uses: flowscripter/.github/.github/workflows/release-bun-executable.yml@v1
package/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![version](https://img.shields.io/github/v/release/flowscripter/example-host-application?sort=semver)](https://github.com/flowscripter/example-host-application/releases)
4
4
  [![build](https://img.shields.io/github/actions/workflow/status/flowscripter/example-host-application/release-bun-executable.yml)](https://github.com/flowscripter/example-host-application/actions/workflows/release-bun-executable.yml)
5
5
  [![coverage](https://codecov.io/gh/flowscripter/example-host-application/branch/main/graph/badge.svg?token=EMFT2938ZF)](https://codecov.io/gh/flowscripter/example-host-application)
6
- [![docs](https://img.shields.io/badge/docs-API-blue)](https://flowscripter.github.io/example-host-application/index.html)
7
6
  [![license: MIT](https://img.shields.io/github/license/flowscripter/example-host-application)](https://github.com/flowscripter/example-host-application/blob/main/LICENSE)
8
7
 
9
8
  > Example host application executable for the
@@ -60,35 +59,20 @@ Compile binary:
60
59
 
61
60
  `bun build index.ts --compile --outfile /tmp/example-host-application`
62
61
 
63
- **NOTE**: The following tasks use Deno as it excels at these and Bun does not
64
- currently provide such functionality:
65
-
66
62
  Format:
67
63
 
68
- `deno fmt`
64
+ `bunx oxfmt`
69
65
 
70
66
  Lint:
71
67
 
72
- `deno lint index.ts src/ tests/`
73
-
74
- Generate HTML API Documentation:
75
-
76
- `deno doc --html --name=example-host-application index.ts`
68
+ `bunx oxlint index.ts src/ tests/`
77
69
 
78
70
  ## Documentation
79
71
 
80
- ### Framework API
81
-
82
72
  Refer to the
83
73
  [dynamic-plugin-framework](https://github.com/flowscripter/dynamic-plugin-framework)
84
74
  for an overview of what this example is demonstrating.
85
75
 
86
- ### API
87
-
88
- Link to auto-generated API docs:
89
-
90
- [API Documentation](https://flowscripter.github.io/example-host-application/index.html)
91
-
92
76
  ## License
93
77
 
94
78
  MIT © Flowscripter
package/bun.lock CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "lockfileVersion": 1,
3
+ "configVersion": 0,
3
4
  "workspaces": {
4
5
  "": {
5
6
  "name": "@flowscripter/example-host-application",
@@ -8,10 +9,10 @@
8
9
  "@flowscripter/example-plugin-api": "^1.0.8",
9
10
  },
10
11
  "devDependencies": {
11
- "@types/bun": "^1.2.10",
12
+ "@types/bun": "^1.3.14",
12
13
  },
13
14
  "peerDependencies": {
14
- "typescript": "^5.8.3",
15
+ "typescript": "^6.0.3",
15
16
  },
16
17
  },
17
18
  },
@@ -20,13 +21,13 @@
20
21
 
21
22
  "@flowscripter/example-plugin-api": ["@flowscripter/example-plugin-api@1.0.8", "", { "peerDependencies": { "typescript": "^5.8.2" } }, "sha512-hRF0DRg+8aKmnAwLDQyA7phjRbET0yD9bBYdny2csL2N5JiV/KLFdfwtJSSSL/LlMdkwtl0VKAVroVc78eWAsw=="],
22
23
 
23
- "@types/bun": ["@types/bun@1.2.10", "", { "dependencies": { "bun-types": "1.2.10" } }, "sha512-eilv6WFM3M0c9ztJt7/g80BDusK98z/FrFwseZgT4bXCq2vPhXD4z8R3oddmAn+R/Nmz9vBn4kweJKmGTZj+lg=="],
24
+ "@types/bun": ["@types/bun@1.3.14", "", { "dependencies": { "bun-types": "1.3.14" } }, "sha512-h1hFqFVcvAvD9j9K7ZW7vd82aSA+rTdznZa+5bwvCwqSB1jmmfLcbIWhOLx1/+boy/xmjgCs/OMUL8hRJSmnPw=="],
24
25
 
25
26
  "@types/node": ["@types/node@22.13.9", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-acBjXdRJ3A6Pb3tqnw9HZmyR3Fiol3aGxRCK1x3d+6CDAMjl7I649wpSd+yNURCjbOUGu9tqtLKnTGxmK6CyGw=="],
26
27
 
27
- "bun-types": ["bun-types@1.2.10", "", { "dependencies": { "@types/node": "*" } }, "sha512-b5ITZMnVdf3m1gMvJHG+gIfeJHiQPJak0f7925Hxu6ZN5VKA8AGy4GZ4lM+Xkn6jtWxg5S3ldWvfmXdvnkp3GQ=="],
28
+ "bun-types": ["bun-types@1.3.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-4N0ig0fEomHt5R0KCFWjovxow98rIoRwKolrYdCcknNwMekCXRnWEUvgu5soYV8QXtVsrUD8B95MBOZGPvr6KQ=="],
28
29
 
29
- "typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
30
+ "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="],
30
31
 
31
32
  "undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
32
33
  }
package/package.json CHANGED
@@ -1,36 +1,36 @@
1
1
  {
2
2
  "name": "@flowscripter/example-host-application",
3
- "homepage": "https://github.com/flowscripter/example-host-application#readme",
3
+ "version": "1.1.0",
4
4
  "description": "Example host application for the https://github.com/flowscripter/dynamic-plugin-framework",
5
- "repository": {
6
- "type": "git",
7
- "url": "git+https://github.com/flowscripter/example-host-application.git"
8
- },
9
- "license": "MIT",
10
5
  "keywords": [
11
6
  "bun",
7
+ "cli",
8
+ "dynamic",
12
9
  "example",
13
- "plugin",
10
+ "executable",
14
11
  "framework",
15
- "dynamic",
16
12
  "import",
17
- "executable",
18
- "cli"
13
+ "plugin"
19
14
  ],
20
- "module": "index.ts",
15
+ "homepage": "https://github.com/flowscripter/example-host-application#readme",
16
+ "license": "MIT",
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/flowscripter/example-host-application.git"
20
+ },
21
21
  "type": "module",
22
- "version": "1.0.0",
22
+ "module": "index.ts",
23
23
  "publishConfig": {
24
24
  "access": "public"
25
25
  },
26
- "devDependencies": {
27
- "@types/bun": "^1.2.10"
28
- },
29
- "peerDependencies": {
30
- "typescript": "^5.8.3"
31
- },
32
26
  "dependencies": {
33
27
  "@flowscripter/dynamic-plugin-framework": "^1.3.18",
34
28
  "@flowscripter/example-plugin-api": "^1.0.8"
29
+ },
30
+ "devDependencies": {
31
+ "@types/bun": "^1.3.14"
32
+ },
33
+ "peerDependencies": {
34
+ "typescript": "^6.0.3"
35
35
  }
36
36
  }
@@ -1,7 +1,4 @@
1
- import {
2
- EXTENSION_POINT_1,
3
- type ExtensionPoint1,
4
- } from "@flowscripter/example-plugin-api";
1
+ import { EXTENSION_POINT_1, type ExtensionPoint1 } from "@flowscripter/example-plugin-api";
5
2
  import {
6
3
  DefaultPluginManager,
7
4
  type ExtensionInfo,
@@ -23,21 +20,16 @@ export async function exampleHostApplication(): Promise<void> {
23
20
 
24
21
  const pluginManager = new DefaultPluginManager([pluginRepository]);
25
22
 
26
- console.info(
27
- `Registering extensions for ${EXTENSION_POINT_1} extension point`,
28
- );
23
+ console.info(`Registering extensions for ${EXTENSION_POINT_1} extension point`);
29
24
 
30
25
  await pluginManager.registerExtensions(EXTENSION_POINT_1);
31
26
 
32
27
  console.info("Registered extensions:");
33
28
 
34
- const extensionInfos = await pluginManager.getRegisteredExtensions(
35
- EXTENSION_POINT_1,
36
- );
29
+ const extensionInfos = await pluginManager.getRegisteredExtensions(EXTENSION_POINT_1);
37
30
 
38
31
  extensionInfos.forEach((extensionInfo: ExtensionInfo) => {
39
- let extensionInfoString =
40
- `extensionHandle: ${extensionInfo.extensionHandle}\n`;
32
+ let extensionInfoString = `extensionHandle: ${extensionInfo.extensionHandle}\n`;
41
33
 
42
34
  if (extensionInfo.extensionData) {
43
35
  extensionInfoString += `extensionData:\n`;
@@ -58,13 +50,10 @@ export async function exampleHostApplication(): Promise<void> {
58
50
  if (extensionInfos.length > 0) {
59
51
  console.info("Instantiating first extension");
60
52
 
61
- const extension = await pluginManager.instantiate(
53
+ const extension = (await pluginManager.instantiate(
62
54
  extensionInfos[0].extensionHandle,
63
- new Map([[
64
- "host_foo",
65
- "host_bar",
66
- ]]),
67
- ) as ExtensionPoint1;
55
+ new Map([["host_foo", "host_bar"]]),
56
+ )) as ExtensionPoint1;
68
57
 
69
58
  console.info("Invoking extension");
70
59
 
package/tsconfig.json CHANGED
@@ -22,6 +22,9 @@
22
22
  // Some stricter flags (disabled by default)
23
23
  "noUnusedLocals": false,
24
24
  "noUnusedParameters": false,
25
- "noPropertyAccessFromIndexSignature": false
25
+ "noPropertyAccessFromIndexSignature": false,
26
+
27
+ // Type definitions
28
+ "types": ["bun", "node"]
26
29
  }
27
30
  }