@wxn0brp/db-storage-bin 0.100.0 → 0.100.2
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/actions.js +2 -2
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/package.json +6 -6
package/dist/actions.js
CHANGED
|
@@ -29,8 +29,8 @@ export class BinFileAction extends CustomActionsBase {
|
|
|
29
29
|
* Check and create the specified collection if it doesn't exist.
|
|
30
30
|
*/
|
|
31
31
|
async ensureCollection(collection) {
|
|
32
|
-
if (await this.issetCollection(
|
|
33
|
-
return;
|
|
32
|
+
if (await this.issetCollection(collection))
|
|
33
|
+
return false;
|
|
34
34
|
await this.mgr.write(collection, []);
|
|
35
35
|
return true;
|
|
36
36
|
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -15,3 +15,11 @@ export async function createBinValthera(path, opts = {}, init = true) {
|
|
|
15
15
|
mgr,
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
+
export const DYNAMIC = {
|
|
19
|
+
async bin(path, opts = {}) {
|
|
20
|
+
const mgr = new BinManager(path, opts);
|
|
21
|
+
const actions = new BinFileAction(mgr);
|
|
22
|
+
await actions.init();
|
|
23
|
+
return actions;
|
|
24
|
+
}
|
|
25
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxn0brp/db-storage-bin",
|
|
3
|
-
"version": "0.100.
|
|
3
|
+
"version": "0.100.2",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"author": "wxn0brP",
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
"vdb-adapter"
|
|
19
19
|
],
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@types/
|
|
22
|
-
"@wxn0brp/db-core": "
|
|
23
|
-
"tsc-alias": "
|
|
24
|
-
"typescript": "
|
|
21
|
+
"@types/bun": "*",
|
|
22
|
+
"@wxn0brp/db-core": "^0.10.3",
|
|
23
|
+
"tsc-alias": "^1",
|
|
24
|
+
"typescript": "^6"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@msgpack/msgpack": "^3.1.3"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@wxn0brp/db-core": "
|
|
30
|
+
"@wxn0brp/db-core": "^0.10.3"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist"
|