Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: truncate hash to 6 digits in table view #25

Merged
merged 2 commits into from
Mar 15, 2023
Merged

feat: truncate hash to 6 digits in table view #25

merged 2 commits into from
Mar 15, 2023

Conversation

nilslice
Copy link
Member

Hash column took up too much horizontal space, now the table fits a more narrow terminal.

┌─────────────────────┬────────┬─────────────────┬───────────┬───────────┬────────────────────────┬─────────┬───────────┐
│ ID                  │ Hash   │ Filename        │ # Exports │ # Imports │ Namespaces             │ Source  │ Size      │
╞═════════════════════╪════════╪═════════════════╪═══════════╪═══════════╪════════════════════════╪═════════╪═══════════╡
│ 3491933836965728984 │ 55414f │ advent.wasm     │ 1         │ 5         │ wasi_snapshot_preview1 │ Unknown │ 121.1 KiB │
├─────────────────────┼────────┼─────────────────┼───────────┼───────────┼────────────────────────┼─────────┼───────────┤
│ 3491933839433176491 │ 22dd5d │ base64-cli.wasm │ 5         │ 8         │ wasi_snapshot_preview1 │ Rust    │ 2.4 MiB   │
├─────────────────────┼────────┼─────────────────┼───────────┼───────────┼────────────────────────┼─────────┼───────────┤
│ 3491933840755152073 │ a8fcad │ chkfont.wasm    │ 1         │ 12        │ wasi_snapshot_preview1 │ C       │ 73.9 KiB  │
└─────────────────────┴────────┴─────────────────┴───────────┴───────────┴────────────────────────┴─────────┴───────────┘

you can get the full hash by using --output-format json:

{
  "results": [
    {
      "module_id": 3491933836965728984,
      "hash": "55414f8c569b37bf71a353c33f5695172a80ca00648cf32408a26fcf46b49070",
      "file_name": "advent.wasm",
      "exports": 1,
      "imports": 5,
      "namespaces": [
        "wasi_snapshot_preview1"
      ],
      "source_language": "Unknown",
      "size": "121.1 KiB"
    },
    {
      "module_id": 3491933839433176491,
      "hash": "22dd5d48e40959c8fa25f5968aaf3d5af9430e848d9a582b7a0b6ba2aaf9a438",
      "file_name": "base64-cli.wasm",
      "exports": 5,
      "imports": 8,
      "namespaces": [
        "wasi_snapshot_preview1"
      ],
      "source_language": "Rust",
      "size": "2.4 MiB"
    },
    {
      "module_id": 3491933840755152073,
      "hash": "a8fcad775e5ab5739c3d6f723cc8121b56fea9c1078d2b1bb1c2e0216d599062",
      "file_name": "chkfont.wasm",
      "exports": 1,
      "imports": 12,
      "namespaces": [
        "wasi_snapshot_preview1"
      ],
      "source_language": "C",
      "size": "73.9 KiB"
    }
  ]
}

@nilslice nilslice merged commit 792d5ca into main Mar 15, 2023
@nilslice nilslice deleted the trunc-hash branch March 15, 2023 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant