Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
);
const latestProfileDir = Path.join(profilesDirectory, `definitions/`);
const latestProfileLocation = Path.join(latestProfileDir, `${getFormattedDate()}-profile.md`);
fs.writeFile(latestProfileLocation, latestProfileMarkDown);
console.log(`Latest profile written at ${latestProfileLocation}`);
// now get all the profile definitions and generate the readme.
const definitions = fs.recursiveReaddir(latestProfileDir);
const definitionsRelativePaths = [];
for await (const file of definitions){
const f = Path.parse(file);
definitionsRelativePaths.push(`$(this-folder)/definitions/${f.base}`);
}
const profilesReadme = cm.markDownExToString(
{
markDown: cm.createNode(
"document",
cm.createNode(
'heading',
cm.createText("Azure Profiles")
),
cm.createNode(
"block_quote",
cm.createNode(
"paragraph",
cm.createText("see https://aka.ms/autorest")
)
),
cm.createNode(
"block_quote",
}
}
}
if (!foundMultiApiReadmes){
throw `Couldn't find any readme.enable-multi-api.md files.`
}
const allPaths = await getPaths(specs);
const crawlResult = getCrawlData(allPaths);
const telemetryDir = Path.join(profilesDirectory, 'crawl-log.json')
fs.writeFile(telemetryDir, JSON.stringify(crawlResult, null, 2));
console.log(`Telemetry written at ${telemetryDir}`);
const latestProfile = getLatestProfile(crawlResult);
const latestProfileMarkDown = cm.markDownExToString(
{
markDown: cm.createNode(
"document",
cm.createNode(
"heading",
cm.createText("Latest Azure Profile")
),
cm.createNode(
"block_quote",
cm.createNode(
"paragraph",
cm.createText("see https://aka.ms/autorest")
)
),
cm.createCodeBlock(
"yaml ",
"heading",
cm.createText("Multi-API support for AutoRest v3 generators")
),
cm.createNode(
"block_quote",
cm.createNode(
"paragraph",
cm.createText("see https://aka.ms/autorest")
)
),
cm.createCodeBlock(
"yaml $(enable-multi-api)",
yaml.dump({ "input-file": it.toArray(set) }, { lineWidth: 1000 })
)
)
const x = cm.markDownExToString({ markDown: readMeMulti })
fs.writeFile(path.join(f.dir, "readme.enable-multi-api.md"), x)
}
}
} catch (e) {
console.error(e)
}
}