dynamo-bao 0.3.2 → 0.3.4
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/package.json +1 -1
- package/src/config.js +4 -3
- package/src/mixins/validation-mixin.js +1 -1
package/package.json
CHANGED
package/src/config.js
CHANGED
|
@@ -55,7 +55,7 @@ async function findConfig() {
|
|
|
55
55
|
moduleSystem: "commonjs",
|
|
56
56
|
},
|
|
57
57
|
logging: {
|
|
58
|
-
level: process.env.
|
|
58
|
+
level: process.env.DYNAMO_BAO_LOG_LEVEL || "ERROR",
|
|
59
59
|
},
|
|
60
60
|
paths: {
|
|
61
61
|
modelsDir: process.env.MODELS_DIR
|
|
@@ -113,7 +113,8 @@ function normalizeConfig(rawConfig, configDir) {
|
|
|
113
113
|
logging: {
|
|
114
114
|
...(rawConfig.logging || {}),
|
|
115
115
|
// Allow environment variable to override config file
|
|
116
|
-
level:
|
|
116
|
+
level:
|
|
117
|
+
process.env.DYNAMO_BAO_LOG_LEVEL || rawConfig.logging?.level || "ERROR",
|
|
117
118
|
},
|
|
118
119
|
tenancy: {
|
|
119
120
|
enabled: false,
|
|
@@ -156,7 +157,7 @@ try {
|
|
|
156
157
|
moduleSystem: "commonjs",
|
|
157
158
|
},
|
|
158
159
|
logging: {
|
|
159
|
-
level: process.env.
|
|
160
|
+
level: process.env.DYNAMO_BAO_LOG_LEVEL || "ERROR",
|
|
160
161
|
},
|
|
161
162
|
paths: {
|
|
162
163
|
modelsDir: process.env.MODELS_DIR
|
|
@@ -77,7 +77,7 @@ const ValidationMethods = {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
const skField = this._getField(this.primaryKey.sk);
|
|
80
|
-
if (!skField.required) {
|
|
80
|
+
if (!skField.required && this.primaryKey.sk !== "modelPrefix") {
|
|
81
81
|
logger.warn(
|
|
82
82
|
`Warning: Sort key field '${this.primaryKey.sk}' in ${this.name} was not explicitly marked as required. Marking as required automatically.`,
|
|
83
83
|
);
|