MCPcopy Create free account
hub / github.com/dfinity/orbit / targetExists

Function targetExists

cli/src/utils.ts:41–47  ·  view source on GitHub ↗
(project: string, target: string)

Source from the content-addressed store, hash-verified

39 (lower ? str.toLowerCase() : str).replace(/(?:^|\s|["'([{])+\S/g, match => match.toUpperCase());
40
41export const targetExists = (project: string, target: string): boolean => {
42 const output = execSync(`npx nx show projects --withTarget="${target}" -p "${project}"`)
43 .toString()
44 .trim();
45
46 return output === project;
47};
48
49export const execAsync = async (command: string): Promise<string> => {
50 return promisify(exec)(command).then(({ stdout }) => stdout);

Callers 1

publish.tsFile · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected