koatty 3.10.2-4 → 3.10.3-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.
@@ -1,4 +1,5 @@
1
1
  {
2
2
  "DevChat.DevChatPath": "/Users/richen/.chat/mamba/envs/devchat/bin/devchat",
3
- "devchat.defaultModel": "gpt-4"
3
+ "devchat.defaultModel": "gpt-4",
4
+ "editor.inlineSuggest.showToolbar": "onHover"
4
5
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [3.10.3-0](https://github.com/thinkkoa/koatty/compare/v3.10.2...v3.10.3-0) (2023-12-06)
6
+
7
+ ### [3.10.2](https://github.com/thinkkoa/koatty/compare/v3.10.2-4...v3.10.2) (2023-11-11)
8
+
5
9
  ### [3.10.2-4](https://github.com/thinkkoa/koatty/compare/v3.10.2-3...v3.10.2-4) (2023-11-11)
6
10
 
7
11
  ### [3.10.2-3](https://github.com/thinkkoa/koatty/compare/v3.10.2-2...v3.10.2-3) (2023-11-10)
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-11-11 11:06:43
3
+ * @Date: 2023-12-06 08:05:36
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-11-11 11:06:30
3
+ * @Date: 2023-12-06 08:05:19
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -592,40 +592,44 @@ class Loader {
592
592
  * @param {*} app
593
593
  * @memberof Loader
594
594
  */
595
- static LoadComponents(app) {
596
- const componentList = koatty_container.IOCContainer.listClass("COMPONENT");
597
- componentList.forEach((item) => {
598
- item.id = (item.id ?? "").replace("COMPONENT:", "");
599
- if (item.id && !(item.id).endsWith("Plugin") && koatty_lib.Helper.isClass(item.target)) {
600
- Logger.Debug(`Load component: ${item.id}`);
601
- // registering to IOC
602
- koatty_container.IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
603
- }
604
- });
605
- }
595
+ // public static LoadComponents(app: Koatty) {
596
+ // const componentList = IOCContainer.listClass("COMPONENT");
597
+ // componentList.forEach((item: ComponentItem) => {
598
+ // item.id = (item.id ?? "").replace("COMPONENT:", "");
599
+ // if (item.id && !(item.id).endsWith("Plugin") && Helper.isClass(item.target)) {
600
+ // Logger.Debug(`Load component: ${item.id}`);
601
+ // // registering to IOC
602
+ // IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
603
+ // }
604
+ // });
605
+ // }
606
606
  /**
607
- * Load plugins
607
+ * Load components
608
608
  *
609
609
  * @static
610
610
  * @param {*} app
611
611
  * @memberof Loader
612
612
  */
613
- static async LoadPlugins(app) {
613
+ static async LoadComponents(app) {
614
614
  const componentList = koatty_container.IOCContainer.listClass("COMPONENT");
615
- let pluginsConf = app.config(undefined, "plugin");
616
- if (koatty_lib.Helper.isEmpty(pluginsConf)) {
617
- pluginsConf = { config: {}, list: [] };
618
- }
619
615
  const pluginList = [];
620
616
  componentList.forEach(async (item) => {
621
617
  item.id = (item.id ?? "").replace("COMPONENT:", "");
622
- if (item.id && (item.id).endsWith("Plugin") && koatty_lib.Helper.isClass(item.target)) {
618
+ if (koatty_lib.Helper.isClass(item.target)) {
619
+ if (item.id && (item.id).endsWith("Plugin")) {
620
+ pluginList.push(item.id);
621
+ }
623
622
  // registering to IOC
624
623
  koatty_container.IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
625
- pluginList.push(item.id);
626
624
  }
627
625
  });
628
- const pluginConfList = pluginsConf.list;
626
+ // load plugin config
627
+ let pluginsConf = app.config(undefined, "plugin");
628
+ if (koatty_lib.Helper.isEmpty(pluginsConf)) {
629
+ pluginsConf = { config: {}, list: [] };
630
+ }
631
+ const pluginConfList = pluginsConf.list ?? [];
632
+ // load plugin list
629
633
  for (const key of pluginConfList) {
630
634
  const handle = koatty_container.IOCContainer.get(key, "COMPONENT");
631
635
  if (!handle) {
@@ -646,18 +650,17 @@ class Loader {
646
650
  }
647
651
  }
648
652
 
649
- var version = "3.10.2-4";
653
+ var version = "3.10.3-0";
650
654
  var engines = {
651
655
  node: ">12.0.0"
652
656
  };
653
657
 
654
- /*
655
- * @Description:
656
- * @Usage:
657
- * @Author: richen
658
- * @Date: 2021-12-17 11:54:06
659
- * @LastEditTime: 2022-03-15 14:22:45
660
- */
658
+ /**
659
+ * @ author: richen
660
+ * @ copyright: Copyright (c) - <richenlin(at)gmail.com>
661
+ * @ license: BSD (3-Clause)
662
+ * @ version: 2020-05-10 11:49:15
663
+ */
661
664
  const KOATTY_VERSION = version;
662
665
  const ENGINES_VERSION = engines.node.slice(1) || '12.0.0';
663
666
  /**
@@ -747,15 +750,12 @@ const executeBootstrap = async function (target, bootFunc, isInitiative = false)
747
750
  Loader.LoadAppEventHooks(app, target);
748
751
  Logger.Log('Koatty', '', 'Emit App Boot ...');
749
752
  await asyncEvent(app, "appBoot" /* AppEvent.appBoot */);
750
- // Load Plugin
751
- Logger.Log('Koatty', '', 'Load Plugins ...');
752
- await Loader.LoadPlugins(app);
753
+ // Load Components
754
+ Logger.Log('Koatty', '', 'Load Components ...');
755
+ await Loader.LoadComponents(app);
753
756
  // Load Middleware
754
757
  Logger.Log('Koatty', '', 'Load Middlewares ...');
755
758
  await Loader.LoadMiddlewares(app);
756
- // Load Components
757
- Logger.Log('Koatty', '', 'Load Components ...');
758
- Loader.LoadComponents(app);
759
759
  // Load Services
760
760
  Logger.Log('Koatty', '', 'Load Services ...');
761
761
  Loader.LoadServices(app);
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-11-11 11:06:30
3
+ * @Date: 2023-12-06 08:05:19
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -578,40 +578,44 @@ class Loader {
578
578
  * @param {*} app
579
579
  * @memberof Loader
580
580
  */
581
- static LoadComponents(app) {
582
- const componentList = IOCContainer.listClass("COMPONENT");
583
- componentList.forEach((item) => {
584
- item.id = (item.id ?? "").replace("COMPONENT:", "");
585
- if (item.id && !(item.id).endsWith("Plugin") && Helper.isClass(item.target)) {
586
- Logger.Debug(`Load component: ${item.id}`);
587
- // registering to IOC
588
- IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
589
- }
590
- });
591
- }
581
+ // public static LoadComponents(app: Koatty) {
582
+ // const componentList = IOCContainer.listClass("COMPONENT");
583
+ // componentList.forEach((item: ComponentItem) => {
584
+ // item.id = (item.id ?? "").replace("COMPONENT:", "");
585
+ // if (item.id && !(item.id).endsWith("Plugin") && Helper.isClass(item.target)) {
586
+ // Logger.Debug(`Load component: ${item.id}`);
587
+ // // registering to IOC
588
+ // IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
589
+ // }
590
+ // });
591
+ // }
592
592
  /**
593
- * Load plugins
593
+ * Load components
594
594
  *
595
595
  * @static
596
596
  * @param {*} app
597
597
  * @memberof Loader
598
598
  */
599
- static async LoadPlugins(app) {
599
+ static async LoadComponents(app) {
600
600
  const componentList = IOCContainer.listClass("COMPONENT");
601
- let pluginsConf = app.config(undefined, "plugin");
602
- if (Helper.isEmpty(pluginsConf)) {
603
- pluginsConf = { config: {}, list: [] };
604
- }
605
601
  const pluginList = [];
606
602
  componentList.forEach(async (item) => {
607
603
  item.id = (item.id ?? "").replace("COMPONENT:", "");
608
- if (item.id && (item.id).endsWith("Plugin") && Helper.isClass(item.target)) {
604
+ if (Helper.isClass(item.target)) {
605
+ if (item.id && (item.id).endsWith("Plugin")) {
606
+ pluginList.push(item.id);
607
+ }
609
608
  // registering to IOC
610
609
  IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
611
- pluginList.push(item.id);
612
610
  }
613
611
  });
614
- const pluginConfList = pluginsConf.list;
612
+ // load plugin config
613
+ let pluginsConf = app.config(undefined, "plugin");
614
+ if (Helper.isEmpty(pluginsConf)) {
615
+ pluginsConf = { config: {}, list: [] };
616
+ }
617
+ const pluginConfList = pluginsConf.list ?? [];
618
+ // load plugin list
615
619
  for (const key of pluginConfList) {
616
620
  const handle = IOCContainer.get(key, "COMPONENT");
617
621
  if (!handle) {
@@ -632,18 +636,17 @@ class Loader {
632
636
  }
633
637
  }
634
638
 
635
- var version = "3.10.2-4";
639
+ var version = "3.10.3-0";
636
640
  var engines = {
637
641
  node: ">12.0.0"
638
642
  };
639
643
 
640
- /*
641
- * @Description:
642
- * @Usage:
643
- * @Author: richen
644
- * @Date: 2021-12-17 11:54:06
645
- * @LastEditTime: 2022-03-15 14:22:45
646
- */
644
+ /**
645
+ * @ author: richen
646
+ * @ copyright: Copyright (c) - <richenlin(at)gmail.com>
647
+ * @ license: BSD (3-Clause)
648
+ * @ version: 2020-05-10 11:49:15
649
+ */
647
650
  const KOATTY_VERSION = version;
648
651
  const ENGINES_VERSION = engines.node.slice(1) || '12.0.0';
649
652
  /**
@@ -733,15 +736,12 @@ const executeBootstrap = async function (target, bootFunc, isInitiative = false)
733
736
  Loader.LoadAppEventHooks(app, target);
734
737
  Logger.Log('Koatty', '', 'Emit App Boot ...');
735
738
  await asyncEvent(app, "appBoot" /* AppEvent.appBoot */);
736
- // Load Plugin
737
- Logger.Log('Koatty', '', 'Load Plugins ...');
738
- await Loader.LoadPlugins(app);
739
+ // Load Components
740
+ Logger.Log('Koatty', '', 'Load Components ...');
741
+ await Loader.LoadComponents(app);
739
742
  // Load Middleware
740
743
  Logger.Log('Koatty', '', 'Load Middlewares ...');
741
744
  await Loader.LoadMiddlewares(app);
742
- // Load Components
743
- Logger.Log('Koatty', '', 'Load Components ...');
744
- Loader.LoadComponents(app);
745
745
  // Load Services
746
746
  Logger.Log('Koatty', '', 'Load Services ...');
747
747
  Loader.LoadServices(app);
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.10.2-4",
3
+ "version": "3.10.3-0",
4
4
  "description": "Koa2 + Typescript = koatty. Use Typescript's decorator implement auto injection.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -80,7 +80,7 @@
80
80
  "dependencies": {
81
81
  "koa": "^2.14.2",
82
82
  "koatty_config": "^1.1.6",
83
- "koatty_container": "^1.8.5",
83
+ "koatty_container": "^1.8.6",
84
84
  "koatty_core": "^1.8.2",
85
85
  "koatty_exception": "^1.2.8",
86
86
  "koatty_lib": "^1.3.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.10.2-4",
3
+ "version": "3.10.3-0",
4
4
  "description": "Koa2 + Typescript = koatty. Use Typescript's decorator implement auto injection.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -80,7 +80,7 @@
80
80
  "dependencies": {
81
81
  "koa": "^2.14.2",
82
82
  "koatty_config": "^1.1.6",
83
- "koatty_container": "^1.8.5",
83
+ "koatty_container": "^1.8.6",
84
84
  "koatty_core": "^1.8.2",
85
85
  "koatty_exception": "^1.2.8",
86
86
  "koatty_lib": "^1.3.4",