@nocobase/data-source-manager 2.0.41 → 2.0.43
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.
|
@@ -100,6 +100,7 @@ const _DatabaseDataSource = class _DatabaseDataSource extends import_data_source
|
|
|
100
100
|
...fieldOptions,
|
|
101
101
|
...modelOptions
|
|
102
102
|
};
|
|
103
|
+
const dbSyncedKeys = ["allowNull"];
|
|
103
104
|
const incomingPossibleTypes = Array.isArray(fieldOptions.possibleTypes) ? fieldOptions.possibleTypes : fieldOptions.type ? [fieldOptions.type] : [];
|
|
104
105
|
const hasCompatibleStorageType = this.hasCompatibleStorageType(fieldOptions.type, modelOptions.type);
|
|
105
106
|
const shouldUseIncomingType = Boolean(fieldOptions.rawType) && Boolean(modelOptions.rawType || modelOptions.type) && (modelOptions.rawType ? fieldOptions.rawType !== modelOptions.rawType && !hasCompatibleStorageType : !incomingPossibleTypes.includes(modelOptions.type) && !hasCompatibleStorageType);
|
|
@@ -109,7 +110,8 @@ const _DatabaseDataSource = class _DatabaseDataSource extends import_data_source
|
|
|
109
110
|
newOptions.rawType = fieldOptions.rawType;
|
|
110
111
|
}
|
|
111
112
|
for (const key of [.../* @__PURE__ */ new Set([...Object.keys(modelOptions), ...Object.keys(fieldOptions)])]) {
|
|
112
|
-
|
|
113
|
+
const shouldUseIncoming = dbSyncedKeys.includes(key) || modelOptions[key] === null && key in fieldOptions;
|
|
114
|
+
if (shouldUseIncoming) {
|
|
113
115
|
newOptions[key] = fieldOptions[key];
|
|
114
116
|
}
|
|
115
117
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/data-source-manager",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.43",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/actions": "2.0.
|
|
10
|
-
"@nocobase/cache": "2.0.
|
|
11
|
-
"@nocobase/database": "2.0.
|
|
12
|
-
"@nocobase/resourcer": "2.0.
|
|
13
|
-
"@nocobase/utils": "2.0.
|
|
9
|
+
"@nocobase/actions": "2.0.43",
|
|
10
|
+
"@nocobase/cache": "2.0.43",
|
|
11
|
+
"@nocobase/database": "2.0.43",
|
|
12
|
+
"@nocobase/resourcer": "2.0.43",
|
|
13
|
+
"@nocobase/utils": "2.0.43",
|
|
14
14
|
"@types/jsonwebtoken": "^8.5.8",
|
|
15
15
|
"jsonwebtoken": "^9.0.2"
|
|
16
16
|
},
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
20
20
|
"directory": "packages/auth"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "bc149659b06c5e9a4f55e707f735125801b508be"
|
|
23
23
|
}
|