@jpetit/toolkit 3.0.6 → 3.0.7
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/package.json +1 -1
- package/toolkit/index.ts +9 -3
package/package.json
CHANGED
package/toolkit/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
3
|
import { confirm } from '@inquirer/prompts'
|
|
4
|
-
|
|
5
4
|
import { program } from '@commander-js/extra-typings'
|
|
6
5
|
import { ai } from './ai'
|
|
7
6
|
import { compilers } from './compilers'
|
|
@@ -11,13 +10,20 @@ import { create } from './create'
|
|
|
11
10
|
import { doctor } from './doctor'
|
|
12
11
|
import { init } from './init'
|
|
13
12
|
import { verify } from './verify'
|
|
13
|
+
import { readFileSync } from 'fs'
|
|
14
|
+
import { fileURLToPath } from 'url'
|
|
15
|
+
import { dirname, join } from 'path'
|
|
16
|
+
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
18
|
+
const __dirname = join(dirname(__filename), '..')
|
|
19
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8'))
|
|
20
|
+
|
|
21
|
+
program.version(packageJson.version as string)
|
|
14
22
|
|
|
15
23
|
program.name('jutge-toolkit')
|
|
16
24
|
|
|
17
25
|
program.description('Toolkit to prepare problems for Jutge.org')
|
|
18
26
|
|
|
19
|
-
program.version('3.0.0')
|
|
20
|
-
|
|
21
27
|
program.addCommand(init)
|
|
22
28
|
program.addCommand(create)
|
|
23
29
|
program.addCommand(make)
|