@alfe.ai/openclaw-database 0.0.10 → 0.0.11
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/plugin2.cjs +3 -1
- package/dist/plugin2.js +3 -1
- package/openclaw.plugin.json +0 -1
- package/package.json +1 -1
package/dist/plugin2.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
let mongodb = require("mongodb");
|
|
2
2
|
let _alfe_ai_config = require("@alfe.ai/config");
|
|
3
|
+
let node_module = require("node:module");
|
|
3
4
|
//#region src/tools.ts
|
|
4
5
|
const DEFAULT_DB = "org_default";
|
|
5
6
|
function str(required = true) {
|
|
@@ -428,6 +429,7 @@ function registerTools(api, _client, _databases, audit, lazyInit) {
|
|
|
428
429
|
}
|
|
429
430
|
//#endregion
|
|
430
431
|
//#region src/plugin.ts
|
|
432
|
+
const pkg = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("../package.json");
|
|
431
433
|
let mongoClient = null;
|
|
432
434
|
let initPromise = null;
|
|
433
435
|
async function fetchCredentials(apiUrl, apiKey) {
|
|
@@ -485,7 +487,7 @@ function reportAudit(apiUrl, apiKey, entry) {
|
|
|
485
487
|
const plugin = {
|
|
486
488
|
id: "@alfe.ai/openclaw-database",
|
|
487
489
|
name: "Alfe Database",
|
|
488
|
-
version:
|
|
490
|
+
version: pkg.version,
|
|
489
491
|
activate(api) {
|
|
490
492
|
const log = api.logger;
|
|
491
493
|
log.info("Database plugin activating...");
|
package/dist/plugin2.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
1
2
|
import { MongoClient } from "mongodb";
|
|
2
3
|
import { resolveConfig } from "@alfe.ai/config";
|
|
3
4
|
//#region src/tools.ts
|
|
@@ -428,6 +429,7 @@ function registerTools(api, _client, _databases, audit, lazyInit) {
|
|
|
428
429
|
}
|
|
429
430
|
//#endregion
|
|
430
431
|
//#region src/plugin.ts
|
|
432
|
+
const pkg = createRequire(import.meta.url)("../package.json");
|
|
431
433
|
let mongoClient = null;
|
|
432
434
|
let initPromise = null;
|
|
433
435
|
async function fetchCredentials(apiUrl, apiKey) {
|
|
@@ -485,7 +487,7 @@ function reportAudit(apiUrl, apiKey, entry) {
|
|
|
485
487
|
const plugin = {
|
|
486
488
|
id: "@alfe.ai/openclaw-database",
|
|
487
489
|
name: "Alfe Database",
|
|
488
|
-
version:
|
|
490
|
+
version: pkg.version,
|
|
489
491
|
activate(api) {
|
|
490
492
|
const log = api.logger;
|
|
491
493
|
log.info("Database plugin activating...");
|
package/openclaw.plugin.json
CHANGED