@iobroker/db-states-redis
Advanced tools
Comparing version 7.0.3 to 7.0.4-alpha.0-20241116-db3148f4f
@@ -12,12 +12,2 @@ /** | ||
import type { DbStatus, ConnectionOptions } from '@iobroker/db-base/inMemFileDB'; | ||
interface LogObject { | ||
/** id of the source instance */ | ||
from: string; | ||
/** log level */ | ||
severity: string; | ||
/** timestamp */ | ||
ts: number; | ||
/** actual content */ | ||
message: string; | ||
} | ||
type UserChangeFunction = (id: string, state: ioBroker.State | null) => void; | ||
@@ -41,2 +31,4 @@ type ChangeFunction = (id: string, state: ioBroker.State | ioBroker.Message | null) => void; | ||
} | ||
/** The internal log message does not have an _id parameter */ | ||
type LogMessageInternal = Omit<ioBroker.LogMessage, '_id'>; | ||
export declare class StateRedisClient { | ||
@@ -126,3 +118,3 @@ private settings; | ||
unsubscribeMessage(id: string, callback?: ioBroker.ErrorCallback): Promise<void>; | ||
pushLog(id: string, log: LogObject, callback?: (err: Error | undefined | null, id?: string) => void): Promise<string | void>; | ||
pushLog(id: string, log: LogMessageInternal, callback?: (err: Error | undefined | null, id?: string) => void): Promise<string | void>; | ||
subscribeLog(id: string, callback?: ioBroker.ErrorCallback): Promise<void>; | ||
@@ -129,0 +121,0 @@ unsubscribeLog(id: string, callback?: ioBroker.ErrorCallback): Promise<void>; |
@@ -37,3 +37,3 @@ "use strict"; | ||
var import_node_util = require("node:util"); | ||
function bufferJsonDecoder(key, value) { | ||
function bufferJsonDecoder(_key, value) { | ||
if (import_db_base.tools.isObject(value) && value.type === "Buffer" && value.data && Array.isArray(value.data)) { | ||
@@ -885,3 +885,2 @@ return Buffer.from(value.data); | ||
} | ||
// implementation uses an modified pushLog with internal _id | ||
async pushLog(id, log, callback) { | ||
@@ -888,0 +887,0 @@ if (!id || typeof id !== "string") { |
@@ -12,12 +12,2 @@ /** | ||
import type { DbStatus, ConnectionOptions } from '@iobroker/db-base/inMemFileDB'; | ||
interface LogObject { | ||
/** id of the source instance */ | ||
from: string; | ||
/** log level */ | ||
severity: string; | ||
/** timestamp */ | ||
ts: number; | ||
/** actual content */ | ||
message: string; | ||
} | ||
type UserChangeFunction = (id: string, state: ioBroker.State | null) => void; | ||
@@ -41,2 +31,4 @@ type ChangeFunction = (id: string, state: ioBroker.State | ioBroker.Message | null) => void; | ||
} | ||
/** The internal log message does not have an _id parameter */ | ||
type LogMessageInternal = Omit<ioBroker.LogMessage, '_id'>; | ||
export declare class StateRedisClient { | ||
@@ -126,3 +118,3 @@ private settings; | ||
unsubscribeMessage(id: string, callback?: ioBroker.ErrorCallback): Promise<void>; | ||
pushLog(id: string, log: LogObject, callback?: (err: Error | undefined | null, id?: string) => void): Promise<string | void>; | ||
pushLog(id: string, log: LogMessageInternal, callback?: (err: Error | undefined | null, id?: string) => void): Promise<string | void>; | ||
subscribeLog(id: string, callback?: ioBroker.ErrorCallback): Promise<void>; | ||
@@ -129,0 +121,0 @@ unsubscribeLog(id: string, callback?: ioBroker.ErrorCallback): Promise<void>; |
@@ -16,6 +16,6 @@ /** | ||
* | ||
* @param key | ||
* @param _key | ||
* @param value | ||
*/ | ||
function bufferJsonDecoder(key, value) { | ||
function bufferJsonDecoder(_key, value) { | ||
if (tools.isObject(value) && value.type === 'Buffer' && value.data && Array.isArray(value.data)) { | ||
@@ -999,3 +999,2 @@ return Buffer.from(value.data); | ||
} | ||
// implementation uses an modified pushLog with internal _id | ||
async pushLog(id, log, callback) { | ||
@@ -1002,0 +1001,0 @@ if (!id || typeof id !== 'string') { |
{ | ||
"name": "@iobroker/db-states-redis", | ||
"type": "module", | ||
"version": "7.0.3", | ||
"version": "7.0.4-alpha.0-20241116-db3148f4f", | ||
"engines": { | ||
@@ -9,3 +9,3 @@ "node": ">=12.0.0" | ||
"dependencies": { | ||
"@iobroker/db-base": "7.0.3", | ||
"@iobroker/db-base": "7.0.4-alpha.0-20241116-db3148f4f", | ||
"ioredis": "^4.28.2" | ||
@@ -49,3 +49,3 @@ }, | ||
], | ||
"gitHead": "1c716ca37fe7c26d4f56571f90d33be69d45726e" | ||
"gitHead": "55ff47d48ea22e3b8e6dae0f7ecda51344da0a09" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
300206
2557
2
+ Added@iobroker/db-base@7.0.4-alpha.0-20241116-db3148f4f(transitive)
+ Added@iobroker/js-controller-common-db@7.0.4-alpha.0-20241116-db3148f4f(transitive)
- Removed@iobroker/db-base@7.0.3(transitive)
- Removed@iobroker/js-controller-common-db@7.0.3(transitive)