( options: Partial<PersistConfig & ProjectExecutorOnlyOptions>, context: BaseNormalizedExecutorContext, )
| 23 | } |
| 24 | |
| 25 | export function persistConfig( |
| 26 | options: Partial<PersistConfig & ProjectExecutorOnlyOptions>, |
| 27 | context: BaseNormalizedExecutorContext, |
| 28 | ): Partial<PersistConfig> { |
| 29 | const { projectConfig, workspaceRoot } = context; |
| 30 | |
| 31 | const { name: projectName = '' } = projectConfig ?? {}; |
| 32 | const { |
| 33 | format, |
| 34 | outputDir = path.join(workspaceRoot, '.code-pushup', projectName), // always in <root>/.code-pushup/<project-name>, |
| 35 | filename, |
| 36 | } = options; |
| 37 | |
| 38 | return { |
| 39 | outputDir, |
| 40 | ...(format ? { format } : {}), |
| 41 | ...(filename ? { filename } : {}), |
| 42 | }; |
| 43 | } |
| 44 | |
| 45 | export function uploadConfig( |
| 46 | options: Partial<UploadConfig & ProjectExecutorOnlyOptions>, |
no outgoing calls
no test coverage detected