@nocobase/plugin-data-source-manager 1.9.13 → 1.9.14
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.
- package/dist/externalVersion.js +8 -8
- package/dist/server/plugin.js +7 -15
- package/package.json +2 -2
package/dist/externalVersion.js
CHANGED
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
module.exports = {
|
|
11
|
-
"@nocobase/client": "1.9.
|
|
11
|
+
"@nocobase/client": "1.9.14",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/plugin-acl": "1.9.
|
|
14
|
-
"@nocobase/utils": "1.9.
|
|
15
|
-
"@nocobase/server": "1.9.
|
|
16
|
-
"@nocobase/data-source-manager": "1.9.
|
|
13
|
+
"@nocobase/plugin-acl": "1.9.14",
|
|
14
|
+
"@nocobase/utils": "1.9.14",
|
|
15
|
+
"@nocobase/server": "1.9.14",
|
|
16
|
+
"@nocobase/data-source-manager": "1.9.14",
|
|
17
17
|
"lodash": "4.17.21",
|
|
18
|
-
"@nocobase/acl": "1.9.
|
|
18
|
+
"@nocobase/acl": "1.9.14",
|
|
19
19
|
"@ant-design/icons": "5.6.1",
|
|
20
20
|
"antd": "5.24.2",
|
|
21
21
|
"react-router-dom": "6.28.1",
|
|
@@ -23,9 +23,9 @@ module.exports = {
|
|
|
23
23
|
"@formily/shared": "2.3.2",
|
|
24
24
|
"react-i18next": "11.18.6",
|
|
25
25
|
"@emotion/css": "11.13.0",
|
|
26
|
-
"@nocobase/database": "1.9.
|
|
26
|
+
"@nocobase/database": "1.9.14",
|
|
27
27
|
"sequelize": "6.35.2",
|
|
28
|
-
"@nocobase/test": "1.9.
|
|
28
|
+
"@nocobase/test": "1.9.14",
|
|
29
29
|
"@formily/antd-v5": "1.2.3",
|
|
30
30
|
"@formily/core": "2.3.0",
|
|
31
31
|
"@formily/reactive": "2.3.0",
|
package/dist/server/plugin.js
CHANGED
|
@@ -319,24 +319,16 @@ class PluginDataSourceManagerServer extends import_server.Plugin {
|
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
321
|
const { actionName, resourceName, params } = ctx.action;
|
|
322
|
-
if (resourceName === "dataSources" && (actionName === "
|
|
323
|
-
const { values
|
|
322
|
+
if (resourceName === "dataSources" && (actionName === "create" || actionName === "update")) {
|
|
323
|
+
const { values } = params;
|
|
324
324
|
if ((_a = values.options) == null ? void 0 : _a.addAllCollections) {
|
|
325
325
|
let introspector = null;
|
|
326
326
|
const dataSourceManager = ctx.app["dataSourceManager"];
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
);
|
|
333
|
-
} else {
|
|
334
|
-
const dataSource = dataSourceManager.dataSources.get(dataSourceKey);
|
|
335
|
-
if (!dataSource) {
|
|
336
|
-
throw new Error(`dataSource ${dataSourceKey} not found`);
|
|
337
|
-
}
|
|
338
|
-
introspector = dataSource["introspector"];
|
|
339
|
-
}
|
|
327
|
+
const klass = dataSourceManager.factory.getClass(values.type);
|
|
328
|
+
const dataSource = new klass(values.options);
|
|
329
|
+
introspector = dataSource.collectionManager.dataSource.createDatabaseIntrospector(
|
|
330
|
+
dataSource.collectionManager.db
|
|
331
|
+
);
|
|
340
332
|
const allCollections = await introspector.getCollections();
|
|
341
333
|
if (allCollections.length > import_constants.ALLOW_MAX_COLLECTIONS_COUNT) {
|
|
342
334
|
throw new Error(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-data-source-manager",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.14",
|
|
4
4
|
"main": "dist/server/index.js",
|
|
5
5
|
"displayName": "Data source manager",
|
|
6
6
|
"displayName.ru-RU": "Менеджер управления источниками данных",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"keywords": [
|
|
21
21
|
"Data model tools"
|
|
22
22
|
],
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "2373dd8980c27cc8220e71ea2f84884bbec4781d"
|
|
24
24
|
}
|