@microsoft/m365-spec-parser 0.2.7-alpha.820087596.0 → 0.2.7-alpha.84d482fe0.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.js +0 -1
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +2 -11
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +0 -1
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +3 -12
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/src/adaptiveCardWrapper.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/interfaces.d.ts +1 -2
- package/dist/src/manifestUpdater.d.ts +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.node.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@ var converter = require('swagger2openapi');
|
|
|
7
7
|
var jsyaml = require('js-yaml');
|
|
8
8
|
var fs = require('fs-extra');
|
|
9
9
|
var path = require('path');
|
|
10
|
-
var
|
|
10
|
+
var appManifest = require('@microsoft/app-manifest');
|
|
11
11
|
var crypto = require('crypto');
|
|
12
12
|
|
|
13
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -100,7 +100,6 @@ exports.WarningType = void 0;
|
|
|
100
100
|
WarningType["GenerateCardFailed"] = "generate-card-failed";
|
|
101
101
|
WarningType["OperationOnlyContainsOptionalParam"] = "operation-only-contains-optional-param";
|
|
102
102
|
WarningType["ConvertSwaggerToOpenAPI"] = "convert-swagger-to-openapi";
|
|
103
|
-
WarningType["FuncDescriptionTooLong"] = "function-description-too-long";
|
|
104
103
|
WarningType["OperationIdContainsSpecialCharacters"] = "operationid-contains-special-characters";
|
|
105
104
|
WarningType["UnsupportedAuthType"] = "unsupported-auth-type";
|
|
106
105
|
WarningType["GenerateJsonDataFailed"] = "generate-json-data-failed";
|
|
@@ -1773,7 +1772,7 @@ class ManifestUpdater {
|
|
|
1773
1772
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1774
1773
|
const manifest = yield fs__default['default'].readJSON(manifestPath);
|
|
1775
1774
|
const apiPluginRelativePath = ManifestUpdater.getRelativePath(manifestPath, apiPluginFilePath);
|
|
1776
|
-
const useCopilotExtensionsInSchema = yield
|
|
1775
|
+
const useCopilotExtensionsInSchema = yield appManifest.ManifestUtil.useCopilotExtensionsInSchema(manifest);
|
|
1777
1776
|
if (manifest.copilotExtensions || useCopilotExtensionsInSchema) {
|
|
1778
1777
|
manifest.copilotExtensions = manifest.copilotExtensions || {};
|
|
1779
1778
|
if (!options.isGptPlugin) {
|
|
@@ -1844,15 +1843,7 @@ class ManifestUpdater {
|
|
|
1844
1843
|
const safeFunctionName = operationId.replace(/[^a-zA-Z0-9]/g, "_");
|
|
1845
1844
|
const description = (_a = operationItem.description) !== null && _a !== void 0 ? _a : "";
|
|
1846
1845
|
const summary = operationItem.summary;
|
|
1847
|
-
|
|
1848
|
-
if (funcDescription.length > ConstantString.FunctionDescriptionMaxLens) {
|
|
1849
|
-
warnings.push({
|
|
1850
|
-
type: exports.WarningType.FuncDescriptionTooLong,
|
|
1851
|
-
content: Utils.format(ConstantString.FuncDescriptionTooLong, safeFunctionName, funcDescription.length.toString(), ConstantString.FunctionDescriptionMaxLens.toString()),
|
|
1852
|
-
data: safeFunctionName,
|
|
1853
|
-
});
|
|
1854
|
-
funcDescription = funcDescription.slice(0, ConstantString.FunctionDescriptionMaxLens);
|
|
1855
|
-
}
|
|
1846
|
+
const funcDescription = operationItem.description || operationItem.summary || "";
|
|
1856
1847
|
const funcObj = {
|
|
1857
1848
|
name: safeFunctionName,
|
|
1858
1849
|
description: funcDescription,
|