@microsoft/m365-spec-parser 0.2.2-alpha.288b4cdfa.0 → 0.2.2-alpha.3031916b6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm2017.mjs
CHANGED
|
@@ -2008,10 +2008,11 @@ class SpecParser {
|
|
|
2008
2008
|
const operation = newSpec.paths[url][method];
|
|
2009
2009
|
try {
|
|
2010
2010
|
const [card, jsonPath] = AdaptiveCardGenerator.generateAdaptiveCard(operation);
|
|
2011
|
-
const
|
|
2011
|
+
const safeAdaptiveCardName = operation.operationId.replace(/[^a-zA-Z0-9]/g, "_");
|
|
2012
|
+
const fileName = path.join(adaptiveCardFolder, `${safeAdaptiveCardName}.json`);
|
|
2012
2013
|
const wrappedCard = wrapAdaptiveCard(card, jsonPath);
|
|
2013
2014
|
await fs.outputJSON(fileName, wrappedCard, { spaces: 2 });
|
|
2014
|
-
const dataFileName = path.join(adaptiveCardFolder, `${
|
|
2015
|
+
const dataFileName = path.join(adaptiveCardFolder, `${safeAdaptiveCardName}.data.json`);
|
|
2015
2016
|
await fs.outputJSON(dataFileName, {}, { spaces: 2 });
|
|
2016
2017
|
}
|
|
2017
2018
|
catch (err) {
|