@grafema/cli 0.2.1-beta → 0.2.2-beta

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 CHANGED
@@ -3,6 +3,9 @@
3
3
  * @grafema/cli - CLI for Grafema code analysis toolkit
4
4
  */
5
5
  import { Command } from 'commander';
6
+ import { readFileSync } from 'fs';
7
+ import { fileURLToPath } from 'url';
8
+ import { dirname, join } from 'path';
6
9
  import { initCommand } from './commands/init.js';
7
10
  import { analyzeCommand } from './commands/analyze.js';
8
11
  import { overviewCommand } from './commands/overview.js';
@@ -20,11 +23,14 @@ import { coverageCommand } from './commands/coverage.js';
20
23
  import { doctorCommand } from './commands/doctor.js';
21
24
  import { schemaCommand } from './commands/schema.js';
22
25
  import { explainCommand } from './commands/explain.js';
26
+ // Read version from package.json
27
+ const __dirname = dirname(fileURLToPath(import.meta.url));
28
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
23
29
  const program = new Command();
24
30
  program
25
31
  .name('grafema')
26
32
  .description('Grafema code analysis CLI')
27
- .version('0.1.0-alpha.1');
33
+ .version(pkg.version);
28
34
  // Commands in logical order
29
35
  program.addCommand(initCommand);
30
36
  program.addCommand(analyzeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafema/cli",
3
- "version": "0.2.1-beta",
3
+ "version": "0.2.2-beta",
4
4
  "description": "CLI for Grafema code analysis toolkit",
5
5
  "type": "module",
6
6
  "main": "./dist/cli.js",
@@ -37,8 +37,8 @@
37
37
  "ink-text-input": "^6.0.0",
38
38
  "react": "^19.2.3",
39
39
  "yaml": "^2.8.2",
40
- "@grafema/core": "0.2.0-beta",
41
- "@grafema/types": "0.2.0-beta"
40
+ "@grafema/core": "0.2.1-beta",
41
+ "@grafema/types": "0.2.1-beta"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/node": "^25.0.8",
package/src/cli.ts CHANGED
@@ -4,6 +4,9 @@
4
4
  */
5
5
 
6
6
  import { Command } from 'commander';
7
+ import { readFileSync } from 'fs';
8
+ import { fileURLToPath } from 'url';
9
+ import { dirname, join } from 'path';
7
10
  import { initCommand } from './commands/init.js';
8
11
  import { analyzeCommand } from './commands/analyze.js';
9
12
  import { overviewCommand } from './commands/overview.js';
@@ -22,12 +25,16 @@ import { doctorCommand } from './commands/doctor.js';
22
25
  import { schemaCommand } from './commands/schema.js';
23
26
  import { explainCommand } from './commands/explain.js';
24
27
 
28
+ // Read version from package.json
29
+ const __dirname = dirname(fileURLToPath(import.meta.url));
30
+ const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
31
+
25
32
  const program = new Command();
26
33
 
27
34
  program
28
35
  .name('grafema')
29
36
  .description('Grafema code analysis CLI')
30
- .version('0.1.0-alpha.1');
37
+ .version(pkg.version);
31
38
 
32
39
  // Commands in logical order
33
40
  program.addCommand(initCommand);