-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: provide better raw output handling (#16)
* chore(deps): bump sdk to version 1.2.1 * lib(util): add data output utility * feat: add `--pretty` option for json output * refractor: replace raw output strategy * chore(release): bump package version to 1.3.0
- Loading branch information
1 parent
26c56e1
commit c5277ee
Showing
11 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"license": "MIT", | ||
"private": false, | ||
"description": "A CLI for Helldivers 2: View the war progress without leaving your terminal! Powered by the HellHub API.", | ||
"version": "1.2.6", | ||
"version": "1.3.0", | ||
"main": "build/index.mjs", | ||
"types": "build/index.d.ts", | ||
"keywords": [ | ||
|
@@ -54,7 +54,7 @@ | |
"email": "[email protected]" | ||
}, | ||
"dependencies": { | ||
"@hellhub-collective/sdk": "latest", | ||
"@hellhub-collective/sdk": "^1.2.1", | ||
"accounting": "^0.4.1", | ||
"boxen": "^7.1.1", | ||
"chalk": "^5.3.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import type { Entity } from "@hellhub-collective/sdk"; | ||
|
||
export default function output(data: Entity | Array<Entity>, pretty = true) { | ||
console.log(JSON.stringify(data, null, pretty ? 1 : 0)); | ||
} |