@nocobase/plugin-data-source-manager 1.4.0-alpha.20241105053324 → 1.4.0-alpha.20241105230315

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.
@@ -8,13 +8,13 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "1.4.0-alpha.20241105053324",
11
+ "@nocobase/client": "1.4.0-alpha.20241105230315",
12
12
  "react": "18.2.0",
13
- "@nocobase/plugin-acl": "1.4.0-alpha.20241105053324",
14
- "@nocobase/utils": "1.4.0-alpha.20241105053324",
15
- "@nocobase/server": "1.4.0-alpha.20241105053324",
13
+ "@nocobase/plugin-acl": "1.4.0-alpha.20241105230315",
14
+ "@nocobase/utils": "1.4.0-alpha.20241105230315",
15
+ "@nocobase/server": "1.4.0-alpha.20241105230315",
16
16
  "lodash": "4.17.21",
17
- "@nocobase/data-source-manager": "1.4.0-alpha.20241105053324",
17
+ "@nocobase/data-source-manager": "1.4.0-alpha.20241105230315",
18
18
  "@ant-design/icons": "5.2.6",
19
19
  "antd": "5.12.8",
20
20
  "react-router-dom": "6.21.0",
@@ -22,10 +22,10 @@ module.exports = {
22
22
  "react-i18next": "11.18.6",
23
23
  "@formily/react": "2.3.0",
24
24
  "@emotion/css": "11.13.0",
25
- "@nocobase/database": "1.4.0-alpha.20241105053324",
26
- "@nocobase/acl": "1.4.0-alpha.20241105053324",
25
+ "@nocobase/database": "1.4.0-alpha.20241105230315",
26
+ "@nocobase/acl": "1.4.0-alpha.20241105230315",
27
27
  "sequelize": "6.35.2",
28
- "@nocobase/test": "1.4.0-alpha.20241105053324",
28
+ "@nocobase/test": "1.4.0-alpha.20241105230315",
29
29
  "@formily/antd-v5": "1.1.9",
30
30
  "@formily/core": "2.3.0",
31
31
  "@formily/reactive": "2.3.0",
@@ -415,7 +415,8 @@ class PluginDataSourceManagerServer extends import_server.Plugin {
415
415
  transaction
416
416
  });
417
417
  });
418
- this.app.resourcer.use(async (ctx, next) => {
418
+ const self = this;
419
+ this.app.resourceManager.use(async function appendDataToRolesCheck(ctx, next) {
419
420
  const action = ctx.action;
420
421
  await next();
421
422
  const { resourceName, actionName } = action.params;
@@ -424,11 +425,11 @@ class PluginDataSourceManagerServer extends import_server.Plugin {
424
425
  const dataSources = await ctx.db.getRepository("dataSources").find();
425
426
  ctx.bodyMeta = {
426
427
  dataSources: dataSources.reduce((carry, dataSourceModel) => {
427
- const dataSource = this.app.dataSourceManager.dataSources.get(dataSourceModel.get("key"));
428
+ const dataSource = self.app.dataSourceManager.dataSources.get(dataSourceModel.get("key"));
428
429
  if (!dataSource) {
429
430
  return carry;
430
431
  }
431
- const dataSourceStatus = this.dataSourceStatus[dataSourceModel.get("key")];
432
+ const dataSourceStatus = self.dataSourceStatus[dataSourceModel.get("key")];
432
433
  if (dataSourceStatus !== "loaded") {
433
434
  return carry;
434
435
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-data-source-manager",
3
- "version": "1.4.0-alpha.20241105053324",
3
+ "version": "1.4.0-alpha.20241105230315",
4
4
  "main": "dist/server/index.js",
5
5
  "displayName": "Data source manager",
6
6
  "displayName.zh-CN": "数据源管理",
@@ -17,5 +17,5 @@
17
17
  "keywords": [
18
18
  "Data model tools"
19
19
  ],
20
- "gitHead": "a6e647971c02c1ffb443e2dc2c230ca2719e3319"
20
+ "gitHead": "45a0f247ae2dab0d1c9d200cb8bfedae3fe49535"
21
21
  }