beanbagdb 0.5.52 → 0.5.54

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.
@@ -1 +1,23 @@
1
- # How to use plugins
1
+ # How to use plugins
2
+
3
+ ```
4
+ // MyPlugin.js
5
+ const MyPlugin = {
6
+ // This function will be bound to the class instance (passed as 'thisArg')
7
+ on_load: async function(instance) {
8
+ console.log("Plugin loaded with instance:", instance);
9
+ // You can access instance properties and methods here
10
+ instance.someMethod();
11
+ },
12
+
13
+ // Another plugin function
14
+ doSomething: function(instance, arg) {
15
+ console.log("Plugin doing something with arg:", arg);
16
+ // Access the class instance here as 'instance'
17
+ instance.someMethod();
18
+ }
19
+ };
20
+
21
+ export default MyPlugin;
22
+
23
+ ```
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "beanbagdb",
3
- "version": "0.5.52",
3
+ "version": "0.5.54",
4
4
  "description": "A JS library to introduce a schema layer to a No-SQL local database",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
7
7
  "type": "module",
8
8
  "scripts": {
9
- "test": "mocha",
9
+ "test": "mocha;rm -rf test_database_*/;",
10
10
  "docgen": "npx jsdoc -c jsdoc.json"
11
11
  },
12
12
  "repository": {
@@ -29,6 +29,7 @@
29
29
  "devDependencies": {
30
30
  "ajv": "^8.17.1",
31
31
  "chai": "^5.1.1",
32
+ "chai-as-promised": "^8.0.0",
32
33
  "dotenv": "^16.4.5",
33
34
  "jsdoc": "^4.0.3",
34
35
  "mocha": "^10.7.3",