@receptron/graphai_cli 0.4.5 → 0.4.6
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/lib/docs.js +3 -2
- package/lib/graphai_cli.js +4 -5
- package/lib/options.d.ts +1 -1
- package/package.json +7 -12
package/lib/docs.js
CHANGED
|
@@ -94,6 +94,7 @@ const IndexMd = (ret) => {
|
|
|
94
94
|
};
|
|
95
95
|
const main = () => {
|
|
96
96
|
const ret = {};
|
|
97
|
+
const base_path = __dirname + "/../../../docs/agentDocs/";
|
|
97
98
|
Object.values(packages).map((agent) => {
|
|
98
99
|
const md = agentMd(agent);
|
|
99
100
|
agent.category.map(async (cat) => {
|
|
@@ -101,13 +102,13 @@ const main = () => {
|
|
|
101
102
|
ret[cat] = {};
|
|
102
103
|
}
|
|
103
104
|
ret[cat][agent.name] = agent.name;
|
|
104
|
-
const catDir = path_1.default.resolve(
|
|
105
|
+
const catDir = path_1.default.resolve(base_path + cat);
|
|
105
106
|
await fs_1.default.promises.mkdir(catDir, { recursive: true });
|
|
106
107
|
fs_1.default.writeFileSync(catDir + "/" + agent.name + ".md", md);
|
|
107
108
|
});
|
|
108
109
|
});
|
|
109
110
|
// console.log(ret);
|
|
110
111
|
const index = IndexMd(ret);
|
|
111
|
-
fs_1.default.writeFileSync(
|
|
112
|
+
fs_1.default.writeFileSync(base_path + "/README.md", index);
|
|
112
113
|
};
|
|
113
114
|
main();
|
package/lib/graphai_cli.js
CHANGED
|
@@ -34,8 +34,7 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
34
34
|
const path_1 = __importDefault(require("path"));
|
|
35
35
|
const yaml_1 = __importDefault(require("yaml"));
|
|
36
36
|
const args_1 = require("./args");
|
|
37
|
-
const
|
|
38
|
-
const file_utils_1 = require("./file_utils");
|
|
37
|
+
const test_utils_1 = require("@graphai/test_utils");
|
|
39
38
|
const options_1 = require("./options");
|
|
40
39
|
const mermaid_1 = require("./mermaid");
|
|
41
40
|
const fileFullPath = (file) => {
|
|
@@ -53,10 +52,10 @@ const main = async () => {
|
|
|
53
52
|
}
|
|
54
53
|
if (args_1.args.log) {
|
|
55
54
|
const logfile = fileFullPath(args_1.args.log);
|
|
56
|
-
(0,
|
|
55
|
+
(0, test_utils_1.mkdirLogDir)(path_1.default.dirname(logfile));
|
|
57
56
|
}
|
|
58
57
|
try {
|
|
59
|
-
const graph_data = (0,
|
|
58
|
+
const graph_data = (0, test_utils_1.readGraphaiData)(file_path);
|
|
60
59
|
if (args_1.args.mermaid) {
|
|
61
60
|
(0, mermaid_1.mermaid)(graph_data);
|
|
62
61
|
return;
|
|
@@ -71,7 +70,7 @@ const main = async () => {
|
|
|
71
70
|
}
|
|
72
71
|
const graph = new graphai_1.GraphAI(graph_data, packages);
|
|
73
72
|
if (args_1.args.verbose) {
|
|
74
|
-
graph.onLogCallback =
|
|
73
|
+
graph.onLogCallback = test_utils_1.callbackLog;
|
|
75
74
|
}
|
|
76
75
|
try {
|
|
77
76
|
const results = await graph.run();
|
package/lib/options.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receptron/graphai_cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"description": "GraphAI command line tools.",
|
|
5
5
|
"main": "lib/graphai_cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,9 @@
|
|
|
14
14
|
"eslint": "eslint --fix",
|
|
15
15
|
"doc": "npx ts-node -r tsconfig-paths/register src/docs.ts",
|
|
16
16
|
"format": "prettier --write '{src,test_yaml,samples}/**/*.{yaml,ts,json}'",
|
|
17
|
-
"test": "
|
|
17
|
+
"test": "yarn run test_sh",
|
|
18
|
+
"test_sh": "./scripts/test.sh",
|
|
19
|
+
"test_node": "node --test -r tsconfig-paths/register --require ts-node/register ./test_yaml/test_*.ts",
|
|
18
20
|
"cli": "npx ts-node -r tsconfig-paths/register ./src/graphai_cli.ts",
|
|
19
21
|
"b": "yarn run format && yarn run eslint && yarn run build"
|
|
20
22
|
},
|
|
@@ -30,20 +32,13 @@
|
|
|
30
32
|
"homepage": "https://github.com/receptron/graphai_cli#readme",
|
|
31
33
|
"devDependencies": {
|
|
32
34
|
"@types/json-schema-generator": "^2.0.3",
|
|
33
|
-
"@types/
|
|
34
|
-
"@types/yargs": "^17.0.32",
|
|
35
|
-
"eslint": "^9.3.0",
|
|
36
|
-
"prettier": "^3.2.5",
|
|
37
|
-
"ts-node": "^10.9.2",
|
|
38
|
-
"tsc-alias": "^1.8.8",
|
|
39
|
-
"tsconfig-paths": "^4.2.0",
|
|
40
|
-
"typescript": "^5.4.5",
|
|
41
|
-
"typescript-eslint": "^7.9.0"
|
|
35
|
+
"@types/yargs": "^17.0.32"
|
|
42
36
|
},
|
|
43
37
|
"dependencies": {
|
|
44
38
|
"@graphai/agents": "^0.0.2",
|
|
39
|
+
"@graphai/test_utils": "^0.0.1",
|
|
45
40
|
"dotenv": "^16.4.5",
|
|
46
|
-
"graphai": "^0.4.
|
|
41
|
+
"graphai": "^0.4.6",
|
|
47
42
|
"json-schema-generator": "^2.0.6",
|
|
48
43
|
"yargs": "^17.7.2"
|
|
49
44
|
},
|