@threadbase-sh/streamer 1.21.0 → 1.22.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.
- package/dist/cli.cjs +301 -276
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -4843,10 +4843,17 @@ var StreamerServer = class {
|
|
|
4843
4843
|
});
|
|
4844
4844
|
}
|
|
4845
4845
|
rotateApiKey() {
|
|
4846
|
+
const oldKey = this.apiKey;
|
|
4846
4847
|
const newKey = generateApiKey();
|
|
4847
4848
|
const persisted = this.apiKeySource === "config";
|
|
4848
4849
|
if (persisted) setApiKey(newKey);
|
|
4849
4850
|
this.apiKey = newKey;
|
|
4851
|
+
this.log.info("API key rotated", {
|
|
4852
|
+
event: "auth.api_key_rotated",
|
|
4853
|
+
oldKeyMasked: `${oldKey.slice(0, 6)}\u2026`,
|
|
4854
|
+
newKeyMasked: `${newKey.slice(0, 6)}\u2026`,
|
|
4855
|
+
persisted
|
|
4856
|
+
});
|
|
4850
4857
|
return { newKey, persisted };
|
|
4851
4858
|
}
|
|
4852
4859
|
checkRateLimit(map, key, limit, windowMs) {
|