@mockingbird_konwlage_cli/cli 1.2.5 → 1.2.6
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/index.js +0 -13
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -29,19 +29,6 @@ program
|
|
|
29
29
|
// Configuration discovery logic
|
|
30
30
|
let apiBaseUrl = process.env.MOCKINGBIRD_API_URL;
|
|
31
31
|
|
|
32
|
-
if (!apiBaseUrl) {
|
|
33
|
-
// Priority 1: ~/.mockingbirdrc (Global config)
|
|
34
|
-
const rcPath = path.join(os.homedir(), '.mockingbirdrc');
|
|
35
|
-
if (fs.existsSync(rcPath)) {
|
|
36
|
-
try {
|
|
37
|
-
const rc = JSON.parse(fs.readFileSync(rcPath, 'utf8'));
|
|
38
|
-
apiBaseUrl = isRemote ? rc.RemoteApiBaseUrl : rc.ApiBaseUrl;
|
|
39
|
-
} catch (e) {
|
|
40
|
-
console.warn(chalk.yellow(`[Warning] Failed to parse ~/.mockingbirdrc: ${e.message}`));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
32
|
// Final fallback to production API
|
|
46
33
|
const API_BASE_URL = apiBaseUrl || 'https://api.aigcclub.com.cn';
|
|
47
34
|
const apiUrl = `${API_BASE_URL}/api/public/skills/raw/${slug}`;
|