@naturalcycles/db-lib 10.1.6 → 10.2.0
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.
|
@@ -4,8 +4,6 @@ import { _pipeline, AjvSchema, getValidationResult, stringId, transformChunk, tr
|
|
|
4
4
|
import { DBLibError } from '../cnst.js';
|
|
5
5
|
import { RunnableDBQuery } from '../query/dbQuery.js';
|
|
6
6
|
import { CommonDaoLogLevel } from './common.dao.model.js';
|
|
7
|
-
const isGAE = !!process.env['GAE_INSTANCE'];
|
|
8
|
-
const isCI = !!process.env['CI'];
|
|
9
7
|
/**
|
|
10
8
|
* Lowest common denominator API between supported Databases.
|
|
11
9
|
*
|
|
@@ -18,10 +16,7 @@ export class CommonDao {
|
|
|
18
16
|
constructor(cfg) {
|
|
19
17
|
this.cfg = cfg;
|
|
20
18
|
this.cfg = {
|
|
21
|
-
|
|
22
|
-
// otherwise to log Operations
|
|
23
|
-
// e.g in Dev (local machine), Test - it will log operations (useful for debugging)
|
|
24
|
-
logLevel: isGAE || isCI ? CommonDaoLogLevel.NONE : CommonDaoLogLevel.OPERATIONS,
|
|
19
|
+
logLevel: CommonDaoLogLevel.NONE,
|
|
25
20
|
generateId: true,
|
|
26
21
|
assignGeneratedIds: false,
|
|
27
22
|
useCreatedProperty: true,
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/db-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.2.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@naturalcycles/js-lib": "^15",
|
|
7
7
|
"@naturalcycles/nodejs-lib": "^14"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
|
-
"@naturalcycles/dev-lib": "
|
|
10
|
+
"@naturalcycles/dev-lib": "18.4.2"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
@@ -57,6 +57,8 @@
|
|
|
57
57
|
"test": "dev-lib test",
|
|
58
58
|
"lint": "dev-lib lint",
|
|
59
59
|
"bt": "dev-lib bt",
|
|
60
|
-
"
|
|
60
|
+
"clean": "dev-lib clean",
|
|
61
|
+
"typecheck": "dev-lib typecheck",
|
|
62
|
+
"check": "dev-lib check"
|
|
61
63
|
}
|
|
62
64
|
}
|
|
@@ -68,9 +68,6 @@ import type {
|
|
|
68
68
|
} from './common.dao.model.js'
|
|
69
69
|
import { CommonDaoLogLevel } from './common.dao.model.js'
|
|
70
70
|
|
|
71
|
-
const isGAE = !!process.env['GAE_INSTANCE']
|
|
72
|
-
const isCI = !!process.env['CI']
|
|
73
|
-
|
|
74
71
|
/**
|
|
75
72
|
* Lowest common denominator API between supported Databases.
|
|
76
73
|
*
|
|
@@ -81,10 +78,7 @@ const isCI = !!process.env['CI']
|
|
|
81
78
|
export class CommonDao<BM extends BaseDBEntity, DBM extends BaseDBEntity = BM, ID = BM['id']> {
|
|
82
79
|
constructor(public cfg: CommonDaoCfg<BM, DBM, ID>) {
|
|
83
80
|
this.cfg = {
|
|
84
|
-
|
|
85
|
-
// otherwise to log Operations
|
|
86
|
-
// e.g in Dev (local machine), Test - it will log operations (useful for debugging)
|
|
87
|
-
logLevel: isGAE || isCI ? CommonDaoLogLevel.NONE : CommonDaoLogLevel.OPERATIONS,
|
|
81
|
+
logLevel: CommonDaoLogLevel.NONE,
|
|
88
82
|
generateId: true,
|
|
89
83
|
assignGeneratedIds: false,
|
|
90
84
|
useCreatedProperty: true,
|