Skip to content

Commit 928431d

Browse files
authored
Merge pull request #17 from danymarques/master
feat: 🎸 add flag to silent the renderer
2 parents 33d4a18 + 789c5ce commit 928431d

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22

33
# @omniboard/analyzer
44

5-
65
## Getting started with Omniboard in less than 5 minutes (video)
76

87
<a href="https://app.omniboard.dev/assets/videos/omniboard-getting-started.mp4" target="_blank">
98
<img src="https://app.omniboard.dev/assets/videos/omniboard-getting-started.png" height="300" />
109
</a>
1110

12-
1311
### Create account, get API key and define checks
1412

1513
1. Create account for [Omniboard.dev](https://www.omniboard.dev)
@@ -18,7 +16,6 @@
1816
4. (optional) test your API key using `npx omniboard test-connection --api-key <your-api-key>` (same as `omniboard tc --ak <your-api-key>`)
1917
5. Define checks in the [Omniboard.dev](https://app.omniboard.dev/app/checks) app
2018

21-
2219
### Run in projects
2320

2421
Make sure you have already set `OMNIBOARD_API_KEY` environment variable in the given environment
@@ -28,11 +25,11 @@ Make sure you have already set `OMNIBOARD_API_KEY` environment variable in the g
2825

2926
or
3027

31-
* `npx @omniboard/analyzer` (in case it was not pre installed)
28+
- `npx @omniboard/analyzer` (in case it was not pre installed)
3229

3330
or
3431

35-
* `npm i -g @omniboard/analyzer` - install it globally to be able to run `omniboard` in any path without waiting for npx install
32+
- `npm i -g @omniboard/analyzer` - install it globally to be able to run `omniboard` in any path without waiting for npx install
3633

3734
## Options
3835

@@ -45,7 +42,7 @@ Run `omniboard --help` for list of all supported commands and options (`omniboar
4542
- `--check-pattern` - only run checks matching provided pattern
4643
- `--json` - store data in local json file
4744
- `--json-path` - location of local json file
48-
45+
- `--silent` - silcences the renderer
4946

5047
## How it works
5148

@@ -58,21 +55,21 @@ Run `omniboard --help` for list of all supported commands and options (`omniboar
5855
## FAQ
5956

6057
#### Is it possible to run @omniboard/analyzer behind organization proxy?
58+
6159
**Yes**
6260

6361
The `@omniboard/analyzer` uses [global-agent](https://github.com/gajus/global-agent) library which will uses
6462
`HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables and use them to make requests
6563
to `https://api.omniboard.dev`
6664

6765
#### Is this uploading my source code to the cloud?
66+
6867
**No**
6968

70-
The `@omniboard/analyzer` runs checks against your source code (or even generated artifacts)
71-
and uploads results of these checks to the cloud service for further processing.
69+
The `@omniboard/analyzer` runs checks against your source code (or even generated artifacts)
70+
and uploads results of these checks to the cloud service for further processing.
7271
The uploaded content is then just metadata describing the projects and results but NOT the projects themselves.
7372

74-
In theory, a check which matches everything could be constructed but such result will
75-
be rejected as the payload would be too large. The limits of how much data can be stored
73+
In theory, a check which matches everything could be constructed but such result will
74+
be rejected as the payload would be too large. The limits of how much data can be stored
7675
per check and per all checks for a project can be customized in organization settings in the Omniboard.dev app.
77-
78-

lib/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ import { loggerMiddleware } from './middlewares/logger.middleware';
4444
description:
4545
'Exit with success (0) even in case of errors and log them as warnings',
4646
})
47+
.option('silent', {
48+
type: 'boolean',
49+
default: false,
50+
description: 'Silences the renderer.',
51+
})
4752
.alias('v', 'version')
4853
.alias('h', 'help')
4954
.epilogue(

lib/interface.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export interface Options {
66
checkPattern?: string;
77
checkDefinition?: string;
88
apiKey?: string;
9+
silent: boolean;
910
}
1011

1112
export interface Context {

lib/utils/process.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const runner = async (
2222
await new Listr(tasks, {
2323
rendererFallback: () => options?.verbose,
2424
rendererOptions: { collapse: false, showTimer: true },
25+
renderer: options.silent ? 'silent' : 'default',
2526
})
2627
.run(context)
2728
.then((res) => {

0 commit comments

Comments
 (0)