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

Function executorContext

testing/test-nx-utils/src/lib/utils/nx.ts:16–38  ·  view source on GitHub ↗
(nameOrOpt: string | T)

Source from the content-addressed store, hash-verified

14import { executeProcess } from '@code-pushup/utils';
15
16export function executorContext<
17 T extends { projectName: string; cwd?: string },
18>(nameOrOpt: string | T): ExecutorContext {
19 const { projectName, cwd = process.cwd() } =
20 typeof nameOrOpt === 'string' ? { projectName: nameOrOpt } : nameOrOpt;
21 return {
22 cwd,
23 isVerbose: false,
24 projectName,
25 root: '.',
26 projectsConfigurations: {
27 projects: {
28 [projectName]: {
29 name: projectName,
30 root: `libs/${projectName}`,
31 },
32 },
33 version: 1,
34 },
35 nxJsonConfiguration: {},
36 projectGraph: { nodes: {}, dependencies: {} } satisfies ProjectGraph,
37 };
38}
39
40export async function generateWorkspaceAndProject(
41 options:

Callers 3

nx.unit.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected