@onlineapps/content-resolver 1.1.15 → 1.1.16

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/content-resolver",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "Automatic conversion between text content and storage references with Content Descriptor pattern",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -110,7 +110,10 @@ class ContentResolver {
110
110
  constructor(options = {}) {
111
111
  const resolved = runtimeCfg.resolve(options);
112
112
  this.threshold = resolved.threshold;
113
- this.logger = options.logger || console;
113
+ if (!options.logger || typeof options.logger.warn !== 'function') {
114
+ throw new Error('[ContentResolver] Logger is required — Expected object with warn() method');
115
+ }
116
+ this.logger = options.logger;
114
117
 
115
118
  // Storage can be passed as instance or config (no fallbacks - fail-fast)
116
119
  if (options.storage instanceof StorageConnector) {