MCPcopy Create free account
hub / github.com/code-pushup/cli / persistConfig

Function persistConfig

packages/nx-plugin/src/executors/internal/config.ts:25–43  ·  view source on GitHub ↗
(
  options: Partial<PersistConfig & ProjectExecutorOnlyOptions>,
  context: BaseNormalizedExecutorContext,
)

Source from the content-addressed store, hash-verified

23}
24
25export 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
45export function uploadConfig(
46 options: Partial<UploadConfig & ProjectExecutorOnlyOptions>,

Callers 2

parseCliExecutorOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected