@microsoft/teamsfx-core 2.0.4-alpha.dc097d3df.0 → 2.0.4-alpha.e83c26af7.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/build/common/deps-checker/util/cpUtils.js +1 -1
- package/build/common/deps-checker/util/cpUtils.js.map +1 -1
- package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -1
- package/build/common/deps-checker/util/fileHelper.js +2 -0
- package/build/common/deps-checker/util/fileHelper.js.map +1 -1
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +2 -1
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/jsonUtils.d.ts.map +1 -1
- package/build/common/jsonUtils.js +2 -0
- package/build/common/jsonUtils.js.map +1 -1
- package/build/common/samples-config-v3.json +2 -8
- package/build/common/samples.d.ts +1 -2
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +15 -6
- package/build/common/samples.js.map +1 -1
- package/build/common/spec-parser/constants.d.ts +12 -0
- package/build/common/spec-parser/constants.d.ts.map +1 -0
- package/build/common/spec-parser/constants.js +18 -0
- package/build/common/spec-parser/constants.js.map +1 -0
- package/build/common/spec-parser/interfaces.d.ts +75 -0
- package/build/common/spec-parser/interfaces.d.ts.map +1 -0
- package/build/common/spec-parser/interfaces.js +40 -0
- package/build/common/spec-parser/interfaces.js.map +1 -0
- package/build/common/spec-parser/specParser.d.ts +36 -0
- package/build/common/spec-parser/specParser.d.ts.map +1 -0
- package/build/common/spec-parser/specParser.js +168 -0
- package/build/common/spec-parser/specParser.js.map +1 -0
- package/build/common/spec-parser/specParserError.d.ts +6 -0
- package/build/common/spec-parser/specParserError.d.ts.map +1 -0
- package/build/common/spec-parser/specParserError.js +13 -0
- package/build/common/spec-parser/specParserError.js.map +1 -0
- package/build/common/tools.js +1 -1
- package/build/common/tools.js.map +1 -1
- package/build/component/configManager/constant.d.ts.map +1 -1
- package/build/component/configManager/constant.js +4 -2
- package/build/component/configManager/constant.js.map +1 -1
- package/build/component/configManager/diagnostic.d.ts.map +1 -1
- package/build/component/configManager/diagnostic.js +2 -0
- package/build/component/configManager/diagnostic.js.map +1 -1
- package/build/component/configManager/interface.d.ts.map +1 -1
- package/build/component/configManager/interface.js +2 -3
- package/build/component/configManager/interface.js.map +1 -1
- package/build/component/configManager/lifecycle.d.ts.map +1 -1
- package/build/component/configManager/lifecycle.js +5 -3
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +5 -3
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.d.ts.map +1 -1
- package/build/component/configManager/validator.js +2 -0
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/constants.d.ts +0 -23
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +1 -24
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +10 -0
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/coordinator/summary.d.ts.map +1 -1
- package/build/component/coordinator/summary.js +2 -0
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.d.ts +10 -3
- package/build/component/driver/aad/error/aadManifestError.d.ts.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +39 -5
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/interface/AADApplication.js +1 -1
- package/build/component/driver/aad/interface/AADApplication.js.map +1 -1
- package/build/component/driver/aad/interface/AADManifest.js +1 -1
- package/build/component/driver/aad/interface/AADManifest.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +14 -19
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.d.ts.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.js +12 -2
- package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.d.ts.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +2 -0
- package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
- package/build/component/driver/interface/buildAndDeployArgs.d.ts +3 -6
- package/build/component/driver/interface/buildAndDeployArgs.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +2 -0
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js +1 -1
- package/build/component/driver/teamsApp/results.d.ts.map +1 -1
- package/build/component/driver/teamsApp/results.js +2 -0
- package/build/component/driver/teamsApp/results.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +6 -0
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +4 -5
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/error/componentError.d.ts +0 -4
- package/build/component/error/componentError.d.ts.map +1 -1
- package/build/component/error/componentError.js +1 -10
- package/build/component/error/componentError.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +5 -0
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -0
- package/build/component/generator/copilotPlugin/generator.js +60 -0
- package/build/component/generator/copilotPlugin/generator.js.map +1 -0
- package/build/component/generator/copilotPlugin/helper.d.ts +30 -0
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -0
- package/build/component/generator/copilotPlugin/helper.js +72 -0
- package/build/component/generator/copilotPlugin/helper.js.map +1 -0
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +5 -4
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +2 -0
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +2 -0
- package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +8 -8
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +2 -0
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/spfx/error.d.ts +2 -0
- package/build/component/generator/spfx/error.d.ts.map +1 -1
- package/build/component/generator/spfx/error.js +21 -1
- package/build/component/generator/spfx/error.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +4 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +128 -106
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +1 -0
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts +2 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/telemetryEvents.js +1 -0
- package/build/component/generator/spfx/utils/telemetryEvents.js.map +1 -1
- package/build/component/generator/utils.d.ts +0 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +1 -6
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +2 -0
- package/build/component/migrate.js.map +1 -1
- package/build/component/registerService.d.ts +0 -1
- package/build/component/registerService.d.ts.map +1 -1
- package/build/component/registerService.js +0 -1
- package/build/component/registerService.js.map +1 -1
- package/build/component/utils/charsetUtils.d.ts.map +1 -1
- package/build/component/utils/charsetUtils.js +2 -0
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/common.js +1 -1
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/depsChecker/common.d.ts.map +1 -1
- package/build/component/utils/depsChecker/common.js +1 -1
- package/build/component/utils/depsChecker/common.js.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.d.ts.map +1 -1
- package/build/component/utils/depsChecker/cpUtils.js +1 -1
- package/build/component/utils/depsChecker/cpUtils.js.map +1 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +2 -0
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/metadataUtil.d.ts.map +1 -1
- package/build/component/utils/metadataUtil.js +2 -0
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +2 -0
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/core/FxCore.d.ts +1 -0
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +3 -0
- package/build/core/FxCore.js.map +1 -1
- package/build/core/FxCoreImplementV3.d.ts +1 -0
- package/build/core/FxCoreImplementV3.d.ts.map +1 -1
- package/build/core/FxCoreImplementV3.js +10 -0
- package/build/core/FxCoreImplementV3.js.map +1 -1
- package/build/core/index.js +1 -0
- package/build/core/index.js.map +1 -1
- package/build/error/arm.d.ts.map +1 -1
- package/build/error/arm.js +2 -0
- package/build/error/arm.js.map +1 -1
- package/build/error/azure.d.ts.map +1 -1
- package/build/error/azure.js +2 -0
- package/build/error/azure.js.map +1 -1
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +2 -0
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +10 -8
- package/build/error/deploy.js.map +1 -1
- package/build/error/index.d.ts.map +1 -1
- package/build/error/index.js +2 -0
- package/build/error/index.js.map +1 -1
- package/build/error/m365.d.ts.map +1 -1
- package/build/error/m365.js +2 -0
- package/build/error/m365.js.map +1 -1
- package/build/error/script.d.ts.map +1 -1
- package/build/error/script.js +2 -0
- package/build/error/script.js.map +1 -1
- package/build/error/upgrade.d.ts.map +1 -1
- package/build/error/upgrade.js +2 -0
- package/build/error/upgrade.js.map +1 -1
- package/build/error/yml.d.ts.map +1 -1
- package/build/error/yml.js +2 -0
- package/build/error/yml.js.map +1 -1
- package/build/failpoint/index.d.ts.map +1 -1
- package/build/failpoint/index.js +2 -0
- package/build/failpoint/index.js.map +1 -1
- package/build/failpoint/marker.d.ts.map +1 -1
- package/build/failpoint/marker.js +2 -0
- package/build/failpoint/marker.js.map +1 -1
- package/build/failpoint/runtime.d.ts.map +1 -1
- package/build/failpoint/runtime.js +3 -4
- package/build/failpoint/runtime.js.map +1 -1
- package/build/question/create.d.ts +3 -2
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +40 -45
- package/build/question/create.js.map +1 -1
- package/build/question/index.d.ts +2 -0
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +8 -0
- package/build/question/index.js.map +1 -1
- package/build/question/other.d.ts +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +14 -1
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +0 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +2 -1
- package/build/question/questionNames.js.map +1 -1
- package/build/question/util.d.ts +1 -1
- package/build/question/util.d.ts.map +1 -1
- package/build/question/util.js +7 -5
- package/build/question/util.js.map +1 -1
- package/package.json +7 -5
- package/resource/package.nls.cs.json +30 -56
- package/resource/package.nls.de.json +30 -56
- package/resource/package.nls.es.json +30 -56
- package/resource/package.nls.fr.json +30 -56
- package/resource/package.nls.it.json +30 -56
- package/resource/package.nls.ja.json +30 -56
- package/resource/package.nls.json +2 -2
- package/resource/package.nls.ko.json +30 -56
- package/resource/package.nls.pl.json +30 -56
- package/resource/package.nls.pt-BR.json +31 -57
- package/resource/package.nls.ru.json +34 -60
- package/resource/package.nls.tr.json +31 -57
- package/resource/package.nls.zh-Hans.json +31 -57
- package/resource/package.nls.zh-Hant.json +30 -56
- package/resource/package.nls.zh-cn.json +232 -712
- package/resource/package.nls.zh-tw.json +230 -710
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/build/component/generator/officeAddin/question.d.ts +0 -10
- package/build/component/generator/officeAddin/question.d.ts.map +0 -1
- package/build/component/generator/officeAddin/question.js +0 -118
- package/build/component/generator/officeAddin/question.js.map +0 -1
- package/templates/plugins/resource/apim/README.md +0 -92
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
3
2
|
// Copyright (c) Microsoft Corporation.
|
|
4
3
|
// Licensed under the MIT license.
|
|
5
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
5
|
exports.cpUtils = void 0;
|
|
7
6
|
const tslib_1 = require("tslib");
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
8
8
|
const cp = tslib_1.__importStar(require("child_process"));
|
|
9
9
|
const os = tslib_1.__importStar(require("os"));
|
|
10
10
|
var cpUtils;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cpUtils.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/util/cpUtils.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"cpUtils.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/util/cpUtils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,oDAAoD;AACpD,0DAAoC;AACpC,+CAAyB;AAMzB,IAAiB,OAAO,CAsIvB;AAtID,WA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,EAAE,MAAM,EAAE,EAAE,CAC9B,UAAU,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,GAAG,GAAG,KAAK,MAAM,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CACpE;SACF,CAAC,CAAC;IACL,CAAC;IAPe,mBAAW,cAO1B,CAAA;AACH,CAAC,EAtIgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAsIvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileHelper.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/util/fileHelper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fileHelper.d.ts","sourceRoot":"","sources":["../../../../src/common/deps-checker/util/fileHelper.ts"],"names":[],"mappings":"AAWA,wBAAsB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAYvE;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAavF;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileHelper.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/util/fileHelper.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"fileHelper.js","sourceRoot":"","sources":["../../../../src/common/deps-checker/util/fileHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC;;GAEG;AACH,qDAA+B;AAC/B,mDAAyD;AACzD,iDAA+C;AAC/C,4CAAgD;AAEzC,KAAK,UAAU,aAAa,CAAC,YAAoB;IACtD,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAC1C,I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,CAErC;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,mBAAmB,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"featureFlags.d.ts","sourceRoot":"","sources":["../../src/common/featureFlags.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAQ,GAAG,OAAO,CAO3F;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAMpD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAG7C;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
|
|
@@ -39,7 +39,8 @@ function isVideoFilterEnabled() {
|
|
|
39
39
|
}
|
|
40
40
|
exports.isVideoFilterEnabled = isVideoFilterEnabled;
|
|
41
41
|
function isImportSPFxEnabled() {
|
|
42
|
-
return
|
|
42
|
+
return true;
|
|
43
|
+
//return isFeatureFlagEnabled(FeatureFlagName.ImportSPFx, false);
|
|
43
44
|
}
|
|
44
45
|
exports.isImportSPFxEnabled = isImportSPFxEnabled;
|
|
45
46
|
function isCopilotPluginEnabled() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureFlags.js","sourceRoot":"","sources":["../../src/common/featureFlags.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,2CAA8C;AAE9C,kFAAkF;AAClF,SAAgB,oBAAoB,CAAC,eAAuB,EAAE,YAAY,GAAG,KAAK;IAChF,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC1C,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,OAAO,YAAY,CAAC,CAAC,2EAA2E;KACjG;SAAM;QACL,OAAO,IAAI,KAAK,GAAG,IAA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EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonUtils.d.ts","sourceRoot":"","sources":["../../src/common/jsonUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsonUtils.d.ts","sourceRoot":"","sources":["../../src/common/jsonUtils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAO,OAAO,EAAM,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAIlE,cAAM,SAAS;IACb,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC;IAY1C,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAenE,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC;CAczD;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsonUtils.js","sourceRoot":"","sources":["../../src/common/jsonUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsonUtils.js","sourceRoot":"","sources":["../../src/common/jsonUtils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAAkE;AAClE,4CAAoG;AACpG,gEAA0B;AAE1B,MAAM,SAAS;IACb,SAAS,CAAC,OAAe;QACvB,IAAI;YACF,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAChC,OAAO,gBAAE,CAAC,GAAG,CAAC,CAAC;SAChB;QAAC,OAAO,CAAM,EAAE;YACf,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa,EAAE;gBAC5B,MAAM,KAAK,GAAG,IAAI,wBAAe,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gBAC9C,OAAO,iBAAG,CAAC,KAAK,CAAC,CAAC;aACnB;YACD,OAAO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Q,CAAC,CAAC,CAAC;aACvD;YACD,OAAO,iBAAG,CAAC,IAAI,sBAAa,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC;SAC5C;IACH,CAAC;CACF;AAEY,QAAA,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"baseUrl": "https://github.com/OfficeDev/TeamsFx-Samples/tree/v2.1.0/",
|
|
3
|
-
"defaultPackageLink": "https://github.com/OfficeDev/TeamsFx-Samples/archive/refs/tags/v2.1.0.zip",
|
|
4
|
-
"baseFolderName": "TeamsFx-Samples-2.1.0",
|
|
5
3
|
"samples": [
|
|
6
4
|
{
|
|
7
5
|
"id": "hello-world-tab-with-backend",
|
|
@@ -94,9 +92,7 @@
|
|
|
94
92
|
"time": "5min to run",
|
|
95
93
|
"configuration": "Ready for debug",
|
|
96
94
|
"suggested": false,
|
|
97
|
-
"url": "https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-proactive-messaging-teamsfx"
|
|
98
|
-
"packageLink": "https://github.com/OfficeDev/Microsoft-Teams-Samples/archive/refs/heads/main.zip",
|
|
99
|
-
"relativePath": "Microsoft-Teams-Samples-main/samples/bot-proactive-messaging-teamsfx"
|
|
95
|
+
"url": "https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-proactive-messaging-teamsfx"
|
|
100
96
|
},
|
|
101
97
|
{
|
|
102
98
|
"id": "adaptive-card-notification",
|
|
@@ -211,9 +207,7 @@
|
|
|
211
207
|
"time": "5min to run",
|
|
212
208
|
"configuration": "Ready for debug",
|
|
213
209
|
"suggested": false,
|
|
214
|
-
"url": "https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-set-signature"
|
|
215
|
-
"packageLink": "https://github.com/OfficeDev/Office-Add-in-samples/archive/refs/heads/main.zip",
|
|
216
|
-
"relativePath": "Office-Add-in-samples-main/Samples/outlook-set-signature"
|
|
210
|
+
"url": "https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/outlook-set-signature"
|
|
217
211
|
},
|
|
218
212
|
{
|
|
219
213
|
"id": "developer-assist-dashboard",
|
|
@@ -6,10 +6,8 @@ export interface SampleInfo {
|
|
|
6
6
|
tags: string[];
|
|
7
7
|
time: string;
|
|
8
8
|
configuration: string;
|
|
9
|
-
link: string;
|
|
10
9
|
suggested: boolean;
|
|
11
10
|
url: string;
|
|
12
|
-
relativePath?: string;
|
|
13
11
|
}
|
|
14
12
|
interface SampleCollection {
|
|
15
13
|
samples: SampleInfo[];
|
|
@@ -19,6 +17,7 @@ declare class SampleProvider {
|
|
|
19
17
|
private sampleConfigs;
|
|
20
18
|
fetchSampleConfig(): Promise<void>;
|
|
21
19
|
get SampleCollection(): SampleCollection;
|
|
20
|
+
private getBaseSampleUrl;
|
|
22
21
|
}
|
|
23
22
|
export declare const sampleProvider: SampleProvider;
|
|
24
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samples.d.ts","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"samples.d.ts","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,gBAAgB;IACxB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,cAAM,cAAc;IAClB,OAAO,CAAC,gBAAgB,CAA+B;IACvD,OAAO,CAAC,aAAa,CAAM;IAEd,iBAAiB;IAqB9B,IAAW,gBAAgB,IAAI,gBAAgB,CA6B9C;IAED,OAAO,CAAC,gBAAgB;CAUzB;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC"}
|
package/build/common/samples.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.sampleProvider = void 0;
|
|
4
6
|
const tslib_1 = require("tslib");
|
|
@@ -6,6 +8,7 @@ const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
|
6
8
|
const utils_1 = require("../component/generator/utils");
|
|
7
9
|
const samples_config_v3_json_1 = tslib_1.__importDefault(require("./samples-config-v3.json"));
|
|
8
10
|
const featureFlags_1 = require("./featureFlags");
|
|
11
|
+
const packageJson = require("../../package.json");
|
|
9
12
|
class configInfo {
|
|
10
13
|
}
|
|
11
14
|
configInfo.owner = "OfficeDev";
|
|
@@ -30,7 +33,6 @@ class SampleProvider {
|
|
|
30
33
|
get SampleCollection() {
|
|
31
34
|
var _a;
|
|
32
35
|
const samples = ((_a = this.sampleConfigs) !== null && _a !== void 0 ? _a : samples_config_v3_json_1.default).samples.map((sample) => {
|
|
33
|
-
var _a, _b, _c;
|
|
34
36
|
return {
|
|
35
37
|
id: sample.id,
|
|
36
38
|
title: sample.title,
|
|
@@ -39,12 +41,8 @@ class SampleProvider {
|
|
|
39
41
|
tags: sample.tags,
|
|
40
42
|
time: sample.time,
|
|
41
43
|
configuration: sample.configuration,
|
|
42
|
-
link: (_a = sample.packageLink) !== null && _a !== void 0 ? _a : ((_b = this.sampleConfigs) !== null && _b !== void 0 ? _b : samples_config_v3_json_1.default).defaultPackageLink,
|
|
43
44
|
suggested: sample.suggested,
|
|
44
|
-
url: sample.
|
|
45
|
-
? sample.url
|
|
46
|
-
: `${((_c = this.sampleConfigs) !== null && _c !== void 0 ? _c : samples_config_v3_json_1.default).baseUrl}${sample.id}`,
|
|
47
|
-
relativePath: sample.relativePath,
|
|
45
|
+
url: sample.url ? sample.url : `${this.getBaseSampleUrl()}${sample.id}`,
|
|
48
46
|
};
|
|
49
47
|
});
|
|
50
48
|
// remove video filter sample app if feature flag is disabled.
|
|
@@ -60,6 +58,17 @@ class SampleProvider {
|
|
|
60
58
|
};
|
|
61
59
|
return this.sampleCollection;
|
|
62
60
|
}
|
|
61
|
+
getBaseSampleUrl() {
|
|
62
|
+
var _a;
|
|
63
|
+
const version = packageJson.version;
|
|
64
|
+
if (version.includes("alpha")) {
|
|
65
|
+
return "https://github.com/OfficeDev/TeamsFx-Samples/tree/dev/";
|
|
66
|
+
}
|
|
67
|
+
if (version.includes("rc")) {
|
|
68
|
+
return "https://github.com/OfficeDev/TeamsFx-Samples/tree/v3/";
|
|
69
|
+
}
|
|
70
|
+
return ((_a = this.sampleConfigs) !== null && _a !== void 0 ? _a : samples_config_v3_json_1.default).baseUrl;
|
|
71
|
+
}
|
|
63
72
|
}
|
|
64
73
|
exports.sampleProvider = new SampleProvider();
|
|
65
74
|
//# sourceMappingURL=samples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,0DAA0B;AAC1B,wDAAsE;AACtE,8FAAsD;AACtD,iDAAsD;AACtD,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAM,UAAU;;AACE,gBAAK,GAAG,WAAW,CAAC;AACpB,eAAI,GAAG,iBAAiB,CAAC;AACzB,eAAI,GAAG,QAAQ,CAAC;AAChB,eAAI,GAAG,gCAAgC,CAAC;AAmB1D,MAAM,cAAc;IAIX,KAAK,CAAC,iBAAiB;QAC5B,I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AC,mCAAoB,EAAE,EAAE;YAC3B,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;YACpD,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAW,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,mBAAmB,CAAC,CAAC;YACpF,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;gBAChB,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;aAC1B;SACF;QAED,IAAI,CAAC,gBAAgB,GAAG;YACtB,OAAO;SACR,CAAC;QAEF,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAEO,gBAAgB;;QACtB,MAAM,OAAO,GAAW,WAAW,CAAC,OAAO,CAAC;QAC5C,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE;YAC7B,OAAO,wDAAwD,CAAC;SACjE;QACD,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;YAC1B,OAAO,uDAAuD,CAAC;SAChE;QACD,OAAO,CAAC,MAAA,IAAI,CAAC,aAAa,mCAAI,gCAAc,CAAC,CAAC,OAAO,CAAC;IACxD,CAAC;CACF;AAEY,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ConstantString {
|
|
2
|
+
static readonly CancelledMessage = "Operation cancelled";
|
|
3
|
+
static readonly SpecVersionNotSupported = "OpenAPI version lower than 3.0.0 is not supported";
|
|
4
|
+
static readonly NoServerInformation = "No server information found in the OpenAPI specification file";
|
|
5
|
+
static readonly MultipleServerInformation = "Multiple server information found in the OpenAPI specification file";
|
|
6
|
+
static readonly RemoteRefNotSupported = "Remote reference is not supported: %s";
|
|
7
|
+
static readonly MissingOperationId = "Missing operationId: %s";
|
|
8
|
+
static readonly NoSupportedApi = "No supported API found in the OpenAPI specification file";
|
|
9
|
+
static readonly GetMethod = "get";
|
|
10
|
+
static readonly PostMethod = "post";
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"AAIA,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,gBAAgB,yBAAyB;IACzD,MAAM,CAAC,QAAQ,CAAC,uBAAuB,uDAAuD;IAC9F,MAAM,CAAC,QAAQ,CAAC,mBAAmB,mEAC+B;IAClE,MAAM,CAAC,QAAQ,CAAC,yBAAyB,yEAC+B;IACxE,MAAM,CAAC,QAAQ,CAAC,qBAAqB,2CAA2C;IAChF,MAAM,CAAC,QAAQ,CAAC,kBAAkB,6BAA6B;IAC/D,MAAM,CAAC,QAAQ,CAAC,cAAc,8DAA8D;IAC5F,MAAM,CAAC,QAAQ,CAAC,SAAS,SAAS;IAClC,MAAM,CAAC,QAAQ,CAAC,UAAU,UAAU;CACrC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ConstantString = void 0;
|
|
6
|
+
class ConstantString {
|
|
7
|
+
}
|
|
8
|
+
exports.ConstantString = ConstantString;
|
|
9
|
+
ConstantString.CancelledMessage = "Operation cancelled";
|
|
10
|
+
ConstantString.SpecVersionNotSupported = "OpenAPI version lower than 3.0.0 is not supported";
|
|
11
|
+
ConstantString.NoServerInformation = "No server information found in the OpenAPI specification file";
|
|
12
|
+
ConstantString.MultipleServerInformation = "Multiple server information found in the OpenAPI specification file";
|
|
13
|
+
ConstantString.RemoteRefNotSupported = "Remote reference is not supported: %s";
|
|
14
|
+
ConstantString.MissingOperationId = "Missing operationId: %s";
|
|
15
|
+
ConstantString.NoSupportedApi = "No supported API found in the OpenAPI specification file";
|
|
16
|
+
ConstantString.GetMethod = "get";
|
|
17
|
+
ConstantString.PostMethod = "post";
|
|
18
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/common/spec-parser/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAEb,MAAa,cAAc;;AAA3B,wCAYC;AAXiB,+BAAgB,GAAG,qBAAqB,CAAC;AACzC,sCAAuB,GAAG,mDAAmD,CAAC;AAC9E,kCAAmB,GACjC,+DAA+D,CAAC;AAClD,wCAAyB,GACvC,qEAAqE,CAAC;AACxD,oCAAqB,GAAG,uCAAuC,CAAC;AAChE,iCAAkB,GAAG,yBAAyB,CAAC;AAC/C,6BAAc,GAAG,0DAA0D,CAAC;AAC5E,wBAAS,GAAG,KAAK,CAAC;AAClB,yBAAU,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An interface that represents the result of validating an OpenAPI specification file.
|
|
3
|
+
*/
|
|
4
|
+
export interface ValidateResult {
|
|
5
|
+
/**
|
|
6
|
+
* The validation status of the OpenAPI specification file.
|
|
7
|
+
*/
|
|
8
|
+
status: ValidationStatus;
|
|
9
|
+
/**
|
|
10
|
+
* An array of warning results generated during validation.
|
|
11
|
+
*/
|
|
12
|
+
warnings: WarningResult[];
|
|
13
|
+
/**
|
|
14
|
+
* An array of error results generated during validation.
|
|
15
|
+
*/
|
|
16
|
+
errors: ErrorResult[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* An interface that represents a warning result generated during validation.
|
|
20
|
+
*/
|
|
21
|
+
export interface WarningResult {
|
|
22
|
+
/**
|
|
23
|
+
* The type of warning.
|
|
24
|
+
*/
|
|
25
|
+
type: WarningType;
|
|
26
|
+
/**
|
|
27
|
+
* The content of the warning.
|
|
28
|
+
*/
|
|
29
|
+
content: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* An interface that represents an error result generated during validation.
|
|
33
|
+
*/
|
|
34
|
+
export interface ErrorResult {
|
|
35
|
+
/**
|
|
36
|
+
* The type of error.
|
|
37
|
+
*/
|
|
38
|
+
type: ErrorType;
|
|
39
|
+
/**
|
|
40
|
+
* The content of the error.
|
|
41
|
+
*/
|
|
42
|
+
content: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* An enum that represents the types of errors that can occur during validation.
|
|
46
|
+
*/
|
|
47
|
+
export declare enum ErrorType {
|
|
48
|
+
SpecNotValid = 0,
|
|
49
|
+
VersionNotSupported = 1,
|
|
50
|
+
RemoteRefNotSupported = 2,
|
|
51
|
+
NoServerInformation = 3,
|
|
52
|
+
MultipleServerInformation = 4,
|
|
53
|
+
NoSupportedApi = 5,
|
|
54
|
+
ListFailed = 6,
|
|
55
|
+
Cancelled = 7,
|
|
56
|
+
Unknown = 8
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* An enum that represents the types of warnings that can occur during validation.
|
|
60
|
+
*/
|
|
61
|
+
export declare enum WarningType {
|
|
62
|
+
AuthNotSupported = 0,
|
|
63
|
+
MethodNotSupported = 1,
|
|
64
|
+
OperationIdMissing = 2,
|
|
65
|
+
Unknown = 3
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* An enum that represents the validation status of an OpenAPI specification file.
|
|
69
|
+
*/
|
|
70
|
+
export declare enum ValidationStatus {
|
|
71
|
+
Valid = 0,
|
|
72
|
+
Warning = 1,
|
|
73
|
+
Error = 2
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,QAAQ,EAAE,aAAa,EAAE,CAAC;IAE1B;;OAEG;IACH,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,YAAY,IAAA;IACZ,mBAAmB,IAAA;IACnB,qBAAqB,IAAA;IACrB,mBAAmB,IAAA;IACnB,yBAAyB,IAAA;IACzB,cAAc,IAAA;IAEd,UAAU,IAAA;IACV,SAAS,IAAA;IACT,OAAO,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,WAAW;IACrB,gBAAgB,IAAA;IAChB,kBAAkB,IAAA;IAClB,kBAAkB,IAAA;IAClB,OAAO,IAAA;CACR;AAED;;GAEG;AACH,oBAAY,gBAAgB;IAC1B,KAAK,IAAA;IACL,OAAO,IAAA;IACP,KAAK,IAAA;CACN"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ValidationStatus = exports.WarningType = exports.ErrorType = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* An enum that represents the types of errors that can occur during validation.
|
|
8
|
+
*/
|
|
9
|
+
var ErrorType;
|
|
10
|
+
(function (ErrorType) {
|
|
11
|
+
ErrorType[ErrorType["SpecNotValid"] = 0] = "SpecNotValid";
|
|
12
|
+
ErrorType[ErrorType["VersionNotSupported"] = 1] = "VersionNotSupported";
|
|
13
|
+
ErrorType[ErrorType["RemoteRefNotSupported"] = 2] = "RemoteRefNotSupported";
|
|
14
|
+
ErrorType[ErrorType["NoServerInformation"] = 3] = "NoServerInformation";
|
|
15
|
+
ErrorType[ErrorType["MultipleServerInformation"] = 4] = "MultipleServerInformation";
|
|
16
|
+
ErrorType[ErrorType["NoSupportedApi"] = 5] = "NoSupportedApi";
|
|
17
|
+
ErrorType[ErrorType["ListFailed"] = 6] = "ListFailed";
|
|
18
|
+
ErrorType[ErrorType["Cancelled"] = 7] = "Cancelled";
|
|
19
|
+
ErrorType[ErrorType["Unknown"] = 8] = "Unknown";
|
|
20
|
+
})(ErrorType = exports.ErrorType || (exports.ErrorType = {}));
|
|
21
|
+
/**
|
|
22
|
+
* An enum that represents the types of warnings that can occur during validation.
|
|
23
|
+
*/
|
|
24
|
+
var WarningType;
|
|
25
|
+
(function (WarningType) {
|
|
26
|
+
WarningType[WarningType["AuthNotSupported"] = 0] = "AuthNotSupported";
|
|
27
|
+
WarningType[WarningType["MethodNotSupported"] = 1] = "MethodNotSupported";
|
|
28
|
+
WarningType[WarningType["OperationIdMissing"] = 2] = "OperationIdMissing";
|
|
29
|
+
WarningType[WarningType["Unknown"] = 3] = "Unknown";
|
|
30
|
+
})(WarningType = exports.WarningType || (exports.WarningType = {}));
|
|
31
|
+
/**
|
|
32
|
+
* An enum that represents the validation status of an OpenAPI specification file.
|
|
33
|
+
*/
|
|
34
|
+
var ValidationStatus;
|
|
35
|
+
(function (ValidationStatus) {
|
|
36
|
+
ValidationStatus[ValidationStatus["Valid"] = 0] = "Valid";
|
|
37
|
+
ValidationStatus[ValidationStatus["Warning"] = 1] = "Warning";
|
|
38
|
+
ValidationStatus[ValidationStatus["Error"] = 2] = "Error";
|
|
39
|
+
})(ValidationStatus = exports.ValidationStatus || (exports.ValidationStatus = {}));
|
|
40
|
+
//# sourceMappingURL=interfaces.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/common/spec-parser/interfaces.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAoDb;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACnB,yDAAY,CAAA;IACZ,uEAAmB,CAAA;IACnB,2EAAqB,CAAA;IACrB,uEAAmB,CAAA;IACnB,mFAAyB,CAAA;IACzB,6DAAc,CAAA;IAEd,qDAAU,CAAA;IACV,mDAAS,CAAA;IACT,+CAAO,CAAA;AACT,CAAC,EAXW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAWpB;AAED;;GAEG;AACH,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,qEAAgB,CAAA;IAChB,yEAAkB,CAAA;IAClB,yEAAkB,CAAA;IAClB,mDAAO,CAAA;AACT,CAAC,EALW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAKtB;AAED;;GAEG;AACH,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,yDAAK,CAAA;IACL,6DAAO,CAAA;IACP,yDAAK,CAAA;AACP,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ValidateResult } from "./interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* A class that parses an OpenAPI specification file and provides methods to validate, list, and generate artifacts.
|
|
4
|
+
*/
|
|
5
|
+
export declare class SpecParser {
|
|
6
|
+
private specPath;
|
|
7
|
+
private apiMap;
|
|
8
|
+
private spec;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new instance of the SpecParser class.
|
|
11
|
+
* @param path The URL or file path of the OpenAPI specification file. The OpenAPI specification file must have a version of 3.0 or higher.
|
|
12
|
+
*/
|
|
13
|
+
constructor(path: string);
|
|
14
|
+
/**
|
|
15
|
+
* Validates the OpenAPI specification file and returns a validation result.
|
|
16
|
+
*
|
|
17
|
+
* @returns A validation result object that contains information about any errors or warnings in the specification file.
|
|
18
|
+
*/
|
|
19
|
+
validate(): Promise<ValidateResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Lists all the OpenAPI operations in the specification file.
|
|
22
|
+
* @returns A string array that represents the HTTP method and path of each operation, such as ['GET /pets/{petId}', 'GET /user/{userId}']
|
|
23
|
+
* according to copilot plugin spec, only list get and post method without auth
|
|
24
|
+
*/
|
|
25
|
+
list(): Promise<string[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
28
|
+
* @param manifestPath A file path of the Teams app manifest file to update.
|
|
29
|
+
* @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
|
|
30
|
+
* @param specPath An optional file path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
31
|
+
* @param adaptiveCardFolder An optional folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
|
|
32
|
+
*/
|
|
33
|
+
generate(manifestPath: string, filter: string[], specPath?: string, adaptiveCardFolder?: string, signal?: AbortSignal): Promise<void>;
|
|
34
|
+
private getAllSupportedApi;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=specParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specParser.d.ts","sourceRoot":"","sources":["../../../src/common/spec-parser/specParser.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,cAAc,EAIf,MAAM,cAAc,CAAC;AAGtB;;GAEG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAA0D;IACxE,OAAO,CAAC,IAAI,CAAiC;IAE7C;;;OAGG;gBACS,IAAI,EAAE,MAAM;IAIxB;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,cAAc,CAAC;IA+FzC;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAY/B;;;;;;OAMG;IACG,QAAQ,CACZ,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EAAE,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC;YAQF,kBAAkB;CAuBjC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
"use strict";
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.SpecParser = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const util = tslib_1.__importStar(require("util"));
|
|
8
|
+
const swagger_parser_1 = tslib_1.__importDefault(require("@apidevtools/swagger-parser"));
|
|
9
|
+
const specParserError_1 = require("./specParserError");
|
|
10
|
+
const interfaces_1 = require("./interfaces");
|
|
11
|
+
const constants_1 = require("./constants");
|
|
12
|
+
/**
|
|
13
|
+
* A class that parses an OpenAPI specification file and provides methods to validate, list, and generate artifacts.
|
|
14
|
+
*/
|
|
15
|
+
class SpecParser {
|
|
16
|
+
/**
|
|
17
|
+
* Creates a new instance of the SpecParser class.
|
|
18
|
+
* @param path The URL or file path of the OpenAPI specification file. The OpenAPI specification file must have a version of 3.0 or higher.
|
|
19
|
+
*/
|
|
20
|
+
constructor(path) {
|
|
21
|
+
this.specPath = path;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Validates the OpenAPI specification file and returns a validation result.
|
|
25
|
+
*
|
|
26
|
+
* @returns A validation result object that contains information about any errors or warnings in the specification file.
|
|
27
|
+
*/
|
|
28
|
+
async validate() {
|
|
29
|
+
const errors = [];
|
|
30
|
+
const warnings = [];
|
|
31
|
+
const parser = new swagger_parser_1.default();
|
|
32
|
+
try {
|
|
33
|
+
if (!this.spec) {
|
|
34
|
+
this.spec = (await parser.validate(this.specPath));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
// Spec not valid
|
|
39
|
+
errors.push({ type: interfaces_1.ErrorType.SpecNotValid, content: e.toString() });
|
|
40
|
+
return {
|
|
41
|
+
status: interfaces_1.ValidationStatus.Error,
|
|
42
|
+
warnings,
|
|
43
|
+
errors,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
// Spec version not supported
|
|
47
|
+
if (!this.spec.openapi || this.spec.openapi < "3.0.0") {
|
|
48
|
+
errors.push({
|
|
49
|
+
type: interfaces_1.ErrorType.VersionNotSupported,
|
|
50
|
+
content: constants_1.ConstantString.SpecVersionNotSupported,
|
|
51
|
+
});
|
|
52
|
+
return {
|
|
53
|
+
status: interfaces_1.ValidationStatus.Error,
|
|
54
|
+
warnings,
|
|
55
|
+
errors,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// Server information invalid
|
|
59
|
+
if (!this.spec.servers || this.spec.servers.length === 0) {
|
|
60
|
+
errors.push({
|
|
61
|
+
type: interfaces_1.ErrorType.NoServerInformation,
|
|
62
|
+
content: constants_1.ConstantString.NoServerInformation,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else if (this.spec.servers.length > 1) {
|
|
66
|
+
errors.push({
|
|
67
|
+
type: interfaces_1.ErrorType.MultipleServerInformation,
|
|
68
|
+
content: constants_1.ConstantString.MultipleServerInformation,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
// Remote reference not supported
|
|
72
|
+
const refPaths = parser.$refs.paths();
|
|
73
|
+
// refPaths [0] is the current spec file path
|
|
74
|
+
if (refPaths.length > 1) {
|
|
75
|
+
console.log("refPaths", refPaths);
|
|
76
|
+
errors.push({
|
|
77
|
+
type: interfaces_1.ErrorType.RemoteRefNotSupported,
|
|
78
|
+
content: util.format(constants_1.ConstantString.RemoteRefNotSupported, refPaths.join(", ")),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
// No supported API
|
|
82
|
+
const apiMap = await this.getAllSupportedApi(this.spec);
|
|
83
|
+
if (Object.keys(apiMap).length === 0) {
|
|
84
|
+
errors.push({
|
|
85
|
+
type: interfaces_1.ErrorType.NoSupportedApi,
|
|
86
|
+
content: constants_1.ConstantString.NoSupportedApi,
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
// OperationId missing
|
|
90
|
+
const apisMissingOperationId = [];
|
|
91
|
+
for (const key in apiMap) {
|
|
92
|
+
const pathObjectItem = apiMap[key];
|
|
93
|
+
if (!pathObjectItem.operationId) {
|
|
94
|
+
apisMissingOperationId.push(key);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (apisMissingOperationId.length > 0) {
|
|
98
|
+
warnings.push({
|
|
99
|
+
type: interfaces_1.WarningType.OperationIdMissing,
|
|
100
|
+
content: util.format(constants_1.ConstantString.MissingOperationId, apisMissingOperationId.join(", ")),
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
let status = interfaces_1.ValidationStatus.Valid;
|
|
104
|
+
if (warnings.length > 0 && errors.length === 0) {
|
|
105
|
+
status = interfaces_1.ValidationStatus.Warning;
|
|
106
|
+
}
|
|
107
|
+
else if (errors.length > 0) {
|
|
108
|
+
status = interfaces_1.ValidationStatus.Error;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
status,
|
|
112
|
+
warnings,
|
|
113
|
+
errors,
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Lists all the OpenAPI operations in the specification file.
|
|
118
|
+
* @returns A string array that represents the HTTP method and path of each operation, such as ['GET /pets/{petId}', 'GET /user/{userId}']
|
|
119
|
+
* according to copilot plugin spec, only list get and post method without auth
|
|
120
|
+
*/
|
|
121
|
+
async list() {
|
|
122
|
+
try {
|
|
123
|
+
if (!this.spec) {
|
|
124
|
+
this.spec = (await swagger_parser_1.default.validate(this.specPath));
|
|
125
|
+
}
|
|
126
|
+
const apiMap = await this.getAllSupportedApi(this.spec);
|
|
127
|
+
return Array.from(Object.keys(apiMap));
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
throw new specParserError_1.SpecParserError(err.toString(), interfaces_1.ErrorType.ListFailed);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Generates and update artifacts from the OpenAPI specification file. Generate Adaptive Cards, update Teams app manifest, and generate a new OpenAPI specification file.
|
|
135
|
+
* @param manifestPath A file path of the Teams app manifest file to update.
|
|
136
|
+
* @param filter An array of strings that represent the filters to apply when generating the artifacts. If filter is empty, it would process nothing.
|
|
137
|
+
* @param specPath An optional file path of the new OpenAPI specification file to generate. If not specified or empty, no spec file will be generated.
|
|
138
|
+
* @param adaptiveCardFolder An optional folder path where the Adaptive Card files will be generated. If not specified or empty, Adaptive Card files will not be generated.
|
|
139
|
+
*/
|
|
140
|
+
async generate(manifestPath, filter, specPath, adaptiveCardFolder, signal) {
|
|
141
|
+
if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
|
142
|
+
throw new specParserError_1.SpecParserError(constants_1.ConstantString.CancelledMessage, interfaces_1.ErrorType.Cancelled);
|
|
143
|
+
}
|
|
144
|
+
// TODO: implementation
|
|
145
|
+
}
|
|
146
|
+
async getAllSupportedApi(spec) {
|
|
147
|
+
var _a;
|
|
148
|
+
if (this.apiMap !== undefined) {
|
|
149
|
+
return this.apiMap;
|
|
150
|
+
}
|
|
151
|
+
const paths = spec.paths;
|
|
152
|
+
const result = {};
|
|
153
|
+
for (const path in paths) {
|
|
154
|
+
const methods = paths[path];
|
|
155
|
+
for (const method in methods) {
|
|
156
|
+
// only list get and post method without auth
|
|
157
|
+
if ((method === constants_1.ConstantString.GetMethod || method === constants_1.ConstantString.PostMethod) &&
|
|
158
|
+
!((_a = methods[method]) === null || _a === void 0 ? void 0 : _a.security)) {
|
|
159
|
+
result[`${method.toUpperCase()} ${path}`] = methods[method];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
this.apiMap = result;
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
exports.SpecParser = SpecParser;
|
|
168
|
+
//# sourceMappingURL=specParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specParser.js","sourceRoot":"","sources":["../../../src/common/spec-parser/specParser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAEb,mDAA6B;AAC7B,yFAAwD;AAExD,uDAAoD;AACpD,6CAOsB;AACtB,2CAA6C;AAE7C;;GAEG;AACH,MAAa,UAAU;IAKrB;;;OAGG;IACH,YAAY,IAAY;QACtB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,QAAQ;QACZ,MAAM,MAAM,GAAkB,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAoB,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,IAAI,wBAAa,EAAE,CAAC;QACnC,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;gBACd,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAuB,CAAC;aAC1E;SACF;QAAC,OAAO,CAAC,EAAE;YACV,iBAAiB;YACjB,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,sBAAS,CAAC,YAAY,EAAE,OAAO,EAAG,CAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAChF,OAAO;gBACL,MAAM,EAAE,6BAAgB,CAAC,KAAK;gBAC9B,QAAQ;gBACR,MAAM;aACP,CAAC;SACH;QAED,6BAA6B;QAC7B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE;YACrD,MAAM,CAAC,IAA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