gitnexushub 0.2.4 → 0.2.5
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 +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
* disconnect Remove all GitNexus config, skills, and project files
|
|
8
8
|
* index Trigger indexing for a GitHub repo on the Hub
|
|
9
9
|
*/
|
|
10
|
+
import { createRequire } from 'module';
|
|
10
11
|
import { Command } from 'commander';
|
|
11
12
|
import pc from 'picocolors';
|
|
13
|
+
const require = createRequire(import.meta.url);
|
|
14
|
+
const PKG_VERSION = require('../package.json').version;
|
|
12
15
|
import { loadConfig, saveConfig, clearConfig } from './config.js';
|
|
13
16
|
import { HubAPI } from './api.js';
|
|
14
17
|
import { isGitRepo, getGitRemoteUrl, parseGitRemote, matchRepo } from './project.js';
|
|
@@ -84,7 +87,7 @@ const program = new Command();
|
|
|
84
87
|
program
|
|
85
88
|
.name('gnx')
|
|
86
89
|
.description('Connect your editor to GitNexus Hub')
|
|
87
|
-
.version(
|
|
90
|
+
.version(PKG_VERSION);
|
|
88
91
|
// ─── Default command: connect ─────────────────────────────────────
|
|
89
92
|
const connectOpts = (cmd) => cmd
|
|
90
93
|
.argument('[token]', 'gnx_ API token (optional if already saved)')
|
package/package.json
CHANGED