Skip to content

Fix organization cmd, support json/md flags#342

Merged
jdalton merged 1 commit intomainfrom
fix_orgs
Feb 28, 2025
Merged

Fix organization cmd, support json/md flags#342
jdalton merged 1 commit intomainfrom
fix_orgs

Conversation

@pvdz
Copy link
Contributor

@pvdz pvdz commented Feb 28, 2025

  • Sorted a plurality inconsistency in the organization command.
  • Made it support the --json and --markdown and --dry-run flags.
  • Will no longer print your full api key to stdout.
  • Added to the dry-run tests
$ npm exec socket -- organization
List of organizations associated with your API key, ending with: K1E9tD

- Name: SocketDev, ID: 1381, Plan: enterprise

$ npm exec socket -- organization --json
[
  {
    "name": "SocketDev",
    "id": "1381",
    "plan": "enterprise"
  }
]

$ npm exec socket -- organization --markdown
# Organizations

List of organizations associated with your API key, ending with: K1E9tD

| Name      | ID   | Plan       |
| --------- | ---- | ---------- |
| SocketDev | 1381 | enterprise |
| --------- | ---- | ---------- |

This works including to the point where you can capture the output to a file (the spinner writes to stderr).

@pvdz pvdz requested a review from jdalton February 28, 2025 11:21
@jdalton jdalton merged commit c73944c into main Feb 28, 2025
15 checks passed
@jdalton jdalton deleted the fix_orgs branch February 28, 2025 12:41
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.

2 participants