hoffmation-base 3.2.1-alpha.1 → 3.2.1-alpha.10

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 (44) hide show
  1. package/lib/action/actuatorChangeAction.js +1 -1
  2. package/lib/action/baseAction.d.ts +2 -1
  3. package/lib/action/baseAction.js +1 -2
  4. package/lib/action/batteryLevelChangeAction.js +1 -1
  5. package/lib/action/handleChangeAction.js +1 -1
  6. package/lib/action/humiditySensorChangeAction.js +1 -1
  7. package/lib/action/motionSensorAction.js +1 -1
  8. package/lib/action/presenceGroupAnyMovementAction.d.ts +2 -2
  9. package/lib/action/presenceGroupFirstEnterAction.d.ts +2 -2
  10. package/lib/action/presenceGroupLastLeftAction.d.ts +2 -2
  11. package/lib/action/shutterPositionChangedAction.js +1 -1
  12. package/lib/action/temperatureSensorChangeAction.js +1 -1
  13. package/lib/command/baseCommand.d.ts +7 -1
  14. package/lib/command/baseCommand.js +17 -8
  15. package/lib/devices/BaseDevice.js +8 -1
  16. package/lib/devices/CameraDevice.d.ts +1 -2
  17. package/lib/devices/CameraDevice.js +1 -10
  18. package/lib/devices/dachs/dachs.d.ts +0 -2
  19. package/lib/devices/dachs/dachs.js +11 -15
  20. package/lib/devices/dachs/dachsTemperatureSensor.js +1 -1
  21. package/lib/devices/espresense/detectedBluetoothDevice.d.ts +1 -2
  22. package/lib/devices/espresense/detectedBluetoothDevice.js +0 -3
  23. package/lib/devices/espresense/espresenseDevice.d.ts +1 -3
  24. package/lib/devices/espresense/espresenseDevice.js +0 -5
  25. package/lib/devices/govee/own-govee-device.js +0 -1
  26. package/lib/devices/hmIPDevices/hmIpRoll.d.ts +0 -2
  27. package/lib/devices/hmIPDevices/hmIpRoll.js +1 -7
  28. package/lib/devices/sharedFunctions/lampUtils.js +0 -1
  29. package/lib/devices/tv/tvDevice.js +2 -6
  30. package/lib/devices/velux/veluxShutter.d.ts +0 -2
  31. package/lib/devices/velux/veluxShutter.js +1 -7
  32. package/lib/devices/victron/victron-device.js +1 -1
  33. package/lib/interfaces/iJsonCustomPrepend.d.ts +9 -0
  34. package/lib/interfaces/iJsonCustomPrepend.js +2 -0
  35. package/lib/interfaces/index.d.ts +1 -0
  36. package/lib/interfaces/index.js +1 -0
  37. package/lib/services/ac/ac-device.js +2 -6
  38. package/lib/services/ac/own-daikin-device.d.ts +0 -2
  39. package/lib/services/ac/own-daikin-device.js +1 -11
  40. package/lib/tsconfig.tsbuildinfo +1 -1
  41. package/lib/utils/ringStorage.d.ts +1 -0
  42. package/lib/utils/ringStorage.js +3 -0
  43. package/lib/utils/utils.js +7 -1
  44. package/package.json +1 -1
@@ -2,6 +2,7 @@ export declare class RingStorage<T> {
2
2
  private maxSize;
3
3
  private storage;
4
4
  private pointer;
5
+ get maximumSize(): number;
5
6
  constructor(maxSize?: number);
6
7
  add(object: T): void;
7
8
  readAmount(amount: number): T[];
@@ -2,6 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RingStorage = void 0;
4
4
  class RingStorage {
5
+ get maximumSize() {
6
+ return this.maxSize;
7
+ }
5
8
  constructor(maxSize = 10) {
6
9
  this.maxSize = maxSize;
7
10
  this.storage = [];
@@ -201,6 +201,12 @@ class Utils {
201
201
  logging_1.ServerLogService.writeLog(enums_1.LogLevel.Warn, `DeepOmit Loop Level ${level} reached for ${currentKey}`);
202
202
  }
203
203
  const combinedOmmitKeys = [...keysToOmit, ...((_a = obj === null || obj === void 0 ? void 0 : obj.jsonOmitKeys) !== null && _a !== void 0 ? _a : [])];
204
+ if (obj === null || obj === void 0 ? void 0 : obj.customPrepend) {
205
+ obj = {
206
+ ...obj,
207
+ ...obj.customPrepend(),
208
+ };
209
+ }
204
210
  // the inner function which will be called recursivley
205
211
  return lodash_1.default.transform(obj, (result, value, key) => {
206
212
  if (value === undefined || value === null) {
@@ -214,10 +220,10 @@ class Utils {
214
220
  return;
215
221
  }
216
222
  }
217
- // transform to a new object
218
223
  if (level === 1 && topLevelOmitKeys.includes(lowerKey)) {
219
224
  return;
220
225
  }
226
+ // transform to a new object
221
227
  if (lowerKey.endsWith('map')) {
222
228
  const newKey = lowerKey.replace('map', 'dict');
223
229
  const dict = {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hoffmation-base",
3
3
  "description": "Base Libraries and functions for own Hoffmation projects",
4
- "version": "3.2.1-alpha.1",
4
+ "version": "3.2.1-alpha.10",
5
5
  "files": [
6
6
  "lib/**/*"
7
7
  ],