@webmate-studio/cli 0.2.22 → 0.2.23

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 (3) hide show
  1. package/bin/wm.js +7 -1
  2. package/bin/wm.mjs +7 -1
  3. package/package.json +1 -1
package/bin/wm.js CHANGED
@@ -10,13 +10,19 @@ import { generate } from '../src/commands/generate.js';
10
10
  import { logout } from '../src/commands/logout.js';
11
11
  import { info } from '../src/commands/info.js';
12
12
  import { switchCommand } from '../src/commands/switch.js';
13
+ import { readFileSync } from 'fs';
14
+ import { fileURLToPath } from 'url';
15
+ import { dirname, join } from 'path';
16
+
17
+ const __dirname = dirname(fileURLToPath(import.meta.url));
18
+ const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
13
19
 
14
20
  const program = new Command();
15
21
 
16
22
  program
17
23
  .name('wm')
18
24
  .description('Webmate Component CLI - Build and manage HTML-first components')
19
- .version('0.1.0');
25
+ .version(packageJson.version);
20
26
 
21
27
  // wm login - Login to CMS
22
28
  program
package/bin/wm.mjs CHANGED
@@ -10,13 +10,19 @@ import { generate } from '../src/commands/generate.js';
10
10
  import { logout } from '../src/commands/logout.js';
11
11
  import { info } from '../src/commands/info.js';
12
12
  import { switchCommand } from '../src/commands/switch.js';
13
+ import { readFileSync } from 'fs';
14
+ import { fileURLToPath } from 'url';
15
+ import { dirname, join } from 'path';
16
+
17
+ const __dirname = dirname(fileURLToPath(import.meta.url));
18
+ const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
13
19
 
14
20
  const program = new Command();
15
21
 
16
22
  program
17
23
  .name('wm')
18
24
  .description('Webmate Component CLI - Build and manage HTML-first components')
19
- .version('0.1.0');
25
+ .version(packageJson.version);
20
26
 
21
27
  // wm login - Login to CMS
22
28
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webmate-studio/cli",
3
- "version": "0.2.22",
3
+ "version": "0.2.23",
4
4
  "type": "module",
5
5
  "description": "Webmate Studio CLI - Build and manage your Webmate components",
6
6
  "keywords": [