bitcompass 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/index.js +9 -1
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -2,6 +2,9 @@
2
2
  import 'dotenv/config';
3
3
  import chalk from 'chalk';
4
4
  import { Command } from 'commander';
5
+ import { readFileSync } from 'fs';
6
+ import { dirname, join } from 'path';
7
+ import { fileURLToPath } from 'url';
5
8
  import { runConfigGet, runConfigList, runConfigSet } from './commands/config-cmd.js';
6
9
  import { runInit } from './commands/init.js';
7
10
  import { runLogin } from './commands/login.js';
@@ -11,11 +14,16 @@ import { runLog } from './commands/log.js';
11
14
  import { runRulesList, runRulesPull, runRulesPush, runRulesSearch } from './commands/rules.js';
12
15
  import { runSolutionsPull, runSolutionsPush, runSolutionsSearch } from './commands/solutions.js';
13
16
  import { runWhoami } from './commands/whoami.js';
17
+ // Read version from package.json
18
+ const __dirname = dirname(fileURLToPath(import.meta.url));
19
+ const packageJsonPath = join(__dirname, '..', 'package.json');
20
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
21
+ const version = packageJson.version;
14
22
  const program = new Command();
15
23
  program
16
24
  .name('bitcompass')
17
25
  .description('BitCompass CLI - rules, solutions, and MCP server')
18
- .version('0.1.0');
26
+ .version(version, '-v, -V, --version', 'display version number');
19
27
  program
20
28
  .command('login')
21
29
  .description('Log in with Google (opens browser)')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bitcompass",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "BitCompass CLI - rules, solutions, and MCP server",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,6 @@
10
10
  "build": "tsc",
11
11
  "dev": "tsc --watch",
12
12
  "start": "node dist/index.js",
13
- "publish": "npm publish --access public",
14
13
  "prepare": "npm run build",
15
14
  "postinstall": "node scripts/postinstall.js"
16
15
  },