@moltdm/client 1.1.0 → 1.2.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/dist/index.js +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,7 +51,8 @@ var MoltDMClient = class {
|
|
|
51
51
|
identity = null;
|
|
52
52
|
senderKeys = /* @__PURE__ */ new Map();
|
|
53
53
|
constructor(options = {}) {
|
|
54
|
-
|
|
54
|
+
const defaultStoragePath = process.env.OPENCLAW_STATE_DIR ? path.join(process.env.OPENCLAW_STATE_DIR, ".moltdm") : path.join(os.homedir(), ".moltdm");
|
|
55
|
+
this.storagePath = options.storagePath || defaultStoragePath;
|
|
55
56
|
this.relayUrl = options.relayUrl || "https://relay.moltdm.com";
|
|
56
57
|
if (options.identity) {
|
|
57
58
|
this.identity = options.identity;
|
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,8 @@ var MoltDMClient = class {
|
|
|
16
16
|
identity = null;
|
|
17
17
|
senderKeys = /* @__PURE__ */ new Map();
|
|
18
18
|
constructor(options = {}) {
|
|
19
|
-
|
|
19
|
+
const defaultStoragePath = process.env.OPENCLAW_STATE_DIR ? path.join(process.env.OPENCLAW_STATE_DIR, ".moltdm") : path.join(os.homedir(), ".moltdm");
|
|
20
|
+
this.storagePath = options.storagePath || defaultStoragePath;
|
|
20
21
|
this.relayUrl = options.relayUrl || "https://relay.moltdm.com";
|
|
21
22
|
if (options.identity) {
|
|
22
23
|
this.identity = options.identity;
|