@wipcomputer/wip-repos 1.9.31 → 1.9.34

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 (2) hide show
  1. package/cli.mjs +10 -1
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -12,7 +12,16 @@
12
12
  */
13
13
 
14
14
  import { check, planSync, executeSync, addRepo, moveRepo, generateReadmeTree, loadManifest } from './core.mjs';
15
- import { resolve, dirname } from 'node:path';
15
+ import { resolve, dirname, join } from 'node:path';
16
+ import { readFileSync } from 'node:fs';
17
+ import { fileURLToPath } from 'node:url';
18
+
19
+ if (process.argv.includes('--version') || process.argv.includes('-v')) {
20
+ const __dirname = dirname(fileURLToPath(import.meta.url));
21
+ const pkg = JSON.parse(readFileSync(join(__dirname, 'package.json'), 'utf8'));
22
+ console.log(pkg.version);
23
+ process.exit(0);
24
+ }
16
25
 
17
26
  const args = process.argv.slice(2);
18
27
  const command = args[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-repos",
3
- "version": "1.9.31",
3
+ "version": "1.9.34",
4
4
  "type": "module",
5
5
  "description": "Repo manifest reconciler. Single source of truth for repo organization. Like prettier for folder structure.",
6
6
  "main": "core.mjs",