@rglabs/butterfly 3.0.0 → 3.0.1
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/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { program } from 'commander';
|
|
3
3
|
import { config } from 'dotenv';
|
|
4
|
+
import { readFileSync } from 'fs';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { dirname, join } from 'path';
|
|
4
7
|
import setupCommand from './commands/setup.js';
|
|
5
8
|
import downloadCommand from './commands/download.js';
|
|
6
9
|
import uploadCommand from './commands/upload.js';
|
|
@@ -14,10 +17,13 @@ import syncDocsCommand from './commands/sync-docs.js';
|
|
|
14
17
|
import translateCommand from './commands/translate.js';
|
|
15
18
|
import viewReportCommand from './commands/view-report.js';
|
|
16
19
|
config();
|
|
20
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
21
|
+
const __dirname = dirname(__filename);
|
|
22
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
17
23
|
program
|
|
18
24
|
.name('butterfly-cli')
|
|
19
25
|
.description('CLI tool to download resources from the Butterfly platform')
|
|
20
|
-
.version(
|
|
26
|
+
.version(pkg.version);
|
|
21
27
|
program
|
|
22
28
|
.command('setup')
|
|
23
29
|
.description('Configure authentication for the Butterfly platform')
|