@ruiapp/rapid-core 0.1.13 → 0.1.14

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/dist/index.js CHANGED
@@ -453,7 +453,9 @@ class PluginManager {
453
453
  /** 初始化插件时调用。 */
454
454
  async initPlugins() {
455
455
  for (const plugin of this.#plugins) {
456
- await plugin.initPlugin(this.#server);
456
+ if (plugin.initPlugin) {
457
+ await plugin.initPlugin(this.#server);
458
+ }
457
459
  }
458
460
  }
459
461
  /** 注册中间件 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [],
@@ -20,7 +20,9 @@ class PluginManager {
20
20
  /** 初始化插件时调用。 */
21
21
  async initPlugins() {
22
22
  for (const plugin of this.#plugins) {
23
- await plugin.initPlugin(this.#server);
23
+ if (plugin.initPlugin) {
24
+ await plugin.initPlugin(this.#server);
25
+ }
24
26
  }
25
27
  }
26
28