(args: ModuleInputArgs)
| 7 | use owo_colors::OwoColorize; |
| 8 | |
| 9 | pub fn run(args: ModuleInputArgs) -> Result<()> { |
| 10 | let loaded = load_module(&args.module)?; |
| 11 | let module = loaded.module; |
| 12 | |
| 13 | println!("{}", "Imports".bold()); |
| 14 | let mut import_count = 0usize; |
| 15 | for import in module.imports() { |
| 16 | import_count += 1; |
| 17 | println!(" {}.{}: {}", import.module.blue(), import.name.cyan(), format_import_type(import.ty).yellow()); |
| 18 | } |
| 19 | if import_count == 0 { |
| 20 | println!(" {}", "(none)".yellow()); |
| 21 | } |
| 22 | |
| 23 | println!(); |
| 24 | println!("{}", "Exports".bold()); |
| 25 | let mut export_count = 0usize; |
| 26 | for export in module.exports() { |
| 27 | export_count += 1; |
| 28 | println!(" {}: {}", export.name.green(), format_export_type(export.ty).yellow()); |
| 29 | } |
| 30 | if export_count == 0 { |
| 31 | println!(" {}", "(none)".yellow()); |
| 32 | } |
| 33 | |
| 34 | Ok(()) |
| 35 | } |
nothing calls this directly
no test coverage detected