@iobroker/adapter-react-v5 6.1.1 → 6.1.3
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/LegacyConnection.d.ts +4 -4
- package/LegacyConnection.js +6 -6
- package/README.md +3 -0
- package/package.json +1 -1
package/LegacyConnection.d.ts
CHANGED
|
@@ -129,7 +129,7 @@ declare class Connection {
|
|
|
129
129
|
private onCmdStdoutHandler;
|
|
130
130
|
private onCmdStderrHandler;
|
|
131
131
|
private onCmdExitHandler;
|
|
132
|
-
systemConfig: ioBroker.
|
|
132
|
+
systemConfig: ioBroker.SystemConfigObject | null;
|
|
133
133
|
constructor(props: ConnectionProps);
|
|
134
134
|
/**
|
|
135
135
|
* Checks if this connection is running in a web adapter and not in an admin.
|
|
@@ -680,11 +680,11 @@ declare class Connection {
|
|
|
680
680
|
* @param {boolean} [update] Force update.
|
|
681
681
|
* @returns {Promise<ioBroker.OtherObject>}
|
|
682
682
|
*/
|
|
683
|
-
getSystemConfig(update?: boolean): Promise<ioBroker.
|
|
683
|
+
getSystemConfig(update?: boolean): Promise<ioBroker.SystemConfigObject>;
|
|
684
684
|
/**
|
|
685
685
|
* Sets the system configuration.
|
|
686
686
|
*/
|
|
687
|
-
setSystemConfig(obj: ioBroker.SettableObjectWorker<ioBroker.
|
|
687
|
+
setSystemConfig(obj: ioBroker.SettableObjectWorker<ioBroker.SystemConfigObject>): Promise<ioBroker.SystemConfigObject>;
|
|
688
688
|
/**
|
|
689
689
|
* Get the raw socket.io socket.
|
|
690
690
|
*/
|
|
@@ -835,7 +835,7 @@ declare class Connection {
|
|
|
835
835
|
*/
|
|
836
836
|
getCompactInstalled(host: string, update?: boolean, cmdTimeout?: number): Promise<Record<string, ioBroker.AdapterObject>>;
|
|
837
837
|
getCompactSystemRepositories(update?: boolean, cmdTimeout?: number): Promise<ioBroker.Object>;
|
|
838
|
-
getCompactSystemConfig(update?: boolean): Promise<ioBroker.
|
|
838
|
+
getCompactSystemConfig(update?: boolean): Promise<ioBroker.SystemConfigObject>;
|
|
839
839
|
/**
|
|
840
840
|
* Get the repository in compact form (only version and icon).
|
|
841
841
|
* @param {string} host
|
package/LegacyConnection.js
CHANGED
|
@@ -2204,8 +2204,8 @@ class Connection {
|
|
|
2204
2204
|
return Promise.reject(NOT_CONNECTED);
|
|
2205
2205
|
}
|
|
2206
2206
|
this._promises.systemConfig = this.getObject('system.config')
|
|
2207
|
-
.then(
|
|
2208
|
-
systemConfig =
|
|
2207
|
+
.then(obj => {
|
|
2208
|
+
const systemConfig = (obj || {});
|
|
2209
2209
|
systemConfig.common = systemConfig.common || {};
|
|
2210
2210
|
systemConfig.native = systemConfig.native || {};
|
|
2211
2211
|
return systemConfig;
|
|
@@ -2692,16 +2692,16 @@ class Connection {
|
|
|
2692
2692
|
}
|
|
2693
2693
|
// returns very optimized information for adapters to minimize a connection load
|
|
2694
2694
|
getCompactSystemConfig(update) {
|
|
2695
|
-
if (!update && this._promises.
|
|
2696
|
-
return this._promises.
|
|
2695
|
+
if (!update && this._promises.systemConfigPromise) {
|
|
2696
|
+
return this._promises.systemConfigPromise;
|
|
2697
2697
|
}
|
|
2698
2698
|
if (!this.connected) {
|
|
2699
2699
|
return Promise.reject(NOT_CONNECTED);
|
|
2700
2700
|
}
|
|
2701
|
-
this._promises.
|
|
2701
|
+
this._promises.systemConfigPromise = new Promise((resolve, reject) => {
|
|
2702
2702
|
this._socket.emit('getCompactSystemConfig', (err, systemConfig) => (err ? reject(err) : resolve(systemConfig)));
|
|
2703
2703
|
});
|
|
2704
|
-
return this._promises.
|
|
2704
|
+
return this._promises.systemConfigPromise;
|
|
2705
2705
|
}
|
|
2706
2706
|
/**
|
|
2707
2707
|
* Get the repository in compact form (only version and icon).
|
package/README.md
CHANGED
|
@@ -781,6 +781,9 @@ The best practice is to replace `padding` with `p` and `margin` with `m`, so you
|
|
|
781
781
|
-->
|
|
782
782
|
|
|
783
783
|
## Changelog
|
|
784
|
+
### 6.1.3 (2024-07-20)
|
|
785
|
+
* (bluefox) Better typing of legacy connection
|
|
786
|
+
|
|
784
787
|
### 6.1.1 (2024-07-16)
|
|
785
788
|
* (bluefox) Added translations
|
|
786
789
|
|