@starktma/minecraft-utils 1.3.22 → 1.3.24
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.
|
@@ -18,19 +18,36 @@ import { SimpleObject } from "./interfaces";
|
|
|
18
18
|
* }
|
|
19
19
|
* return MyDatabase.instance;
|
|
20
20
|
* }
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* // Using a custom namespace
|
|
25
|
+
* class MyCustomDatabase extends SimpleDatabase<PlayerObject> {
|
|
26
|
+
* protected static instance: MyCustomDatabase;
|
|
27
|
+
* constructor() {
|
|
28
|
+
* super("myDatabase", undefined, "customnamespace");
|
|
29
|
+
* }
|
|
30
|
+
*
|
|
31
|
+
* static getInstance(): MyCustomDatabase {
|
|
32
|
+
* if (!MyCustomDatabase.instance) {
|
|
33
|
+
* MyCustomDatabase.instance = new MyCustomDatabase();
|
|
34
|
+
* }
|
|
35
|
+
* return MyCustomDatabase.instance;
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
21
38
|
*/
|
|
22
39
|
declare class SimpleDatabase<T extends SimpleObject> {
|
|
23
40
|
private mainDB;
|
|
24
|
-
private localDB;
|
|
25
41
|
protected databaseName: string;
|
|
26
42
|
/**
|
|
27
|
-
* The constructor initializes the
|
|
43
|
+
* The constructor initializes the database manager.
|
|
28
44
|
* @param databaseName The name of the database.
|
|
29
45
|
* @param target The target entity to store the database in. If undefined, the database is stored in the world.
|
|
46
|
+
* @param namespace The namespace to use for the database. If undefined, the global namespace is used.
|
|
30
47
|
*/
|
|
31
|
-
protected constructor(databaseName: string, target?: Entity | undefined);
|
|
48
|
+
protected constructor(databaseName: string, target?: Entity | undefined, namespace?: string);
|
|
32
49
|
/**
|
|
33
|
-
* Updates the main database with the
|
|
50
|
+
* Updates the main database with the provided data.
|
|
34
51
|
* This method is called automatically when an object is added, updated or removed.
|
|
35
52
|
* @private
|
|
36
53
|
*/
|
|
@@ -42,47 +59,47 @@ declare class SimpleDatabase<T extends SimpleObject> {
|
|
|
42
59
|
*/
|
|
43
60
|
private getMainDB;
|
|
44
61
|
/**
|
|
45
|
-
* Adds an object to the
|
|
62
|
+
* Adds an object to the database.
|
|
46
63
|
* @param object The object to be added.
|
|
47
64
|
*/
|
|
48
65
|
addObject(object: T): void;
|
|
49
66
|
/**
|
|
50
|
-
* Updates an object in the
|
|
67
|
+
* Updates an object in the database.
|
|
51
68
|
* If the object does not exist, it is added.
|
|
52
69
|
* @param object The object to be updated.
|
|
53
70
|
*/
|
|
54
71
|
updateObject(object: T): void;
|
|
55
72
|
/**
|
|
56
|
-
* Checks if an object with the given id exists in the
|
|
73
|
+
* Checks if an object with the given id exists in the database.
|
|
57
74
|
* @param id The id of the object.
|
|
58
75
|
* @returns True if the object exists, false otherwise.
|
|
59
76
|
*/
|
|
60
77
|
hasObject(id: string): boolean;
|
|
61
78
|
/**
|
|
62
|
-
* Retrieves an object with the given id from the
|
|
79
|
+
* Retrieves an object with the given id from the database.
|
|
63
80
|
* @param id The id of the object.
|
|
64
81
|
* @returns The object if it exists, undefined otherwise.
|
|
65
82
|
*/
|
|
66
83
|
getObject(id: string): T | undefined;
|
|
67
84
|
/**
|
|
68
|
-
* Removes an object with the given id from the
|
|
85
|
+
* Removes an object with the given id from the database.
|
|
69
86
|
* @param id The id of the object.
|
|
70
87
|
*/
|
|
71
88
|
removeObject(id: string): void;
|
|
72
89
|
/**
|
|
73
|
-
* Retrieves all objects from the
|
|
74
|
-
* @returns An array of all objects in the
|
|
90
|
+
* Retrieves all objects from the database.
|
|
91
|
+
* @returns An array of all objects in the database.
|
|
75
92
|
*/
|
|
76
93
|
getAllObjects(): T[];
|
|
77
94
|
/**
|
|
78
|
-
* Removes all objects from the
|
|
95
|
+
* Removes all objects from the database.
|
|
79
96
|
*/
|
|
80
97
|
eraseAllObjects(): void;
|
|
81
98
|
/**
|
|
82
|
-
* Iterates over all objects in the
|
|
99
|
+
* Iterates over all objects in the database.
|
|
83
100
|
* @param callback The function to be called for each object.
|
|
84
101
|
*/
|
|
85
|
-
forEach(callback: (object:
|
|
102
|
+
forEach(callback: (object: T, index: number) => void): void;
|
|
86
103
|
}
|
|
87
104
|
export { SimpleDatabase, SimpleObject };
|
|
88
105
|
//# sourceMappingURL=database.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/database/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/database/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AA+I5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,cAAM,cAAc,CAAC,CAAC,SAAS,YAAY;IAC1C,OAAO,CAAC,MAAM,CAAkB;IAEhC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAE/B;;;;;OAKG;IACH,SAAS,aAAa,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM;IAU3F;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAIpB;;;;OAIG;IACH,OAAO,CAAC,SAAS;IASjB;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI;IAM1B;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI;IAO7B;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAK9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAKpC;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAM9B;;;OAGG;IACH,aAAa,IAAI,CAAC,EAAE;IAIpB;;OAEG;IACH,eAAe,IAAI,IAAI;IAIvB;;;OAGG;IACH,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;CAI3D;AAED,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -8,13 +8,20 @@ class DatabaseManager {
|
|
|
8
8
|
static DYNAMIC_PROP_MAX_LENGTH = 32767;
|
|
9
9
|
static CHUNK_KEY = "__SPLIT__";
|
|
10
10
|
target;
|
|
11
|
-
|
|
11
|
+
namespace;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new DatabaseManager instance.
|
|
14
|
+
* @param target The target entity to store the database in. If undefined, the database is stored in the world.
|
|
15
|
+
* @param namespace The namespace to use for the database. If undefined, the global namespace is used.
|
|
16
|
+
*/
|
|
17
|
+
constructor(target, namespace) {
|
|
12
18
|
if (target instanceof Entity) {
|
|
13
19
|
this.target = target;
|
|
14
20
|
}
|
|
15
21
|
else {
|
|
16
22
|
this.target = world;
|
|
17
23
|
}
|
|
24
|
+
this.namespace = namespace || getNamespace();
|
|
18
25
|
}
|
|
19
26
|
/**
|
|
20
27
|
* Checks if a JSON database with the given name exists.
|
|
@@ -22,7 +29,7 @@ class DatabaseManager {
|
|
|
22
29
|
* @returns True if the database exists, false otherwise.
|
|
23
30
|
*/
|
|
24
31
|
hasJSONDatabase(databaseName) {
|
|
25
|
-
return this.target.getDynamicProperty(`${
|
|
32
|
+
return this.target.getDynamicProperty(`${this.namespace}:${databaseName}`) !== undefined;
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
35
|
* Adds a new JSON database with the given name and data.
|
|
@@ -30,7 +37,7 @@ class DatabaseManager {
|
|
|
30
37
|
* @param database The data to be stored in the database.
|
|
31
38
|
*/
|
|
32
39
|
addJSONDatabase(databaseName, database) {
|
|
33
|
-
const propertyName = `${
|
|
40
|
+
const propertyName = `${this.namespace}:${databaseName}`;
|
|
34
41
|
const jsonString = JSON.stringify(database);
|
|
35
42
|
const existingProp = this.target.getDynamicProperty(propertyName);
|
|
36
43
|
let existingChunks = 0;
|
|
@@ -77,7 +84,7 @@ class DatabaseManager {
|
|
|
77
84
|
* @param databaseName The name of the database.
|
|
78
85
|
*/
|
|
79
86
|
removeJSONDatabase(databaseName) {
|
|
80
|
-
const propertyName = `${
|
|
87
|
+
const propertyName = `${this.namespace}:${databaseName}`;
|
|
81
88
|
const propString = this.target.getDynamicProperty(propertyName);
|
|
82
89
|
if (propString !== undefined) {
|
|
83
90
|
try {
|
|
@@ -101,7 +108,7 @@ class DatabaseManager {
|
|
|
101
108
|
* @throws An error if the database does not exist.
|
|
102
109
|
*/
|
|
103
110
|
getJSONDatabase(databaseName) {
|
|
104
|
-
const propertyName = `${
|
|
111
|
+
const propertyName = `${this.namespace}:${databaseName}`;
|
|
105
112
|
const propString = this.target.getDynamicProperty(propertyName);
|
|
106
113
|
if (propString === undefined) {
|
|
107
114
|
throw new Error("Database does not exist");
|
|
@@ -150,34 +157,48 @@ class DatabaseManager {
|
|
|
150
157
|
* }
|
|
151
158
|
* return MyDatabase.instance;
|
|
152
159
|
* }
|
|
160
|
+
* }
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* // Using a custom namespace
|
|
164
|
+
* class MyCustomDatabase extends SimpleDatabase<PlayerObject> {
|
|
165
|
+
* protected static instance: MyCustomDatabase;
|
|
166
|
+
* constructor() {
|
|
167
|
+
* super("myDatabase", undefined, "customnamespace");
|
|
168
|
+
* }
|
|
169
|
+
*
|
|
170
|
+
* static getInstance(): MyCustomDatabase {
|
|
171
|
+
* if (!MyCustomDatabase.instance) {
|
|
172
|
+
* MyCustomDatabase.instance = new MyCustomDatabase();
|
|
173
|
+
* }
|
|
174
|
+
* return MyCustomDatabase.instance;
|
|
175
|
+
* }
|
|
176
|
+
* }
|
|
153
177
|
*/
|
|
154
178
|
class SimpleDatabase {
|
|
155
179
|
mainDB;
|
|
156
|
-
localDB;
|
|
157
180
|
databaseName;
|
|
158
181
|
/**
|
|
159
|
-
* The constructor initializes the
|
|
182
|
+
* The constructor initializes the database manager.
|
|
160
183
|
* @param databaseName The name of the database.
|
|
161
184
|
* @param target The target entity to store the database in. If undefined, the database is stored in the world.
|
|
185
|
+
* @param namespace The namespace to use for the database. If undefined, the global namespace is used.
|
|
162
186
|
*/
|
|
163
|
-
constructor(databaseName, target) {
|
|
164
|
-
this.mainDB = new DatabaseManager(target);
|
|
187
|
+
constructor(databaseName, target, namespace) {
|
|
188
|
+
this.mainDB = new DatabaseManager(target, namespace);
|
|
165
189
|
this.databaseName = databaseName;
|
|
166
|
-
if
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
else {
|
|
170
|
-
this.localDB = [];
|
|
171
|
-
this.updateMainDB();
|
|
190
|
+
// Initialize the database if it doesn't exist
|
|
191
|
+
if (!this.mainDB.hasJSONDatabase(this.databaseName)) {
|
|
192
|
+
this.mainDB.addJSONDatabase(this.databaseName, []);
|
|
172
193
|
}
|
|
173
194
|
}
|
|
174
195
|
/**
|
|
175
|
-
* Updates the main database with the
|
|
196
|
+
* Updates the main database with the provided data.
|
|
176
197
|
* This method is called automatically when an object is added, updated or removed.
|
|
177
198
|
* @private
|
|
178
199
|
*/
|
|
179
|
-
updateMainDB() {
|
|
180
|
-
this.mainDB.addJSONDatabase(this.databaseName,
|
|
200
|
+
updateMainDB(data) {
|
|
201
|
+
this.mainDB.addJSONDatabase(this.databaseName, data);
|
|
181
202
|
}
|
|
182
203
|
/**
|
|
183
204
|
* Retrieves the main database.
|
|
@@ -185,18 +206,25 @@ class SimpleDatabase {
|
|
|
185
206
|
* @returns The main database.
|
|
186
207
|
*/
|
|
187
208
|
getMainDB() {
|
|
188
|
-
|
|
209
|
+
try {
|
|
210
|
+
return this.mainDB.getJSONDatabase(this.databaseName);
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
// If database doesn't exist or is corrupted, return empty array
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
189
216
|
}
|
|
190
217
|
/**
|
|
191
|
-
* Adds an object to the
|
|
218
|
+
* Adds an object to the database.
|
|
192
219
|
* @param object The object to be added.
|
|
193
220
|
*/
|
|
194
221
|
addObject(object) {
|
|
195
|
-
this.
|
|
196
|
-
|
|
222
|
+
const currentData = this.getMainDB();
|
|
223
|
+
currentData.push(object);
|
|
224
|
+
this.updateMainDB(currentData);
|
|
197
225
|
}
|
|
198
226
|
/**
|
|
199
|
-
* Updates an object in the
|
|
227
|
+
* Updates an object in the database.
|
|
200
228
|
* If the object does not exist, it is added.
|
|
201
229
|
* @param object The object to be updated.
|
|
202
230
|
*/
|
|
@@ -207,49 +235,52 @@ class SimpleDatabase {
|
|
|
207
235
|
this.addObject(object);
|
|
208
236
|
}
|
|
209
237
|
/**
|
|
210
|
-
* Checks if an object with the given id exists in the
|
|
238
|
+
* Checks if an object with the given id exists in the database.
|
|
211
239
|
* @param id The id of the object.
|
|
212
240
|
* @returns True if the object exists, false otherwise.
|
|
213
241
|
*/
|
|
214
242
|
hasObject(id) {
|
|
215
|
-
|
|
243
|
+
const currentData = this.getMainDB();
|
|
244
|
+
return currentData.map((object) => object.id).includes(id);
|
|
216
245
|
}
|
|
217
246
|
/**
|
|
218
|
-
* Retrieves an object with the given id from the
|
|
247
|
+
* Retrieves an object with the given id from the database.
|
|
219
248
|
* @param id The id of the object.
|
|
220
249
|
* @returns The object if it exists, undefined otherwise.
|
|
221
250
|
*/
|
|
222
251
|
getObject(id) {
|
|
223
|
-
|
|
252
|
+
const currentData = this.getMainDB();
|
|
253
|
+
return currentData.filter((object) => object.id === id)[0];
|
|
224
254
|
}
|
|
225
255
|
/**
|
|
226
|
-
* Removes an object with the given id from the
|
|
256
|
+
* Removes an object with the given id from the database.
|
|
227
257
|
* @param id The id of the object.
|
|
228
258
|
*/
|
|
229
259
|
removeObject(id) {
|
|
230
|
-
|
|
231
|
-
|
|
260
|
+
const currentData = this.getMainDB();
|
|
261
|
+
const updatedData = currentData.filter((object) => object.id !== id);
|
|
262
|
+
this.updateMainDB(updatedData);
|
|
232
263
|
}
|
|
233
264
|
/**
|
|
234
|
-
* Retrieves all objects from the
|
|
235
|
-
* @returns An array of all objects in the
|
|
265
|
+
* Retrieves all objects from the database.
|
|
266
|
+
* @returns An array of all objects in the database.
|
|
236
267
|
*/
|
|
237
268
|
getAllObjects() {
|
|
238
|
-
return this.
|
|
269
|
+
return this.getMainDB();
|
|
239
270
|
}
|
|
240
271
|
/**
|
|
241
|
-
* Removes all objects from the
|
|
272
|
+
* Removes all objects from the database.
|
|
242
273
|
*/
|
|
243
274
|
eraseAllObjects() {
|
|
244
|
-
this.
|
|
245
|
-
this.updateMainDB();
|
|
275
|
+
this.updateMainDB([]);
|
|
246
276
|
}
|
|
247
277
|
/**
|
|
248
|
-
* Iterates over all objects in the
|
|
278
|
+
* Iterates over all objects in the database.
|
|
249
279
|
* @param callback The function to be called for each object.
|
|
250
280
|
*/
|
|
251
281
|
forEach(callback) {
|
|
252
|
-
|
|
282
|
+
const currentData = this.getMainDB();
|
|
283
|
+
currentData.forEach((object, index) => callback(object, index));
|
|
253
284
|
}
|
|
254
285
|
}
|
|
255
286
|
export { SimpleDatabase };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/database/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAS,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C;;;GAGG;AACH,MAAM,eAAe;IACZ,MAAM,CAAU,uBAAuB,GAAG,KAAK,CAAC;IAChD,MAAM,CAAU,SAAS,GAAG,WAAW,CAAC;IAExC,MAAM,CAAiB;
|
|
1
|
+
{"version":3,"file":"database.js","sourceRoot":"","sources":["../../src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