soulsync 1.0.20 → 1.0.22

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +8 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soulsync",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "SoulSync plugin for OpenClaw - cross-bot memory synchronization",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/config.js CHANGED
@@ -5,15 +5,15 @@ const os = require('os');
5
5
  let config = null;
6
6
 
7
7
  function getPluginDir() {
8
- return path.dirname(__filename);
8
+ return path.dirname(path.dirname(__filename));
9
9
  }
10
10
 
11
11
  function loadConfig() {
12
12
  if (config) return config;
13
-
14
- const pluginDir = path.dirname(__filename);
13
+
14
+ const pluginDir = getPluginDir();
15
15
  const configPath = path.join(pluginDir, 'config.json');
16
-
16
+
17
17
  try {
18
18
  if (fs.existsSync(configPath)) {
19
19
  config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
@@ -26,9 +26,9 @@ function loadConfig() {
26
26
  }
27
27
 
28
28
  function saveConfig(newConfig) {
29
- const pluginDir = path.dirname(__filename);
29
+ const pluginDir = getPluginDir();
30
30
  const configPath = path.join(pluginDir, 'config.json');
31
-
31
+
32
32
  try {
33
33
  let existing = {};
34
34
  if (fs.existsSync(configPath)) {
@@ -44,9 +44,9 @@ function saveConfig(newConfig) {
44
44
  }
45
45
 
46
46
  function clearConfig() {
47
- const pluginDir = path.dirname(__filename);
47
+ const pluginDir = getPluginDir();
48
48
  const configPath = path.join(pluginDir, 'config.json');
49
-
49
+
50
50
  try {
51
51
  if (fs.existsSync(configPath)) {
52
52
  const existing = JSON.parse(fs.readFileSync(configPath, 'utf-8'));