godprotocol 2.2.99 → 2.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.
Files changed (2) hide show
  1. package/Godprotocol.js +2 -0
  2. package/package.json +1 -1
package/Godprotocol.js CHANGED
@@ -47,6 +47,8 @@ class GodProtocol {
47
47
  };
48
48
 
49
49
  add_router = async (version, routes, opts = {}) => {
50
+ if (typeof routes === "function") routes = await routes();
51
+
50
52
  if (opts.is_old) {
51
53
  await this.route_table.init_version(version, { is_old: true });
52
54
  this.route_table.versions[version].routes = routes;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "godprotocol",
3
- "version": "2.2.99",
3
+ "version": "2.3.0",
4
4
  "description": "A distributed computing environment for Web 4.0 — integrating AI, decentralisation, and virtual computation.",
5
5
  "main": "Index.js",
6
6
  "type": "module",