@tachybase/module-collection 0.23.22 → 0.23.40

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,14 +1,14 @@
1
1
  module.exports = {
2
- "@tachybase/client": "0.23.22",
3
- "@tachybase/database": "0.23.22",
4
- "@tachybase/module-error-handler": "0.23.22",
5
- "@tachybase/server": "0.23.22",
2
+ "@tachybase/client": "0.23.40",
3
+ "@tachybase/database": "0.23.40",
4
+ "@tachybase/module-error-handler": "0.23.40",
5
+ "@tachybase/server": "0.23.40",
6
6
  "async-mutex": "0.3.2",
7
7
  "lodash": "4.17.21",
8
- "@tachybase/test": "0.23.22",
9
- "@tachybase/actions": "0.23.22",
10
- "@tachybase/resourcer": "0.23.22",
11
- "@tachybase/utils": "0.23.22",
8
+ "@tachybase/test": "0.23.40",
9
+ "@tachybase/actions": "0.23.40",
10
+ "@tachybase/resourcer": "0.23.40",
11
+ "@tachybase/utils": "0.23.40",
12
12
  "sequelize": "6.37.5",
13
13
  "dayjs": "1.11.13"
14
14
  };
@@ -6,7 +6,7 @@ interface LoadOptions {
6
6
  export declare class CollectionRepository extends Repository {
7
7
  private app;
8
8
  setApp(app: any): void;
9
- load(options?: LoadOptions): Promise<void>;
9
+ load(options?: LoadOptions): Promise<any[]>;
10
10
  db2cm(collectionName: string): Promise<void>;
11
11
  }
12
12
  export {};
@@ -46,8 +46,10 @@ class CollectionRepository extends import_database.Repository {
46
46
  const graph = new graphlib.Graph();
47
47
  const nameMap = {};
48
48
  const viewCollections = [];
49
+ const customCollections = [];
49
50
  for (const instance of instances) {
50
51
  graph.setNode(instance.get("name"));
52
+ customCollections.push(instance.get("name"));
51
53
  if (instance.get("view") || instance.get("sql")) {
52
54
  viewCollections.push(instance.get("name"));
53
55
  }
@@ -106,6 +108,7 @@ class CollectionRepository extends import_database.Repository {
106
108
  (_c = this.app) == null ? void 0 : _c.setMaintainingMessage(`load ${collectionName} collection fields`);
107
109
  await nameMap[collectionName].loadFields({ includeFields: skipField });
108
110
  }
111
+ return customCollections;
109
112
  }
110
113
  async db2cm(collectionName) {
111
114
  const collection = this.database.getCollection(collectionName);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/module-collection",
3
3
  "displayName": "Data source: Main",
4
- "version": "0.23.22",
4
+ "version": "0.23.40",
5
5
  "description": "TachyBase main database, supports relational databases such as MySQL, PostgreSQL, SQLite and so on.",
6
6
  "keywords": [
7
7
  "Data sources"
@@ -18,14 +18,14 @@
18
18
  "toposort": "^2.0.2"
19
19
  },
20
20
  "peerDependencies": {
21
- "@tachybase/actions": "0.23.22",
22
- "@tachybase/database": "0.23.22",
23
- "@tachybase/client": "0.23.22",
24
- "@tachybase/resourcer": "0.23.22",
25
- "@tachybase/module-error-handler": "0.23.22",
26
- "@tachybase/test": "0.23.22",
27
- "@tachybase/utils": "0.23.22",
28
- "@tachybase/server": "0.23.22"
21
+ "@tachybase/actions": "0.23.40",
22
+ "@tachybase/client": "0.23.40",
23
+ "@tachybase/database": "0.23.40",
24
+ "@tachybase/module-error-handler": "0.23.40",
25
+ "@tachybase/test": "0.23.40",
26
+ "@tachybase/utils": "0.23.40",
27
+ "@tachybase/resourcer": "0.23.40",
28
+ "@tachybase/server": "0.23.40"
29
29
  },
30
30
  "description.zh-CN": "TachyBase 主数据库,支持 MySQL、PostgreSQL、SQLite 等关系型数据库。",
31
31
  "displayName.zh-CN": "数据源:主数据库",