agent-resource-management 2.1.3 → 2.1.4
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/main.js +8 -0
- package/package.json +1 -1
- package/src/main.ts +10 -0
- package/dist/test.md +0 -3
- package/dist/test2.md +0 -3
package/dist/main.js
CHANGED
|
@@ -1976,10 +1976,18 @@ function setServer(url) {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
|
|
1978
1978
|
// src/main.ts
|
|
1979
|
+
import { readFileSync as readFileSync4 } from "fs";
|
|
1980
|
+
import { join as join6 } from "path";
|
|
1981
|
+
var __dirname = "/Users/lk/Documents/Dev/aims/xuanwu/xuanwu-agents/agent-resource-management/cli/src";
|
|
1979
1982
|
var args = process.argv.slice(2);
|
|
1980
1983
|
var command = args[0];
|
|
1981
1984
|
var subCommand = args[1];
|
|
1985
|
+
var VERSION = JSON.parse(readFileSync4(join6(__dirname, "../package.json"), "utf-8")).version;
|
|
1982
1986
|
async function main() {
|
|
1987
|
+
if (command === "--version" || command === "-v") {
|
|
1988
|
+
console.log(`arm v${VERSION}`);
|
|
1989
|
+
return;
|
|
1990
|
+
}
|
|
1983
1991
|
switch (command) {
|
|
1984
1992
|
case "register":
|
|
1985
1993
|
if (args[1] && args[1].startsWith("--")) {
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -5,11 +5,21 @@ import { listKnowledge, searchKnowledge, infoKnowledge, downloadKnowledge, uploa
|
|
|
5
5
|
import { showServer, setServer } from './cmd/server';
|
|
6
6
|
import { getOutputMode, setOutputMode } from './lib/output';
|
|
7
7
|
|
|
8
|
+
import { readFileSync } from 'fs';
|
|
9
|
+
import { join } from 'path';
|
|
10
|
+
|
|
8
11
|
const args = process.argv.slice(2);
|
|
9
12
|
const command = args[0];
|
|
10
13
|
const subCommand = args[1];
|
|
11
14
|
|
|
15
|
+
const VERSION = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8')).version;
|
|
16
|
+
|
|
12
17
|
async function main() {
|
|
18
|
+
if (command === '--version' || command === '-v') {
|
|
19
|
+
console.log(`arm v${VERSION}`);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
13
23
|
switch (command) {
|
|
14
24
|
case 'register':
|
|
15
25
|
if (args[1] && args[1].startsWith('--')) {
|
package/dist/test.md
DELETED
package/dist/test2.md
DELETED