File tree Expand file tree Collapse file tree 2 files changed +30
-2
lines changed
packages/cli/src/lib/implementation Expand file tree Collapse file tree 2 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 1- import type { CoreConfig , Format , UploadConfig } from '@code-pushup/models' ;
1+ import type {
2+ CacheConfig ,
3+ CoreConfig ,
4+ Format ,
5+ UploadConfig ,
6+ } from '@code-pushup/models' ;
27
38export type PersistConfigCliOptions = {
49 'persist.outputDir' ?: string ;
@@ -13,6 +18,11 @@ export type UploadConfigCliOptions = {
1318 'upload.server' ?: string ;
1419} ;
1520
21+ export type CacheConfigCliOptions = {
22+ 'cache.read' ?: boolean ;
23+ 'cache.write' ?: boolean ;
24+ } ;
25+
1626export type ConfigCliOptions = {
1727 config ?: string ;
1828 tsconfig ?: string ;
@@ -21,4 +31,4 @@ export type ConfigCliOptions = {
2131
2232export type CoreConfigCliOptions = Pick < CoreConfig , 'persist' > & {
2333 upload ?: Partial < Omit < UploadConfig , 'timeout' > > ;
24- } ;
34+ } & CacheConfig ;
Original file line number Diff line number Diff line change 11import type { Options } from 'yargs' ;
22import type {
3+ CacheConfigCliOptions ,
34 PersistConfigCliOptions ,
45 UploadConfigCliOptions ,
56} from './core-config.model.js' ;
@@ -11,6 +12,7 @@ export function yargsCoreConfigOptionsDefinition(): Record<
1112 return {
1213 ...yargsPersistConfigOptionsDefinition ( ) ,
1314 ...yargsUploadConfigOptionsDefinition ( ) ,
15+ ...yargsCacheConfigOptionsDefinition ( ) ,
1416 } ;
1517}
1618
@@ -57,3 +59,19 @@ export function yargsUploadConfigOptionsDefinition(): Record<
5759 } ,
5860 } ;
5961}
62+
63+ export function yargsCacheConfigOptionsDefinition ( ) : Record <
64+ keyof CacheConfigCliOptions ,
65+ Options
66+ > {
67+ return {
68+ 'cache.read' : {
69+ describe : 'Read runner-output.json to file system' ,
70+ type : 'boolean' ,
71+ } ,
72+ 'cache.write' : {
73+ describe : 'Write runner-output.json to file system' ,
74+ type : 'boolean' ,
75+ } ,
76+ } ;
77+ }
You can’t perform that action at this time.
0 commit comments