@h-ai/reldb 0.1.0-alpha.18 → 0.1.0-alpha.20
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/README.md +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1026,7 +1026,7 @@ interface ReldbFunctions {
|
|
|
1026
1026
|
readonly crud: CrudManager;
|
|
1027
1027
|
/** 事务管理器 */
|
|
1028
1028
|
readonly tx: TxManager;
|
|
1029
|
-
/**
|
|
1029
|
+
/** 当前数据库脱敏配置快照(未初始化时为 null) */
|
|
1030
1030
|
readonly config: ReldbConfig | null;
|
|
1031
1031
|
/** 是否已初始化 */
|
|
1032
1032
|
readonly isInitialized: boolean;
|
package/dist/index.js
CHANGED
|
@@ -399,12 +399,13 @@ var BaseReldbCrudRepository = class {
|
|
|
399
399
|
*/
|
|
400
400
|
mapRow(row) {
|
|
401
401
|
const result = {};
|
|
402
|
+
const resultRecord = result;
|
|
402
403
|
for (const field of this.fields) {
|
|
403
404
|
if (!field.select) {
|
|
404
405
|
continue;
|
|
405
406
|
}
|
|
406
407
|
const value = this.fromDbValue(row[field.columnName], field.def);
|
|
407
|
-
|
|
408
|
+
resultRecord[field.fieldName] = value;
|
|
408
409
|
}
|
|
409
410
|
return result;
|
|
410
411
|
}
|
|
@@ -2593,9 +2594,9 @@ var reldb = {
|
|
|
2593
2594
|
get tx() {
|
|
2594
2595
|
return currentProvider?.tx ?? notInitializedTx;
|
|
2595
2596
|
},
|
|
2596
|
-
/**
|
|
2597
|
+
/** 获取当前脱敏后的配置快照(未初始化时为 null) */
|
|
2597
2598
|
get config() {
|
|
2598
|
-
return currentConfig;
|
|
2599
|
+
return currentConfig ? core.sanitize.sanitizeSensitiveFields(currentConfig) : null;
|
|
2599
2600
|
},
|
|
2600
2601
|
/** 检查是否已初始化 */
|
|
2601
2602
|
get isInitialized() {
|