@wxn0brp/db-storage-csv 0.0.4 → 0.0.5
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/action.d.ts +1 -0
- package/dist/action.js +5 -1
- package/package.json +3 -3
package/dist/action.d.ts
CHANGED
|
@@ -13,4 +13,5 @@ export declare class DbStorageCsv extends CustomActionsBase {
|
|
|
13
13
|
ensureCollection(config: VQuery): Promise<boolean>;
|
|
14
14
|
issetCollection(config: VQuery): Promise<boolean>;
|
|
15
15
|
getCollections(): Promise<string[]>;
|
|
16
|
+
removeCollection(config: VQuery): Promise<boolean>;
|
|
16
17
|
}
|
package/dist/action.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CustomFileCpu } from "@wxn0brp/db-core";
|
|
2
2
|
import { CustomActionsBase } from "@wxn0brp/db-core/base/custom";
|
|
3
|
-
import { access, mkdir, readdir } from "fs/promises";
|
|
3
|
+
import { access, mkdir, readdir, rm } from "fs/promises";
|
|
4
4
|
import { parse, stringify } from "csv/sync";
|
|
5
5
|
import { readFile, writeFile } from "fs/promises";
|
|
6
6
|
export class DbStorageCsv extends CustomActionsBase {
|
|
@@ -70,4 +70,8 @@ export class DbStorageCsv extends CustomActionsBase {
|
|
|
70
70
|
return [];
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
async removeCollection(config) {
|
|
74
|
+
await rm(this._getPath(config));
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
73
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxn0brp/db-storage-csv",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"description": "ValtheraDB Storage CSV",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"csv"
|
|
20
20
|
],
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@wxn0brp/db-core": ">=0.
|
|
22
|
+
"@wxn0brp/db-core": ">=0.7.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"csv": "^6.4.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "*",
|
|
29
|
-
"@wxn0brp/db-core": "^0.
|
|
29
|
+
"@wxn0brp/db-core": "^0.7.0",
|
|
30
30
|
"tsc-alias": "*",
|
|
31
31
|
"typescript": "*"
|
|
32
32
|
},
|