@wxn0brp/db 0.20.2 → 0.30.0
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/dist/graph.d.ts +9 -6
- package/dist/graph.js +2 -2
- package/dist/version.js +1 -1
- package/package.json +5 -5
package/dist/graph.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ declare class Graph {
|
|
|
10
10
|
/**
|
|
11
11
|
* Adds an edge between two nodes.
|
|
12
12
|
*/
|
|
13
|
-
add(collection: string, nodeA: string, nodeB: string): Promise<
|
|
13
|
+
add(collection: string, nodeA: string, nodeB: string): Promise<{
|
|
14
|
+
a: unknown;
|
|
15
|
+
b: unknown;
|
|
16
|
+
}>;
|
|
14
17
|
/**
|
|
15
18
|
* Removes an edge between two nodes.
|
|
16
19
|
*/
|
|
@@ -22,11 +25,11 @@ declare class Graph {
|
|
|
22
25
|
/**
|
|
23
26
|
* Finds one edge with either node equal to `nodeA` and the other equal to `nodeB`.
|
|
24
27
|
*/
|
|
25
|
-
findOne(collection:
|
|
28
|
+
findOne(collection: string, nodeA: string, nodeB: string): Promise<Data>;
|
|
26
29
|
/**
|
|
27
30
|
* Gets all edges in the database.
|
|
28
31
|
*/
|
|
29
|
-
getAll(collection:
|
|
32
|
+
getAll(collection: string): Promise<Data[]>;
|
|
30
33
|
/**
|
|
31
34
|
* Get the names of all available databases.
|
|
32
35
|
*/
|
|
@@ -34,14 +37,14 @@ declare class Graph {
|
|
|
34
37
|
/**
|
|
35
38
|
* Check and create the specified collection if it doesn't exist.
|
|
36
39
|
*/
|
|
37
|
-
|
|
40
|
+
ensureCollection(collection: string): Promise<void>;
|
|
38
41
|
/**
|
|
39
42
|
* Check if a collection exists.
|
|
40
43
|
*/
|
|
41
|
-
issetCollection(collection:
|
|
44
|
+
issetCollection(collection: string): Promise<boolean>;
|
|
42
45
|
/**
|
|
43
46
|
* Removes a database collection from the file system.
|
|
44
47
|
*/
|
|
45
|
-
removeCollection(collection:
|
|
48
|
+
removeCollection(collection: string): void;
|
|
46
49
|
}
|
|
47
50
|
export default Graph;
|
package/dist/graph.js
CHANGED
|
@@ -66,8 +66,8 @@ class Graph {
|
|
|
66
66
|
/**
|
|
67
67
|
* Check and create the specified collection if it doesn't exist.
|
|
68
68
|
*/
|
|
69
|
-
async
|
|
70
|
-
await this.db.
|
|
69
|
+
async ensureCollection(collection) {
|
|
70
|
+
await this.db.ensureCollection(collection);
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
73
|
* Check if a collection exists.
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "0.
|
|
1
|
+
export const version = "0.30.0";
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxn0brp/db",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": "wxn0brP",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@wxn0brp/db-client": ">=0.
|
|
11
|
-
"@wxn0brp/db-core": ">=0.
|
|
12
|
-
"@wxn0brp/db-storage-dir": ">=0.
|
|
10
|
+
"@wxn0brp/db-client": ">=0.1.0",
|
|
11
|
+
"@wxn0brp/db-core": ">=0.1.2",
|
|
12
|
+
"@wxn0brp/db-storage-dir": ">=0.1.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@types/node": "^
|
|
15
|
+
"@types/node": "^24.1.0",
|
|
16
16
|
"tsc-alias": "^1.8.10",
|
|
17
17
|
"typescript": "^5.7.3"
|
|
18
18
|
},
|