@xiboplayer/utils 0.5.14 → 0.5.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 +2 -2
  2. package/src/logger.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiboplayer/utils",
3
- "version": "0.5.14",
3
+ "version": "0.5.16",
4
4
  "description": "Shared utilities for Xibo Player packages",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -11,7 +11,7 @@
11
11
  "./config": "./src/config.js"
12
12
  },
13
13
  "dependencies": {
14
- "@xiboplayer/crypto": "0.5.14"
14
+ "@xiboplayer/crypto": "0.5.16"
15
15
  },
16
16
  "devDependencies": {
17
17
  "vitest": "^2.0.0"
package/src/logger.js CHANGED
@@ -133,6 +133,9 @@ if (typeof window !== 'undefined') {
133
133
  } else {
134
134
  globalConfig.setGlobalLevel('WARNING');
135
135
  }
136
+ } else if (typeof self !== 'undefined' && self.swLogLevel) {
137
+ // Service Worker context: use self.swLogLevel (set before importing this module)
138
+ globalConfig.setGlobalLevel(self.swLogLevel);
136
139
  }
137
140
 
138
141
  // Factory function — loggers follow global level by default (reactive)