@mockingbird_konwlage_cli/cli 1.2.0 → 1.2.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/index.js +15 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -11,7 +11,7 @@ const program = new Command();
11
11
  program
12
12
  .name('mockingbird-cli')
13
13
  .description('Installs and manages AI skills for various coding clients')
14
- .version('1.2.0');
14
+ .version('1.2.2');
15
15
 
16
16
  program
17
17
  .command('add <slug>')
@@ -29,7 +29,7 @@ program
29
29
  let apiBaseUrl = process.env.MOCKINGBIRD_API_URL;
30
30
 
31
31
  if (!apiBaseUrl) {
32
- // Check .mockingbirdrc in current directory
32
+ // Priority 1: .mockingbirdrc
33
33
  const rcPath = path.join(process.cwd(), '.mockingbirdrc');
34
34
  if (fs.existsSync(rcPath)) {
35
35
  try {
@@ -42,15 +42,24 @@ program
42
42
  }
43
43
 
44
44
  if (!apiBaseUrl) {
45
- // Check appsettings.json in current directory
45
+ // Priority 2: appsettings.Production.json (useful for server environments)
46
+ const prodSettingsPath = path.join(process.cwd(), 'appsettings.Production.json');
47
+ if (fs.existsSync(prodSettingsPath)) {
48
+ try {
49
+ const settings = JSON.parse(fs.readFileSync(prodSettingsPath, 'utf8'));
50
+ apiBaseUrl = settings.ApiBaseUrl;
51
+ } catch (e) { }
52
+ }
53
+ }
54
+
55
+ if (!apiBaseUrl) {
56
+ // Priority 3: appsettings.json
46
57
  const appSettingsPath = path.join(process.cwd(), 'appsettings.json');
47
58
  if (fs.existsSync(appSettingsPath)) {
48
59
  try {
49
60
  const settings = JSON.parse(fs.readFileSync(appSettingsPath, 'utf8'));
50
61
  apiBaseUrl = settings.ApiBaseUrl;
51
- } catch (e) {
52
- // Ignore parsing errors for general appsettings
53
- }
62
+ } catch (e) { }
54
63
  }
55
64
  }
56
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mockingbird_konwlage_cli/cli",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Mockingbird AI Developer Client CLI",
5
5
  "main": "index.js",
6
6
  "bin": {