opencode-sync-plugin 0.3.1 → 0.3.2

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/dist/cli.js +11 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -141,17 +141,20 @@ function verify() {
141
141
  );
142
142
  console.log();
143
143
  }
144
- const opencodeConfigPath = join(
145
- homedir(),
146
- ".config",
147
- "opencode",
148
- "opencode.json"
149
- );
150
- const projectConfigPath = join(process.cwd(), "opencode.json");
144
+ const configDir = join(homedir(), ".config", "opencode");
145
+ const globalJsonConfig = join(configDir, "opencode.json");
146
+ const globalJsoncConfig = join(configDir, "opencode.jsonc");
147
+ const projectJsonConfig = join(process.cwd(), "opencode.json");
148
+ const projectJsoncConfig = join(process.cwd(), "opencode.jsonc");
151
149
  let configFound = false;
152
150
  let configPath = "";
153
151
  let pluginRegistered = false;
154
- for (const path of [opencodeConfigPath, projectConfigPath]) {
152
+ for (const path of [
153
+ globalJsonConfig,
154
+ globalJsoncConfig,
155
+ projectJsonConfig,
156
+ projectJsoncConfig
157
+ ]) {
155
158
  if (existsSync(path)) {
156
159
  configFound = true;
157
160
  configPath = path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-sync-plugin",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Sync your OpenCode sessions to the OpenSync dashboard",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",