@flowscripter/dynamic-plugin-framework 1.3.14 → 1.3.16
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.
- package/.github/workflows/check-bun-dependencies.yml +3 -0
- package/.github/workflows/lint-pr-message.yml +2 -0
- package/.github/workflows/release-bun-library.yml +6 -0
- package/.github/workflows/validate-bun-library-pr.yml +2 -0
- package/bun.lock +3 -3
- package/package.json +16 -2
- package/src/plugin_manager/plugin_repository/UrlPluginSource.ts +5 -0
- package/tests/plugin_manager/plugin_repository/UrlPluginSource_test.ts +3 -3
|
@@ -2,6 +2,12 @@ name: release-bun-library
|
|
|
2
2
|
on:
|
|
3
3
|
push:
|
|
4
4
|
branches: [main]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: write
|
|
7
|
+
issues: write
|
|
8
|
+
pull-requests: write
|
|
9
|
+
id-token: write
|
|
10
|
+
pages: write
|
|
5
11
|
jobs:
|
|
6
12
|
call-release-bun-library:
|
|
7
13
|
uses: flowscripter/.github/.github/workflows/release-bun-library.yml@v1
|
package/bun.lock
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"": {
|
|
5
5
|
"name": "@flowscripter/dynamic-plugin-framework",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@types/bun": "^1.2.
|
|
7
|
+
"@types/bun": "^1.2.5",
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"typescript": "^5.8.2",
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
},
|
|
13
13
|
},
|
|
14
14
|
"packages": {
|
|
15
|
-
"@types/bun": ["@types/bun@1.2.
|
|
15
|
+
"@types/bun": ["@types/bun@1.2.5", "", { "dependencies": { "bun-types": "1.2.5" } }, "sha512-w2OZTzrZTVtbnJew1pdFmgV99H0/L+Pvw+z1P67HaR18MHOzYnTYOi6qzErhK8HyT+DB782ADVPPE92Xu2/Opg=="],
|
|
16
16
|
|
|
17
17
|
"@types/node": ["@types/node@22.13.4", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg=="],
|
|
18
18
|
|
|
19
19
|
"@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
|
|
20
20
|
|
|
21
|
-
"bun-types": ["bun-types@1.2.
|
|
21
|
+
"bun-types": ["bun-types@1.2.5", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-3oO6LVGGRRKI4kHINx5PIdIgnLRb7l/SprhzqXapmoYkFl5m4j6EvALvbDVuuBFaamB46Ap6HCUxIXNLCGy+tg=="],
|
|
22
22
|
|
|
23
23
|
"typescript": ["typescript@5.8.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ=="],
|
|
24
24
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/dynamic-plugin-framework",
|
|
3
|
+
"description": "Dynamic plugin framework for Bun based on Javascript Modules and import() function",
|
|
4
|
+
"homepage": "https://github.com/flowscripter/dynamic-plugin-framework#readme",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/flowscripter/dynamic-plugin-framework.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"bun",
|
|
12
|
+
"plugin",
|
|
13
|
+
"framework",
|
|
14
|
+
"dynamic",
|
|
15
|
+
"import"
|
|
16
|
+
],
|
|
3
17
|
"module": "index.ts",
|
|
4
18
|
"type": "module",
|
|
5
|
-
"version": "1.3.
|
|
19
|
+
"version": "1.3.16",
|
|
6
20
|
"publishConfig": {
|
|
7
21
|
"access": "public"
|
|
8
22
|
},
|
|
9
23
|
"devDependencies": {
|
|
10
|
-
"@types/bun": "^1.2.
|
|
24
|
+
"@types/bun": "^1.2.5"
|
|
11
25
|
},
|
|
12
26
|
"peerDependencies": {
|
|
13
27
|
"typescript": "^5.8.2"
|
|
@@ -28,6 +28,11 @@ export default class UrlPluginSource {
|
|
|
28
28
|
plugin = pluginLoadResult.plugin;
|
|
29
29
|
this.pluginsByUrl.set(url, plugin);
|
|
30
30
|
}
|
|
31
|
+
if (pluginLoadResult.error) {
|
|
32
|
+
throw new Error(
|
|
33
|
+
`Failed to load plugin from ${url}: ${pluginLoadResult.error.message}`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
37
|
return Promise.resolve(this.pluginsByUrl.get(url));
|
|
33
38
|
}
|
|
@@ -15,14 +15,14 @@ const INVALID_PLUGIN_URL = "file://" +
|
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
describe("UrlPluginSource Tests", () => {
|
|
18
|
-
test("
|
|
18
|
+
test("Throws on invalid plugin", () => {
|
|
19
19
|
const urlPluginSource = new UrlPluginSource();
|
|
20
20
|
|
|
21
21
|
expect(
|
|
22
|
-
|
|
22
|
+
urlPluginSource.loadPlugin(
|
|
23
23
|
new URL(INVALID_PLUGIN_URL),
|
|
24
24
|
),
|
|
25
|
-
).
|
|
25
|
+
).rejects.toThrow();
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
test("Loads a plugin", async () => {
|