@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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FolderQuestion, Inputs, OptionItem, QTreeNode, SingleFileQuestion, SingleSelectQuestion } from "@microsoft/teamsfx-api";
|
|
2
|
-
export declare const OfficeAddinItems: () => OptionItem[];
|
|
3
|
-
export declare function ImportAddinProjectItem(): OptionItem;
|
|
4
|
-
export declare const AddinLanguageQuestion: SingleSelectQuestion;
|
|
5
|
-
export declare const OfficeHostQuestion: SingleSelectQuestion;
|
|
6
|
-
export declare const AddinProjectFolderQuestion: FolderQuestion;
|
|
7
|
-
export declare const AddinProjectManifestQuestion: SingleFileQuestion;
|
|
8
|
-
export declare const getTemplate: (inputs: Inputs) => string;
|
|
9
|
-
export declare const getQuestionsForScaffolding: () => QTreeNode;
|
|
10
|
-
//# sourceMappingURL=question.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.d.ts","sourceRoot":"","sources":["../../../../src/component/generator/officeAddin/question.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,MAAM,EACN,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAQhC,eAAO,MAAM,gBAAgB,EAAE,MAAM,UAAU,EAQ1C,CAAC;AAGN,wBAAgB,sBAAsB,IAAI,UAAU,CAUnD;AAWD,eAAO,MAAM,qBAAqB,EAAE,oBAiBnC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,oBAoBhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,cAIxC,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,kBAI1C,CAAC;AAEF,eAAO,MAAM,WAAW,WAAY,MAAM,KAAG,MAS5C,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAAO,SAyB7C,CAAC"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getQuestionsForScaffolding = exports.getTemplate = exports.AddinProjectManifestQuestion = exports.AddinProjectFolderQuestion = exports.OfficeHostQuestion = exports.AddinLanguageQuestion = exports.ImportAddinProjectItem = exports.OfficeAddinItems = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
6
|
-
const localizeUtils_1 = require("../../../common/localizeUtils");
|
|
7
|
-
const constants_1 = require("../../constants");
|
|
8
|
-
const projectsJsonData_1 = tslib_1.__importDefault(require("./config/projectsJsonData"));
|
|
9
|
-
const jsonData = new projectsJsonData_1.default();
|
|
10
|
-
const OfficeAddinItems = () => jsonData.getProjectTemplateNames().map((template) => ({
|
|
11
|
-
id: template,
|
|
12
|
-
label: localizeUtils_1.getLocalizedString(jsonData.getProjectDisplayName(template)),
|
|
13
|
-
detail: localizeUtils_1.getLocalizedString(jsonData.getProjectDetails(template)),
|
|
14
|
-
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
15
|
-
}));
|
|
16
|
-
exports.OfficeAddinItems = OfficeAddinItems;
|
|
17
|
-
// TODO: add localization strings
|
|
18
|
-
function ImportAddinProjectItem() {
|
|
19
|
-
return {
|
|
20
|
-
id: "import-addin-project",
|
|
21
|
-
label: localizeUtils_1.getLocalizedString("core.importAddin.label"),
|
|
22
|
-
cliName: "import",
|
|
23
|
-
detail: localizeUtils_1.getLocalizedString("core.importAddin.detail"),
|
|
24
|
-
description: localizeUtils_1.getLocalizedString("core.createProjectQuestion.option.description.previewOnWindow"),
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
exports.ImportAddinProjectItem = ImportAddinProjectItem;
|
|
28
|
-
var QuestionName;
|
|
29
|
-
(function (QuestionName) {
|
|
30
|
-
QuestionName["AddinLanguageQuestion"] = "addin-language";
|
|
31
|
-
QuestionName["AddinNameQuestion"] = "addin-name";
|
|
32
|
-
QuestionName["AddinProjectFolderQuestion"] = "addin-project-folder";
|
|
33
|
-
QuestionName["AddinProjectManifestQuestion"] = "addin-project-manifest";
|
|
34
|
-
QuestionName["AddinTemplateSelectQuestion"] = "addin-template-select";
|
|
35
|
-
QuestionName["OfficeHostQuestion"] = "addin-host";
|
|
36
|
-
})(QuestionName || (QuestionName = {}));
|
|
37
|
-
exports.AddinLanguageQuestion = {
|
|
38
|
-
type: "singleSelect",
|
|
39
|
-
name: QuestionName.AddinLanguageQuestion,
|
|
40
|
-
title: "Add-in Language",
|
|
41
|
-
staticOptions: [],
|
|
42
|
-
dynamicOptions: async (inputs) => {
|
|
43
|
-
const template = exports.getTemplate(inputs);
|
|
44
|
-
const supportedTypes = jsonData.getSupportedScriptTypes(template);
|
|
45
|
-
const options = supportedTypes.map((language) => ({ label: language, id: language }));
|
|
46
|
-
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
47
|
-
},
|
|
48
|
-
default: async (inputs) => {
|
|
49
|
-
const template = exports.getTemplate(inputs);
|
|
50
|
-
const options = jsonData.getSupportedScriptTypes(template);
|
|
51
|
-
return options[0] || "No Options";
|
|
52
|
-
},
|
|
53
|
-
skipSingleOption: true,
|
|
54
|
-
};
|
|
55
|
-
exports.OfficeHostQuestion = {
|
|
56
|
-
type: "singleSelect",
|
|
57
|
-
name: QuestionName.OfficeHostQuestion,
|
|
58
|
-
title: "Add-in Host",
|
|
59
|
-
staticOptions: [],
|
|
60
|
-
dynamicOptions: async (inputs) => {
|
|
61
|
-
const template = exports.getTemplate(inputs);
|
|
62
|
-
const getHostTemplateNames = jsonData.getHostTemplateNames(template);
|
|
63
|
-
const options = getHostTemplateNames.map((host) => ({
|
|
64
|
-
label: jsonData.getHostDisplayName(host),
|
|
65
|
-
id: host,
|
|
66
|
-
}));
|
|
67
|
-
return options.length > 0 ? options : [{ label: "No Options", id: "No Options" }];
|
|
68
|
-
},
|
|
69
|
-
default: async (inputs) => {
|
|
70
|
-
const template = exports.getTemplate(inputs);
|
|
71
|
-
const options = jsonData.getHostTemplateNames(template);
|
|
72
|
-
return options[0] || "No Options";
|
|
73
|
-
},
|
|
74
|
-
skipSingleOption: true,
|
|
75
|
-
};
|
|
76
|
-
exports.AddinProjectFolderQuestion = {
|
|
77
|
-
type: "folder",
|
|
78
|
-
name: QuestionName.AddinProjectFolderQuestion,
|
|
79
|
-
title: "Existing add-in project folder",
|
|
80
|
-
};
|
|
81
|
-
exports.AddinProjectManifestQuestion = {
|
|
82
|
-
type: "singleFile",
|
|
83
|
-
name: QuestionName.AddinProjectManifestQuestion,
|
|
84
|
-
title: "Select import project manifest file",
|
|
85
|
-
};
|
|
86
|
-
const getTemplate = (inputs) => {
|
|
87
|
-
const capabilities = inputs["capabilities"];
|
|
88
|
-
const templates = jsonData.getProjectTemplateNames();
|
|
89
|
-
const foundTemplate = templates.find((template) => {
|
|
90
|
-
return capabilities.includes(template);
|
|
91
|
-
});
|
|
92
|
-
return foundTemplate !== null && foundTemplate !== void 0 ? foundTemplate : "";
|
|
93
|
-
};
|
|
94
|
-
exports.getTemplate = getTemplate;
|
|
95
|
-
const getQuestionsForScaffolding = () => {
|
|
96
|
-
const importNode = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
97
|
-
importNode.condition = (inputs) => inputs[constants_1.AzureSolutionQuestionNames.Capabilities] === ImportAddinProjectItem().id;
|
|
98
|
-
importNode.addChild(new teamsfx_api_1.QTreeNode(exports.AddinProjectFolderQuestion));
|
|
99
|
-
importNode.addChild(new teamsfx_api_1.QTreeNode(exports.AddinProjectManifestQuestion));
|
|
100
|
-
const templateNode = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
101
|
-
templateNode.condition = (inputs) => {
|
|
102
|
-
const cap = inputs[constants_1.AzureSolutionQuestionNames.Capabilities];
|
|
103
|
-
const addinOptionIds = [
|
|
104
|
-
...exports.OfficeAddinItems().map((item) => {
|
|
105
|
-
return item.id;
|
|
106
|
-
}),
|
|
107
|
-
];
|
|
108
|
-
return addinOptionIds.includes(cap);
|
|
109
|
-
};
|
|
110
|
-
templateNode.addChild(new teamsfx_api_1.QTreeNode(exports.AddinLanguageQuestion));
|
|
111
|
-
templateNode.addChild(new teamsfx_api_1.QTreeNode(exports.OfficeHostQuestion));
|
|
112
|
-
const root = new teamsfx_api_1.QTreeNode({ type: "group" });
|
|
113
|
-
root.addChild(importNode);
|
|
114
|
-
root.addChild(templateNode);
|
|
115
|
-
return root;
|
|
116
|
-
};
|
|
117
|
-
exports.getQuestionsForScaffolding = getQuestionsForScaffolding;
|
|
118
|
-
//# sourceMappingURL=question.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"question.js","sourceRoot":"","sources":["../../../../src/component/generator/officeAddin/question.ts"],"names":[],"mappings":";;;;AAAA,wDAOgC;AAEhC,iEAAmE;AACnE,+CAA6D;AAC7D,yFAAyD;AAEzD,MAAM,QAAQ,GAAG,IAAI,0BAAgB,EAAE,CAAC;AAEjC,MAAM,gBAAgB,GAAuB,GAAG,EAAE,CACvD,QAAQ,CAAC,uBAAuB,EAAE,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,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,QAAQ,CAAC,IAAI,uBAAS,CAAC,oCAA4B,CAAC,CAAC,CAAC;IAEjE,MAAM,YAAY,GAAG,IAAI,uBAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IACtD,YAAY,CAAC,SAAS,GAAG,CAAC,MAAc,EAAE,EAAE;QAC1C,MAAM,GAAG,GAAG,MAAM,CAAC,sCAA0B,CAAC,YAAY,CAAW,CAAC;QACtE,MAAM,cAAc,GAAa;YAC/B,GAAG,wBAAgB,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACjC,OAAO,IAAI,CAAC,EAAE,CAAC;YACjB,CAAC,CAAC;SACH,CAAC;QACF,OAAO,cAAc,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC,CAAC;IACF,YAAY,CAAC,QAAQ,CAAC,IAAI,uBAAS,CAAC,6BAAqB,CAAC,CAAC,CAAC;IAC5D,YAAY,CAAC,QAAQ,CAAC,IAAI,uBAAS,CAAC,0BAAkB,CAAC,CAAC,CAAC;IAEzD,MAAM,IAAI,GAAG,IAAI,uBAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9C,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC1B,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAE5B,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAzBW,QAAA,0BAA0B,8BAyBrC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Publish Teams Backend (Azure Functions) to Azure API Management
|
|
2
|
-
|
|
3
|
-
Azure API Management (APIM) is used to create consistent and modern API gateways for existing backend services. With Teams Toolkit or TeamsFx CLI, you can easily publish your backend APIs (Azure Functions) to APIM instance.
|
|
4
|
-
|
|
5
|
-
## Prerequisite
|
|
6
|
-
|
|
7
|
-
- [Node.js](https://nodejs.org/), supported versions: 14, 16, 18 (preview)
|
|
8
|
-
- An Microsoft 365 account. If you do not have an Microsoft 365 account, apply for one from [Microsoft 365 developer program](https://developer.microsoft.com/en-us/microsoft-365/dev-program)
|
|
9
|
-
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/en-us/free/)
|
|
10
|
-
- Ensure the resource provider 'Microsoft.ApiManagement' is registered for the subscription by following [document](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/error-register-resource-provider#solution-3---azure-portal)
|
|
11
|
-
- Teams Toolkit Extension for Visual Studio Code or TeamsFx CLI
|
|
12
|
-
|
|
13
|
-
## Enable API Management Feature in TeamsFx
|
|
14
|
-
|
|
15
|
-
> Publish APIs to APIM requires Azure Functions in your project. If your project does not include Azure Functions, please note that we will automatically add one for you. Read about [Azure Functions in TeamsFx](https://github.com/OfficeDev/TeamsFx/tree/main/templates/function-base/js/default#readme) to learn more.
|
|
16
|
-
|
|
17
|
-
You can enable Azure API Management by following steps:
|
|
18
|
-
| Using Teams Toolkit| Using TeamsFx CLI|
|
|
19
|
-
| :------------------| :----------------|
|
|
20
|
-
| Open command palette, select `Teams: Add Resources` and select `Register APIs in Azure API Management` in next step.| Run command `teamsfx resource add azure-apim`.|
|
|
21
|
-
|
|
22
|
-
## Deploy to Azure
|
|
23
|
-
|
|
24
|
-
Deploy your project to Azure by following these steps:
|
|
25
|
-
|
|
26
|
-
| From Visual Studio Code | From TeamsFx CLI |
|
|
27
|
-
| :-----------------------| :----------------|
|
|
28
|
-
| <ul><li>Open Teams Toolkit, and sign into Azure by clicking the `Sign in to Azure` under the `ACCOUNTS` section from sidebar.<sup>\*</sup></li> <li>After you signed in, select a subscription under your account.<sup>\*</sup></li><li>Open Teams Toolkit, and sign into Microsoft 365 by clicking the `Sign in to Microsoft 365` under the `ACCOUNTS` section from sidebar.<sup>\*</sup></li><li>Open the command palette and select: `Teams: Provision in the cloud`.</li><li>Open the command palette and select: `Teams: Deploy to the cloud`.</li></ul> |<ul> <li>Run command `teamsfx account login azure`.<sup>\*</sup></li> <li>Run command `teamsfx account set --subscription $subscriptionId`.<sup>\*</sup></li> <li>Run command `teamsfx account login m365`.<sup>\*</sup></li> <li> Run command `teamsfx provision`.</li> <li>First-time: Run command `teamsfx deploy function apim --open-api-document openapi/openapi.json --api-prefix $apiPrefix --api-version $apiVersion`. </li><li>Non-first-time: Run command `teamsfx deploy function apim --api-version $apiVersion`. </li></ul>|
|
|
29
|
-
|
|
30
|
-
> \* Skip this step if you have already done in the previous steps.
|
|
31
|
-
|
|
32
|
-
In the deployment step, there will be some inputs needed:
|
|
33
|
-
|
|
34
|
-
- Select the resource `API Management`. The resource `Azure Function` should also be selected if the API changes have never been deployed to the cloud.
|
|
35
|
-
- The OpenAPI Specification File (Default: `openapi/openapi.json`).
|
|
36
|
-
- Input API prefix. The API path will be `$apiPrefix-$resourceSuffix`. The API Name will be `$apiPrefix-$resourceSuffix-$apiVersion`.
|
|
37
|
-
- Select an existing API version or input a new API version.
|
|
38
|
-
|
|
39
|
-
> Note: Provisioning and deployment may incur charges to your Azure Subscription.
|
|
40
|
-
|
|
41
|
-
## Write OpenAPI Document
|
|
42
|
-
|
|
43
|
-
We support both yaml and json format for the OpenAPI document. You need to follow the [OpenAPI Specification](https://swagger.io/resources/open-api/), author the OpenAPI document and ensure the API schema is aligned with the Azure Functions HTTP trigger implementation.
|
|
44
|
-
|
|
45
|
-
Below is a sample swagger file for the default HTTP trigger function. You can copy the content into `./openapi/openapi.json`, and change the content according to your modification (E.g. `/getUserProfile` -> `/$yourFunctionName` ).
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"openapi": "3.0.1",
|
|
50
|
-
"info": {
|
|
51
|
-
"title": "{appName}",
|
|
52
|
-
"version": "v1"
|
|
53
|
-
},
|
|
54
|
-
"paths": {
|
|
55
|
-
"/getUserProfile": {
|
|
56
|
-
"get": {
|
|
57
|
-
"summary": "Get User Profile",
|
|
58
|
-
"operationId": "get-user-profile",
|
|
59
|
-
"responses": {
|
|
60
|
-
"200": {
|
|
61
|
-
"description": "200 response",
|
|
62
|
-
"content": {
|
|
63
|
-
"application/json": {
|
|
64
|
-
"schema": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"properties": {
|
|
67
|
-
"receivedHTTPRequestBody": {
|
|
68
|
-
"type": "string"
|
|
69
|
-
},
|
|
70
|
-
"userInfoMessage": {
|
|
71
|
-
"type": "string"
|
|
72
|
-
},
|
|
73
|
-
"graphClientMessage": {
|
|
74
|
-
"type": "object"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
You can use your favorite tool to generate an OpenAPI document, such as [OpenAPI (Swagger) Editor](https://marketplace.visualstudio.com/items?itemName=42Crunch.vscode-openapi) and [swagger-jsdoc](https://github.com/Surnet/swagger-jsdoc/).
|
|
89
|
-
|
|
90
|
-
## Documentation
|
|
91
|
-
|
|
92
|
-
Find help in [troubleshooting guide](https://aka.ms/teamsfx-apim-help) if you met any issues.
|