@bazilio-san/glm-cc 1.0.8 → 1.0.11
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/bin/glm.js +10 -1
- package/package.json +1 -1
package/bin/glm.js
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import os from 'node:os';
|
|
5
5
|
import fs from 'node:fs';
|
|
6
|
+
import { createRequire } from 'node:module';
|
|
7
|
+
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
const pkg = require('../package.json');
|
|
6
10
|
import readline from 'node:readline';
|
|
7
11
|
import { spawn } from 'node:child_process';
|
|
8
12
|
|
|
@@ -16,7 +20,7 @@ const CONFIG_FIELDS = [
|
|
|
16
20
|
},
|
|
17
21
|
{
|
|
18
22
|
key: 'ANTHROPIC_AUTH_TOKEN',
|
|
19
|
-
label: 'Anthropic Auth Token
|
|
23
|
+
label: 'Anthropic Auth Token',
|
|
20
24
|
defaultValue: '',
|
|
21
25
|
},
|
|
22
26
|
{
|
|
@@ -121,6 +125,11 @@ function launchClaude(config) {
|
|
|
121
125
|
async function main() {
|
|
122
126
|
const args = process.argv.slice(2);
|
|
123
127
|
|
|
128
|
+
if (args.includes('-v') || args.includes('-V') || args.includes('--version') || args.includes('-version')) {
|
|
129
|
+
console.log(pkg.version);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
124
133
|
if (args.includes('-h') || args.includes('--help')) {
|
|
125
134
|
showHelp(loadConfig());
|
|
126
135
|
return;
|