@flowscripter/dynamic-plugin-framework 1.3.13 → 1.3.15

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/bun.lock CHANGED
@@ -4,7 +4,7 @@
4
4
  "": {
5
5
  "name": "@flowscripter/dynamic-plugin-framework",
6
6
  "devDependencies": {
7
- "@types/bun": "^1.2.4",
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.4", "", { "dependencies": { "bun-types": "1.2.4" } }, "sha512-QtuV5OMR8/rdKJs213iwXDpfVvnskPXY/S0ZiFbsTjQZycuqPbMW8Gf/XhLfwE5njW8sxI2WjISURXPlHypMFA=="],
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.4", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-nDPymR207ZZEoWD4AavvEaa/KZe/qlrbMSchqpQwovPZCKc7pwMoENjEtHgMKaAjJhy+x6vfqSBA1QU3bJgs0Q=="],
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.13",
19
+ "version": "1.3.15",
6
20
  "publishConfig": {
7
21
  "access": "public"
8
22
  },
9
23
  "devDependencies": {
10
- "@types/bun": "^1.2.4"
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("Returns undefined on invalid plugin", async () => {
18
+ test("Throws on invalid plugin", () => {
19
19
  const urlPluginSource = new UrlPluginSource();
20
20
 
21
21
  expect(
22
- await urlPluginSource.loadPlugin(
22
+ urlPluginSource.loadPlugin(
23
23
  new URL(INVALID_PLUGIN_URL),
24
24
  ),
25
- ).toBeUndefined();
25
+ ).rejects.toThrow();
26
26
  });
27
27
 
28
28
  test("Loads a plugin", async () => {