@iobroker/db-objects-file 4.0.23 → 4.1.0-alpha.0-20220823-bd606e5c

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.
@@ -0,0 +1,5 @@
1
+ export const ObjectsInMemoryFileDB: typeof import("./lib/objects/objectsInMemFileDB");
2
+ export const Client: typeof import("@iobroker/db-objects-redis").Client;
3
+ export const Server: typeof import("./lib/objects/objectsInMemServerClass.js");
4
+ export function getDefaultPort(_host: any): number;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  module.exports = {
2
3
  ObjectsInMemoryFileDB: require('./lib/objects/objectsInMemFileDB'),
3
4
  Client: require('@iobroker/db-objects-redis').Client,
@@ -6,3 +7,4 @@ module.exports = {
6
7
  return 9001;
7
8
  }
8
9
  };
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,100 @@
1
+ export = ObjectsInMemoryFileDB;
2
+ /**
3
+ * This class inherits InMemoryFileDB class and adds all relevant logic for objects
4
+ * including the available methods for use by js-controller directly
5
+ **/
6
+ declare class ObjectsInMemoryFileDB extends InMemoryFileDB {
7
+ constructor(settings: any);
8
+ change: any;
9
+ fileOptions: {};
10
+ files: {};
11
+ writeTimer: NodeJS.Timeout | null;
12
+ writeIds: any[];
13
+ preserveSettings: string[];
14
+ defaultNewAcl: any;
15
+ namespace: any;
16
+ writeFileInterval: number;
17
+ objectsDir: string;
18
+ existingMetaObjects: {};
19
+ _normalizeFilename(name: any): any;
20
+ _saveFileSettings(id: any, force: any): void;
21
+ _loadFileSettings(id: any): void;
22
+ syncFileDirectory(limitId: any): {
23
+ numberSuccess: number;
24
+ notifications: any[];
25
+ };
26
+ _writeFile(id: any, name: any, data: any, options: any): void;
27
+ _readFile(id: any, name: any, options: any): {
28
+ fileContent: any;
29
+ fileMime: any;
30
+ };
31
+ /**
32
+ * Check if given object exists
33
+ *
34
+ * @param {string} id id of the object
35
+ * @param {object} [_options] optional user context
36
+ * @return {boolean}
37
+ */
38
+ _objectExists(id: string, _options?: object | undefined): boolean;
39
+ /**
40
+ * Check if given file exists
41
+ *
42
+ * @param {string} id id of the namespace
43
+ * @param {string} [name] name of the file
44
+ * @returns {boolean}
45
+ */
46
+ _fileExists(id: string, name?: string | undefined): boolean;
47
+ /**
48
+ * Check if given directory exists
49
+ *
50
+ * @param {string} id id of the namespace
51
+ * @param {string} [name] name of the directory
52
+ * @returns {boolean}
53
+ */
54
+ dirExists(id: string, name?: string | undefined): boolean;
55
+ _unlink(id: any, name: any): void;
56
+ _readDir(id: any, name: any, options: any): {
57
+ file: string;
58
+ stats: fs.Stats;
59
+ isDir: boolean;
60
+ acl: any;
61
+ modifiedAt: any;
62
+ createdAt: any;
63
+ }[];
64
+ _rename(id: any, oldName: any, newName: any): void;
65
+ _clone(obj: any): any;
66
+ _subscribeMeta(client: any, pattern: any): void;
67
+ _subscribeConfigForClient(client: any, pattern: any): void;
68
+ _unsubscribeConfigForClient(client: any, pattern: any): void;
69
+ _subscribeFileForClient(client: any, id: any, pattern: any): void;
70
+ _unsubscribeFileForClient(client: any, id: any, pattern: any): void;
71
+ _getObject(id: any): any;
72
+ _getKeys(pattern: any): string[];
73
+ _getObjects(keys: any): any;
74
+ _ensureMetaDict(): any;
75
+ /**
76
+ * Get value of given meta id
77
+ *
78
+ * @param {string} id
79
+ * @returns {*}
80
+ */
81
+ getMeta(id: string): any;
82
+ /**
83
+ * Sets given value to id in metaNamespace
84
+ *
85
+ * @param {string} id
86
+ * @param {string} value
87
+ */
88
+ setMeta(id: string, value: string): void;
89
+ _setObjectDirect(id: any, obj: any): void;
90
+ _delObject(id: any): void;
91
+ _applyView(func: any, params: any): {
92
+ rows: never[];
93
+ };
94
+ _getObjectView(design: any, search: any, params: any): {
95
+ rows: never[];
96
+ };
97
+ }
98
+ import { InMemoryFileDB } from "@iobroker/db-base";
99
+ import fs = require("fs-extra");
100
+ //# sourceMappingURL=objectsInMemFileDB.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objectsInMemFileDB.d.ts","sourceRoot":"","sources":["../../../src/lib/objects/objectsInMemFileDB.js"],"names":[],"mappings":";AAsBA;;;IAGI;AACJ;IACI,2BAgDC;IAvCO,YAEC;IAEL,gBAAqB;IACrB,UAAe;IACf,kCAAsB;IACtB,gBAAkB;IAClB,2BAAkC;IAClC,mBAAwD;IACxD,eAAwE;IACxE,0BAGc;IAKd,mBAAkD;IAGlD,wBAA6B;IAoBjC,mCAEC;IAID,6CAuCC;IAGD,iCA+BC;IAGD;;;MA8FC;IAGD,8DA+FC;IAGD;;;MAqGC;IAED;;;;;;OAMG;IAEH,kBALW,MAAM,kCAEL,OAAO,CAelB;IAED;;;;;;OAMG;IAEH,gBALW,MAAM,8BAEJ,OAAO,CAoBnB;IAED;;;;;;OAMG;IAEH,cALW,MAAM,8BAEJ,OAAO,CAoBnB;IAGD,kCA6DC;IAGD;;;;;;;QAkKC;IAGD,mDA+BC;IAGD,sBAWC;IAED,gDAEC;IAGD,2DAEC;IAGD,6DAEC;IAGD,kEAMC;IAGD,oEAMC;IAGD,yBAEC;IAGD,iCAKC;IAGD,4BAMC;IAED,uBAOC;IAED;;;;;OAKG;IACH,YAHW,MAAM,OAMhB;IAED;;;;;OAKG;IACH,YAHW,MAAM,SACN,MAAM,QAiBhB;IAGD,0CAWC;IAGD,0BAsBC;IAGD;;MA8CC;IAGD;;MAWC;CAgBJ"}