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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynamo-bao",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "description": "Simple powerful data modeling primitives for DynamoDB in JavaScript.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
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.LOG_LEVEL || "ERROR",
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: process.env.LOG_LEVEL || rawConfig.logging?.level || "ERROR",
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.LOG_LEVEL || "ERROR",
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
  );