@nocobase/server 2.2.45 → 2.2.47

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.
@@ -116,12 +116,10 @@ const _MainDataSource = class _MainDataSource extends import_data_source_manager
116
116
  ...filter
117
117
  }
118
118
  });
119
- const collections = loadedCollections.filter(
120
- (collection) => {
121
- var _a;
122
- return !["db2cm", "dbsync"].includes((_a = collection.options) == null ? void 0 : _a.from);
123
- }
124
- );
119
+ const collections = loadedCollections.filter((collection) => {
120
+ var _a;
121
+ return ((_a = collection.options) == null ? void 0 : _a.from) !== "db2cm";
122
+ });
125
123
  const loadedData = {};
126
124
  for (const collection of collections) {
127
125
  const c = db.getCollection(collection.name);
@@ -157,7 +155,13 @@ const _MainDataSource = class _MainDataSource extends import_data_source_manager
157
155
  } catch (err) {
158
156
  ctx.log.error(err);
159
157
  }
160
- const toLoadCollections = this.mergeWithLoadedCollections(collections, loadedCollections);
158
+ const toLoadCollections = collections.flatMap((collection) => {
159
+ const loaded = loadedCollections[collection.tableName];
160
+ return this.mergeWithLoadedCollections(
161
+ [collection],
162
+ (loaded == null ? void 0 : loaded.from) === "dbsync" ? { [collection.name]: loaded } : loadedCollections
163
+ );
164
+ });
161
165
  const currentSchema = process.env.COLLECTION_MANAGER_SCHEMA || db.options.schema || "public";
162
166
  for (const values of toLoadCollections) {
163
167
  if (values.schema === currentSchema) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "2.2.45",
3
+ "version": "2.2.47",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -10,21 +10,21 @@
10
10
  "@koa/cors": "^5.0.0",
11
11
  "@koa/multer": "^3.1.0",
12
12
  "@koa/router": "^13.1.0",
13
- "@nocobase/acl": "2.2.45",
14
- "@nocobase/actions": "2.2.45",
15
- "@nocobase/ai": "2.2.45",
16
- "@nocobase/auth": "2.2.45",
17
- "@nocobase/cache": "2.2.45",
18
- "@nocobase/data-source-manager": "2.2.45",
19
- "@nocobase/database": "2.2.45",
20
- "@nocobase/evaluators": "2.2.45",
21
- "@nocobase/lock-manager": "2.2.45",
22
- "@nocobase/logger": "2.2.45",
23
- "@nocobase/resourcer": "2.2.45",
24
- "@nocobase/sdk": "2.2.45",
25
- "@nocobase/snowflake-id": "2.2.45",
26
- "@nocobase/telemetry": "2.2.45",
27
- "@nocobase/utils": "2.2.45",
13
+ "@nocobase/acl": "2.2.47",
14
+ "@nocobase/actions": "2.2.47",
15
+ "@nocobase/ai": "2.2.47",
16
+ "@nocobase/auth": "2.2.47",
17
+ "@nocobase/cache": "2.2.47",
18
+ "@nocobase/data-source-manager": "2.2.47",
19
+ "@nocobase/database": "2.2.47",
20
+ "@nocobase/evaluators": "2.2.47",
21
+ "@nocobase/lock-manager": "2.2.47",
22
+ "@nocobase/logger": "2.2.47",
23
+ "@nocobase/resourcer": "2.2.47",
24
+ "@nocobase/sdk": "2.2.47",
25
+ "@nocobase/snowflake-id": "2.2.47",
26
+ "@nocobase/telemetry": "2.2.47",
27
+ "@nocobase/utils": "2.2.47",
28
28
  "@types/ini": "^1.3.31",
29
29
  "@types/koa-send": "^4.1.3",
30
30
  "@types/multer": "^1.4.12",
@@ -60,5 +60,5 @@
60
60
  "@types/serve-handler": "^6.1.1",
61
61
  "@types/ws": "^8.5.5"
62
62
  },
63
- "gitHead": "41365164a6a0551491c07dc01634d8bcd1e2b7b8"
63
+ "gitHead": "f827e4f861022e813452f37af70b41d24cfc196e"
64
64
  }