MCPcopy Create free account
hub / github.com/SAP-samples/cloud-sdk-js / writeServiceDefintion

Function writeServiceDefintion

scripts/fetch-service-spec.ts:39–47  ·  view source on GitHub ↗
(
  specRoot: string,
  content: string,
  fileName: string
)

Source from the content-addressed store, hash-verified

37 return 'Basic ' + encoded;
38}
39async function writeServiceDefintion(
40 specRoot: string,
41 content: string,
42 fileName: string
43): Promise<void> {
44 const path = join(specRoot, fileName);
45 await writeFile(path, content, { encoding: 'utf-8' });
46 console.info(`Service definition written: ${path}.`);
47}
48
49export async function writeFilesToServiceSpecFolder(specRoot: string) {
50 await cleanUp(specRoot);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected