@wafflebase/cli 0.2.0 → 0.3.0
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/commands/root.js +4 -1
- package/package.json +1 -1
package/dist/commands/root.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
1
2
|
import { Command } from 'commander';
|
|
2
3
|
import { resolveConfig } from '../config/config.js';
|
|
3
4
|
import { HttpClient } from '../client/http-client.js';
|
|
5
|
+
const require = createRequire(import.meta.url);
|
|
6
|
+
const { version } = require('../../package.json');
|
|
4
7
|
export function getGlobalOpts(cmd) {
|
|
5
8
|
const root = cmd.optsWithGlobals();
|
|
6
9
|
return root;
|
|
@@ -21,7 +24,7 @@ export function createProgram() {
|
|
|
21
24
|
program
|
|
22
25
|
.name('wafflebase')
|
|
23
26
|
.description('CLI for Wafflebase spreadsheet API')
|
|
24
|
-
.version(
|
|
27
|
+
.version(version)
|
|
25
28
|
.option('--server <url>', 'Server URL')
|
|
26
29
|
.option('--api-key <key>', 'API key')
|
|
27
30
|
.option('--workspace <id>', 'Workspace ID')
|