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.
- package/dist/cli.js +11 -8
- 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
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
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 [
|
|
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;
|