@microsoft/teamsfx-core 2.0.7-rc-hotfix.1 → 2.0.8-alpha.e17ffd4d1.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.
Files changed (289) hide show
  1. package/build/common/constants.d.ts +6 -1
  2. package/build/common/constants.d.ts.map +1 -1
  3. package/build/common/constants.js +6 -1
  4. package/build/common/constants.js.map +1 -1
  5. package/build/common/featureFlags.d.ts +5 -0
  6. package/build/common/featureFlags.d.ts.map +1 -1
  7. package/build/common/featureFlags.js +24 -2
  8. package/build/common/featureFlags.js.map +1 -1
  9. package/build/common/m365/packageService.d.ts +1 -0
  10. package/build/common/m365/packageService.d.ts.map +1 -1
  11. package/build/common/m365/packageService.js +15 -2
  12. package/build/common/m365/packageService.js.map +1 -1
  13. package/build/common/projectSettingsHelper.d.ts +3 -0
  14. package/build/common/projectSettingsHelper.d.ts.map +1 -1
  15. package/build/common/projectSettingsHelper.js +29 -1
  16. package/build/common/projectSettingsHelper.js.map +1 -1
  17. package/build/common/projectTypeChecker.d.ts.map +1 -1
  18. package/build/common/projectTypeChecker.js +1 -2
  19. package/build/common/projectTypeChecker.js.map +1 -1
  20. package/build/common/samples.d.ts +3 -2
  21. package/build/common/samples.d.ts.map +1 -1
  22. package/build/common/samples.js +84 -40
  23. package/build/common/samples.js.map +1 -1
  24. package/build/common/telemetry.d.ts +3 -1
  25. package/build/common/telemetry.d.ts.map +1 -1
  26. package/build/common/telemetry.js +2 -0
  27. package/build/common/telemetry.js.map +1 -1
  28. package/build/common/templates-config.json +3 -2
  29. package/build/common/wrappedAxiosClient.d.ts +59 -0
  30. package/build/common/wrappedAxiosClient.d.ts.map +1 -0
  31. package/build/common/wrappedAxiosClient.js +247 -0
  32. package/build/common/wrappedAxiosClient.js.map +1 -0
  33. package/build/component/constant/commonConstant.d.ts +5 -0
  34. package/build/component/constant/commonConstant.d.ts.map +1 -1
  35. package/build/component/constant/commonConstant.js +7 -1
  36. package/build/component/constant/commonConstant.js.map +1 -1
  37. package/build/component/coordinator/index.d.ts +8 -1
  38. package/build/component/coordinator/index.d.ts.map +1 -1
  39. package/build/component/coordinator/index.js +71 -5
  40. package/build/component/coordinator/index.js.map +1 -1
  41. package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
  42. package/build/component/developerPortalScaffoldUtils.js +0 -2
  43. package/build/component/developerPortalScaffoldUtils.js.map +1 -1
  44. package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -0
  45. package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
  46. package/build/component/driver/aad/utility/aadAppClient.js +9 -0
  47. package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
  48. package/build/component/driver/apiKey/create.d.ts.map +1 -1
  49. package/build/component/driver/apiKey/create.js +2 -4
  50. package/build/component/driver/apiKey/create.js.map +1 -1
  51. package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
  52. package/build/component/driver/botFramework/createOrUpdateBot.js +0 -2
  53. package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
  54. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
  55. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -5
  56. package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
  57. package/build/component/driver/index.d.ts +1 -0
  58. package/build/component/driver/index.d.ts.map +1 -1
  59. package/build/component/driver/index.js +1 -0
  60. package/build/component/driver/index.js.map +1 -1
  61. package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
  62. package/build/component/driver/teamsApp/appStudio.js +0 -2
  63. package/build/component/driver/teamsApp/appStudio.js.map +1 -1
  64. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +31 -9
  65. package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
  66. package/build/component/driver/teamsApp/clients/appStudioClient.js +86 -111
  67. package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
  68. package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
  69. package/build/component/driver/teamsApp/clients/authSvcClient.js +3 -24
  70. package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
  71. package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
  72. package/build/component/driver/teamsApp/configure.js +0 -2
  73. package/build/component/driver/teamsApp/configure.js.map +1 -1
  74. package/build/component/driver/teamsApp/constants.d.ts +4 -0
  75. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  76. package/build/component/driver/teamsApp/constants.js +6 -1
  77. package/build/component/driver/teamsApp/constants.js.map +1 -1
  78. package/build/component/driver/teamsApp/create.d.ts.map +1 -1
  79. package/build/component/driver/teamsApp/create.js +0 -2
  80. package/build/component/driver/teamsApp/create.js.map +1 -1
  81. package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
  82. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  83. package/build/component/driver/teamsApp/createAppPackage.js +61 -14
  84. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  85. package/build/component/driver/teamsApp/errors.d.ts +4 -0
  86. package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
  87. package/build/component/driver/teamsApp/errors.js +7 -0
  88. package/build/component/driver/teamsApp/errors.js.map +1 -1
  89. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts +21 -0
  90. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts.map +1 -0
  91. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js +5 -0
  92. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js.map +1 -0
  93. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts +17 -0
  94. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts.map +1 -0
  95. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js +16 -0
  96. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js.map +1 -0
  97. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts +41 -0
  98. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts.map +1 -0
  99. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js +5 -0
  100. package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js.map +1 -0
  101. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts +17 -0
  102. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts.map +1 -0
  103. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js +5 -0
  104. package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js.map +1 -0
  105. package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
  106. package/build/component/driver/teamsApp/publishAppPackage.js +3 -5
  107. package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
  108. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -0
  109. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  110. package/build/component/driver/teamsApp/utils/ManifestUtils.js +17 -0
  111. package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
  112. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +8 -0
  113. package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -0
  114. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +63 -0
  115. package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -0
  116. package/build/component/driver/teamsApp/utils/telemetry.d.ts +0 -31
  117. package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
  118. package/build/component/driver/teamsApp/utils/telemetry.js +1 -53
  119. package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
  120. package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
  121. package/build/component/driver/teamsApp/validate.js +0 -1
  122. package/build/component/driver/teamsApp/validate.js.map +1 -1
  123. package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
  124. package/build/component/driver/teamsApp/validateAppPackage.js +0 -1
  125. package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
  126. package/build/component/driver/teamsApp/validateTestCases.d.ts +13 -0
  127. package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -0
  128. package/build/component/driver/teamsApp/validateTestCases.js +143 -0
  129. package/build/component/driver/teamsApp/validateTestCases.js.map +1 -0
  130. package/build/component/feature/collaboration.d.ts +1 -1
  131. package/build/component/feature/collaboration.d.ts.map +1 -1
  132. package/build/component/feature/collaboration.js +2 -4
  133. package/build/component/feature/collaboration.js.map +1 -1
  134. package/build/component/generator/copilotPlugin/generator.d.ts +5 -2
  135. package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
  136. package/build/component/generator/copilotPlugin/generator.js +101 -26
  137. package/build/component/generator/copilotPlugin/generator.js.map +1 -1
  138. package/build/component/generator/copilotPlugin/helper.d.ts +8 -3
  139. package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
  140. package/build/component/generator/copilotPlugin/helper.js +239 -28
  141. package/build/component/generator/copilotPlugin/helper.js.map +1 -1
  142. package/build/component/generator/error.d.ts +1 -1
  143. package/build/component/generator/error.d.ts.map +1 -1
  144. package/build/component/generator/error.js +4 -4
  145. package/build/component/generator/error.js.map +1 -1
  146. package/build/component/generator/generator.d.ts +6 -1
  147. package/build/component/generator/generator.d.ts.map +1 -1
  148. package/build/component/generator/generator.js +32 -26
  149. package/build/component/generator/generator.js.map +1 -1
  150. package/build/component/generator/generatorAction.d.ts +5 -16
  151. package/build/component/generator/generatorAction.d.ts.map +1 -1
  152. package/build/component/generator/generatorAction.js +46 -87
  153. package/build/component/generator/generatorAction.js.map +1 -1
  154. package/build/component/generator/officeAddin/config/projectProperties.d.ts +32 -1
  155. package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
  156. package/build/component/generator/officeAddin/config/projectProperties.js +33 -2
  157. package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
  158. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +7 -1
  159. package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
  160. package/build/component/generator/officeAddin/config/projectsJsonData.js +54 -4
  161. package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
  162. package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
  163. package/build/component/generator/officeAddin/generator.js +31 -10
  164. package/build/component/generator/officeAddin/generator.js.map +1 -1
  165. package/build/component/generator/officeAddin/helperMethods.d.ts +2 -1
  166. package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
  167. package/build/component/generator/officeAddin/helperMethods.js +21 -10
  168. package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
  169. package/build/component/generator/officeXMLAddin/generator.d.ts +9 -0
  170. package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -0
  171. package/build/component/generator/officeXMLAddin/generator.js +90 -0
  172. package/build/component/generator/officeXMLAddin/generator.js.map +1 -0
  173. package/build/component/generator/officeXMLAddin/projectConfig.d.ts +36 -0
  174. package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -0
  175. package/build/component/generator/officeXMLAddin/projectConfig.js +127 -0
  176. package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -0
  177. package/build/component/generator/utils.d.ts +2 -1
  178. package/build/component/generator/utils.d.ts.map +1 -1
  179. package/build/component/generator/utils.js +35 -16
  180. package/build/component/generator/utils.js.map +1 -1
  181. package/build/component/middleware/envMW.d.ts.map +1 -1
  182. package/build/component/middleware/envMW.js +1 -0
  183. package/build/component/middleware/envMW.js.map +1 -1
  184. package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
  185. package/build/component/resource/botService/appStudio/appStudioClient.js +11 -39
  186. package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
  187. package/build/component/utils/envUtil.d.ts +2 -0
  188. package/build/component/utils/envUtil.d.ts.map +1 -1
  189. package/build/component/utils/envUtil.js +23 -0
  190. package/build/component/utils/envUtil.js.map +1 -1
  191. package/build/component/utils/pathUtils.d.ts.map +1 -1
  192. package/build/component/utils/pathUtils.js +2 -0
  193. package/build/component/utils/pathUtils.js.map +1 -1
  194. package/build/core/FxCore.d.ts +1 -0
  195. package/build/core/FxCore.d.ts.map +1 -1
  196. package/build/core/FxCore.js +49 -15
  197. package/build/core/FxCore.js.map +1 -1
  198. package/build/core/collaborator.js +3 -3
  199. package/build/core/collaborator.js.map +1 -1
  200. package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
  201. package/build/core/middleware/projectMigratorV3.js +6 -1
  202. package/build/core/middleware/projectMigratorV3.js.map +1 -1
  203. package/build/error/common.d.ts.map +1 -1
  204. package/build/error/common.js +1 -1
  205. package/build/error/common.js.map +1 -1
  206. package/build/error/deploy.d.ts.map +1 -1
  207. package/build/error/deploy.js +17 -6
  208. package/build/error/deploy.js.map +1 -1
  209. package/build/index.d.ts +0 -1
  210. package/build/index.d.ts.map +1 -1
  211. package/build/index.js +1 -3
  212. package/build/index.js.map +1 -1
  213. package/build/question/constants.d.ts +1 -0
  214. package/build/question/constants.d.ts.map +1 -1
  215. package/build/question/constants.js +2 -1
  216. package/build/question/constants.js.map +1 -1
  217. package/build/question/create.d.ts +34 -2
  218. package/build/question/create.d.ts.map +1 -1
  219. package/build/question/create.js +552 -74
  220. package/build/question/create.js.map +1 -1
  221. package/build/question/inputs/CreateProjectInputs.d.ts +21 -7
  222. package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
  223. package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
  224. package/build/question/options/CreateProjectOptions.js +57 -11
  225. package/build/question/options/CreateProjectOptions.js.map +1 -1
  226. package/build/question/other.d.ts +1 -0
  227. package/build/question/other.d.ts.map +1 -1
  228. package/build/question/other.js +17 -1
  229. package/build/question/other.js.map +1 -1
  230. package/build/question/questionNames.d.ts +10 -1
  231. package/build/question/questionNames.d.ts.map +1 -1
  232. package/build/question/questionNames.js +9 -0
  233. package/build/question/questionNames.js.map +1 -1
  234. package/package.json +4 -4
  235. package/resource/package.nls.json +208 -116
  236. package/templates/fallback/common.zip +0 -0
  237. package/templates/fallback/csharp.zip +0 -0
  238. package/templates/fallback/js.zip +0 -0
  239. package/templates/fallback/python.zip +0 -0
  240. package/templates/fallback/ts.zip +0 -0
  241. package/templates/plugins/resource/aad/auth/V3/Enable SSO.txt +1 -1
  242. package/build/common/spec-parser/adaptiveCardGenerator.d.ts +0 -7
  243. package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +0 -1
  244. package/build/common/spec-parser/adaptiveCardGenerator.js +0 -168
  245. package/build/common/spec-parser/adaptiveCardGenerator.js.map +0 -1
  246. package/build/common/spec-parser/adaptiveCardWrapper.d.ts +0 -15
  247. package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +0 -1
  248. package/build/common/spec-parser/adaptiveCardWrapper.js +0 -98
  249. package/build/common/spec-parser/adaptiveCardWrapper.js.map +0 -1
  250. package/build/common/spec-parser/constants.d.ts +0 -41
  251. package/build/common/spec-parser/constants.d.ts.map +0 -1
  252. package/build/common/spec-parser/constants.js +0 -95
  253. package/build/common/spec-parser/constants.js.map +0 -1
  254. package/build/common/spec-parser/index.browser.d.ts +0 -6
  255. package/build/common/spec-parser/index.browser.d.ts.map +0 -1
  256. package/build/common/spec-parser/index.browser.js +0 -16
  257. package/build/common/spec-parser/index.browser.js.map +0 -1
  258. package/build/common/spec-parser/index.d.ts +0 -5
  259. package/build/common/spec-parser/index.d.ts.map +0 -1
  260. package/build/common/spec-parser/index.js +0 -16
  261. package/build/common/spec-parser/index.js.map +0 -1
  262. package/build/common/spec-parser/interfaces.d.ts +0 -180
  263. package/build/common/spec-parser/interfaces.d.ts.map +0 -1
  264. package/build/common/spec-parser/interfaces.js +0 -51
  265. package/build/common/spec-parser/interfaces.js.map +0 -1
  266. package/build/common/spec-parser/manifestUpdater.d.ts +0 -7
  267. package/build/common/spec-parser/manifestUpdater.d.ts.map +0 -1
  268. package/build/common/spec-parser/manifestUpdater.js +0 -98
  269. package/build/common/spec-parser/manifestUpdater.js.map +0 -1
  270. package/build/common/spec-parser/specFilter.d.ts +0 -3
  271. package/build/common/spec-parser/specFilter.d.ts.map +0 -1
  272. package/build/common/spec-parser/specFilter.js +0 -40
  273. package/build/common/spec-parser/specFilter.js.map +0 -1
  274. package/build/common/spec-parser/specParser.browser.d.ts +0 -46
  275. package/build/common/spec-parser/specParser.browser.d.ts.map +0 -1
  276. package/build/common/spec-parser/specParser.browser.js +0 -139
  277. package/build/common/spec-parser/specParser.browser.js.map +0 -1
  278. package/build/common/spec-parser/specParser.d.ts +0 -46
  279. package/build/common/spec-parser/specParser.d.ts.map +0 -1
  280. package/build/common/spec-parser/specParser.js +0 -244
  281. package/build/common/spec-parser/specParser.js.map +0 -1
  282. package/build/common/spec-parser/specParserError.d.ts +0 -6
  283. package/build/common/spec-parser/specParserError.d.ts.map +0 -1
  284. package/build/common/spec-parser/specParserError.js +0 -13
  285. package/build/common/spec-parser/specParserError.js.map +0 -1
  286. package/build/common/spec-parser/utils.d.ts +0 -43
  287. package/build/common/spec-parser/utils.d.ts.map +0 -1
  288. package/build/common/spec-parser/utils.js +0 -595
  289. package/build/common/spec-parser/utils.js.map +0 -1
