@receptron/graphai_cli 0.6.3 → 0.6.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/lib/args.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare const args: {
10
10
  yaml: boolean;
11
11
  json: boolean;
12
12
  log: string | undefined;
13
+ i: (string | number)[] | undefined;
13
14
  yaml_or_json_file: string | undefined;
14
15
  _: (string | number)[];
15
16
  $0: string;
package/lib/args.js CHANGED
@@ -59,6 +59,12 @@ exports.args = yargs_1.default
59
59
  description: "output log",
60
60
  demandOption: false,
61
61
  type: "string",
62
+ })
63
+ .option("i", {
64
+ alias: "injectValue",
65
+ description: "injectValue for static node",
66
+ demandOption: false,
67
+ type: "array",
62
68
  })
63
69
  .command(exports.hasOption ? "* [yaml_or_json_file]" : "* <yaml_or_json_file>", "run GraphAI with GraphAI file.")
64
70
  .positional("yaml_or_json_file", {
@@ -82,6 +82,14 @@ const main = async () => {
82
82
  if (args_1.args.verbose) {
83
83
  graph.onLogCallback = test_utils_1.callbackLog;
84
84
  }
85
+ if (args_1.args.i) {
86
+ args_1.args.i.forEach((injectValue) => {
87
+ const [key, value] = String(injectValue).split("=");
88
+ if (key && value) {
89
+ graph.injectValue(key, value);
90
+ }
91
+ });
92
+ }
85
93
  try {
86
94
  const resultAll = !!args_1.args.all;
87
95
  const results = await graph.run(resultAll);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@receptron/graphai_cli",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "GraphAI command line tools.",
5
5
  "main": "lib/graphai_cli.js",
6
6
  "bin": {
@@ -37,10 +37,10 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@graphai/agent_filters": "^0.0.8",
40
- "@graphai/agents": "^0.2.2",
40
+ "@graphai/agents": "^0.2.3",
41
41
  "@receptron/test_utils": "^0.2.2",
42
42
  "dotenv": "^16.4.7",
43
- "graphai": "^0.6.2",
43
+ "graphai": "^0.6.6",
44
44
  "json-schema-generator": "^2.0.6",
45
45
  "yargs": "^17.7.2"
46
46
  },