@travetto/cli 7.0.3 → 7.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/cli",
3
- "version": "7.0.3",
3
+ "version": "7.0.4",
4
4
  "type": "module",
5
5
  "description": "CLI infrastructure for Travetto framework",
6
6
  "keywords": [
@@ -29,7 +29,7 @@
29
29
  "directory": "module/cli"
30
30
  },
31
31
  "dependencies": {
32
- "@travetto/schema": "^7.0.3",
32
+ "@travetto/schema": "^7.0.4",
33
33
  "@travetto/terminal": "^7.0.3"
34
34
  },
35
35
  "travetto": {
@@ -75,13 +75,14 @@ export class CliSchemaExportUtil {
75
75
  static exportSchema(cls: Class): CliCommandSchema {
76
76
  const schema = SchemaRegistryIndex.getConfig(cls);
77
77
  const config = CliCommandRegistryIndex.get(cls);
78
- const processed = Object.values(schema.fields).map(value => this.processInput(value));
78
+ const flags = Object.values(schema.fields).map(value => this.processInput(value));
79
+ const args = (schema.methods.main?.parameters ?? []).map(value => this.processInput(value));
79
80
  return {
80
81
  name: config.name,
81
82
  module: describeFunction(config.cls).module,
82
83
  description: schema.description,
83
- flags: processed.filter(value => value.flagNames && value.flagNames.length > 0),
84
- args: processed.filter(value => !value.flagNames || value.flagNames.length === 0),
84
+ flags: flags.filter(value => value.flagNames && value.flagNames.length > 0),
85
+ args,
85
86
  runTarget: config.runTarget ?? false
86
87
  };
87
88
  }