@@ -1,595 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- "use strict";
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getSafeRegistrationIdEnvName = exports.format = exports.validateSpec = exports.listSupportedAPIs = exports.parseApiInfo = exports.updateParameterWithInputType = exports.generateParametersFromSchema = exports.isWellKnownName = exports.validateServer = exports.checkServerUrl = exports.resolveServerUrl = exports.getUrlProtocol = exports.convertPathToCamelCase = exports.getResponseJson = exports.updateFirstLetter = exports.getAuthArray = exports.isBearerTokenAuth = exports.isAPIKeyAuth = exports.isSupportedAuth = exports.isSupportedApi = exports.checkPostBody = exports.checkParameters = void 0;
6
- const constants_1 = require("./constants");
7
- const interfaces_1 = require("./interfaces");
8
- function checkParameters(paramObject) {
9
- const paramResult = {
10
- requiredNum: 0,
11
- optionalNum: 0,
12
- isValid: true,
13
- };
14
- if (!paramObject) {
15
- return paramResult;
16
- }
17
- for (let i = 0; i < paramObject.length; i++) {
18
- const param = paramObject[i];
19
- const schema = param.schema;
20
- const isRequiredWithoutDefault = param.required && schema.default === undefined;
21
- if (param.in === "header" || param.in === "cookie") {
22
- if (isRequiredWithoutDefault) {
23
- paramResult.isValid = false;
24
- }
25
- continue;
26
- }
27
- if (schema.type !== "boolean" &&
28
- schema.type !== "string" &&
29
- schema.type !== "number" &&
30
- schema.type !== "integer") {
31
- if (isRequiredWithoutDefault) {
32
- paramResult.isValid = false;
33
- }
34
- continue;
35
- }
36
- if (param.in === "query" || param.in === "path") {
37
- if (isRequiredWithoutDefault) {
38
- paramResult.requiredNum = paramResult.requiredNum + 1;
39
- }
40
- else {
41
- paramResult.optionalNum = paramResult.optionalNum + 1;
42
- }
43
- }
44
- }
45
- return paramResult;
46
- }
47
- exports.checkParameters = checkParameters;
48
- function checkPostBody(schema, isRequired = false) {
49
- var _a;
50
- const paramResult = {
51
- requiredNum: 0,
52
- optionalNum: 0,
53
- isValid: true,
54
- };
55
- if (Object.keys(schema).length === 0) {
56
- return paramResult;
57
- }
58
- const isRequiredWithoutDefault = isRequired && schema.default === undefined;
59
- if (schema.type === "string" ||
60
- schema.type === "integer" ||
61
- schema.type === "boolean" ||
62
- schema.type === "number") {
63
- if (isRequiredWithoutDefault) {
64
- paramResult.requiredNum = paramResult.requiredNum + 1;
65
- }
66
- else {
67
- paramResult.optionalNum = paramResult.optionalNum + 1;
68
- }
69
- }
70
- else if (schema.type === "object") {
71
- const { properties } = schema;
72
- for (const property in properties) {
73
- let isRequired = false;
74
- if (schema.required && ((_a = schema.required) === null || _a === void 0 ? void 0 : _a.indexOf(property)) >= 0) {
75
- isRequired = true;
76
- }
77
- const result = checkPostBody(properties[property], isRequired);
78
- paramResult.requiredNum += result.requiredNum;
79
- paramResult.optionalNum += result.optionalNum;
80
- paramResult.isValid = paramResult.isValid && result.isValid;
81
- }
82
- }
83
- else {
84
- if (isRequiredWithoutDefault) {
85
- paramResult.isValid = false;
86
- }
87
- }
88
- return paramResult;
89
- }
90
- exports.checkPostBody = checkPostBody;
91
- /**
92
- * Checks if the given API is supported.
93
- * @param {string} method - The HTTP method of the API.
94
- * @param {string} path - The path of the API.
95
- * @param {OpenAPIV3.Document} spec - The OpenAPI specification document.
96
- * @returns {boolean} - Returns true if the API is supported, false otherwise.
97
- * @description The following APIs are supported:
98
- * 1. only support Get/Post operation without auth property
99
- * 2. parameter inside query or path only support string, number, boolean and integer
100
- * 3. parameter inside post body only support string, number, boolean, integer and object
101
- * 4. request body + required parameters <= 1
102
- * 5. response body should be “application/json” and not empty, and response code should be 20X
103
- * 6. only support request body with “application/json” content type
104
- */
105
- function isSupportedApi(method, path, spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2) {
106
- const pathObj = spec.paths[path];
107
- method = method.toLocaleLowerCase();
108
- if (pathObj) {
109
- if ((method === constants_1.ConstantString.PostMethod || method === constants_1.ConstantString.GetMethod) &&
110
- pathObj[method]) {
111
- const securities = pathObj[method].security;
112
- const authArray = getAuthArray(securities, spec);
113
- if (!isSupportedAuth(authArray, allowAPIKeyAuth, allowOauth2)) {
114
- return false;
115
- }
116
- const operationObject = pathObj[method];
117
- if (!allowMissingId && !operationObject.operationId) {
118
- return false;
119
- }
120
- const paramObject = operationObject.parameters;
121
- const requestBody = operationObject.requestBody;
122
- const requestJsonBody = requestBody === null || requestBody === void 0 ? void 0 : requestBody.content["application/json"];
123
- const mediaTypesCount = Object.keys((requestBody === null || requestBody === void 0 ? void 0 : requestBody.content) || {}).length;
124
- if (mediaTypesCount > 1) {
125
- return false;
126
- }
127
- const responseJson = getResponseJson(operationObject);
128
- if (Object.keys(responseJson).length === 0) {
129
- return false;
130
- }
131
- let requestBodyParamResult = {
132
- requiredNum: 0,
133
- optionalNum: 0,
134
- isValid: true,
135
- };
136
- if (requestJsonBody) {
137
- const requestBodySchema = requestJsonBody.schema;
138
- requestBodyParamResult = checkPostBody(requestBodySchema, requestBody.required);
139
- }
140
- if (!requestBodyParamResult.isValid) {
141
- return false;
142
- }
143
- const paramResult = checkParameters(paramObject);
144
- if (!paramResult.isValid) {
145
- return false;
146
- }
147
- if (requestBodyParamResult.requiredNum + paramResult.requiredNum > 1) {
148
- if (allowMultipleParameters &&
149
- requestBodyParamResult.requiredNum + paramResult.requiredNum <= 5) {
150
- return true;
151
- }
152
- return false;
153
- }
154
- else if (requestBodyParamResult.requiredNum +
155
- requestBodyParamResult.optionalNum +
156
- paramResult.requiredNum +
157
- paramResult.optionalNum ===
158
- 0) {
159
- return false;
160
- }
161
- else {
162
- return true;
163
- }
164
- }
165
- }
166
- return false;
167
- }
168
- exports.isSupportedApi = isSupportedApi;
169
- function isSupportedAuth(authSchemaArray, allowAPIKeyAuth, allowOauth2) {
170
- if (authSchemaArray.length === 0) {
171
- return true;
172
- }
173
- if (allowAPIKeyAuth || allowOauth2) {
174
- // Currently we don't support multiple auth in one operation
175
- if (authSchemaArray.length > 0 && authSchemaArray.every((auths) => auths.length > 1)) {
176
- return false;
177
- }
178
- for (const auths of authSchemaArray) {
179
- if (auths.length === 1) {
180
- if (!allowOauth2 && allowAPIKeyAuth && isAPIKeyAuth(auths[0].authSchema)) {
181
- return true;
182
- }
183
- else if (!allowAPIKeyAuth && allowOauth2 && isBearerTokenAuth(auths[0].authSchema)) {
184
- return true;
185
- }
186
- else if (allowAPIKeyAuth &&
187
- allowOauth2 &&
188
- (isAPIKeyAuth(auths[0].authSchema) || isBearerTokenAuth(auths[0].authSchema))) {
189
- return true;
190
- }
191
- }
192
- }
193
- }
194
- return false;
195
- }
196
- exports.isSupportedAuth = isSupportedAuth;
197
- function isAPIKeyAuth(authSchema) {
198
- return authSchema.type === "apiKey";
199
- }
200
- exports.isAPIKeyAuth = isAPIKeyAuth;
201
- function isBearerTokenAuth(authSchema) {
202
- return (authSchema.type === "oauth2" ||
203
- authSchema.type === "openIdConnect" ||
204
- (authSchema.type === "http" && authSchema.scheme === "bearer"));
205
- }
206
- exports.isBearerTokenAuth = isBearerTokenAuth;
207
- function getAuthArray(securities, spec) {
208
- var _a;
209
- const result = [];
210
- const securitySchemas = (_a = spec.components) === null || _a === void 0 ? void 0 : _a.securitySchemes;
211
- if (securities && securitySchemas) {
212
- for (let i = 0; i < securities.length; i++) {
213
- const security = securities[i];
214
- const authArray = [];
215
- for (const name in security) {
216
- const auth = securitySchemas[name];
217
- authArray.push({
218
- authSchema: auth,
219
- name: name,
220
- });
221
- }
222
- if (authArray.length > 0) {
223
- result.push(authArray);
224
- }
225
- }
226
- }
227
- result.sort((a, b) => a[0].name.localeCompare(b[0].name));
228
- return result;
229
- }
230
- exports.getAuthArray = getAuthArray;
231
- function updateFirstLetter(str) {
232
- return str.charAt(0).toUpperCase() + str.slice(1);
233
- }
234
- exports.updateFirstLetter = updateFirstLetter;
235
- function getResponseJson(operationObject) {
236
- var _a, _b;
237
- let json = {};
238
- for (const code of constants_1.ConstantString.ResponseCodeFor20X) {
239
- const responseObject = (_a = operationObject === null || operationObject === void 0 ? void 0 : operationObject.responses) === null || _a === void 0 ? void 0 : _a[code];
240
- const mediaTypesCount = Object.keys((responseObject === null || responseObject === void 0 ? void 0 : responseObject.content) || {}).length;
241
- if (mediaTypesCount > 1) {
242
- return {};
243
- }
244
- if ((_b = responseObject === null || responseObject === void 0 ? void 0 : responseObject.content) === null || _b === void 0 ? void 0 : _b["application/json"]) {
245
- json = responseObject.content["application/json"];
246
- break;
247
- }
248
- }
249
- return json;
250
- }
251
- exports.getResponseJson = getResponseJson;
252
- function convertPathToCamelCase(path) {
253
- const pathSegments = path.split(/[./{]/);
254
- const camelCaseSegments = pathSegments.map((segment) => {
255
- segment = segment.replace(/}/g, "");
256
- return segment.charAt(0).toUpperCase() + segment.slice(1);
257
- });
258
- const camelCasePath = camelCaseSegments.join("");
259
- return camelCasePath;
260
- }
261
- exports.convertPathToCamelCase = convertPathToCamelCase;
262
- function getUrlProtocol(urlString) {
263
- try {
264
- const url = new URL(urlString);
265
- return url.protocol;
266
- }
267
- catch (err) {
268
- return undefined;
269
- }
270
- }
271
- exports.getUrlProtocol = getUrlProtocol;
272
- function resolveServerUrl(url) {
273
- const placeHolderReg = /\${{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*}}/g;
274
- let matches = placeHolderReg.exec(url);
275
- let newUrl = url;
276
- while (matches != null) {
277
- const envVar = matches[1];
278
- const envVal = process.env[envVar];
279
- if (!envVal) {
280
- throw new Error(format(constants_1.ConstantString.ResolveServerUrlFailed, envVar));
281
- }
282
- else {
283
- newUrl = newUrl.replace(matches[0], envVal);
284
- }
285
- matches = placeHolderReg.exec(url);
286
- }
287
- return newUrl;
288
- }
289
- exports.resolveServerUrl = resolveServerUrl;
290
- function checkServerUrl(servers) {
291
- const errors = [];
292
- let serverUrl;
293
- try {
294
- serverUrl = resolveServerUrl(servers[0].url);
295
- }
296
- catch (err) {
297
- errors.push({
298
- type: interfaces_1.ErrorType.ResolveServerUrlFailed,
299
- content: err.message,
300
- data: servers,
301
- });
302
- return errors;
303
- }
304
- const protocol = getUrlProtocol(serverUrl);
305
- if (!protocol) {
306
- // Relative server url is not supported
307
- errors.push({
308
- type: interfaces_1.ErrorType.RelativeServerUrlNotSupported,
309
- content: constants_1.ConstantString.RelativeServerUrlNotSupported,
310
- data: servers,
311
- });
312
- }
313
- else if (protocol !== "https:") {
314
- // Http server url is not supported
315
- const protocolString = protocol.slice(0, -1);
316
- errors.push({
317
- type: interfaces_1.ErrorType.UrlProtocolNotSupported,
318
- content: format(constants_1.ConstantString.UrlProtocolNotSupported, protocol.slice(0, -1)),
319
- data: protocolString,
320
- });
321
- }
322
- return errors;
323
- }
324
- exports.checkServerUrl = checkServerUrl;
325
- function validateServer(spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2) {
326
- const errors = [];
327
- let hasTopLevelServers = false;
328
- let hasPathLevelServers = false;
329
- let hasOperationLevelServers = false;
330
- if (spec.servers && spec.servers.length >= 1) {
331
- hasTopLevelServers = true;
332
- // for multiple server, we only use the first url
333
- const serverErrors = checkServerUrl(spec.servers);
334
- errors.push(...serverErrors);
335
- }
336
- const paths = spec.paths;
337
- for (const path in paths) {
338
- const methods = paths[path];
339
- if ((methods === null || methods === void 0 ? void 0 : methods.servers) && methods.servers.length >= 1) {
340
- hasPathLevelServers = true;
341
- const serverErrors = checkServerUrl(methods.servers);
342
- errors.push(...serverErrors);
343
- }
344
- for (const method in methods) {
345
- const operationObject = methods[method];
346
- if (isSupportedApi(method, path, spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2)) {
347
- if ((operationObject === null || operationObject === void 0 ? void 0 : operationObject.servers) && operationObject.servers.length >= 1) {
348
- hasOperationLevelServers = true;
349
- const serverErrors = checkServerUrl(operationObject.servers);
350
- errors.push(...serverErrors);
351
- }
352
- }
353
- }
354
- }
355
- if (!hasTopLevelServers && !hasPathLevelServers && !hasOperationLevelServers) {
356
- errors.push({
357
- type: interfaces_1.ErrorType.NoServerInformation,
358
- content: constants_1.ConstantString.NoServerInformation,
359
- });
360
- }
361
- return errors;
362
- }
363
- exports.validateServer = validateServer;
364
- function isWellKnownName(name, wellknownNameList) {
365
- for (let i = 0; i < wellknownNameList.length; i++) {
366
- name = name.replace(/_/g, "").replace(/-/g, "");
367
- if (name.toLowerCase().includes(wellknownNameList[i])) {
368
- return true;
369
- }
370
- }
371
- return false;
372
- }
373
- exports.isWellKnownName = isWellKnownName;
374
- function generateParametersFromSchema(schema, name, allowMultipleParameters, isRequired = false) {
375
- var _a, _b;
376
- const requiredParams = [];
377
- const optionalParams = [];
378
- if (schema.type === "string" ||
379
- schema.type === "integer" ||
380
- schema.type === "boolean" ||
381
- schema.type === "number") {
382
- const parameter = {
383
- name: name,
384
- title: updateFirstLetter(name).slice(0, constants_1.ConstantString.ParameterTitleMaxLens),
385
- description: ((_a = schema.description) !== null && _a !== void 0 ? _a : "").slice(0, constants_1.ConstantString.ParameterDescriptionMaxLens),
386
- };
387
- if (allowMultipleParameters) {
388
- updateParameterWithInputType(schema, parameter);
389
- }
390
- if (isRequired && schema.default === undefined) {
391
- requiredParams.push(parameter);
392
- }
393
- else {
394
- optionalParams.push(parameter);
395
- }
396
- }
397
- else if (schema.type === "object") {
398
- const { properties } = schema;
399
- for (const property in properties) {
400
- let isRequired = false;
401
- if (schema.required && ((_b = schema.required) === null || _b === void 0 ? void 0 : _b.indexOf(property)) >= 0) {
402
- isRequired = true;
403
- }
404
- const [requiredP, optionalP] = generateParametersFromSchema(properties[property], property, allowMultipleParameters, isRequired);
405
- requiredParams.push(...requiredP);
406
- optionalParams.push(...optionalP);
407
- }
408
- }
409
- return [requiredParams, optionalParams];
410
- }
411
- exports.generateParametersFromSchema = generateParametersFromSchema;
412
- function updateParameterWithInputType(schema, param) {
413
- if (schema.enum) {
414
- param.inputType = "choiceset";
415
- param.choices = [];
416
- for (let i = 0; i < schema.enum.length; i++) {
417
- param.choices.push({
418
- title: schema.enum[i],
419
- value: schema.enum[i],
420
- });
421
- }
422
- }
423
- else if (schema.type === "string") {
424
- param.inputType = "text";
425
- }
426
- else if (schema.type === "integer" || schema.type === "number") {
427
- param.inputType = "number";
428
- }
429
- else if (schema.type === "boolean") {
430
- param.inputType = "toggle";
431
- }
432
- if (schema.default) {
433
- param.value = schema.default;
434
- }
435
- }
436
- exports.updateParameterWithInputType = updateParameterWithInputType;
437
- function parseApiInfo(operationItem, allowMultipleParameters) {
438
- var _a, _b;
439
- const requiredParams = [];
440
- const optionalParams = [];
441
- const paramObject = operationItem.parameters;
442
- if (paramObject) {
443
- paramObject.forEach((param) => {
444
- var _a;
445
- const parameter = {
446
- name: param.name,
447
- title: updateFirstLetter(param.name).slice(0, constants_1.ConstantString.ParameterTitleMaxLens),
448
- description: ((_a = param.description) !== null && _a !== void 0 ? _a : "").slice(0, constants_1.ConstantString.ParameterDescriptionMaxLens),
449
- };
450
- const schema = param.schema;
451
- if (allowMultipleParameters && schema) {
452
- updateParameterWithInputType(schema, parameter);
453
- }
454
- if (param.in !== "header" && param.in !== "cookie") {
455
- if (param.required && (schema === null || schema === void 0 ? void 0 : schema.default) === undefined) {
456
- requiredParams.push(parameter);
457
- }
458
- else {
459
- optionalParams.push(parameter);
460
- }
461
- }
462
- });
463
- }
464
- if (operationItem.requestBody) {
465
- const requestBody = operationItem.requestBody;
466
- const requestJson = requestBody.content["application/json"];
467
- if (Object.keys(requestJson).length !== 0) {
468
- const schema = requestJson.schema;
469
- const [requiredP, optionalP] = generateParametersFromSchema(schema, "requestBody", allowMultipleParameters, requestBody.required);
470
- requiredParams.push(...requiredP);
471
- optionalParams.push(...optionalP);
472
- }
473
- }
474
- const operationId = operationItem.operationId;
475
- const parameters = [];
476
- if (requiredParams.length !== 0) {
477
- parameters.push(...requiredParams);
478
- }
479
- else {
480
- parameters.push(optionalParams[0]);
481
- }
482
- const command = {
483
- context: ["compose"],
484
- type: "query",
485
- title: ((_a = operationItem.summary) !== null && _a !== void 0 ? _a : "").slice(0, constants_1.ConstantString.CommandTitleMaxLens),
486
- id: operationId,
487
- parameters: parameters,
488
- description: ((_b = operationItem.description) !== null && _b !== void 0 ? _b : "").slice(0, constants_1.ConstantString.CommandDescriptionMaxLens),
489
- };
490
- let warning = undefined;
491
- if (requiredParams.length === 0 && optionalParams.length > 1) {
492
- warning = {
493
- type: interfaces_1.WarningType.OperationOnlyContainsOptionalParam,
494
- content: format(constants_1.ConstantString.OperationOnlyContainsOptionalParam, operationId),
495
- data: operationId,
496
- };
497
- }
498
- return [command, warning];
499
- }
500
- exports.parseApiInfo = parseApiInfo;
501
- function listSupportedAPIs(spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2) {
502
- const paths = spec.paths;
503
- const result = {};
504
- for (const path in paths) {
505
- const methods = paths[path];
506
- for (const method in methods) {
507
- // For developer preview, only support GET operation with only 1 parameter without auth
508
- if (isSupportedApi(method, path, spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2)) {
509
- const operationObject = methods[method];
510
- result[`${method.toUpperCase()} ${path}`] = operationObject;
511
- }
512
- }
513
- }
514
- return result;
515
- }
516
- exports.listSupportedAPIs = listSupportedAPIs;
517
- function validateSpec(spec, parser, isSwaggerFile, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2) {
518
- const errors = [];
519
- const warnings = [];
520
- if (isSwaggerFile) {
521
- warnings.push({
522
- type: interfaces_1.WarningType.ConvertSwaggerToOpenAPI,
523
- content: constants_1.ConstantString.ConvertSwaggerToOpenAPI,
524
- });
525
- }
526
- // Server validation
527
- const serverErrors = validateServer(spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2);
528
- errors.push(...serverErrors);
529
- // Remote reference not supported
530
- const refPaths = parser.$refs.paths();
531
- // refPaths [0] is the current spec file path
532
- if (refPaths.length > 1) {
533
- errors.push({
534
- type: interfaces_1.ErrorType.RemoteRefNotSupported,
535
- content: format(constants_1.ConstantString.RemoteRefNotSupported, refPaths.join(", ")),
536
- data: refPaths,
537
- });
538
- }
539
- // No supported API
540
- const apiMap = listSupportedAPIs(spec, allowMissingId, allowAPIKeyAuth, allowMultipleParameters, allowOauth2);
541
- if (Object.keys(apiMap).length === 0) {
542
- errors.push({
543
- type: interfaces_1.ErrorType.NoSupportedApi,
544
- content: constants_1.ConstantString.NoSupportedApi,
545
- });
546
- }
547
- // OperationId missing
548
- const apisMissingOperationId = [];
549
- for (const key in apiMap) {
550
- const pathObjectItem = apiMap[key];
551
- if (!pathObjectItem.operationId) {
552
- apisMissingOperationId.push(key);
553
- }
554
- }
555
- if (apisMissingOperationId.length > 0) {
556
- warnings.push({
557
- type: interfaces_1.WarningType.OperationIdMissing,
558
- content: format(constants_1.ConstantString.MissingOperationId, apisMissingOperationId.join(", ")),
559
- data: apisMissingOperationId,
560
- });
561
- }
562
- let status = interfaces_1.ValidationStatus.Valid;
563
- if (warnings.length > 0 && errors.length === 0) {
564
- status = interfaces_1.ValidationStatus.Warning;
565
- }
566
- else if (errors.length > 0) {
567
- status = interfaces_1.ValidationStatus.Error;
568
- }
569
- return {
570
- status,
571
- warnings,
572
- errors,
573
- };
574
- }
575
- exports.validateSpec = validateSpec;
576
- function format(str, ...args) {
577
- let index = 0;
578
- return str.replace(/%s/g, () => {
579
- const arg = args[index++];
580
- return arg !== undefined ? arg : "";
581
- });
582
- }
583
- exports.format = format;
584
- function getSafeRegistrationIdEnvName(authName) {
585
- if (!authName) {
586
- return "";
587
- }
588
- let safeRegistrationIdEnvName = authName.toUpperCase().replace(/[^A-Z0-9_]/g, "_");
589
- if (!safeRegistrationIdEnvName.match(/^[A-Z]/)) {
590
- safeRegistrationIdEnvName = "PREFIX_" + safeRegistrationIdEnvName;
591
- }
592
- return safeRegistrationIdEnvName;
593
- }
594
- exports.getSafeRegistrationIdEnvName = getSafeRegistrationIdEnvName;
595
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/common/spec-parser/utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAIb,2CAA6C;AAC7C,6CAUsB;AAGtB,SAAgB,eAAe,CAAC,WAAwC;IACtE,MAAM,WAAW,GAAG;QAClB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,IAAI;KACd,CAAC;IAEF,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,WAAW,CAAC;KACpB;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC3C,MAAM,KAAK,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;Q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