s3db.js 7.4.2 → 8.0.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/PLUGINS.md +3 -3
- package/dist/s3db.cjs.js +516 -349
- package/dist/s3db.cjs.min.js +1 -1
- package/dist/s3db.d.ts +10 -0
- package/dist/s3db.es.js +516 -349
- package/dist/s3db.es.min.js +1 -1
- package/dist/s3db.iife.js +517 -351
- package/dist/s3db.iife.min.js +1 -1
- package/mcp/README.md +1062 -0
- package/mcp/server.js +1 -1
- package/package.json +31 -29
- package/src/client.class.js +26 -5
- package/src/database.class.js +151 -0
- package/src/plugins/audit.plugin.js +143 -310
- package/src/plugins/cache/filesystem-cache.class.js +40 -11
- package/src/plugins/cache.plugin.js +95 -47
- package/src/plugins/fulltext.plugin.js +21 -0
- package/src/plugins/metrics.plugin.js +21 -6
- package/src/plugins/replicator.plugin.js +65 -70
- package/src/resource.class.js +3 -2
- package/src/s3db.d.ts +10 -0
package/PLUGINS.md
CHANGED
|
@@ -81,7 +81,7 @@ await users.list(); // Cached result
|
|
|
81
81
|
|
|
82
82
|
| Parameter | Type | Default | Description |
|
|
83
83
|
|-----------|------|---------|-------------|
|
|
84
|
-
| `
|
|
84
|
+
| `driver` | string | `'s3'` | Cache driver: `'memory'` or `'s3'` |
|
|
85
85
|
| `ttl` | number | `300000` | Time-to-live in milliseconds (5 minutes) |
|
|
86
86
|
| `maxSize` | number | `1000` | Maximum number of items in cache (memory driver) |
|
|
87
87
|
| `includePartitions` | boolean | `true` | Include partition values in cache keys |
|
|
@@ -113,7 +113,7 @@ import { S3db, CachePlugin } from 's3db.js';
|
|
|
113
113
|
const s3db = new S3db({
|
|
114
114
|
connectionString: "s3://ACCESS_KEY:SECRET_KEY@BUCKET_NAME/databases/myapp",
|
|
115
115
|
plugins: [new CachePlugin({
|
|
116
|
-
|
|
116
|
+
driver: 'memory',
|
|
117
117
|
ttl: 600000, // 10 minutes
|
|
118
118
|
maxSize: 500
|
|
119
119
|
})]
|
|
@@ -3887,7 +3887,7 @@ const s3db = new S3db({
|
|
|
3887
3887
|
plugins: [
|
|
3888
3888
|
// Performance optimization
|
|
3889
3889
|
new CachePlugin({
|
|
3890
|
-
|
|
3890
|
+
driver: 'memory',
|
|
3891
3891
|
ttl: 600000
|
|
3892
3892
|
}),
|
|
3893
3893
|
|