diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5c2cbffbb6..df336c43b4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -199,8 +199,8 @@ /packages/fx-core/src/component/driver/m365 @swatDong @XiaofuHuang @kuojianlu @kimizhu /packages/fx-core/tests/component/driver/m365 @swatDong @XiaofuHuang @kuojianlu @kimizhu -/packages/fx-core/src/component/driver/prerequisite @swatDong @XiaofuHuang @kuojianlu @kimizhu -/packages/fx-core/tests/component/driver/prerequisite @swatDong @XiaofuHuang @kuojianlu @kimizhu +/packages/fx-core/src/component/driver/devTool @swatDong @XiaofuHuang @kuojianlu @kimizhu +/packages/fx-core/tests/component/driver/devTool @swatDong @XiaofuHuang @kuojianlu @kimizhu /packages/fx-core/src/core/middleware/utils/debug @swatDong @XiaofuHuang @kuojianlu @kimizhu diff --git a/.github/scripts/sync-version.js b/.github/scripts/sync-version.js index cf90e02b21..e40210a319 100644 --- a/.github/scripts/sync-version.js +++ b/.github/scripts/sync-version.js @@ -7,10 +7,13 @@ const repoRoot = path.join(__dirname, "../.."); function updateTemplatesDeps(templateDir, templateList) { let depPkgs = []; for (let subTempDir of templateList) { - const subTempPath = path.join(templateDir, subTempDir, "package.json") - if (fse.existsSync(subTempPath)) { - depPkgs.push(subTempPath) - } + packageFileCandidates = ["package.json", "package.json.tpl"]; + packageFileCandidates.forEach((file) => { + const subTempPath = path.join(templateDir, subTempDir, file) + if (fse.existsSync(subTempPath)) { + depPkgs.push(subTempPath) + } + }); } const pkgDirs = require(path.join(repoRoot, "lerna.json")).packages; let templatesDeps = {}; diff --git a/packages/cli/src/cmds/capability.ts b/packages/cli/src/cmds/capability.ts index 488dd090d2..ef707cf55c 100644 --- a/packages/cli/src/cmds/capability.ts +++ b/packages/cli/src/cmds/capability.ts @@ -9,7 +9,6 @@ import { FeatureId, getQuestionsForAddWebpart, } from "@microsoft/teamsfx-core/build/component/question"; -import { SPFxQuestionNames } from "@microsoft/teamsfx-core/build/component/constants"; import { Argv } from "yargs"; import activate from "../activate"; import { CLIHelpInputs, EmptyQTreeNode, RootFolderNode } from "../constants"; @@ -78,7 +77,7 @@ export class CapabilityAddSPFxTab extends CapabilityAddBase { } export class AddWebpart extends YargsCommand { - public readonly commandHead = `SPFxWebPart`; + public readonly commandHead = `spfx-web-part`; public readonly command = `${this.commandHead}`; public readonly description = "Auto-hosted SPFx web part tightly integrated with Microsoft Teams"; @@ -110,21 +109,6 @@ export class AddWebpart extends YargsCommand { const core = resultFolder.value; const inputs = getSystemInputs(rootFolder, args.env); inputs.stage = Stage.addWebpart; - if (args["spfx-install-latest-package"]) { - inputs["spfx-install-latest-package"] = args["spfx-install-latest-package"]; - } - if (args[SPFxQuestionNames.SPFxFolder]) { - inputs[SPFxQuestionNames.SPFxFolder] = args[SPFxQuestionNames.SPFxFolder]; - } - if (args[SPFxQuestionNames.WebPartName]) { - inputs[SPFxQuestionNames.WebPartName] = args[SPFxQuestionNames.WebPartName]; - } - if (args[SPFxQuestionNames.ManifestPath]) { - inputs[SPFxQuestionNames.ManifestPath] = args[SPFxQuestionNames.ManifestPath]; - } - if (args[SPFxQuestionNames.LocalManifestPath]) { - inputs[SPFxQuestionNames.LocalManifestPath] = args[SPFxQuestionNames.LocalManifestPath]; - } const result = await core.addWebpart(inputs); if (result.isErr()) { cliTelemetry.sendTelemetryErrorEvent(TelemetryEvent.AddWebpart, result.error); diff --git a/packages/cli/src/cmds/package.ts b/packages/cli/src/cmds/package.ts index 3529a72b04..0664967403 100644 --- a/packages/cli/src/cmds/package.ts +++ b/packages/cli/src/cmds/package.ts @@ -56,14 +56,6 @@ export default class Package extends YargsCommand { { let result; if (isV3Enabled()) { - inputs[CoreQuestionNames.TeamsAppManifestFilePath] = - args[ManifestFilePathParamName] ?? `${rootFolder}/${AppPackageFolderName}/manifest.json`; - inputs[CoreQuestionNames.OutputZipPathParamName] = - args[CoreQuestionNames.OutputZipPathParamName] ?? - `${rootFolder}/${AppPackageFolderName}/${BuildFolderName}/appPackage.${inputs.env}.zip`; - inputs[CoreQuestionNames.OutputManifestParamName] = - args[CoreQuestionNames.OutputManifestParamName] ?? - `${rootFolder}/${AppPackageFolderName}/${BuildFolderName}/manifest.${inputs.env}.json`; result = await core.createAppPackage(inputs); } else { const func: Func = { diff --git a/packages/cli/src/cmds/validate.ts b/packages/cli/src/cmds/validate.ts index 21872f36c0..a3903829d6 100644 --- a/packages/cli/src/cmds/validate.ts +++ b/packages/cli/src/cmds/validate.ts @@ -54,12 +54,8 @@ export class ManifestValidate extends YargsCommand { if (isV3Enabled()) { if (args[AppPackageFilePathParamName]) { inputs.validateMethod = "validateAgainstAppPackage"; - inputs[CoreQuestionNames.TeamsAppPackageFilePath] = args[AppPackageFilePathParamName]; } else { inputs.validateMethod = "validateAgainstSchema"; - inputs[CoreQuestionNames.TeamsAppManifestFilePath] = - args[ManifestFilePathParamName] ?? - `${rootFolder}/${AppPackageFolderName}/manifest.json`; } result = await core.validateApplication(inputs); } else { diff --git a/packages/cli/src/constants.ts b/packages/cli/src/constants.ts index e4228cff05..e0202d06b3 100644 --- a/packages/cli/src/constants.ts +++ b/packages/cli/src/constants.ts @@ -56,7 +56,7 @@ export const CollaboratorEmailNode = new QTreeNode({ title: "Input email address of collaborator", }); -export const ManifestFilePathParamName = "manifest-file-path"; +export const ManifestFilePathParamName = "manifest-path"; export const AppPackageFilePathParamName = "app-package-file-path"; export const BuildPackageOptions: OptionsMap = { [ManifestFilePathParamName]: { diff --git a/packages/cli/tests/e2e/debug/DebugCommandAndResponse.tests.ts b/packages/cli/tests/e2e/debug/DebugCommandAndResponse.tests.ts index 0a3cb306cf..9158fc8e8a 100644 --- a/packages/cli/tests/e2e/debug/DebugCommandAndResponse.tests.ts +++ b/packages/cli/tests/e2e/debug/DebugCommandAndResponse.tests.ts @@ -94,7 +94,7 @@ describe("Debug V3 command-and-response template", () => { context = await readContextMultiEnvV3(projectPath, "local"); chai.assert.isDefined(context); - // validate .localSettings - chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localSettings"))); + // validate .localConfigs + chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localConfigs"))); }); }); diff --git a/packages/cli/tests/e2e/debug/DebugNotificationHttpTrigger.tests.ts b/packages/cli/tests/e2e/debug/DebugNotificationHttpTrigger.tests.ts index 2860fa9c74..a9ada57823 100644 --- a/packages/cli/tests/e2e/debug/DebugNotificationHttpTrigger.tests.ts +++ b/packages/cli/tests/e2e/debug/DebugNotificationHttpTrigger.tests.ts @@ -104,7 +104,7 @@ describe("Debug V3 notification-http-trigger template", () => { // validate func chai.assert.isUndefined(context.FUNC_PATH); // FUNC_PATH is undefined for global func - // validate .localSettings - chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localSettings"))); + // validate .localConfigs + chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localConfigs"))); }); }); diff --git a/packages/cli/tests/e2e/debug/DebugSsoTab.tests.ts b/packages/cli/tests/e2e/debug/DebugSsoTab.tests.ts index 6ba7745ed2..fde5153065 100644 --- a/packages/cli/tests/e2e/debug/DebugSsoTab.tests.ts +++ b/packages/cli/tests/e2e/debug/DebugSsoTab.tests.ts @@ -86,7 +86,7 @@ describe("Debug V3 sso-tab template", () => { chai.assert.isDefined(context.SSL_KEY_FILE); chai.assert.isNotEmpty(context.SSL_KEY_FILE); - // validate .localSettings - chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localSettings"))); + // validate .localConfigs + chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localConfigs"))); }); }); diff --git a/packages/cli/tests/e2e/m365/DebugM365MessageExtension.tests.ts b/packages/cli/tests/e2e/m365/DebugM365MessageExtension.tests.ts index 84fcb69395..503911f008 100644 --- a/packages/cli/tests/e2e/m365/DebugM365MessageExtension.tests.ts +++ b/packages/cli/tests/e2e/m365/DebugM365MessageExtension.tests.ts @@ -101,7 +101,7 @@ describe("Debug V3 m365-message-extension template", () => { context = await readContextMultiEnvV3(projectPath, "local"); chai.assert.isDefined(context); - // validate .localSettings - chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localSettings"))); + // validate .localConfigs + chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localConfigs"))); }); }); diff --git a/packages/cli/tests/e2e/m365/DebugM365Tab.tests.ts b/packages/cli/tests/e2e/m365/DebugM365Tab.tests.ts index ea6c1ba881..86c7e554ae 100644 --- a/packages/cli/tests/e2e/m365/DebugM365Tab.tests.ts +++ b/packages/cli/tests/e2e/m365/DebugM365Tab.tests.ts @@ -94,8 +94,8 @@ describe("Debug V3 m365-tab template", () => { chai.assert.isDefined(context.SSL_KEY_FILE); chai.assert.isNotEmpty(context.SSL_KEY_FILE); - // validate .localSettings - chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localSettings"))); + // validate .localConfigs + chai.assert.isTrue(await fs.pathExists(path.join(projectPath, ".localConfigs"))); } }); }); diff --git a/packages/cli/tests/utils/executor.ts b/packages/cli/tests/utils/executor.ts index be45f71b22..27dd7ff5bb 100644 --- a/packages/cli/tests/utils/executor.ts +++ b/packages/cli/tests/utils/executor.ts @@ -67,7 +67,7 @@ export class Executor { localManifestPath: string ) { const command = - `teamsfx add SPFxWebPart --spfx-webpart-name ${webpartName}` + + `teamsfx add spfx-web-part --spfx-webpart-name ${webpartName}` + ` --spfx-folder ${spfxFolder} --manifest-path ${manifestPath}` + ` --local-manifest-path ${localManifestPath}` + ` --spfx-install-latest-package true`; diff --git a/packages/fx-core/resource/package.nls.json b/packages/fx-core/resource/package.nls.json index c5cf7c0d17..7a1c9598ae 100644 --- a/packages/fx-core/resource/package.nls.json +++ b/packages/fx-core/resource/package.nls.json @@ -23,6 +23,7 @@ "core.deploy.noCapabilityFound": "No capability found to %s. Click Get Help to learn more about how to add capabilities.", "core.deploy.successNotice": "'%s' successfully deployed.", "core.deploy.aadManifestSuccessNotice": "Your Azure Active Directory application has been successfully deployed. Click \"Learn more\" to check how to view your Azure Active Directory application.", + "core.deploy.aadManifestOnCLISuccessNotice": "Your Azure Active Directory application has been successfully updated.", "core.deploy.aadManifestLearnMore": "Learn more", "core.deploy.failNotice": "Unable to deploy '%s'!", "core.deploy.botTroubleShoot": "To troubleshoot bot application in azure, please click learn more for documentation.", @@ -86,6 +87,7 @@ "core.progress.uploadTabToStorage": "Uploading Tab front end to Azure Storage account.", "core.progress.configureAzureStorage": "Configuring Azure Storage, enable static website setting.", "core.progress.runCommand": "Run command %s at %s", + "core.progress.deployToAzure": "`Deploying %s to %s", "core.log.updateFunctionAppSettings": "Updating Azure Functions app settings.", "core.error.programmingLanguageInvalid": "Invalid programming language found in project settings.", "core.Notification.ReadMore": "Read more", @@ -171,7 +173,7 @@ "plugins.spfx.questions.packageSelect.placeholder": "Select an option for scaffolding", "plugins.spfx.questions.packageSelect.useGlobalPackage.withVersion.label": "Use globally installed SPFx (%s)", "plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label": "Use globally installed SPFx", - "plugins.spfx.questions.packageSelect.useGlobalPackage.detail": "Recommend SPFx %s or later", + "plugins.spfx.questions.packageSelect.useGlobalPackage.detail": "SPFx %s or later", "plugins.spfx.questions.packageSelect.installLocally.withVersion.label": "Install the latest SPFx (%s) locally in Teams Toolkit directory ", "plugins.spfx.questions.packageSelect.installLocally.noVersion.label": "Install the latest SPFx locally in Teams Toolkit directory ", "plugins.spfx.buildNotice": "SharePoint package successfully built at %s.", @@ -452,7 +454,7 @@ "error.debugHandler.InvalidExistingBotArgsError": "botId and botPassword need to be set together if you use existing bot.", "error.debugHandler.DebugArgumentEmptyError": "Debug argument '%s' is empty.", "error.debugHandler.InvalidTabBaseUrlError": "baseUrl must be a valid https url.", - "error.m365.M365TitleNotAcquiredError": "Microsoft 365 title is not acquired yet, please use m365Title/acquire action to acquire Microsoft 365 title.", + "error.m365.NotExtendedToM365Error": "Unable to extend Teams app to Microsoft 365. Use 'teamsApp/extendToM365' action to extend your Teams app to Microsoft 365.", "core.QuestionAppName.validation.pattern": "Application name must start with letters and contain at least two letters or digits. It can not contain some special characters.", "core.QuestionAppName.validation.maxlength": "Application name is longer than the maximum length of 30.", "core.QuestionAppName.validation.pathExist": "Path exists: %s. Select a different application name.", @@ -584,7 +586,7 @@ "core.getUserEmailQuestion.validation1": "Email address cannot be null or empty", "core.getUserEmailQuestion.validation2": "Please change [UserName] to the real user name", "core.collaboration.error.failedToLoadDotEnvFile": "Unable to load your .env File. Reason: %s", - "core.collaboration.error.failedToGetTeamsAppId": "Unable to find Teams app id in your .env file. Please correctly set the value with key '%s' in your .env file.", + "core.collaboration.error.failedToGetTeamsAppId": "Unable to find Teams app id in your .env file. Make sure you have already run 'Provision' or correctly set the value with key '%s' in your .env file.", "core.selectAadAppManifestQuestion.title": "Select Azure Active Directory manifest.json file", "core.selectTeamsAppManifestQuestion.title": "Select Teams manifest.json file", "core.selectTeamsAppPackageQuestion.title": "Select Teams app package file", @@ -872,7 +874,7 @@ "driver.botAadApp.log.successCreateBotAad": "Created Azure Active Directory application with client id %s.", "driver.botAadApp.log.useExistingBotAad": "Used existing Azure Active Directory application with client id %s.", "driver.botAadApp.error.unexpectedEmptyBotPassword": "Bot password is empty. Add it in env file or clear bot id to have bot id/password pair regenerated. action: %s.", - "driver.arm.description.deploy": "Deploy the given ARM templates to Azure", + "driver.arm.description.deploy": "Deploy the given ARM templates to Azure.", "driver.arm.deploy.progressBar.message": "Deploying the ARM templates to Azure...", "debug.warningMessage": "To debug applications in Teams, your localhost server must be on HTTPS.\nFor Teams to trust the self-signed SSL certificate used by the toolkit, a self-signed certificate must be added to your certificate store.\n You may skip this step, but you'll have to manually trust the secure connection in a new browser window when debugging your apps in Teams.\nFor more information \"https://aka.ms/teamsfx-ca-certificate\".", "debug.warningMessage2": " You may be asked for your account credentials when installing the certificate.", @@ -894,7 +896,7 @@ "driver.prerequisite.error.funcInstallationError": "Unable to check and install Azure Functions Core Tools.", "driver.prerequisite.error.dotnetInstallationError": "Unable to check and install .NET Core SDK.", "driver.prerequisite.description": "installing dependencies", - "driver.prerequisite.progressBar": "Checking and installing dependencies.", + "driver.prerequisite.progressBar": "Checking and installing development tool(s).", "driver.prerequisite.summary.devCert.trusted.succuss": "Development certificate for localhost is installed.", "driver.prerequisite.summary.devCert.notTrusted.succuss": "Development certificate for localhost is generated.", "driver.prerequisite.summary.devCert.skipped": "Skip trusting development certificate for localhost.", @@ -958,6 +960,7 @@ "driver.teamsApp.summary.validate": "Teams Toolkit has checked against all validation rules:\n\nSummary:\n%s.\n%s\n%s\n\nA complete log of validations can be found in %s", "driver.teamsApp.summary.validate.succeed": "%s passed", "driver.teamsApp.summary.validate.failed": "%s failed", + "driver.teamsApp.summary.validate.warning": "%s warning", "driver.teamsApp.validate.skip": "%s action is currently skipped, will be updated in the future version.", "driver.teamsApp.invalidParameter": "Following parameter is missing or invalid for %s action: %s.", "driver.teamsApp.validate.invalidParameter": "Parameter %s should be provided for action %s", @@ -971,8 +974,8 @@ "driver.botFramework.summary.update": "The bot registration has been updated successfully (%s).", "driver.botFramework.progressBar.createOrUpdateBot": "Creating or updating bot registration.", "driver.generateAppsettings.description": "Add or update environment variables to appsettings file.", - "error.yaml.InvalidYamlSchemaError": "Unable to parse yaml file: %s", - "error.yaml.InvalidYamlSchemaErrorWithReason": "Unable to parse yaml file: %s. Reason: %s", + "error.yaml.InvalidYamlSchemaError": "Unable to parse yaml file: %s. Please open the yaml file and check the PROBLEMS tab for more details.", + "error.yaml.InvalidYamlSchemaErrorWithReason": "Unable to parse yaml file: %s. Reason: %s. Please open the yaml file and check the PROBLEMS tab for more details", "error.yaml.YamlFieldTypeError": "Field '%s' should have %s type, yaml file: %s", "error.yaml.YamlFieldMissingError": "Field '%s' is missing, yaml file: %s", "error.yaml.InvalidYmlActionNameError": "Action '%s' not found, yaml file: %s", diff --git a/packages/fx-core/resource/yaml.schema.json b/packages/fx-core/resource/yaml.schema.json index d667550344..fb7b8a4a83 100644 --- a/packages/fx-core/resource/yaml.schema.json +++ b/packages/fx-core/resource/yaml.schema.json @@ -54,8 +54,8 @@ { "$ref": "#/definitions/botframeworkCreate" }, { "$ref": "#/definitions/fileCreateOrUpdateEnvironmentFile" }, { "$ref": "#/definitions/fileCreateOrUpdateJsonFile" }, - { "$ref": "#/definitions/prerequisiteInstall" }, - { "$ref": "#/definitions/m365TitleAcquire" }, + { "$ref": "#/definitions/devToolInstall" }, + { "$ref": "#/definitions/teamsAppExtendToM365" }, { "$ref": "#/definitions/spfxDeploy" }, { "$ref": "#/definitions/teamsAppCopyAppPackageToSPFx" }, { "$ref": "#/definitions/script" } @@ -1133,10 +1133,10 @@ } } }, - "prerequisiteInstall": { + "devToolInstall": { "type": "object", "additionalProperties": false, - "description": "Install prerequisite(s). Refer to https://aka.ms/teamsfx-actions/prerequisite-install for more details.", + "description": "Install development tool(s). Refer to https://aka.ms/teamsfx-actions/devtool-install for more details.", "required": ["uses", "with"], "properties": { "name": { @@ -1152,8 +1152,8 @@ }, "uses": { "type": "string", - "description": "Install prerequisite(s). Refer to https://aka.ms/teamsfx-actions/prerequisite-install for more details.", - "const": "prerequisite/install" + "description": "Install development tool(s). Refer to https://aka.ms/teamsfx-actions/devtool-install for more details.", + "const": "devTool/install" }, "with": { "type": "object", @@ -1207,10 +1207,10 @@ } } }, - "m365TitleAcquire": { + "teamsAppExtendToM365": { "type": "object", "additionalProperties": false, - "description": "Upload app as M365 title. Refer to https://aka.ms/teamsfx-actions/m365-title-acquire for more details.", + "description": "Extend Teams app across Microsoft 365. Refer to https://aka.ms/teamsfx-actions/teamsapp-extendToM365 for more details.", "required": ["uses", "with"], "properties": { "name": { @@ -1226,8 +1226,8 @@ }, "uses": { "type": "string", - "description": "Upload app as M365 title. Refer to https://aka.ms/teamsfx-actions/m365-title-acquire for more details.", - "const": "m365Title/acquire" + "description": "Extend Teams app across Microsoft 365. Refer to https://aka.ms/teamsfx-actions/teamsapp-extendToM365 for more details.", + "const": "teamsApp/extendToM365" }, "with": { "type": "object", diff --git a/packages/fx-core/src/common/m365/errors.ts b/packages/fx-core/src/common/m365/errors.ts index 13252be97a..1a6f5f6ae7 100644 --- a/packages/fx-core/src/common/m365/errors.ts +++ b/packages/fx-core/src/common/m365/errors.ts @@ -5,14 +5,14 @@ import { UserError } from "@microsoft/teamsfx-api"; import { getDefaultString, getLocalizedString } from "../localizeUtils"; -export class M365TitleNotAcquiredError extends UserError { +export class NotExtendedToM365Error extends UserError { constructor(source: string) { super({ source: source, - name: "M365TitleNotAcquiredError", - message: getDefaultString("error.m365.M365TitleNotAcquiredError"), - displayMessage: getLocalizedString("error.m365.M365TitleNotAcquiredError"), - helpLink: "https://aka.ms/teamsfx-actions/m365-title-acquire", + name: "NotExtendedToM365Error", + message: getDefaultString("error.m365.NotExtendedToM365Error"), + displayMessage: getLocalizedString("error.m365.NotExtendedToM365Error"), + helpLink: "https://aka.ms/teamsfx-actions/teamsapp-extendToM365", }); } } diff --git a/packages/fx-core/src/common/m365/launchHelper.ts b/packages/fx-core/src/common/m365/launchHelper.ts index c5529d75e6..af18a61bd6 100644 --- a/packages/fx-core/src/common/m365/launchHelper.ts +++ b/packages/fx-core/src/common/m365/launchHelper.ts @@ -14,7 +14,7 @@ import { import { CoreSource } from "../../core/error"; import { AppStudioScopes } from "../tools"; import { Hub } from "./constants"; -import { M365TitleNotAcquiredError } from "./errors"; +import { NotExtendedToM365Error } from "./errors"; import { PackageService } from "./packageService"; import { serviceEndpoint, serviceScope } from "./serviceConstant"; @@ -91,12 +91,12 @@ export class LaunchHelper { try { const m365AppId = await packageService.retrieveAppId(sideloadingToken, teamsAppId); if (!m365AppId) { - return err(new M365TitleNotAcquiredError(CoreSource)); + return err(new NotExtendedToM365Error(CoreSource)); } return ok(m365AppId); } catch (error) { if ((error as FxError).innerError?.response.status === 404) { - return err(new M365TitleNotAcquiredError(CoreSource)); + return err(new NotExtendedToM365Error(CoreSource)); } return err(assembleError(error)); } diff --git a/packages/fx-core/src/component/coordinator/index.ts b/packages/fx-core/src/component/coordinator/index.ts index 3355561d00..95409458e6 100644 --- a/packages/fx-core/src/component/coordinator/index.ts +++ b/packages/fx-core/src/component/coordinator/index.ts @@ -170,7 +170,7 @@ const M365Actions = [ "aadApp/create", "aadApp/update", "botFramework/create", - "m365Title/acquire", + "teamsApp/extendToM365", ]; const AzureActions = ["arm/deploy"]; const AzureDeployActions = [ diff --git a/packages/fx-core/src/component/driver/aad/update.ts b/packages/fx-core/src/component/driver/aad/update.ts index 0de786a1cf..454a312ea0 100644 --- a/packages/fx-core/src/component/driver/aad/update.ts +++ b/packages/fx-core/src/component/driver/aad/update.ts @@ -4,10 +4,9 @@ import { ExecutionResult, StepDriver } from "../interface/stepDriver"; import { DriverContext } from "../interface/commonArgs"; import { UpdateAadAppArgs } from "./interface/updateAadAppArgs"; import { Service } from "typedi"; -import { ProgressBarSetting } from "./interface/progressBarSetting"; import { AadAppClient } from "./utility/aadAppClient"; import axios from "axios"; -import { SystemError, UserError, ok, err, FxError, Result } from "@microsoft/teamsfx-api"; +import { SystemError, UserError, ok, err, FxError, Result, Platform } from "@microsoft/teamsfx-api"; import { UnhandledSystemError, UnhandledUserError } from "./error/unhandledError"; import { hooks } from "@feathersjs/hooks/lib"; import { addStartAndEndTelemetry } from "../middleware/addStartAndEndTelemetry"; @@ -78,6 +77,11 @@ export class UpdateAadAppDriver implements StepDriver { getLocalizedString(logMessageKeys.successExecuteDriver, actionName) ); + if (context.platform === Platform.CLI) { + const msg = getLocalizedString("core.deploy.aadManifestOnCLISuccessNotice"); + context.ui?.showMessage("info", msg, false); + } + return { result: ok( new Map( diff --git a/packages/fx-core/src/component/driver/add/utility/constants.ts b/packages/fx-core/src/component/driver/add/utility/constants.ts index 66bc5548b7..607e693da1 100644 --- a/packages/fx-core/src/component/driver/add/utility/constants.ts +++ b/packages/fx-core/src/component/driver/add/utility/constants.ts @@ -5,7 +5,7 @@ export class Constants { static readonly ActionName = "spfx/add"; static readonly LOCAL_CONTENT_URL = - "https://{teamSiteDomain}{teamSitePath}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/TeamsWorkBench.aspx%3FcomponentId=%s%26openPropertyPane=true%26teams%26forceLocale={locale}%26loadSPFX%3Dtrue%26debugManifestsFile%3Dhttps%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js"; + "https://{teamSiteDomain}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest={teamSitePath}/_layouts/15/TeamsWorkBench.aspx%3FcomponentId=%s%26teams%26personal%26forceLocale={locale}%26loadSPFX%3Dtrue%26debugManifestsFile%3Dhttps%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fmanifests.js"; static readonly REMOTE_CONTENT_URL = "https://{teamSiteDomain}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=/_layouts/15/teamshostedapp.aspx%3Fteams%26personal%26componentId=%s%26forceLocale={locale}"; static readonly YO_RC_FILE = ".yo-rc.json"; diff --git a/packages/fx-core/src/component/driver/deploy/azure/azureStorageDeployDriver.ts b/packages/fx-core/src/component/driver/deploy/azure/azureStorageDeployDriver.ts index 90370c4ce7..5c683446db 100644 --- a/packages/fx-core/src/component/driver/deploy/azure/azureStorageDeployDriver.ts +++ b/packages/fx-core/src/component/driver/deploy/azure/azureStorageDeployDriver.ts @@ -35,6 +35,7 @@ import { AzureStorageGetContainerError, AzureStorageUploadFilesError, } from "../../../../error/deploy"; +import { ProgressMessages } from "../../../messages"; const ACTION_NAME = "azureStorage/deploy"; @@ -179,6 +180,8 @@ export class AzureStorageDeployDriverImpl extends AzureDeployImpl { } updateProgressbar() { - this.progressBar?.next(`Deploying ${this.workingDirectory ?? ""} to Azure Storage Service`); + this.progressBar?.next( + ProgressMessages.deployToAzure(this.workingDirectory, "Azure Storage Service") + ); } } diff --git a/packages/fx-core/src/component/driver/deploy/azure/impl/AzureZipDeployImpl.ts b/packages/fx-core/src/component/driver/deploy/azure/impl/AzureZipDeployImpl.ts index 3378190696..6b2c4be648 100644 --- a/packages/fx-core/src/component/driver/deploy/azure/impl/AzureZipDeployImpl.ts +++ b/packages/fx-core/src/component/driver/deploy/azure/impl/AzureZipDeployImpl.ts @@ -14,7 +14,7 @@ import { import { AzureResourceInfo, DriverContext } from "../../../interface/commonArgs"; import { TokenCredential } from "@azure/core-auth"; import { LogProvider } from "@microsoft/teamsfx-api"; -import { getLocalizedMessage } from "../../../../messages"; +import { getLocalizedMessage, ProgressMessages } from "../../../../messages"; import { DeployConstant } from "../../../../constant/deployConstant"; import { createHash } from "crypto"; import { default as axios } from "axios"; @@ -241,6 +241,6 @@ export class AzureZipDeployImpl extends AzureDeployImpl { } updateProgressbar() { - this.progressBar?.next(`Deploying ${this.workingDirectory ?? ""} to ${this.serviceName}`); + this.progressBar?.next(ProgressMessages.deployToAzure(this.workingDirectory, this.serviceName)); } } diff --git a/packages/fx-core/src/component/driver/prerequisite/constant.ts b/packages/fx-core/src/component/driver/devTool/constant.ts similarity index 100% rename from packages/fx-core/src/component/driver/prerequisite/constant.ts rename to packages/fx-core/src/component/driver/devTool/constant.ts diff --git a/packages/fx-core/src/component/driver/prerequisite/error/dotnetInstallationUserError.ts b/packages/fx-core/src/component/driver/devTool/error/dotnetInstallationUserError.ts similarity index 100% rename from packages/fx-core/src/component/driver/prerequisite/error/dotnetInstallationUserError.ts rename to packages/fx-core/src/component/driver/devTool/error/dotnetInstallationUserError.ts diff --git a/packages/fx-core/src/component/driver/prerequisite/error/funcInstallationUserError.ts b/packages/fx-core/src/component/driver/devTool/error/funcInstallationUserError.ts similarity index 100% rename from packages/fx-core/src/component/driver/prerequisite/error/funcInstallationUserError.ts rename to packages/fx-core/src/component/driver/devTool/error/funcInstallationUserError.ts diff --git a/packages/fx-core/src/component/driver/prerequisite/installDriver.ts b/packages/fx-core/src/component/driver/devTool/installDriver.ts similarity index 98% rename from packages/fx-core/src/component/driver/prerequisite/installDriver.ts rename to packages/fx-core/src/component/driver/devTool/installDriver.ts index 3f0dd4e57c..aa9f66c650 100644 --- a/packages/fx-core/src/component/driver/prerequisite/installDriver.ts +++ b/packages/fx-core/src/component/driver/devTool/installDriver.ts @@ -35,8 +35,8 @@ import { updateProgress } from "../middleware/updateProgress"; import { hooks } from "@feathersjs/hooks/lib"; import { getLocalizedString } from "../../../common/localizeUtils"; -const ACTION_NAME = "prerequisite/install"; -const helpLink = "https://aka.ms/teamsfx-actions/prerequisite-install"; +const ACTION_NAME = "devTool/install"; +const helpLink = "https://aka.ms/teamsfx-actions/devtool-install"; const outputKeys = { sslCertFile: "sslCertFile", diff --git a/packages/fx-core/src/component/driver/prerequisite/interfaces/InstallToolArgs.ts b/packages/fx-core/src/component/driver/devTool/interfaces/InstallToolArgs.ts similarity index 100% rename from packages/fx-core/src/component/driver/prerequisite/interfaces/InstallToolArgs.ts rename to packages/fx-core/src/component/driver/devTool/interfaces/InstallToolArgs.ts diff --git a/packages/fx-core/src/component/driver/index.ts b/packages/fx-core/src/component/driver/index.ts index c27065df84..790ee82a00 100644 --- a/packages/fx-core/src/component/driver/index.ts +++ b/packages/fx-core/src/component/driver/index.ts @@ -23,7 +23,7 @@ import "./script/dotnetBuildDriver"; import "./script/npmBuildDriver"; import "./script/npxBuildDriver"; import "./script/scriptDriver"; -import "./prerequisite/installDriver"; +import "./devTool/installDriver"; import "./file/createOrUpdateEnvironmentFile"; import "./file/createOrUpdateJsonFile"; import "./botFramework/createOrUpdateBot"; diff --git a/packages/fx-core/src/component/driver/m365/acquire.ts b/packages/fx-core/src/component/driver/m365/acquire.ts index 092ccf3dad..2ab966585a 100644 --- a/packages/fx-core/src/component/driver/m365/acquire.ts +++ b/packages/fx-core/src/component/driver/m365/acquire.ts @@ -24,8 +24,8 @@ interface AcquireArgs { appPackagePath?: string; // The path of the app package } -const actionName = "m365Title/acquire"; -const helpLink = "https://aka.ms/teamsfx-actions/m365-title-acquire"; +const actionName = "teamsApp/extendToM365"; +const helpLink = "https://aka.ms/teamsfx-actions/teamsapp-extendToM365"; const outputKeys = { titleId: "titleId", diff --git a/packages/fx-core/src/component/driver/middleware/addStartAndEndTelemetry.ts b/packages/fx-core/src/component/driver/middleware/addStartAndEndTelemetry.ts index dbf1306468..2fbd48884a 100644 --- a/packages/fx-core/src/component/driver/middleware/addStartAndEndTelemetry.ts +++ b/packages/fx-core/src/component/driver/middleware/addStartAndEndTelemetry.ts @@ -13,13 +13,15 @@ import { TelemetryConstants } from "../../constants"; import { performance } from "perf_hooks"; // Based on fx-core's design that a component should always return FxError instead of throw exception, no error handling is added +// Will remove `/` in the componentName to avoid the value being redacted. export function addStartAndEndTelemetry(eventName: string, componentName: string): Middleware { return async (ctx: HookContext, next: NextFunction) => { const driverContext = ctx.arguments[1] as WrapDriverContext; let telemetryReporter: TeamsFxTelemetryReporter | undefined = undefined; if (driverContext.telemetryReporter) { + const normalizedComponentName = componentName.replace(/\//g, ""); // Remove `/` in the componentName to avoid the value being redacted. telemetryReporter = new TeamsFxTelemetryReporter(driverContext.telemetryReporter, { - componentName, + componentName: normalizedComponentName, }); } telemetryReporter?.sendStartEvent({ eventName }); diff --git a/packages/fx-core/src/component/driver/teamsApp/validateAppPackage.ts b/packages/fx-core/src/component/driver/teamsApp/validateAppPackage.ts index bcd1fe7c26..a39f1e272f 100644 --- a/packages/fx-core/src/component/driver/teamsApp/validateAppPackage.ts +++ b/packages/fx-core/src/component/driver/teamsApp/validateAppPackage.ts @@ -19,12 +19,14 @@ import { Service } from "typedi"; import fs from "fs-extra"; import * as path from "path"; import { EOL } from "os"; +import { merge } from "lodash"; import { StepDriver, ExecutionResult } from "../interface/stepDriver"; import { DriverContext } from "../interface/commonArgs"; import { WrapDriverContext } from "../util/wrapUtil"; import { ValidateAppPackageArgs } from "./interfaces/ValidateAppPackageArgs"; import { addStartAndEndTelemetry } from "../middleware/addStartAndEndTelemetry"; import { TelemetryUtils } from "../../resource/appManifest/utils/telemetry"; +import { TelemetryPropertyKey } from "../../resource/appManifest/utils/telemetry"; import { AppStudioResultFactory } from "../../resource/appManifest/results"; import { AppStudioError } from "../../resource/appManifest/errors"; import { AppStudioClient } from "../../resource/appManifest/appStudioClient"; @@ -119,14 +121,36 @@ export class ValidateAppPackageDriver implements StepDriver { content: "Teams Toolkit has checked against all validation rules:\n\nSummary: \n", color: Colors.BRIGHT_WHITE, }, - { - content: `${ - validationResult.errors.length + validationResult.warnings.length - } failed, `, - color: Colors.BRIGHT_RED, - }, - { content: `${validationResult.notes.length} passed.\n`, color: Colors.BRIGHT_GREEN }, ]; + if (validationResult.errors.length > 0) { + outputMessage.push({ + content: `${validationResult.errors.length} failed, `, + color: Colors.BRIGHT_RED, + }); + merge(context.telemetryProperties, { + [TelemetryPropertyKey.validationErrors]: validationResult.errors + .map((x) => x.title) + .join(";"), + }); + } + if (validationResult.warnings.length > 0) { + outputMessage.push({ + content: + `${validationResult.warnings.length} warning` + + (validationResult.warnings.length > 1 ? "s" : "") + + ", ", + color: Colors.BRIGHT_RED, + }); + merge(context.telemetryProperties, { + [TelemetryPropertyKey.validationWarnings]: validationResult.warnings + .map((x) => x.title) + .join(";"), + }); + } + outputMessage.push({ + content: `${validationResult.notes.length} passed.\n`, + color: Colors.BRIGHT_GREEN, + }); validationResult.errors.map((error) => { outputMessage.push({ content: `${SummaryConstant.Failed} `, color: Colors.BRIGHT_RED }); outputMessage.push({ @@ -180,26 +204,37 @@ export class ValidateAppPackageDriver implements StepDriver { .join(EOL); const passed = validationResult.notes.length; - const failed = validationResult.errors.length + validationResult.warnings.length; - let summaryStr = ""; + const failed = validationResult.errors.length; + const warns = validationResult.warnings.length; + const summaryStr = []; if (failed > 0) { - if (passed > 0) { - summaryStr = - getLocalizedString("driver.teamsApp.summary.validate.failed", failed) + - ", " + - getLocalizedString("driver.teamsApp.summary.validate.succeed", passed); - } else { - summaryStr = getLocalizedString("driver.teamsApp.summary.validate.failed", failed); - } - } else { - summaryStr = getLocalizedString("driver.teamsApp.summary.validate.succeed", passed); + summaryStr.push(getLocalizedString("driver.teamsApp.summary.validate.failed", failed)); + merge(context.telemetryProperties, { + [TelemetryPropertyKey.validationErrors]: validationResult.errors + .map((x) => x.title) + .join(";"), + }); + } + if (warns > 0) { + summaryStr.push( + getLocalizedString("driver.teamsApp.summary.validate.warning", warns) + + (warns > 1 ? "s" : "") + ); + merge(context.telemetryProperties, { + [TelemetryPropertyKey.validationWarnings]: validationResult.warnings + .map((x) => x.title) + .join(";"), + }); + } + if (passed > 0) { + summaryStr.push(getLocalizedString("driver.teamsApp.summary.validate.succeed", passed)); } const outputMessage = EOL + getLocalizedString( "driver.teamsApp.summary.validate", - summaryStr, + summaryStr.join(", "), errors, warnings, path.resolve(context.logProvider?.getLogFilePath()) @@ -211,8 +246,7 @@ export class ValidateAppPackageDriver implements StepDriver { if (args.showMessage) { const message = getLocalizedString( "driver.teamsApp.validate.result", - validationResult.errors.length + validationResult.warnings.length, - validationResult.notes.length, + summaryStr.join(", "), "command:fx-extension.showOutputChannel" ); context.ui?.showMessage("info", message, false); diff --git a/packages/fx-core/src/component/driver/util/wrapUtil.ts b/packages/fx-core/src/component/driver/util/wrapUtil.ts index 51f260c742..f84da28e12 100644 --- a/packages/fx-core/src/component/driver/util/wrapUtil.ts +++ b/packages/fx-core/src/component/driver/util/wrapUtil.ts @@ -28,7 +28,7 @@ export class WrapDriverContext { Object.assign(this, driverContext, {}); this.eventName = eventName; this.telemetryProperties = { - component: eventName, + component: componentName.replace(/\//g, ""), // Remove `/` in the componentName to avoid the value being redacted. }; if (driverContext.telemetryReporter) { this.wrapTelemetryReporter = new TeamsFxTelemetryReporter(driverContext.telemetryReporter, { diff --git a/packages/fx-core/src/component/messages.ts b/packages/fx-core/src/component/messages.ts index 9b971956b3..d64c15d6cf 100644 --- a/packages/fx-core/src/component/messages.ts +++ b/packages/fx-core/src/component/messages.ts @@ -44,6 +44,8 @@ export class ProgressMessages { ); static readonly runCommand = (command: string, directory: string) => getLocalizedString("core.progress.runCommand", command, directory); + static readonly deployToAzure = (folder: string, target?: string) => + getLocalizedString("core.progress.deployToAzure", folder, target); } export class LogMessages { diff --git a/packages/fx-core/src/component/resource/appManifest/appManifest.ts b/packages/fx-core/src/component/resource/appManifest/appManifest.ts index ea409ddbde..69599cf04d 100644 --- a/packages/fx-core/src/component/resource/appManifest/appManifest.ts +++ b/packages/fx-core/src/component/resource/appManifest/appManifest.ts @@ -525,8 +525,11 @@ export class AppManifest implements CloudResource { return err( new UserError( Constants.PLUGIN_NAME, - "GetConfigError", - ErrorMessages.GetConfigError(Constants.TEAMS_APP_ID, this.name) + AppStudioError.ListCollaboratorFailedError.name, + getLocalizedString( + "core.collaboration.error.failedToGetTeamsAppId", + Constants.TEAMS_APP_ID_ENV + ) ) ); } @@ -600,13 +603,14 @@ export class AppManifest implements CloudResource { ? teamsAppIdV3 : await this.getTeamsAppId(ctx, inputs, envInfo!); if (!teamsAppId) { - const msgs = ErrorMessages.GetConfigError(Constants.TEAMS_APP_ID, this.name); return err( new UserError( Constants.PLUGIN_NAME, AppStudioError.GrantPermissionFailedError.name, - msgs[0], - msgs[1] + getLocalizedString( + "core.collaboration.error.failedToGetTeamsAppId", + Constants.TEAMS_APP_ID_ENV + ) ) ); } @@ -675,8 +679,11 @@ export class AppManifest implements CloudResource { return err( new UserError( Constants.PLUGIN_NAME, - "GetConfigError", - ErrorMessages.GetConfigError(Constants.TEAMS_APP_ID, this.name) + AppStudioError.CheckPermissionFailedError.name, + getLocalizedString( + "core.collaboration.error.failedToGetTeamsAppId", + Constants.TEAMS_APP_ID_ENV + ) ) ); } diff --git a/packages/fx-core/src/component/resource/appManifest/appStudio.ts b/packages/fx-core/src/component/resource/appManifest/appStudio.ts index 43ad34b6ab..830ad5c220 100644 --- a/packages/fx-core/src/component/resource/appManifest/appStudio.ts +++ b/packages/fx-core/src/component/resource/appManifest/appStudio.ts @@ -665,20 +665,15 @@ export async function updateManifestV3( inputs: InputsWithProjectPath ): Promise, FxError>> { const state = { - TAB_ENDPOINT: process.env.TAB_ENDPOINT, - TAB_DOMAIN: process.env.TAB_DOMAIN, - BOT_ID: process.env.BOT_ID, - BOT_DOMAIN: process.env.BOT_DOMAIN, ENV_NAME: process.env.TEAMSFX_ENV, }; - const teamsAppId = process.env.TEAMS_APP_ID; const manifestTemplatePath = inputs.manifestTemplatePath ?? (await manifestUtils.getTeamsAppManifestPath(inputs.projectPath)); const manifestFileName = path.join( inputs.projectPath, - BuildFolderName, AppPackageFolderName, + BuildFolderName, `manifest.${state.ENV_NAME}.json` ); @@ -712,6 +707,7 @@ export async function updateManifestV3( } } const existingManifest = await fs.readJSON(manifestFileName); + const teamsAppId = manifest.id; delete manifest.id; delete existingManifest.id; if (!_.isEqual(manifest, existingManifest)) { @@ -767,8 +763,6 @@ export async function updateManifestV3( return err(result.error); } - ctx.logProvider?.info(getLocalizedString("plugins.appstudio.teamsAppUpdatedLog", teamsAppId)); - let loginHint = ""; const accountRes = await ctx.tokenProvider.m365TokenProvider.getJsonObject({ scopes: AppStudioScopes, @@ -777,11 +771,7 @@ export async function updateManifestV3( loginHint = accountRes.value.unique_name as string; } - const url = util.format( - Constants.DEVELOPER_PORTAL_APP_PACKAGE_URL, - result.value.get("TEAMS_APP_ID"), - loginHint - ); + const url = util.format(Constants.DEVELOPER_PORTAL_APP_PACKAGE_URL, teamsAppId, loginHint); if (inputs.platform === Platform.CLI) { const message = [ { @@ -974,8 +964,8 @@ function generateCreateAppPackageArgs( ): CreateAppPackageArgs { const manifestFileName = path.join( projectPath, - BuildFolderName, AppPackageFolderName, + BuildFolderName, `manifest.${envName}.json` ); diff --git a/packages/fx-core/src/component/resource/appManifest/constants.ts b/packages/fx-core/src/component/resource/appManifest/constants.ts index f3944e5dbb..89fc41aa2e 100644 --- a/packages/fx-core/src/component/resource/appManifest/constants.ts +++ b/packages/fx-core/src/component/resource/appManifest/constants.ts @@ -251,6 +251,7 @@ export class Constants { public static readonly TEAMS_MANAGE_APP_DOC = "https://aka.ms/teamsfx-mtac-doc"; public static readonly TEAMS_APP_ID = "teamsAppId"; public static readonly TEAMS_APP_UPDATED_AT = "teamsAppUpdatedAt"; + public static readonly TEAMS_APP_ID_ENV = "TEAMS_APP_ID"; public static readonly PERMISSIONS = { name: "Teams App", diff --git a/packages/fx-core/src/component/resource/appManifest/utils/telemetry.ts b/packages/fx-core/src/component/resource/appManifest/utils/telemetry.ts index 0f1ae22082..1a3d33538a 100644 --- a/packages/fx-core/src/component/resource/appManifest/utils/telemetry.ts +++ b/packages/fx-core/src/component/resource/appManifest/utils/telemetry.ts @@ -24,6 +24,8 @@ export enum TelemetryPropertyKey { tenantId = "tenant-id", publishedAppId = "published-app-id", customizedKeys = "customized-manifest-keys", + validationErrors = "validation-errors", + validationWarnings = "validation-warnings", manual = "manual", statusCode = "status-code", url = "url", diff --git a/packages/fx-core/src/component/resource/spfx/utils/question-helper.ts b/packages/fx-core/src/component/resource/spfx/utils/question-helper.ts index 2e479f642f..d583754d5c 100644 --- a/packages/fx-core/src/component/resource/spfx/utils/question-helper.ts +++ b/packages/fx-core/src/component/resource/spfx/utils/question-helper.ts @@ -53,7 +53,7 @@ export class PackageSelectOptionsHelper { : getLocalizedString( "plugins.spfx.questions.packageSelect.useGlobalPackage.noVersion.label" ), - detail: getLocalizedString( + description: getLocalizedString( "plugins.spfx.questions.packageSelect.useGlobalPackage.detail", Constants.RecommendedLowestSpfxVersion ), diff --git a/packages/fx-core/src/core/middleware/questionModel.ts b/packages/fx-core/src/core/middleware/questionModel.ts index f349e324f3..2557d230c9 100644 --- a/packages/fx-core/src/core/middleware/questionModel.ts +++ b/packages/fx-core/src/core/middleware/questionModel.ts @@ -78,34 +78,26 @@ export const QuestionModelMW: Middleware = async (ctx: CoreHookContext, next: Ne ctx.result = err(getQuestionRes.error); return; } - - // TOOLS?.logProvider.debug(`[core] success to get questions for ${method}`); - const node = getQuestionRes.value; if (node) { const res = await traverse(node, inputs, TOOLS.ui, TOOLS.telemetryReporter); if (res.isErr()) { - // TOOLS?.logProvider.debug(`[core] failed to run question model for ${method}`); ctx.result = err(res.error); return; } - // const desensitized = desensitize(node, inputs); - // TOOLS?.logProvider.info( - // `[core] success to run question model for ${method}, answers:${JSON.stringify(desensitized)}` - // ); } await next(); }; -export function desensitize(node: QTreeNode, input: Inputs): Inputs { - const copy = deepCopy(input); - const names = new Set(); - traverseToCollectPasswordNodes(node, names); - for (const name of names) { - copy[name] = "******"; - } - return copy; -} +// export function desensitize(node: QTreeNode, input: Inputs): Inputs { +// const copy = deepCopy(input); +// const names = new Set(); +// traverseToCollectPasswordNodes(node, names); +// for (const name of names) { +// copy[name] = "******"; +// } +// return copy; +// } export function traverseToCollectPasswordNodes(node: QTreeNode, names: Set): void { if (node.data.type === "text" && node.data.password === true) { diff --git a/packages/fx-core/src/core/middleware/utils/debug/appLocalYmlGenerator.ts b/packages/fx-core/src/core/middleware/utils/debug/appLocalYmlGenerator.ts index 376c748979..191d4eec21 100644 --- a/packages/fx-core/src/core/middleware/utils/debug/appLocalYmlGenerator.ts +++ b/packages/fx-core/src/core/middleware/utils/debug/appLocalYmlGenerator.ts @@ -3,7 +3,7 @@ import { ProjectSettings } from "@microsoft/teamsfx-api"; import { BuildArgs } from "../../../../component/driver/interface/buildAndDeployArgs"; -import { InstallToolArgs } from "../../../../component/driver/prerequisite/interfaces/InstallToolArgs"; +import { InstallToolArgs } from "../../../../component/driver/devTool/interfaces/InstallToolArgs"; import { BaseAppYmlGenerator } from "../appYmlGenerator"; import { DebugPlaceholderMapping, OldProjectSettingsHelper } from "./debugV3MigrationUtils"; diff --git a/packages/fx-core/src/core/middleware/utils/debug/debugV3MigrationUtils.ts b/packages/fx-core/src/core/middleware/utils/debug/debugV3MigrationUtils.ts index 6a659e71d5..b1f0a6a5c0 100644 --- a/packages/fx-core/src/core/middleware/utils/debug/debugV3MigrationUtils.ts +++ b/packages/fx-core/src/core/middleware/utils/debug/debugV3MigrationUtils.ts @@ -158,7 +158,7 @@ export function startFrontendTask(label: string): CommentJSONValue { const task = { label, type: "shell", - command: "npx env-cmd --silent -f .localSettings react-scripts start", + command: "npx env-cmd --silent -f .localConfigs react-scripts start", isBackground: true, options: { cwd: "${workspaceFolder}/tabs", @@ -231,7 +231,7 @@ export function watchBackendTask(label: string): CommentJSONValue { export function startBackendTask(label: string, programmingLanguage?: string): CommentJSONValue { programmingLanguage = programmingLanguage || "javascript"; - const command = `npx env-cmd --silent -f .localSettings func start --${programmingLanguage} --language-worker="--inspect=9229" --port "7071" --cors "*"`; + const command = `npx env-cmd --silent -f .localConfigs func start --${programmingLanguage} --language-worker="--inspect=9229" --port "7071" --cors "*"`; const task = { label, type: "shell", @@ -267,8 +267,8 @@ export function startBackendTask(label: string, programmingLanguage?: string): C export function startBotTask(label: string, programmingLanguage?: string): CommentJSONValue { const command = programmingLanguage === "typescript" - ? "npx env-cmd --silent -f .localSettings nodemon --inspect=9239 --signal SIGINT -r ts-node/register index.ts" - : "npx env-cmd --silent -f .localSettings nodemon --inspect=9239 --signal SIGINT index.js"; + ? "npx env-cmd --silent -f .localConfigs nodemon --inspect=9239 --signal SIGINT -r ts-node/register index.ts" + : "npx env-cmd --silent -f .localConfigs nodemon --inspect=9239 --signal SIGINT index.js"; const task = { label, type: "shell", diff --git a/packages/fx-core/src/core/middleware/utils/debug/taskMigrator.ts b/packages/fx-core/src/core/middleware/utils/debug/taskMigrator.ts index 59f4bd673a..5c0b4749b4 100644 --- a/packages/fx-core/src/core/middleware/utils/debug/taskMigrator.ts +++ b/packages/fx-core/src/core/middleware/utils/debug/taskMigrator.ts @@ -26,7 +26,7 @@ import { updateLocalEnv, watchBackendTask, } from "./debugV3MigrationUtils"; -import { InstallToolArgs } from "../../../../component/driver/prerequisite/interfaces/InstallToolArgs"; +import { InstallToolArgs } from "../../../../component/driver/devTool/interfaces/InstallToolArgs"; import { BuildArgs } from "../../../../component/driver/interface/buildAndDeployArgs"; import { LocalCrypto } from "../../../crypto"; import * as os from "os"; diff --git a/packages/fx-core/src/core/question.ts b/packages/fx-core/src/core/question.ts index 10867b417c..81262b492e 100644 --- a/packages/fx-core/src/core/question.ts +++ b/packages/fx-core/src/core/question.ts @@ -95,7 +95,7 @@ export enum CoreQuestionNames { TeamsAppManifestFilePath = "manifest-path", LocalTeamsAppManifestFilePath = "local-manifest-path", AadAppManifestFilePath = "aadAppManifestFilePath", - TeamsAppPackageFilePath = "teamsAppPackageFilePath", + TeamsAppPackageFilePath = "app-package-file-path", ConfirmManifest = "confirmManifest", ConfirmLocalManifest = "confirmLocalManifest", OutputZipPathParamName = "output-zip-path", @@ -924,7 +924,7 @@ export function selectTeamsAppManifestQuestion(inputs: Inputs, isLocal = false): }; const res = new QTreeNode(teamsAppManifestNode); - if (inputs.platform !== Platform.CLI_HELP) { + if (inputs.platform !== Platform.CLI_HELP && inputs.platform !== Platform.CLI) { const manifestPath = path.join( inputs.projectPath!, AppPackageFolderName, diff --git a/packages/fx-core/templates/core/v3Migration/csharp.app.local.yml b/packages/fx-core/templates/core/v3Migration/csharp.app.local.yml index 14e49e8251..37963d7953 100644 --- a/packages/fx-core/templates/core/v3Migration/csharp.app.local.yml +++ b/packages/fx-core/templates/core/v3Migration/csharp.app.local.yml @@ -1,6 +1,9 @@ +# yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions version: 1.0.0 -registerApp: +provision: {{#if activePlugins.fx-resource-aad-app-for-teams}} - uses: aadApp/create # Creates a new Azure Active Directory (AAD) app to authenticate users if the environment variable that stores clientId is empty with: @@ -19,10 +22,9 @@ registerApp: with: name: {{teamsAppName}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - {{#if activePlugins.fx-resource-bot}} -provision: - uses: botAadApp/create # Creates a new AAD app for Bot Registration. with: name: {{appName}} @@ -49,8 +51,6 @@ provision: OAuthAuthority: $\{{AAD_APP_OAUTH_AUTHORITY}} {{/if}} {{/if}} - -configureApp: {{#if activePlugins.fx-resource-frontend-hosting}} - uses: script # Set env for local launch name: Set {{placeholderMappings.tabDomain}} for local launch @@ -98,6 +98,4 @@ configureApp: outputJsonPath: ./build/appPackage/manifest.$\{{TEAMSFX_ENV}}.json - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: - appPackagePath: ./build/appPackage/appPackage.$\{{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID \ No newline at end of file + appPackagePath: ./build/appPackage/appPackage.$\{{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. \ No newline at end of file diff --git a/packages/fx-core/templates/core/v3Migration/csharp.app.yml b/packages/fx-core/templates/core/v3Migration/csharp.app.yml index 15be4db007..f60aff985d 100644 --- a/packages/fx-core/templates/core/v3Migration/csharp.app.yml +++ b/packages/fx-core/templates/core/v3Migration/csharp.app.yml @@ -1,3 +1,6 @@ +# yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions version: 1.0.0 projectId: {{projectId}} @@ -23,6 +26,7 @@ provision: with: name: {{teamsAppName}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID {{#if activePlugins.fx-resource-bot}} - uses: botAadApp/create # Creates a new AAD app for Bot Registration. @@ -63,8 +67,6 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./build/appPackage/appPackage.$\{{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID deploy: - uses: cli/runDotnetCommand diff --git a/packages/fx-core/templates/core/v3Migration/js.ts.app.local.yml b/packages/fx-core/templates/core/v3Migration/js.ts.app.local.yml index a819fc56ca..90ec66786d 100644 --- a/packages/fx-core/templates/core/v3Migration/js.ts.app.local.yml +++ b/packages/fx-core/templates/core/v3Migration/js.ts.app.local.yml @@ -26,6 +26,7 @@ provision: with: name: $\{{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID {{/if}} @@ -97,7 +98,7 @@ provision: {{/teamsApp}} {{#if isM365}} - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./build/appPackage/appPackage.$\{{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -110,7 +111,7 @@ provision: {{#config.deploy}} deploy: {{#tools}} - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: {{#devCert}} devCert: @@ -122,7 +123,7 @@ deploy: {{#dotnet}} dotnet: true {{/dotnet}} - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). {{#devCert}} sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -223,7 +224,7 @@ deploy: {{#frontendStart}} - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./tabs/.localSettings + target: ./tabs/.localConfigs envs: BROWSER: none HTTPS: true @@ -259,7 +260,7 @@ deploy: {{#botStart}} - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./bot/.localSettings + target: ./bot/.localConfigs envs: BOT_ID: $\{{BOT_ID}} BOT_PASSWORD: $\{{SECRET_BOT_PASSWORD}} @@ -283,7 +284,7 @@ deploy: {{#if backendStart}} - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./api/.localSettings + target: ./api/.localConfigs envs: FUNCTIONS_WORKER_RUNTIME: node M365_CLIENT_ID: $\{{AAD_APP_CLIENT_ID}} diff --git a/packages/fx-core/templates/core/v3Migration/js.ts.app.yml b/packages/fx-core/templates/core/v3Migration/js.ts.app.yml index 70ffb11bcb..6f6ae4604b 100644 --- a/packages/fx-core/templates/core/v3Migration/js.ts.app.yml +++ b/packages/fx-core/templates/core/v3Migration/js.ts.app.yml @@ -27,6 +27,7 @@ provision: with: name: {{teamsAppName}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID {{#if activePlugins.fx-resource-bot}} - uses: botAadApp/create # Creates a new AAD app for Bot Registration. @@ -73,7 +74,7 @@ provision: with: appPackagePath: ./build/appPackage/appPackage.$\{{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. {{#if isM365}} - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./build/appPackage/appPackage.$\{{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -162,10 +163,10 @@ deploy: {{/if}} {{/if}} {{#if activePlugins.fx-resource-function}} - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). dotnetPath: DOTNET_PATH - uses: cli/runNpmCommand name: install api dependencies @@ -176,7 +177,7 @@ deploy: with: workingDirectory: api args: build extensions.csproj -o bin --ignore-failed-sources - execPath: $\{{ {{~dotnetPath~}} }} # Use dotnet installed by prerequisite/install action + execPath: $\{{ {{~dotnetPath~}} }} # Use dotnet installed by devTool/install action {{#if isTypescript}} - uses: cli/runNpmCommand name: build api app diff --git a/packages/fx-core/tests/common/m365/launchHelper.test.ts b/packages/fx-core/tests/common/m365/launchHelper.test.ts index a6cd376d56..3276e52d56 100644 --- a/packages/fx-core/tests/common/m365/launchHelper.test.ts +++ b/packages/fx-core/tests/common/m365/launchHelper.test.ts @@ -147,7 +147,7 @@ describe("LaunchHelper", () => { }); const result = await launchHelper.getM365AppId("test-id"); chai.assert(result.isErr()); - chai.assert.deepEqual((result as any).error.name, "M365TitleNotAcquiredError"); + chai.assert.deepEqual((result as any).error.name, "NotExtendedToM365Error"); }); it("retrieveAppId undefined", async () => { @@ -155,7 +155,7 @@ describe("LaunchHelper", () => { sinon.stub(PackageService.prototype, "retrieveAppId").resolves(undefined); const result = await launchHelper.getM365AppId("test-id"); chai.assert(result.isErr()); - chai.assert.deepEqual((result as any).error.name, "M365TitleNotAcquiredError"); + chai.assert.deepEqual((result as any).error.name, "NotExtendedToM365Error"); }); it("happy path", async () => { diff --git a/packages/fx-core/tests/component/driver/aad/create.test.ts b/packages/fx-core/tests/component/driver/aad/create.test.ts index 21b74b2f2c..c6c23fa976 100644 --- a/packages/fx-core/tests/component/driver/aad/create.test.ts +++ b/packages/fx-core/tests/component/driver/aad/create.test.ts @@ -401,9 +401,9 @@ describe("aadAppCreate", async () => { expect(result.result.isOk()).to.be.true; expect(startTelemetry.eventName).to.equal("aadApp/create-start"); - expect(startTelemetry.properties.component).to.equal("aadApp/create"); + expect(startTelemetry.properties.component).to.equal("aadAppcreate"); expect(endTelemetry.eventName).to.equal("aadApp/create"); - expect(endTelemetry.properties.component).to.equal("aadApp/create"); + expect(endTelemetry.properties.component).to.equal("aadAppcreate"); expect(endTelemetry.properties.success).to.equal("yes"); }); @@ -460,9 +460,9 @@ describe("aadAppCreate", async () => { expect(result.result.isOk()).to.be.false; expect(startTelemetry.eventName).to.equal("aadApp/create-start"); - expect(startTelemetry.properties.component).to.equal("aadApp/create"); + expect(startTelemetry.properties.component).to.equal("aadAppcreate"); expect(endTelemetry.eventName).to.equal("aadApp/create"); - expect(endTelemetry.properties.component).to.equal("aadApp/create"); + expect(endTelemetry.properties.component).to.equal("aadAppcreate"); expect(endTelemetry.properties.success).to.equal("no"); expect(endTelemetry.properties["error-code"]).to.equal("aadApp/create.UnhandledError"); expect(endTelemetry.properties["error-type"]).to.equal("user"); diff --git a/packages/fx-core/tests/component/driver/aad/update.test.ts b/packages/fx-core/tests/component/driver/aad/update.test.ts index 5cb1c90e99..93ade6b4d3 100644 --- a/packages/fx-core/tests/component/driver/aad/update.test.ts +++ b/packages/fx-core/tests/component/driver/aad/update.test.ts @@ -23,7 +23,7 @@ import { } from "../../../../src/component/driver/aad/error/unhandledError"; import { cwd } from "process"; import { InvalidActionInputError, UnresolvedPlaceholderError } from "../../../../src/error/common"; - +import { Platform } from "@microsoft/teamsfx-api"; chai.use(chaiAsPromised); const expect = chai.expect; @@ -122,9 +122,9 @@ describe("aadAppUpdate", async () => { manifestPath: path.join(testAssetsRoot, "manifest.json"), outputFilePath: outputPath, }; - + const showMessage = sinon.spy(mockedDriverContext.ui, "showMessage"); const result = await updateAadAppDriver.execute(args, mockedDriverContext); - + chai.assert.isFalse(showMessage.called); expect(result.result.isOk()).to.be.true; expect(result.result._unsafeUnwrap().get(outputKeys.AAD_APP_ACCESS_AS_USER_PERMISSION_ID)).to.be .not.empty; @@ -147,6 +147,49 @@ describe("aadAppUpdate", async () => { expect(result.summaries).includes( `Applied manifest ${args.manifestPath} to Azure Active Directory application with object id ${expectedObjectId}` ); + showMessage.restore(); + }); + it("should success with valid manifest on cli", async () => { + sinon.stub(AadAppClient.prototype, "updateAadApp").resolves(); + const showMessage = sinon.spy(mockedDriverContext.ui, "showMessage"); + envRestore = mockedEnv({ + AAD_APP_OBJECT_ID: expectedObjectId, + AAD_APP_CLIENT_ID: expectedClientId, + }); + + const outputPath = path.join(outputRoot, "manifest.output.json"); + const args = { + manifestPath: path.join(testAssetsRoot, "manifest.json"), + outputFilePath: outputPath, + }; + mockedDriverContext.platform = Platform.CLI; + const result = await updateAadAppDriver.execute(args, mockedDriverContext); + chai.assert.isTrue(showMessage.calledOnce); + chai.assert.equal(showMessage.getCall(0).args[0], "info"); + chai.assert.equal( + showMessage.getCall(0).args[1], + "Your Azure Active Directory application has been successfully updated." + ); + chai.assert.isFalse(showMessage.getCall(0).args[2]); + expect(result.result.isOk()).to.be.true; + showMessage.restore(); + }); + it("should success while context ui not support on cli", async () => { + sinon.stub(AadAppClient.prototype, "updateAadApp").resolves(); + envRestore = mockedEnv({ + AAD_APP_OBJECT_ID: expectedObjectId, + AAD_APP_CLIENT_ID: expectedClientId, + }); + + const outputPath = path.join(outputRoot, "manifest.output.json"); + const args = { + manifestPath: path.join(testAssetsRoot, "manifest.json"), + outputFilePath: outputPath, + }; + delete mockedDriverContext.ui; + mockedDriverContext.platform = Platform.CLI; + const result = await updateAadAppDriver.execute(args, mockedDriverContext); + expect(result.result.isOk()).to.be.true; }); it("should use absolute path in args directly", async () => { @@ -440,9 +483,9 @@ describe("aadAppUpdate", async () => { expect(result.result.isOk()).to.be.true; expect(startTelemetry.eventName).to.equal("aadApp/update-start"); - expect(startTelemetry.properties.component).to.equal("aadApp/update"); + expect(startTelemetry.properties.component).to.equal("aadAppupdate"); expect(endTelemetry.eventName).to.equal("aadApp/update"); - expect(endTelemetry.properties.component).to.equal("aadApp/update"); + expect(endTelemetry.properties.component).to.equal("aadAppupdate"); expect(endTelemetry.properties.success).to.equal("yes"); }); @@ -504,9 +547,9 @@ describe("aadAppUpdate", async () => { expect(result.result.isOk()).to.be.false; expect(startTelemetry.eventName).to.equal("aadApp/update-start"); - expect(startTelemetry.properties.component).to.equal("aadApp/update"); + expect(startTelemetry.properties.component).to.equal("aadAppupdate"); expect(endTelemetry.eventName).to.equal("aadApp/update"); - expect(endTelemetry.properties.component).to.equal("aadApp/update"); + expect(endTelemetry.properties.component).to.equal("aadAppupdate"); expect(endTelemetry.properties.success).to.equal("no"); expect(endTelemetry.properties["error-code"]).to.equal("aadApp/update.UnhandledError"); expect(endTelemetry.properties["error-type"]).to.equal("system"); diff --git a/packages/fx-core/tests/component/driver/prerequisite/installDriver.test.ts b/packages/fx-core/tests/component/driver/devTool/installDriver.test.ts similarity index 99% rename from packages/fx-core/tests/component/driver/prerequisite/installDriver.test.ts rename to packages/fx-core/tests/component/driver/devTool/installDriver.test.ts index 503c42cadd..14a08b05b9 100644 --- a/packages/fx-core/tests/component/driver/prerequisite/installDriver.test.ts +++ b/packages/fx-core/tests/component/driver/devTool/installDriver.test.ts @@ -5,13 +5,13 @@ import "mocha"; import * as sinon from "sinon"; import chai from "chai"; -import { ToolsInstallDriver } from "../../../../src/component/driver/prerequisite/installDriver"; +import { ToolsInstallDriver } from "../../../../src/component/driver/devTool/installDriver"; import { MockedLogProvider, MockedUserInteraction } from "../../../plugins/solution/util"; import { DriverContext } from "../../../../src/component/driver/interface/commonArgs"; import { LocalCertificateManager } from "../../../../src/common/local/localCertificateManager"; import { UserError } from "@microsoft/teamsfx-api"; import { CoreSource } from "../../../../src/core/error"; -import { InstallToolArgs } from "../../../../src/component/driver/prerequisite/interfaces/InstallToolArgs"; +import { InstallToolArgs } from "../../../../src/component/driver/devTool/interfaces/InstallToolArgs"; import { FuncToolChecker } from "../../../../src/common/deps-checker/internal/funcToolChecker"; import { DepsType } from "../../../../src/common/deps-checker/depsChecker"; import { DepsCheckerError } from "../../../../src/common/deps-checker/depsError"; diff --git a/packages/fx-core/tests/component/driver/m365/acquire.test.ts b/packages/fx-core/tests/component/driver/m365/acquire.test.ts index 518eb16bf8..5a7864d8b2 100644 --- a/packages/fx-core/tests/component/driver/m365/acquire.test.ts +++ b/packages/fx-core/tests/component/driver/m365/acquire.test.ts @@ -13,7 +13,7 @@ import { MockedUserInteraction, } from "../../../plugins/solution/util"; -describe("m365Title/acquire", async () => { +describe("teamsApp/extendToM365", async () => { const acquireDriver = new M365TitleAcquireDriver(); const mockedDriverContext: any = { m365TokenProvider: new MockedM365Provider(), diff --git a/packages/fx-core/tests/component/error.test.ts b/packages/fx-core/tests/component/error.test.ts new file mode 100644 index 0000000000..9a7e95ef55 --- /dev/null +++ b/packages/fx-core/tests/component/error.test.ts @@ -0,0 +1,22 @@ +import { assert } from "chai"; +import "mocha"; +import * as sinon from "sinon"; +import { setTools } from "../../src/core/globalVars"; +import { InvalidYamlSchemaError } from "../../src/error/yml"; +import { MockTools } from "../core/utils"; + +describe("Error", () => { + const tools = new MockTools(); + setTools(tools); + const sandbox = sinon.createSandbox(); + afterEach(() => { + sandbox.restore(); + }); + beforeEach(() => {}); + it("InvalidYamlSchemaError", async () => { + const e1 = new InvalidYamlSchemaError(".", "."); + const e2 = new InvalidYamlSchemaError("."); + assert.isTrue(e1 instanceof InvalidYamlSchemaError); + assert.isTrue(e2 instanceof InvalidYamlSchemaError); + }); +}); diff --git a/packages/fx-core/tests/component/resource/appManifest/index.test.ts b/packages/fx-core/tests/component/resource/appManifest/index.test.ts index 5e115c2a84..247cc45d62 100644 --- a/packages/fx-core/tests/component/resource/appManifest/index.test.ts +++ b/packages/fx-core/tests/component/resource/appManifest/index.test.ts @@ -20,6 +20,7 @@ import { } from "@microsoft/teamsfx-api"; import Container from "typedi"; import { randomAppName, MockLogProvider, MockTools } from "../../../core/utils"; +import { MockedM365Provider, MockedAzureAccountProvider } from "../../../plugins/solution/util"; import { createContextV3 } from "../../../../src/component/utils"; import { setTools } from "../../../../src/core/globalVars"; import { AppManifest } from "../../../../src/component/resource/appManifest/appManifest"; @@ -38,6 +39,7 @@ import mockedEnv, { RestoreFn } from "mocked-env"; import { FeatureFlagName } from "../../../../src/common/constants"; import * as commonTools from "../../../../src/common/tools"; import { CreateAppPackageDriver } from "../../../../src/component/driver/teamsApp/createAppPackage"; +import { ConfigureTeamsAppDriver } from "../../../../src/component/driver/teamsApp/configure"; import { envUtil } from "../../../../src/component/utils/envUtil"; describe("App-manifest Component", () => { @@ -643,12 +645,18 @@ describe("App-manifest Component - v3", () => { sandbox.stub(context.userInteraction, "selectOption").resolves(ok(res)); context.logProvider = new MockLogProvider(); + context.tokenProvider = { + m365TokenProvider: new MockedM365Provider(), + azureAccountProvider: new MockedAzureAccountProvider(), + }; sandbox.stub(commonTools, "isV3Enabled").returns(true); sandbox .stub(Container, "get") .withArgs(sandbox.match("teamsApp/zipAppPackage")) - .returns(new CreateAppPackageDriver()); + .returns(new CreateAppPackageDriver()) + .withArgs(sandbox.match("teamsApp/update")) + .returns(new ConfigureTeamsAppDriver()); sandbox.stub(envUtil, "readEnv").resolves(); }); @@ -656,30 +664,19 @@ describe("App-manifest Component - v3", () => { sandbox.restore(); }); - it("deploy - filenotfound - v3", async function () { - const inputs2 = _.cloneDeep(inputs); - inputs2.projectPath = path.join(os.homedir(), "TeamsApps", appName); - const deployAction = await component.deploy(context as ResourceContextV3, inputs2); - chai.assert.isTrue(deployAction.isErr()); - if (deployAction.isErr()) { - chai.assert.equal(deployAction.error.name, AppStudioError.FileNotFoundError.name); - } - }); - - it("deploy - preview only", async function () { + it("deploy - happy path", async function () { const manifest = new TeamsAppManifest(); manifest.id = ""; manifest.icons.color = "resources/color.png"; manifest.icons.outline = "resources/outline.png"; sandbox.stub(manifestUtils, "readAppManifest").resolves(ok(manifest)); - sandbox.stub(manifestUtils, "getManifest").resolves(ok(manifest)); + sandbox.stub(manifestUtils, "getManifestV3").resolves(ok(manifest)); sandbox.stub(fs, "pathExists").resolves(true); sandbox.stub(fs, "readJSON").resolves(manifest); sandbox.stub(fs, "readFile").resolves(new Buffer(JSON.stringify(manifest))); sandbox.stub(context.userInteraction, "showMessage").resolves(ok("Preview only")); - sandbox.stub(AppStudioClient, "importApp").resolves(appDef); + sandbox.stub(ConfigureTeamsAppDriver.prototype, "run").resolves(ok(new Map())); - const deployAction = await component.deploy(context as ResourceContextV3, inputs); - chai.assert.isTrue(deployAction.isErr()); + const deployAction = await component.deployV3(context as ResourceContextV3, inputs); }); }); diff --git a/packages/fx-core/tests/core/collaborator.test.ts b/packages/fx-core/tests/core/collaborator.test.ts index 34cc82d739..3435860939 100644 --- a/packages/fx-core/tests/core/collaborator.test.ts +++ b/packages/fx-core/tests/core/collaborator.test.ts @@ -1830,6 +1830,7 @@ describe("Collaborator APIs for V3", () => { }); it("happy path: getQuestionsForGrantPermission", async () => { + inputs.platform = Platform.VSCode; inputs[CoreQuestionNames.TeamsAppManifestFilePath] = "teamsAppManifest"; inputs[CoreQuestionNames.AadAppManifestFilePath] = "aadAppManifest"; diff --git a/packages/fx-core/tests/core/middleware/debug/appLocalYmlGenerator.test.ts b/packages/fx-core/tests/core/middleware/debug/appLocalYmlGenerator.test.ts index dec13832d8..a974511634 100644 --- a/packages/fx-core/tests/core/middleware/debug/appLocalYmlGenerator.test.ts +++ b/packages/fx-core/tests/core/middleware/debug/appLocalYmlGenerator.test.ts @@ -36,7 +36,7 @@ describe("AppLocalYmlGenerator", () => { chai.assert.deepEqual(obj.deploy, [ { - uses: "prerequisite/install", + uses: "devTool/install", with: { devCert: { trust: true } }, writeToEnvironmentFile: { sslCertFile: "SSL_CRT_FILE", sslKeyFile: "SSL_KEY_FILE" }, }, diff --git a/packages/fx-core/tests/core/middleware/debug/taskMigrator.test.ts b/packages/fx-core/tests/core/middleware/debug/taskMigrator.test.ts index b28ab55195..78c0b5344d 100644 --- a/packages/fx-core/tests/core/middleware/debug/taskMigrator.test.ts +++ b/packages/fx-core/tests/core/middleware/debug/taskMigrator.test.ts @@ -1346,7 +1346,7 @@ describe("debugMigration", () => { { "label": "Start frontend", "type": "shell", - "command": "npx env-cmd --silent -f .localSettings react-scripts start", + "command": "npx env-cmd --silent -f .localConfigs react-scripts start", "isBackground": true, "options": { "cwd": "\${workspaceFolder}/tabs" diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpFunctionBot/expectedResult/app.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpFunctionBot/expectedResult/app.yml index 9667ec205f..5f13435505 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpFunctionBot/expectedResult/app.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpFunctionBot/expectedResult/app.yml @@ -1,3 +1,6 @@ +# yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions version: 1.0.0 projectId: 00000000-0000-0000-0000-000000000000 @@ -9,6 +12,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for Bot Registration. with: @@ -36,8 +40,6 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID deploy: - uses: cli/runDotnetCommand diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpNonSsoTab/expectedResult/app.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpNonSsoTab/expectedResult/app.yml index 8d45fa4243..f2e1bd51b0 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpNonSsoTab/expectedResult/app.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpNonSsoTab/expectedResult/app.yml @@ -1,3 +1,6 @@ +# yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions version: 1.0.0 projectId: 00000000-0000-0000-0000-000000000000 @@ -9,6 +12,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: arm/deploy # Deploy given ARM templates parallelly. with: @@ -33,8 +37,6 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID deploy: - uses: cli/runDotnetCommand diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpSsoTab/expectedResult/app.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpSsoTab/expectedResult/app.yml index b7930f6ece..f2d1a73896 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpSsoTab/expectedResult/app.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpSsoTab/expectedResult/app.yml @@ -1,3 +1,6 @@ +# yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions version: 1.0.0 projectId: 00000000-0000-0000-0000-000000000000 @@ -21,6 +24,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: arm/deploy # Deploy given ARM templates parallelly. with: @@ -49,8 +53,6 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID deploy: - uses: cli/runDotnetCommand diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpWebappBot/expectedResult/app.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpWebappBot/expectedResult/app.yml index 9dfa45f79c..f1777be17d 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpWebappBot/expectedResult/app.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/csharpWebappBot/expectedResult/app.yml @@ -1,3 +1,6 @@ +# yaml-language-server: $schema=https://developer.microsoft.com/json-schemas/teams-toolkit/teamsapp-yaml/1.0.0/yaml.schema.json +# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file +# Visit https://aka.ms/teamsfx-actions for details on actions version: 1.0.0 projectId: 00000000-0000-0000-0000-000000000000 @@ -9,6 +12,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for Bot Registration. with: @@ -36,8 +40,6 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - writeToEnvironmentFile: - teamsAppId: TEAMS_APP_ID deploy: - uses: cli/runDotnetCommand diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-command/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-command/expected/app.local.yml index 6987607905..b683a1c480 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-command/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-command/expected/app.local.yml @@ -8,6 +8,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-notification-trigger/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-notification-trigger/expected/app.local.yml index f088715c4f..a512b08dc0 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-notification-trigger/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-notification-trigger/expected/app.local.yml @@ -8,6 +8,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -41,10 +42,10 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab-bot-func/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab-bot-func/expected/app.local.yml index 6748e00693..5342fb180a 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab-bot-func/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab-bot-func/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -72,13 +73,13 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true func: true dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE funcPath: FUNC_PATH diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab/expected/app.local.yml index f49b8f020b..5d4108a74e 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/V3.5.0-V4.0.6-tab/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: script # Set env for local launch @@ -56,11 +57,11 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/app.local.yml index 273da66e96..da40d3b767 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -66,7 +67,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./bot/.localSettings + target: ./bot/.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/tasks.json b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/tasks.json index 59f497fb7a..15174e4b7c 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/tasks.json +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-bot/expected/tasks.json @@ -98,7 +98,7 @@ { "label": "Start bot", "type": "shell", - "command": "npx env-cmd --silent -f .localSettings nodemon --inspect=9239 --signal SIGINT index.js", + "command": "npx env-cmd --silent -f .localConfigs nodemon --inspect=9239 --signal SIGINT index.js", "isBackground": true, "options": { "cwd": "${workspaceFolder}/bot" diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/app.local.yml index 6655d12319..84c840a653 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -72,13 +73,13 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true func: true dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE funcPath: FUNC_PATH @@ -97,7 +98,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./tabs/.localSettings + target: ./tabs/.localConfigs envs: BROWSER: none HTTPS: true @@ -125,7 +126,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./bot/.localSettings + target: ./bot/.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} @@ -139,7 +140,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./api/.localSettings + target: ./api/.localConfigs envs: FUNCTIONS_WORKER_RUNTIME: node M365_CLIENT_ID: ${{AAD_APP_CLIENT_ID}} diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/tasks.json b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/tasks.json index 10722bfcec..64ca5401c9 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/tasks.json +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab-bot-func/expected/tasks.json @@ -133,7 +133,7 @@ { "label": "Start frontend", "type": "shell", - "command": "npx env-cmd --silent -f .localSettings react-scripts start", + "command": "npx env-cmd --silent -f .localConfigs react-scripts start", "isBackground": true, "options": { "cwd": "${workspaceFolder}/tabs" @@ -169,7 +169,7 @@ { "label": "Start backend", "type": "shell", - "command": "npx env-cmd --silent -f .localSettings func start --javascript --language-worker=\"--inspect=9229\" --port \"7071\" --cors \"*\"", + "command": "npx env-cmd --silent -f .localConfigs func start --javascript --language-worker=\"--inspect=9229\" --port \"7071\" --cors \"*\"", "isBackground": true, "options": { "cwd": "${workspaceFolder}/api", @@ -211,7 +211,7 @@ { "label": "Start bot", "type": "shell", - "command": "npx env-cmd --silent -f .localSettings nodemon --inspect=9239 --signal SIGINT index.js", + "command": "npx env-cmd --silent -f .localConfigs nodemon --inspect=9239 --signal SIGINT index.js", "isBackground": true, "options": { "cwd": "${workspaceFolder}/bot" diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/app.local.yml index 422031c517..31a480a072 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: script # Set env for local launch @@ -56,12 +57,12 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE dotnetPath: DOTNET_PATH @@ -73,7 +74,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./tabs/.localSettings + target: ./tabs/.localConfigs envs: BROWSER: none HTTPS: true diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/tasks.json b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/tasks.json index 35c4d6c3b3..d273d490db 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/tasks.json +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/beforeV3.4.0-tab/expected/tasks.json @@ -101,7 +101,7 @@ { "label": "Start frontend", "type": "shell", - "command": "npx env-cmd --silent -f .localSettings react-scripts start", + "command": "npx env-cmd --silent -f .localConfigs react-scripts start", "isBackground": true, "options": { "cwd": "${workspaceFolder}/tabs" diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-bot/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-bot/expected/app.local.yml index 2eb5227e99..37f3fc26b8 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-bot/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-bot/expected/app.local.yml @@ -8,6 +8,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-me/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-me/expected/app.local.yml index dd4e058923..1e3b61b539 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-me/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-me/expected/app.local.yml @@ -8,6 +8,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -41,7 +42,7 @@ provision: with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-tab/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-tab/expected/app.local.yml index dfd0df7170..4ef7bb54b2 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-tab/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-m365-tab/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: script # Set env for local launch @@ -55,7 +56,7 @@ provision: with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -63,11 +64,11 @@ provision: appId: M365_APP_ID deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-notification/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-notification/expected/app.local.yml index 24eb4b5b24..4befcb64c0 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-notification/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-notification/expected/app.local.yml @@ -8,6 +8,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -41,10 +42,10 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-bot/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-bot/expected/app.local.yml index df1ea9be7d..e5d8b3373d 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-bot/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-bot/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-tab/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-tab/expected/app.local.yml index 081a2e065d..da7a0e4a20 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-tab/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-sso-tab/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: script # Set env for local launch @@ -56,11 +57,11 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab-bot-func/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab-bot-func/expected/app.local.yml index 96ad3a774e..7448c57555 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab-bot-func/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab-bot-func/expected/app.local.yml @@ -21,6 +21,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: botAadApp/create # Creates a new AAD app for bot if BOT_ID environment variable is empty @@ -72,13 +73,13 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true func: true dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE funcPath: FUNC_PATH diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab/expected/app.local.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab/expected/app.local.yml index 43c789687d..547c060b87 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab/expected/app.local.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/debug/transparent-tab/expected/app.local.yml @@ -8,6 +8,7 @@ provision: with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID - uses: script # Set env for local launch @@ -38,11 +39,11 @@ provision: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/js.app.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/js.app.yml index aa636ae2a8..8c032cb7ef 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/js.app.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/js.app.yml @@ -38,10 +38,10 @@ deploy: artifactFolder: build # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file. resourceId: $\{{PROVISIONOUTPUT__AZURESTORAGETABOUTPUT__STORAGERESOURCEID}} - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). dotnetPath: DOTNET_PATH - uses: cli/runNpmCommand name: install api dependencies @@ -52,7 +52,7 @@ deploy: with: workingDirectory: api args: build extensions.csproj -o bin --ignore-failed-sources - execPath: $\{{DOTNET_PATH}} # Use dotnet installed by prerequisite/install action + execPath: $\{{DOTNET_PATH}} # Use dotnet installed by devTool/install action # Deploy your application to Azure Functions using the zip deploy feature. # For additional details, please refer to https://aka.ms/zip-deploy-to-azure-functions - uses: azureFunctions/zipDeploy diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/ts.app.yml b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/ts.app.yml index 41f6e8397f..2bd35796a4 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/ts.app.yml +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/jsTabWithApi/expectedResult/ts.app.yml @@ -38,10 +38,10 @@ deploy: artifactFolder: build # The resource id of the cloud resource to be deployed to. This key will be generated by arm/deploy action automatically. You can replace it with your existing Azure Resource id or add it to your environment variable file. resourceId: $\{{PROVISIONOUTPUT__AZURESTORAGETABOUTPUT__STORAGERESOURCEID}} - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: dotnet: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). dotnetPath: DOTNET_PATH - uses: cli/runNpmCommand name: install api dependencies @@ -52,7 +52,7 @@ deploy: with: workingDirectory: api args: build extensions.csproj -o bin --ignore-failed-sources - execPath: $\{{DOTNET_PATH}} # Use dotnet installed by prerequisite/install action + execPath: $\{{DOTNET_PATH}} # Use dotnet installed by devTool/install action - uses: cli/runNpmCommand name: build api app with: diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/m365Title.tpl b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/m365Title.tpl index a1b60bc73f..9e9b9a0d50 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/m365Title.tpl +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/m365Title.tpl @@ -1,4 +1,4 @@ - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./build/appPackage/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/teamsAppCreate.tpl b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/teamsAppCreate.tpl index 724a7f0962..7ded7f1ac0 100644 --- a/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/teamsAppCreate.tpl +++ b/packages/fx-core/tests/core/middleware/testAssets/v3Migration/ymlTemplates/teamsAppCreate.tpl @@ -2,4 +2,5 @@ with: name: ${{CONFIG__MANIFEST__APPNAME__SHORT}} # Teams app name writeToEnvironmentFile: + # Write the information of created resources into environment file for the specified environment variable(s). teamsAppId: TEAMS_APP_ID \ No newline at end of file diff --git a/packages/sdk-react/package-lock.json b/packages/sdk-react/package-lock.json index 5cb799d46d..cc80365227 100644 --- a/packages/sdk-react/package-lock.json +++ b/packages/sdk-react/package-lock.json @@ -622,7 +622,6 @@ "version": "8.5.6", "resolved": "https://registry.npmjs.org/@fluentui/date-time-utilities/-/date-time-utilities-8.5.6.tgz", "integrity": "sha512-BS5EgnB5GFLg4p84GWqCjt6Pbnjnz0RZA94FAfVOYoqHcnjLURZ1BkQuorGdwS7ipaE4AVgNaQsPq90PsAfuXw==", - "dev": true, "requires": { "@fluentui/set-version": "^8.2.6", "tslib": "^2.1.0" @@ -632,7 +631,6 @@ "version": "2.2.6", "resolved": "https://registry.npmjs.org/@fluentui/dom-utilities/-/dom-utilities-2.2.6.tgz", "integrity": "sha512-yJOEiFj/TfR307hzZn15kNocC0P3j2BltrAJznhgXywMKJhIczATFTfj2len7YMHxLttnR5yDz/oYpyBLSk4rw==", - "dev": true, "requires": { "@fluentui/set-version": "^8.2.6", "tslib": "^2.1.0" @@ -642,7 +640,6 @@ "version": "8.5.13", "resolved": "https://registry.npmjs.org/@fluentui/font-icons-mdl2/-/font-icons-mdl2-8.5.13.tgz", "integrity": "sha512-3JjYN7lJZefpBdNPoQRFOiNpyVw+BOGynMkmYglnGjEWlg3uodawNi9lnKBODXCy31OHh900n9pAPFyNpdCbBg==", - "dev": true, "requires": { "@fluentui/set-version": "^8.2.6", "@fluentui/style-utilities": "^8.9.6", @@ -654,7 +651,6 @@ "version": "8.2.33", "resolved": "https://registry.npmjs.org/@fluentui/foundation-legacy/-/foundation-legacy-8.2.33.tgz", "integrity": "sha512-Z1Nl1hmyICAjTwaU2fvIGenzczRfyf0P3oaRniwac4gAa5MidE6QlpAkEcwCka2QEG/qUjcx/cMacDGLN/Dd0A==", - "dev": true, "requires": { "@fluentui/merge-styles": "^8.5.7", "@fluentui/set-version": "^8.2.6", @@ -667,7 +663,6 @@ "version": "0.4.6", "resolved": "https://registry.npmjs.org/@fluentui/keyboard-key/-/keyboard-key-0.4.6.tgz", "integrity": "sha512-p59zLGs3ucDPc7ZVaPxVCaQsfNwERDt3n+yLE0w/FFBlPWJcOSkiZHIieMhqk5ur5YGzbgs9WppPrtxNga23fw==", - "dev": true, "requires": { "tslib": "^2.1.0" } @@ -685,7 +680,6 @@ "version": "8.5.7", "resolved": "https://registry.npmjs.org/@fluentui/merge-styles/-/merge-styles-8.5.7.tgz", "integrity": "sha512-t/mOQTigj51n7z6VPZ1nlb9getkzoLVhN0aUbOJUSD5qvu0gZqSBh7Y9xIP6QeYWF4q6wcZhEggo8HOgYqaWQw==", - "dev": true, "requires": { "@fluentui/set-version": "^8.2.6", "tslib": "^2.1.0" @@ -704,7 +698,6 @@ "version": "8.107.1", "resolved": "https://registry.npmjs.org/@fluentui/react/-/react-8.107.1.tgz", "integrity": "sha512-wz8Cjmh53qfYlLdovTabhlRcRbwys2DIJTC/bcEErP8JiY7FVrUH4ZyVK1a6mksZry0SDv9V4m8EdSykm9T+rw==", - "dev": true, "requires": { "@fluentui/date-time-utilities": "^8.5.6", "@fluentui/font-icons-mdl2": "^8.5.13", @@ -973,7 +966,6 @@ "version": "8.8.19", "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-8.8.19.tgz", "integrity": "sha512-Gswx0aOazRVFJONmcsj5o6SI/ebWQeZyBAlOsdFeSUuK38aRlVy4DbwVQ+5tQ675u3wmf/+Ln2a0xCixOAVvWg==", - "dev": true, "requires": { "@fluentui/keyboard-key": "^0.4.6", "@fluentui/merge-styles": "^8.5.7", @@ -987,7 +979,6 @@ "version": "8.6.20", "resolved": "https://registry.npmjs.org/@fluentui/react-hooks/-/react-hooks-8.6.20.tgz", "integrity": "sha512-vb90tgc0nGWvahE2zuPPtEpknIfAA0ABq7/ro7+CAcKgDx2sleGZKRGdzKXdYS026OxjQ8TN2K7/D3OI1v4Rjg==", - "dev": true, "requires": { "@fluentui/react-window-provider": "^2.2.9", "@fluentui/set-version": "^8.2.6", @@ -1157,7 +1148,6 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/@fluentui/react-portal-compat-context/-/react-portal-compat-context-9.0.5.tgz", "integrity": "sha512-vgGvv74jPi/salcxv37TCm06lOFn44CfNLX5wZw5HQIe9LYGUw/J7vkaniwNIzmQZsn62Y+fVxDS6Sq5S823tA==", - "dev": true, "requires": { "@swc/helpers": "^0.4.14" } @@ -1451,7 +1441,6 @@ "version": "2.2.9", "resolved": "https://registry.npmjs.org/@fluentui/react-window-provider/-/react-window-provider-2.2.9.tgz", "integrity": "sha512-BRa23ITjwUgewS9ynzCnW2bJIgaNHwhPUY0htLKcYSSv3fG7iib91B6FVC7QqmXDBTia00kqVul1TZz5G0qrlQ==", - "dev": true, "requires": { "@fluentui/set-version": "^8.2.6", "tslib": "^2.1.0" @@ -1461,7 +1450,6 @@ "version": "8.2.6", "resolved": "https://registry.npmjs.org/@fluentui/set-version/-/set-version-8.2.6.tgz", "integrity": "sha512-zXIfscQ1ZAiEpHc5taMrDEtTP2NtPBGlz2HbOpZiQ3aj/xcnUT7nT73ctb+Q2bHIqlDCHEaFRQxy/HG6koGYAA==", - "dev": true, "requires": { "tslib": "^2.1.0" } @@ -1470,7 +1458,6 @@ "version": "8.9.6", "resolved": "https://registry.npmjs.org/@fluentui/style-utilities/-/style-utilities-8.9.6.tgz", "integrity": "sha512-glhexQzJNnLws66Tb7a0WPStYVE1tRy0QWwbtOdIRXsd/3CA1FZse76itss8/yqGakPin2PElkej/jTKpaRWew==", - "dev": true, "requires": { "@fluentui/merge-styles": "^8.5.7", "@fluentui/set-version": "^8.2.6", @@ -1484,7 +1471,6 @@ "version": "2.6.25", "resolved": "https://registry.npmjs.org/@fluentui/theme/-/theme-2.6.25.tgz", "integrity": "sha512-slp+Tk+FEDj6HtZNWzckEMPLZMYfe2bECz4hLj/aq2ok51f2ztVTM8rjjmiJjOAidcTirF/gdYVbayc/5MOKag==", - "dev": true, "requires": { "@fluentui/merge-styles": "^8.5.7", "@fluentui/set-version": "^8.2.6", @@ -1505,7 +1491,6 @@ "version": "8.13.9", "resolved": "https://registry.npmjs.org/@fluentui/utilities/-/utilities-8.13.9.tgz", "integrity": "sha512-8SkDFN+v3FZ2DNQtnRHnUxkY2tVQo6ojHVPWsR5WAbfKDAdlDUWxf5bM+U/8d4E4v49x4HpKY1fqsrx3hLAhyA==", - "dev": true, "requires": { "@fluentui/dom-utilities": "^2.2.6", "@fluentui/merge-styles": "^8.5.7", @@ -2352,8 +2337,7 @@ "@microsoft/load-themed-styles": { "version": "1.10.295", "resolved": "https://registry.npmjs.org/@microsoft/load-themed-styles/-/load-themed-styles-1.10.295.tgz", - "integrity": "sha512-W+IzEBw8a6LOOfRJM02dTT7BDZijxm+Z7lhtOAz1+y9vQm1Kdz9jlAO+qCEKsfxtUOmKilW8DIRqFw2aUgKeGg==", - "dev": true + "integrity": "sha512-W+IzEBw8a6LOOfRJM02dTT7BDZijxm+Z7lhtOAz1+y9vQm1Kdz9jlAO+qCEKsfxtUOmKilW8DIRqFw2aUgKeGg==" }, "@microsoft/microsoft-graph-client": { "version": "3.0.1", @@ -2428,7 +2412,6 @@ "version": "0.4.14", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz", "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==", - "dev": true, "requires": { "tslib": "^2.4.0" }, @@ -2436,8 +2419,7 @@ "tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", - "dev": true + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" } } }, @@ -9584,8 +9566,7 @@ "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, "tsutils": { "version": "3.21.0", @@ -9635,9 +9616,9 @@ } }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true }, "unbox-primitive": { diff --git a/packages/sdk-react/package.json b/packages/sdk-react/package.json index 8da2beb4b5..01aabce87a 100644 --- a/packages/sdk-react/package.json +++ b/packages/sdk-react/package.json @@ -28,7 +28,6 @@ "precommit": "npm run check-sensitive && lint-staged" }, "devDependencies": { - "@fluentui/react": "^8.106.1", "@fluentui/react-components": "^9.15.0", "@istanbuljs/nyc-config-typescript": "^1.0.2", "@microsoft/eslint-plugin-teamsfx": "^0.0.1", @@ -78,6 +77,9 @@ "react": ">=16.8.0 <19.0.0", "react-dom": ">=16.8.0 <19.0.0" }, + "dependencies": { + "@fluentui/react": "^8.106.1" + }, "publishConfig": { "access": "public" }, diff --git a/packages/vscode-extension/PRERELEASE.md b/packages/vscode-extension/PRERELEASE.md index f59ecff642..a9d0692a79 100644 --- a/packages/vscode-extension/PRERELEASE.md +++ b/packages/vscode-extension/PRERELEASE.md @@ -2,6 +2,82 @@ ## Changelog +### Apr 18, 2023 + +New features: + +- Run and debug Teams bot and message extension applications with dev tunnels in Visual Studio Code. Refer to [this doc](https://aka.ms/teamsfx-switch-tunnel) if you want to switch back to use ngrok. + ![devtunnel](https://user-images.githubusercontent.com/11220663/230364699-ed108641-4196-4318-949b-17ff56a6593f.png) + +- `Validate Application` now helps catch errors and warnings that would prevent a successful publish to Teams in addition to schema checks. + ![validate](https://user-images.githubusercontent.com/11220663/230363745-50bb8b6b-06a1-40df-b6ae-5601a71b193e.png) + +- Auto-complete suggestions and descriptions when editing `teamsapp.yml` files. + + > Note: Teams Toolkit for Visual Studio Code takes a new dependency on [YAML extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) which will be installed together with Teams Toolkit. + +New getting started experience with GitHub Codespaces: + +Start developing Teams applications instantly by opening Teams Toolkit samples in GitHub Codespaces. Try these samples today: + +- [Hello World Tab Sample](https://github.com/OfficeDev/TeamsFx-Samples/tree/v3/hello-world-tab-codespaces) +- [Notification Sample](https://github.com/OfficeDev/TeamsFx-Samples/tree/v3/notification-codespaces) +- [NPM Search Message Extension Sample](https://github.com/OfficeDev/TeamsFx-Samples/tree/v3/NPM-search-message-extension-codespaces) + +SharePoint Framework developer experience update: + +- Automated the process to add multiple SPFx web parts as Teams Tab pages and configure the new web parts with Teams app. +- Choose which SharePoint Framework (SPFx) package version to use when creating a SPFx-based Teams tab app, either from a globally installed version or let Teams Toolkit install the latest version for you. +- Streamlined full stack debugging for SPFx based tab apps on Teams, Outlook and the Microsoft 365 app. + ![SPFx](https://user-images.githubusercontent.com/11220663/230363218-98e16312-17b0-49cf-8617-333ca961c4b0.png) + +Teams Toolkit generated project file change: + +- Simplified the default lifecycle steps in `teamsapp.yml` to be Provision, Deploy, and Publish. The ConfigureApp and RegisterApp steps are removed, and their actions are defaulted to the Provision step. +- Added support for a new action, `uses: script`, that can be used to run any script command. +- Some actions now support a `writeToEnvironmentFile` parameter to define generated environment variable names. +- `.env.{envName}` files now only contain non-sensitive information and are removed from `.gitignore`. +- Added `.env.{envName}.user` files to store sensitive information like password and are added to `.gitignore`. + ![project](https://user-images.githubusercontent.com/11220663/230363542-c0e8db66-8b6f-4c0e-92d0-b184c34e4824.png) + +Teams Toolkit CLI ([`@microsoft/teamsfx-cli`](https://www.npmjs.com/package/@microsoft/teamsfx-cli)) `v2.0.0@beta`: + +- Updated `teamsfx validate` command to validate your app package against validation rules. +- Updated `teamsfx new` command to include a new parameter `--spfx-install-latest-package` to specify whether to use the latest SPFx package or not. +- Added `teamsfx add spfx-web-part` command to add multiple web parts. + +TeamsFx-React SDK ([`@microsoft/teamsfx-react`](https://www.npmjs.com/package/@microsoft/teamsfx-react)) `v3.0.0@beta`: + +- Added `BaseDashboard` class: A base component that provides basic functionality to create a dashboard. +- Added `BaseWidget` class: A base component that provides basic functionality to create a widget. +- Added `IWidgetClassNames` Interface: A Interface for defining the class names of widget elements. + +Enhancements: + +- Updated Teams Toolkit tree view user interface to streamline the development workflow: + + - Added the `ENVIRONMENT` section back. + - Renamed the `DEPLOYMENT` section to `LIFECYCLE`. + - Renamed `Provision in the cloud` to `Provision`, `Deploy to the cloud` to `Deploy` and `Publish to Teams` to `Publish`. Now `Provision`, `Deploy` and `Publish` command will trigger the corresponding actions defined in the `teamsapp.yml` file. + - Moved `Zip Teams App Package`, `Validate Application`, and `Open Developer Portal to Publish` commands to `UTILITY` section. + ![treeview](https://user-images.githubusercontent.com/11220663/230364045-510c7bd6-5c5a-4b32-ae61-bb069b31c016.png) + +- `Zip Teams App Package`, `Validate Application`, `Update Azure Active Directory App`, `Update Teams App` commands will now ask for additional inputs like `manifest.json` file path and environment name so that you have the flexibility to arrange hose files. + +- Simplified multiple progress notifications into a single one for provision, deploy and publish. + +- Sample: enabled [app caching](https://learn.microsoft.com/en-us/microsoftteams/platform/apps-in-teams-meetings/build-tabs-for-meeting?tabs=desktop%2Cmeeting-chat-view-desktop%2Cmeeting-stage-view-desktop%2Cchannel-meeting-desktop#app-caching) in "My First Meeting App" sample that improves subsequent launch time of the apps that are loaded in the meeting side panel. + +- Template: updated templates and samples to use Fluent UI V9 and React 18. + +Bug fixes: + +- Fixed an issue where we will only display relevant how-to guide for SPFx project. ([#8083](https://github.com/OfficeDev/TeamsFx/pull/8083)) +- Fixed an issue where the hyperlink is highlighted multiple colors from output channel. ([#8239](https://github.com/OfficeDev/TeamsFx/pull/8239)) +- Fixed an issue where you might see duplicate error messages. ([#8213](https://github.com/OfficeDev/TeamsFx/pull/8213)) +- Fixed an issue where you might see `Upload failed due to an invalid BotId in your manifest` after migrating your project with prerelease version. ([#8127](https://github.com/OfficeDev/TeamsFx/pull/8127)) +- Fixed an issue where `teamsApp/update` action will not create a new Teams app registration when `TEAMS_APP_ID` doesn't exist. ([#8021](https://github.com/OfficeDev/TeamsFx/pull/8021)) + ### Mar 23, 2023 Enhancement: @@ -18,8 +94,8 @@ New features: SDK updates: -- [TeamsFx](https://www.npmjs.com/package/@microsoft/teamsfx) `v2.2.1`: Updated package dependency. -- [TeamsFx-React](https://www.npmjs.com/package/@microsoft/teamsfx-react) `v3.0.0`: Updated package to support React 18 and `useTeams`, `useTeamsFx` and `useTeamsUserCredential` hooks to use `@fluentui/react-components` from Fluent UI v9. +- [TeamsFx](https://www.npmjs.com/package/@microsoft/teamsfx) `v2.2.1@beta`: Updated package dependency. +- [TeamsFx-React](https://www.npmjs.com/package/@microsoft/teamsfx-react) `v3.0.0@beta`: Updated package to support React 18 and `useTeams`, `useTeamsFx` and `useTeamsUserCredential` hooks to use `@fluentui/react-components` from Fluent UI v9. Sample additions: diff --git a/packages/vscode-extension/package.json b/packages/vscode-extension/package.json index 5d7ebb5288..64ef17dde6 100644 --- a/packages/vscode-extension/package.json +++ b/packages/vscode-extension/package.json @@ -53,9 +53,10 @@ "onCommand:fx-extension.validate-getStarted-prerequisites", "onCommand:workbench.action.tasks.runTask", "onCommand:workbench.action.debug.start", - "workspaceContains:**/.fx/*", + "workspaceContains:/.fx/**/*", "workspaceContains:teamsapp.yml", - "onView:teamsfx-empty-project" + "onView:teamsfx-empty-project", + "onUri" ], "capabilities": { "untrustedWorkspaces": { @@ -562,7 +563,7 @@ "command": "fx-extension.addEnvironmentWithIcon", "title": "%teamstoolkit.commands.createEnvironment.title%", "icon": "$(add)", - "enablement": "fx-extension.isTeamsFx" + "enablement": "fx-extension.isTeamsFx && isWorkspaceTrusted && !fx-extension.commandLocked" }, { "command": "fx-extension.addFeature", @@ -1064,10 +1065,6 @@ }, {} ] - }, - "template": { - "type": "string", - "description": "%teamstoolkit.taskDefinitions.args.template.title%" } }, "additionalProperties": false diff --git a/packages/vscode-extension/package.nls.json b/packages/vscode-extension/package.nls.json index 6d09d44b04..483e37e410 100644 --- a/packages/vscode-extension/package.nls.json +++ b/packages/vscode-extension/package.nls.json @@ -187,7 +187,6 @@ "teamstoolkit.handlers.coreNotReady": "Core module is loading", "teamstoolkit.handlers.createProjectNotification": "You should create a new app or open an existing one to open the README file.", "teamstoolkit.handlers.createProjectTitle": "Create a New App", - "teamstoolkit.handlers.decryptFailed": "Failed to decrypt secret.", "teamstoolkit.handlers.disableAutomaticNpmInstall": "Disable Auto NPM Install", "teamstoolkit.handlers.editSecretTitle": "Edit the decrypted secret value", "teamstoolkit.handlers.fileNotFound": "%s not found, cannot open it.", @@ -413,7 +412,6 @@ "teamstoolkit.taskDefinitions.args.ports.portNumber.title": "Local server port number.", "teamstoolkit.taskDefinitions.args.ports.protocol.title": "Protocol for the port.", "teamstoolkit.taskDefinitions.args.ports.access.title": "Access control for the tunnel.", - "teamstoolkit.taskDefinitions.args.template.title": "The path to yml template.", "teamstoolkit.manageCollaborator.grantPermission.label": "Add App Owners", "teamstoolkit.manageCollaborator.grantPermission.description": "Add owners to your Teams app and Azure Active Director app registrations so they can make changes", "teamstoolkit.manageCollaborator.listCollaborator.label": "List App Owners", diff --git a/packages/vscode-extension/src/codeLensProvider.ts b/packages/vscode-extension/src/codeLensProvider.ts index 291f836acb..ee5dd40d27 100644 --- a/packages/vscode-extension/src/codeLensProvider.ts +++ b/packages/vscode-extension/src/codeLensProvider.ts @@ -26,6 +26,7 @@ import { core, getSystemInputs } from "./handlers"; import isUUID from "validator/lib/isUUID"; import { isV3Enabled, envUtil } from "@microsoft/teamsfx-core"; import { MetadataV3 } from "@microsoft/teamsfx-core/build/common/versionMetadata"; +import { commandIsRunning } from "./globalVariables"; async function resolveStateAndConfigCodeLens( lens: vscode.CodeLens, @@ -151,17 +152,17 @@ export class CryptoCodeLensProvider implements vscode.CodeLensProvider { constructor() { this.userDataRegex = - /fx-resource-[a-zA-Z\-]+\.[a-zA-Z\-_]+(?:Secret|Password|VariableParams)=(.*)/g; + /fx-resource-[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-_]+(?:Secret|Password|VariableParams)=(.*)/g; this.localDebugRegex = /(?: *|\t*)"(?:clientSecret|SimpleAuthEnvironmentVariableParams|botPassword)": "(crypto_.*)"/g; - this.envSecretRegex = /#?(?:SECRET_)[a-zA-Z\-_]+=(crypto_.*)/g; + this.envSecretRegex = /#?(?:SECRET_)[a-zA-Z0-9\-_]+=(crypto_.*)/g; } public provideCodeLenses( document: vscode.TextDocument ): vscode.CodeLens[] | Thenable { if (isV3Enabled()) { - if (document.fileName.includes(".env.")) { + if (!commandIsRunning && document.fileName.includes(".env.")) { return this.computeCodeLenses(document, this.envSecretRegex); } else { return []; @@ -185,7 +186,7 @@ export class CryptoCodeLensProvider implements vscode.CodeLensProvider { const text = document.getText(); const regex = new RegExp(secretRegex); let matches; - while ((matches = regex.exec(text)) !== null) { + while (!commandIsRunning && (matches = regex.exec(text)) !== null) { const match = matches[1]; const line = document.lineAt(document.positionAt(matches.index).line); const indexOf = line.text.indexOf(match); diff --git a/packages/vscode-extension/src/debug/taskTerminal/ngrokTunnelTaskTerminal.ts b/packages/vscode-extension/src/debug/taskTerminal/ngrokTunnelTaskTerminal.ts index 4112c8f909..49f71fb482 100644 --- a/packages/vscode-extension/src/debug/taskTerminal/ngrokTunnelTaskTerminal.ts +++ b/packages/vscode-extension/src/debug/taskTerminal/ngrokTunnelTaskTerminal.ts @@ -486,7 +486,7 @@ const NgrokTunnelError = Object.freeze({ getDefaultString("teamstoolkit.localDebug.tunnelEndpointNotFoundError"), webServiceUrl ), - util.format(localize("teamstoolkit.localDebug.tunnelEndpointNotFoundError", webServiceUrl)) + util.format(localize("teamstoolkit.localDebug.tunnelEndpointNotFoundError"), webServiceUrl) ), NgrokNotFoundError: () => new UserError( diff --git a/packages/vscode-extension/src/globalVariables.ts b/packages/vscode-extension/src/globalVariables.ts index 1ccf96d6f0..083156f68c 100644 --- a/packages/vscode-extension/src/globalVariables.ts +++ b/packages/vscode-extension/src/globalVariables.ts @@ -21,6 +21,7 @@ export let isSPFxProject = false; export let isExistingUser = "no"; export let uriEventHandler: UriHandler; export let defaultExtensionLogPath: string; +export let commandIsRunning = false; if (vscode.workspace && vscode.workspace.workspaceFolders) { if (vscode.workspace.workspaceFolders.length > 0) { @@ -63,3 +64,7 @@ function checkIsSPFx(directory: string): boolean { export function setUriEventHandler(uriHandler: UriHandler) { uriEventHandler = uriHandler; } + +export function setCommandIsRunning(isRunning: boolean) { + commandIsRunning = isRunning; +} diff --git a/packages/vscode-extension/src/handlers.ts b/packages/vscode-extension/src/handlers.ts index 00a1cef116..044433f7bb 100644 --- a/packages/vscode-extension/src/handlers.ts +++ b/packages/vscode-extension/src/handlers.ts @@ -246,9 +246,11 @@ export function activate(): Result { core = new FxCore(tools); if (isV3Enabled()) { core.on(CoreCallbackEvent.lock, async (command: string) => { + globalVariables.setCommandIsRunning(true); await commandController.lockedByOperation(command); }); core.on(CoreCallbackEvent.unlock, async (command: string) => { + globalVariables.setCommandIsRunning(false); await commandController.unlockedByOperation(command); }); } @@ -2761,7 +2763,7 @@ export async function decryptSecret(cipher: string, selection: vscode.Range): Pr } } else { ExtTelemetry.sendTelemetryErrorEvent(TelemetryEvent.EditSecret, result.error); - window.showErrorMessage(localize("teamstoolkit.handlers.decryptFailed")); + window.showErrorMessage(result.error.message); } } diff --git a/packages/vscode-extension/src/telemetry/extTelemetry.ts b/packages/vscode-extension/src/telemetry/extTelemetry.ts index 2157020703..04426807db 100644 --- a/packages/vscode-extension/src/telemetry/extTelemetry.ts +++ b/packages/vscode-extension/src/telemetry/extTelemetry.ts @@ -76,6 +76,12 @@ export namespace ExtTelemetry { return TelemetryEvent.PublishInDeveloperPortal; case Stage.addWebpart: return TelemetryEvent.AddWebpart; + case Stage.validateApplication: + return TelemetryEvent.ValidateApplication; + case Stage.createAppPackage: + return TelemetryEvent.Build; + case Stage.deployTeams: + return TelemetryEvent.UpdateTeamsApp; default: return undefined; } diff --git a/packages/vscode-extension/src/telemetry/extTelemetryEvents.ts b/packages/vscode-extension/src/telemetry/extTelemetryEvents.ts index 51cf3c989e..6daee871f5 100644 --- a/packages/vscode-extension/src/telemetry/extTelemetryEvents.ts +++ b/packages/vscode-extension/src/telemetry/extTelemetryEvents.ts @@ -40,6 +40,7 @@ export enum TelemetryEvent { ValidateManifestStart = "validate-manifest-start", ValidateManifest = "validate-manifest", + ValidateApplication = "validate-application", UpdatePreviewManifestStart = "update-preview-manifest-start", UpdatePreviewManifest = "update-preview-manifest", diff --git a/packages/vscode-extension/syntaxes/teamsfx-toolkit-output.tmLanguage b/packages/vscode-extension/syntaxes/teamsfx-toolkit-output.tmLanguage index 67019bad60..b037af4559 100644 --- a/packages/vscode-extension/syntaxes/teamsfx-toolkit-output.tmLanguage +++ b/packages/vscode-extension/syntaxes/teamsfx-toolkit-output.tmLanguage @@ -189,13 +189,18 @@ token.error-token 2 + + name + token.warn-token + + 3 name comment.line match - ([0-9]+ failed[,. ]+)?([0-9]+ passed.) + ([0-9]+ failed[,. ]+)?([0-9]+ warning[s,. ]+)?([0-9]+ passed.) name teamsfx-toolkit.validate.summary diff --git a/packages/vscode-extension/test/extension/codeLensProvider.test.ts b/packages/vscode-extension/test/extension/codeLensProvider.test.ts index 401dbd412b..2b926c0ce5 100644 --- a/packages/vscode-extension/test/extension/codeLensProvider.test.ts +++ b/packages/vscode-extension/test/extension/codeLensProvider.test.ts @@ -12,6 +12,7 @@ import * as commonTools from "@microsoft/teamsfx-core/build/common/tools"; import * as vscode from "vscode"; import { TelemetryTriggerFrom } from "../../src/telemetry/extTelemetryEvents"; import { vscodeHelper } from "../../src/debug/depsChecker/vscodeHelper"; +import * as globalVariables from "../../src/globalVariables"; describe("Manifest codelens", () => { afterEach(() => { @@ -160,6 +161,10 @@ describe("Manifest codelens", () => { }); describe("Crypto CodeLensProvider", () => { + afterEach(() => { + sinon.restore(); + }); + it("userData codelens", async () => { sinon.stub(commonTools, "isV3Enabled").returns(false); const document = { @@ -229,12 +234,12 @@ describe("Crypto CodeLensProvider", () => { const document = { fileName: ".env.local", getText: () => { - return "SECRET_VAR=crypto_abc"; + return "SECRET_VAR_2=crypto_abc"; }, lineAt: () => { return { lineNumber: 0, - text: "SECRET_VAR=crypto_abc", + text: "SECRET_VAR_2=crypto_abc", }; }, positionAt: () => { @@ -255,4 +260,34 @@ describe("Crypto CodeLensProvider", () => { chai.expect(codelens[0].command?.command).equal("fx-extension.decryptSecret"); sinon.restore(); }); + + it("hides when command is running", async () => { + sinon.stub(commonTools, "isV3Enabled").returns(true); + sinon.stub(globalVariables, "commandIsRunning").value(true); + const document = { + fileName: ".env.local", + getText: () => { + return "SECRET_VAR_2=crypto_abc"; + }, + lineAt: () => { + return { + lineNumber: 0, + text: "SECRET_VAR_2=crypto_abc", + }; + }, + positionAt: () => { + return { + character: 0, + line: 0, + }; + }, + } as unknown as vscode.TextDocument; + + const cryptoProvider = new CryptoCodeLensProvider(); + const codelens: vscode.CodeLens[] = cryptoProvider.provideCodeLenses( + document + ) as vscode.CodeLens[]; + + chai.assert.equal(codelens.length, 0); + }); }); diff --git a/packages/vscode-extension/test/extension/globalVariables.test.ts b/packages/vscode-extension/test/extension/globalVariables.test.ts index 7f1269b1c4..d53259139c 100644 --- a/packages/vscode-extension/test/extension/globalVariables.test.ts +++ b/packages/vscode-extension/test/extension/globalVariables.test.ts @@ -115,5 +115,12 @@ describe("Global Variables", () => { chai.expect(globalVariables.defaultExtensionLogPath).equals("fakePath"); sinon.restore(); }); + + it("set commandIsRunning", async () => { + globalVariables.setCommandIsRunning(true); + + chai.expect(globalVariables.commandIsRunning).equals(true); + sinon.restore(); + }); }); }); diff --git a/templates/scenarios/js/command-and-response/.appserviceIgnore b/templates/scenarios/js/command-and-response/.appserviceIgnore index 899215d4c5..f92808a7ad 100644 --- a/templates/scenarios/js/command-and-response/.appserviceIgnore +++ b/templates/scenarios/js/command-and-response/.appserviceIgnore @@ -1,7 +1,7 @@ .appserviceIgnore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/command-and-response/.gitignore b/templates/scenarios/js/command-and-response/.gitignore index 33315e77de..600d53ac6c 100644 --- a/templates/scenarios/js/command-and-response/.gitignore +++ b/templates/scenarios/js/command-and-response/.gitignore @@ -16,5 +16,5 @@ node_modules/ lib/ # Local data -.localSettings +.localConfigs .notification.localstore.json diff --git a/templates/scenarios/js/command-and-response/.vscode/launch.json b/templates/scenarios/js/command-and-response/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/command-and-response/.vscode/launch.json +++ b/templates/scenarios/js/command-and-response/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/command-and-response/package.json.tpl b/templates/scenarios/js/command-and-response/package.json.tpl index b82e42c450..5a173b3308 100644 --- a/templates/scenarios/js/command-and-response/package.json.tpl +++ b/templates/scenarios/js/command-and-response/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./src/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./src/index.js", "start": "node ./src/index.js", "watch": "nodemon ./src/index.js", diff --git a/templates/scenarios/js/command-and-response/teamsapp.local.yml.tpl b/templates/scenarios/js/command-and-response/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/js/command-and-response/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/command-and-response/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/dashboard-tab/.gitignore b/templates/scenarios/js/dashboard-tab/.gitignore index 4838e168ce..857402bd0c 100644 --- a/templates/scenarios/js/dashboard-tab/.gitignore +++ b/templates/scenarios/js/dashboard-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/js/dashboard-tab/.vscode/launch.json b/templates/scenarios/js/dashboard-tab/.vscode/launch.json index a82c5811fe..f2d0c206dc 100644 --- a/templates/scenarios/js/dashboard-tab/.vscode/launch.json +++ b/templates/scenarios/js/dashboard-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { diff --git a/templates/scenarios/js/dashboard-tab/package.json.tpl b/templates/scenarios/js/dashboard-tab/package.json.tpl index d7c88c482b..af03cfcd0f 100644 --- a/templates/scenarios/js/dashboard-tab/package.json.tpl +++ b/templates/scenarios/js/dashboard-tab/package.json.tpl @@ -21,7 +21,7 @@ "env-cmd": "^10.1.0" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/js/dashboard-tab/teamsapp.local.yml.tpl b/templates/scenarios/js/dashboard-tab/teamsapp.local.yml.tpl index 8c8ebd301a..b394577cc2 100644 --- a/templates/scenarios/js/dashboard-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/dashboard-tab/teamsapp.local.yml.tpl @@ -34,11 +34,11 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -48,7 +48,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/js/default-bot-message-extension/.gitignore b/templates/scenarios/js/default-bot-message-extension/.gitignore index d6a41d5c06..ed4fab7ab1 100644 --- a/templates/scenarios/js/default-bot-message-extension/.gitignore +++ b/templates/scenarios/js/default-bot-message-extension/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/js/default-bot-message-extension/.vscode/launch.json b/templates/scenarios/js/default-bot-message-extension/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/default-bot-message-extension/.vscode/launch.json +++ b/templates/scenarios/js/default-bot-message-extension/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/default-bot-message-extension/.webappignore b/templates/scenarios/js/default-bot-message-extension/.webappignore index 4abf4d120b..6daed8b6bc 100644 --- a/templates/scenarios/js/default-bot-message-extension/.webappignore +++ b/templates/scenarios/js/default-bot-message-extension/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/default-bot-message-extension/README.md b/templates/scenarios/js/default-bot-message-extension/README.md index f5c0a7cdd0..1b7aef8e0f 100644 --- a/templates/scenarios/js/default-bot-message-extension/README.md +++ b/templates/scenarios/js/default-bot-message-extension/README.md @@ -37,6 +37,12 @@ This is a simple hello world application with both Bot and Message extension cap - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/js/default-bot-message-extension/package.json.tpl b/templates/scenarios/js/default-bot-message-extension/package.json.tpl index fd26727131..f58740df8c 100644 --- a/templates/scenarios/js/default-bot-message-extension/package.json.tpl +++ b/templates/scenarios/js/default-bot-message-extension/package.json.tpl @@ -12,7 +12,7 @@ "license": "MIT", "main": "index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./index.js", "start": "node ./index.js", "watch": "nodemon ./index.js", diff --git a/templates/scenarios/js/default-bot-message-extension/teamsapp.local.yml.tpl b/templates/scenarios/js/default-bot-message-extension/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/js/default-bot-message-extension/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/default-bot-message-extension/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/default-bot/.gitignore b/templates/scenarios/js/default-bot/.gitignore index d6a41d5c06..ed4fab7ab1 100644 --- a/templates/scenarios/js/default-bot/.gitignore +++ b/templates/scenarios/js/default-bot/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/js/default-bot/.vscode/launch.json b/templates/scenarios/js/default-bot/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/default-bot/.vscode/launch.json +++ b/templates/scenarios/js/default-bot/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/default-bot/.webappignore b/templates/scenarios/js/default-bot/.webappignore index 4abf4d120b..6daed8b6bc 100644 --- a/templates/scenarios/js/default-bot/.webappignore +++ b/templates/scenarios/js/default-bot/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/default-bot/README.md b/templates/scenarios/js/default-bot/README.md index 01ae4b1342..56531a3688 100644 --- a/templates/scenarios/js/default-bot/README.md +++ b/templates/scenarios/js/default-bot/README.md @@ -33,6 +33,12 @@ This is a simple hello world application with Bot capabilities. - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/js/default-bot/package.json.tpl b/templates/scenarios/js/default-bot/package.json.tpl index fd26727131..f58740df8c 100644 --- a/templates/scenarios/js/default-bot/package.json.tpl +++ b/templates/scenarios/js/default-bot/package.json.tpl @@ -12,7 +12,7 @@ "license": "MIT", "main": "index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./index.js", "start": "node ./index.js", "watch": "nodemon ./index.js", diff --git a/templates/scenarios/js/default-bot/teamsapp.local.yml.tpl b/templates/scenarios/js/default-bot/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/js/default-bot/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/default-bot/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/m365-message-extension/.gitignore b/templates/scenarios/js/m365-message-extension/.gitignore index d6a41d5c06..ed4fab7ab1 100644 --- a/templates/scenarios/js/m365-message-extension/.gitignore +++ b/templates/scenarios/js/m365-message-extension/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/js/m365-message-extension/.vscode/launch.json b/templates/scenarios/js/m365-message-extension/.vscode/launch.json index 7d5199b438..6a87b6a80d 100644 --- a/templates/scenarios/js/m365-message-extension/.vscode/launch.json +++ b/templates/scenarios/js/m365-message-extension/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch Remote in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Launch Remote in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "presentation": { @@ -47,7 +47,7 @@ }, { "name": "Launch App in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -61,7 +61,7 @@ }, { "name": "Launch App in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -75,7 +75,7 @@ }, { "name": "Launch App in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "cascadeTerminateToConfigurations": [ @@ -89,7 +89,7 @@ }, { "name": "Launch App in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "cascadeTerminateToConfigurations": [ @@ -103,7 +103,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/m365-message-extension/.webappignore b/templates/scenarios/js/m365-message-extension/.webappignore index 4abf4d120b..6daed8b6bc 100644 --- a/templates/scenarios/js/m365-message-extension/.webappignore +++ b/templates/scenarios/js/m365-message-extension/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/m365-message-extension/README.md b/templates/scenarios/js/m365-message-extension/README.md index add5c24da5..b1224e1e89 100644 --- a/templates/scenarios/js/m365-message-extension/README.md +++ b/templates/scenarios/js/m365-message-extension/README.md @@ -40,7 +40,12 @@ Follow below instructions to get started with this application template for loca 1. Select a target Microsoft application where the message extension runs: `Debug in Teams`, `Debug in Outlook` and click the `Run and Debug` green arrow button. ### Test your application with TeamsFx CLI - +1. Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. +1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` 1. Executing the command `teamsfx provision --env local` in your project directory. 1. Executing the command `teamsfx deploy --env local` in your project directory. 1. Executing the command `teamsfx preview --env local --m365-host ` in your project directory, where options for `m365-host` are `teams` or `outlook`. diff --git a/templates/scenarios/js/m365-message-extension/package.json.tpl b/templates/scenarios/js/m365-message-extension/package.json.tpl index 2e1db63551..24b852bc01 100644 --- a/templates/scenarios/js/m365-message-extension/package.json.tpl +++ b/templates/scenarios/js/m365-message-extension/package.json.tpl @@ -12,7 +12,7 @@ "license": "MIT", "main": "index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./index.js", "start": "node ./index.js", "watch": "nodemon ./index.js" diff --git a/templates/scenarios/js/m365-message-extension/teamsapp.local.yml.tpl b/templates/scenarios/js/m365-message-extension/teamsapp.local.yml.tpl index 47134adb0f..01622d3435 100644 --- a/templates/scenarios/js/m365-message-extension/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/m365-message-extension/teamsapp.local.yml.tpl @@ -44,7 +44,7 @@ provision: with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -58,7 +58,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/m365-message-extension/teamsapp.yml.tpl b/templates/scenarios/js/m365-message-extension/teamsapp.yml.tpl index 9fc03fa1bf..e51b619402 100644 --- a/templates/scenarios/js/m365-message-extension/teamsapp.yml.tpl +++ b/templates/scenarios/js/m365-message-extension/teamsapp.yml.tpl @@ -44,7 +44,7 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/templates/scenarios/js/m365-tab/.gitignore b/templates/scenarios/js/m365-tab/.gitignore index 4838e168ce..857402bd0c 100644 --- a/templates/scenarios/js/m365-tab/.gitignore +++ b/templates/scenarios/js/m365-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/js/m365-tab/.vscode/launch.json b/templates/scenarios/js/m365-tab/.vscode/launch.json index d7f641abd3..92acc20ec6 100644 --- a/templates/scenarios/js/m365-tab/.vscode/launch.json +++ b/templates/scenarios/js/m365-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch Remote in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{M365_APP_ID}}?${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Launch Remote in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{M365_APP_ID}}?${account-hint}", "presentation": { @@ -47,7 +47,7 @@ }, { "name": "Launch Remote in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -58,7 +58,7 @@ }, { "name": "Launch Remote in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -69,7 +69,7 @@ }, { "name": "Attach to Frontend in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -80,7 +80,7 @@ }, { "name": "Attach to Frontend in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -91,7 +91,7 @@ }, { "name": "Attach to Frontend in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "presentation": { @@ -102,7 +102,7 @@ }, { "name": "Attach to Frontend in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "presentation": { @@ -113,7 +113,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -124,7 +124,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "presentation": { diff --git a/templates/scenarios/js/m365-tab/package.json.tpl b/templates/scenarios/js/m365-tab/package.json.tpl index 169c76a468..00bae54a30 100644 --- a/templates/scenarios/js/m365-tab/package.json.tpl +++ b/templates/scenarios/js/m365-tab/package.json.tpl @@ -24,7 +24,7 @@ "env-cmd": "^10.1.0" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/js/m365-tab/teamsapp.local.yml.tpl b/templates/scenarios/js/m365-tab/teamsapp.local.yml.tpl index a429c61ce5..77cde0e2b7 100644 --- a/templates/scenarios/js/m365-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/m365-tab/teamsapp.local.yml.tpl @@ -54,7 +54,7 @@ provision: with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -62,11 +62,11 @@ provision: appId: M365_APP_ID deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -77,7 +77,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/js/m365-tab/teamsapp.yml.tpl b/templates/scenarios/js/m365-tab/teamsapp.yml.tpl index ccf1b96f09..9244d18d39 100644 --- a/templates/scenarios/js/m365-tab/teamsapp.yml.tpl +++ b/templates/scenarios/js/m365-tab/teamsapp.yml.tpl @@ -61,7 +61,7 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/templates/scenarios/js/message-extension/.gitignore b/templates/scenarios/js/message-extension/.gitignore index d6a41d5c06..ed4fab7ab1 100644 --- a/templates/scenarios/js/message-extension/.gitignore +++ b/templates/scenarios/js/message-extension/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/js/message-extension/.vscode/launch.json b/templates/scenarios/js/message-extension/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/message-extension/.vscode/launch.json +++ b/templates/scenarios/js/message-extension/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/message-extension/.webappignore b/templates/scenarios/js/message-extension/.webappignore index 4abf4d120b..6daed8b6bc 100644 --- a/templates/scenarios/js/message-extension/.webappignore +++ b/templates/scenarios/js/message-extension/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/message-extension/README.md b/templates/scenarios/js/message-extension/README.md index 184b2612ca..329d29b96c 100644 --- a/templates/scenarios/js/message-extension/README.md +++ b/templates/scenarios/js/message-extension/README.md @@ -35,6 +35,12 @@ This is a simple hello world application with Message extension capabilities. - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/js/message-extension/package.json.tpl b/templates/scenarios/js/message-extension/package.json.tpl index 7bed10f6ed..50b1538575 100644 --- a/templates/scenarios/js/message-extension/package.json.tpl +++ b/templates/scenarios/js/message-extension/package.json.tpl @@ -12,7 +12,7 @@ "license": "MIT", "main": "index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./index.js", "start": "node ./index.js", "watch": "nodemon ./index.js", diff --git a/templates/scenarios/js/message-extension/teamsapp.local.yml.tpl b/templates/scenarios/js/message-extension/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/js/message-extension/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/message-extension/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/non-sso-tab-default-bot/.gitignore b/templates/scenarios/js/non-sso-tab-default-bot/.gitignore index ff5f1be2b0..aa5c66936c 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/.gitignore +++ b/templates/scenarios/js/non-sso-tab-default-bot/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/js/non-sso-tab-default-bot/.vscode/launch.json b/templates/scenarios/js/non-sso-tab-default-bot/.vscode/launch.json index dc928fba91..c55e669e75 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/.vscode/launch.json +++ b/templates/scenarios/js/non-sso-tab-default-bot/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/non-sso-tab-default-bot/bot/.webappignore b/templates/scenarios/js/non-sso-tab-default-bot/bot/.webappignore index 3ccc5f24c9..fbaf95be39 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/bot/.webappignore +++ b/templates/scenarios/js/non-sso-tab-default-bot/bot/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/non-sso-tab-default-bot/bot/README.md b/templates/scenarios/js/non-sso-tab-default-bot/bot/README.md index a4eeddb3e1..27811218c2 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/bot/README.md +++ b/templates/scenarios/js/non-sso-tab-default-bot/bot/README.md @@ -19,6 +19,12 @@ This is a simple hello world application with both Bot and Message extension cap - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/js/non-sso-tab-default-bot/bot/package.json.tpl b/templates/scenarios/js/non-sso-tab-default-bot/bot/package.json.tpl index 2073d7f81a..6fc701345b 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/bot/package.json.tpl +++ b/templates/scenarios/js/non-sso-tab-default-bot/bot/package.json.tpl @@ -12,7 +12,7 @@ "license": "MIT", "main": "index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./index.js", "start": "node ./index.js", "watch": "nodemon ./index.js", diff --git a/templates/scenarios/js/non-sso-tab-default-bot/tab/package.json.tpl b/templates/scenarios/js/non-sso-tab-default-bot/tab/package.json.tpl index a42f4a86fa..3d5620fdc9 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/tab/package.json.tpl +++ b/templates/scenarios/js/non-sso-tab-default-bot/tab/package.json.tpl @@ -20,7 +20,7 @@ "env-cmd": "^10.1.0" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/js/non-sso-tab-default-bot/teamsapp.local.yml.tpl b/templates/scenarios/js/non-sso-tab-default-bot/teamsapp.local.yml.tpl index 607617698b..b688b250f7 100644 --- a/templates/scenarios/js/non-sso-tab-default-bot/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/non-sso-tab-default-bot/teamsapp.local.yml.tpl @@ -50,11 +50,11 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -64,7 +64,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables for tab with: - target: ./tab/.localSettings + target: ./tab/.localConfigs envs: BROWSER: none HTTPS: true @@ -74,7 +74,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables for bot with: - target: ./bot/.localSettings + target: ./bot/.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/non-sso-tab/.gitignore b/templates/scenarios/js/non-sso-tab/.gitignore index 4838e168ce..857402bd0c 100644 --- a/templates/scenarios/js/non-sso-tab/.gitignore +++ b/templates/scenarios/js/non-sso-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/js/non-sso-tab/.vscode/launch.json b/templates/scenarios/js/non-sso-tab/.vscode/launch.json index 04e708c231..b16067d472 100644 --- a/templates/scenarios/js/non-sso-tab/.vscode/launch.json +++ b/templates/scenarios/js/non-sso-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch Remote in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{M365_APP_ID}}?${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Launch Remote in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{M365_APP_ID}}?${account-hint}", "presentation": { @@ -47,7 +47,7 @@ }, { "name": "Launch Remote in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -58,7 +58,7 @@ }, { "name": "Launch Remote in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -69,7 +69,7 @@ }, { "name": "Attach to Frontend in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -83,7 +83,7 @@ }, { "name": "Attach to Frontend in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -97,7 +97,7 @@ }, { "name": "Attach to Frontend in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "cascadeTerminateToConfigurations": [ @@ -111,7 +111,7 @@ }, { "name": "Attach to Frontend in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "cascadeTerminateToConfigurations": [ @@ -125,7 +125,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -139,7 +139,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -153,7 +153,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/non-sso-tab/package.json.tpl b/templates/scenarios/js/non-sso-tab/package.json.tpl index 62d2717373..5b0fc47eaa 100644 --- a/templates/scenarios/js/non-sso-tab/package.json.tpl +++ b/templates/scenarios/js/non-sso-tab/package.json.tpl @@ -14,7 +14,7 @@ "nodemon": "^2.0.21" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "nodemon --inspect=9239 --signal SIGINT src/app.js", "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/templates/scenarios/js/non-sso-tab/teamsapp.local.yml.tpl b/templates/scenarios/js/non-sso-tab/teamsapp.local.yml.tpl index 9a2882a432..aab6f40aed 100644 --- a/templates/scenarios/js/non-sso-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/non-sso-tab/teamsapp.local.yml.tpl @@ -42,11 +42,11 @@ provision: appId: M365_APP_ID deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/js/notification-http-timer-trigger/.funcignore b/templates/scenarios/js/notification-http-timer-trigger/.funcignore index 43ff118881..ab80133a6d 100644 --- a/templates/scenarios/js/notification-http-timer-trigger/.funcignore +++ b/templates/scenarios/js/notification-http-timer-trigger/.funcignore @@ -2,7 +2,7 @@ .development .DS_Store .git* -.localSettings +.localConfigs .notification.localstore.json .vscode *.js.map diff --git a/templates/scenarios/js/notification-http-timer-trigger/.gitignore b/templates/scenarios/js/notification-http-timer-trigger/.gitignore index da2dd9582c..361020f449 100644 --- a/templates/scenarios/js/notification-http-timer-trigger/.gitignore +++ b/templates/scenarios/js/notification-http-timer-trigger/.gitignore @@ -22,7 +22,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/js/notification-http-timer-trigger/.vscode/launch.json b/templates/scenarios/js/notification-http-timer-trigger/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/notification-http-timer-trigger/.vscode/launch.json +++ b/templates/scenarios/js/notification-http-timer-trigger/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/notification-http-timer-trigger/package.json.tpl b/templates/scenarios/js/notification-http-timer-trigger/package.json.tpl index 78c83059f5..71d54ed9d3 100644 --- a/templates/scenarios/js/notification-http-timer-trigger/package.json.tpl +++ b/templates/scenarios/js/notification-http-timer-trigger/package.json.tpl @@ -8,7 +8,7 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "func start --javascript --language-worker=\"--inspect=9239\" --port \"3978\" --cors \"*\"", "prepare-storage:teamsfx": "azurite --silent --location ./_storage_emulator --debug ./_storage_emulator/debug.log", "start": "npx func start", diff --git a/templates/scenarios/js/notification-http-timer-trigger/teamsapp.local.yml.tpl b/templates/scenarios/js/notification-http-timer-trigger/teamsapp.local.yml.tpl index eb893fd2ef..d7632aa347 100644 --- a/templates/scenarios/js/notification-http-timer-trigger/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/notification-http-timer-trigger/teamsapp.local.yml.tpl @@ -44,10 +44,10 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: cli/runNpmCommand # Run npm command @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/notification-http-trigger/.funcignore b/templates/scenarios/js/notification-http-trigger/.funcignore index 43ff118881..ab80133a6d 100644 --- a/templates/scenarios/js/notification-http-trigger/.funcignore +++ b/templates/scenarios/js/notification-http-trigger/.funcignore @@ -2,7 +2,7 @@ .development .DS_Store .git* -.localSettings +.localConfigs .notification.localstore.json .vscode *.js.map diff --git a/templates/scenarios/js/notification-http-trigger/.gitignore b/templates/scenarios/js/notification-http-trigger/.gitignore index da2dd9582c..361020f449 100644 --- a/templates/scenarios/js/notification-http-trigger/.gitignore +++ b/templates/scenarios/js/notification-http-trigger/.gitignore @@ -22,7 +22,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/js/notification-http-trigger/.vscode/launch.json b/templates/scenarios/js/notification-http-trigger/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/notification-http-trigger/.vscode/launch.json +++ b/templates/scenarios/js/notification-http-trigger/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/notification-http-trigger/package.json.tpl b/templates/scenarios/js/notification-http-trigger/package.json.tpl index 78c83059f5..71d54ed9d3 100644 --- a/templates/scenarios/js/notification-http-trigger/package.json.tpl +++ b/templates/scenarios/js/notification-http-trigger/package.json.tpl @@ -8,7 +8,7 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "func start --javascript --language-worker=\"--inspect=9239\" --port \"3978\" --cors \"*\"", "prepare-storage:teamsfx": "azurite --silent --location ./_storage_emulator --debug ./_storage_emulator/debug.log", "start": "npx func start", diff --git a/templates/scenarios/js/notification-http-trigger/teamsapp.local.yml.tpl b/templates/scenarios/js/notification-http-trigger/teamsapp.local.yml.tpl index eb893fd2ef..d7632aa347 100644 --- a/templates/scenarios/js/notification-http-trigger/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/notification-http-trigger/teamsapp.local.yml.tpl @@ -44,10 +44,10 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: cli/runNpmCommand # Run npm command @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/notification-restify/.appserviceignore b/templates/scenarios/js/notification-restify/.appserviceignore index 899215d4c5..f92808a7ad 100644 --- a/templates/scenarios/js/notification-restify/.appserviceignore +++ b/templates/scenarios/js/notification-restify/.appserviceignore @@ -1,7 +1,7 @@ .appserviceIgnore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/notification-restify/.gitignore b/templates/scenarios/js/notification-restify/.gitignore index 33315e77de..600d53ac6c 100644 --- a/templates/scenarios/js/notification-restify/.gitignore +++ b/templates/scenarios/js/notification-restify/.gitignore @@ -16,5 +16,5 @@ node_modules/ lib/ # Local data -.localSettings +.localConfigs .notification.localstore.json diff --git a/templates/scenarios/js/notification-restify/.vscode/launch.json b/templates/scenarios/js/notification-restify/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/notification-restify/.vscode/launch.json +++ b/templates/scenarios/js/notification-restify/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/notification-restify/package.json.tpl b/templates/scenarios/js/notification-restify/package.json.tpl index 575af7924b..18416ff020 100644 --- a/templates/scenarios/js/notification-restify/package.json.tpl +++ b/templates/scenarios/js/notification-restify/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./src/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./src/index.js", "start": "node ./src/index.js", "watch": "nodemon ./src/index.js", diff --git a/templates/scenarios/js/notification-restify/teamsapp.local.yml.tpl b/templates/scenarios/js/notification-restify/teamsapp.local.yml.tpl index f861447fed..8bb5fc0288 100644 --- a/templates/scenarios/js/notification-restify/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/notification-restify/teamsapp.local.yml.tpl @@ -49,7 +49,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/notification-timer-trigger/.funcignore b/templates/scenarios/js/notification-timer-trigger/.funcignore index 43ff118881..ab80133a6d 100644 --- a/templates/scenarios/js/notification-timer-trigger/.funcignore +++ b/templates/scenarios/js/notification-timer-trigger/.funcignore @@ -2,7 +2,7 @@ .development .DS_Store .git* -.localSettings +.localConfigs .notification.localstore.json .vscode *.js.map diff --git a/templates/scenarios/js/notification-timer-trigger/.gitignore b/templates/scenarios/js/notification-timer-trigger/.gitignore index da2dd9582c..361020f449 100644 --- a/templates/scenarios/js/notification-timer-trigger/.gitignore +++ b/templates/scenarios/js/notification-timer-trigger/.gitignore @@ -22,7 +22,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/js/notification-timer-trigger/.vscode/launch.json b/templates/scenarios/js/notification-timer-trigger/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/notification-timer-trigger/.vscode/launch.json +++ b/templates/scenarios/js/notification-timer-trigger/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/notification-timer-trigger/package.json.tpl b/templates/scenarios/js/notification-timer-trigger/package.json.tpl index 78c83059f5..71d54ed9d3 100644 --- a/templates/scenarios/js/notification-timer-trigger/package.json.tpl +++ b/templates/scenarios/js/notification-timer-trigger/package.json.tpl @@ -8,7 +8,7 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "func start --javascript --language-worker=\"--inspect=9239\" --port \"3978\" --cors \"*\"", "prepare-storage:teamsfx": "azurite --silent --location ./_storage_emulator --debug ./_storage_emulator/debug.log", "start": "npx func start", diff --git a/templates/scenarios/js/notification-timer-trigger/teamsapp.local.yml.tpl b/templates/scenarios/js/notification-timer-trigger/teamsapp.local.yml.tpl index eb893fd2ef..d7632aa347 100644 --- a/templates/scenarios/js/notification-timer-trigger/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/notification-timer-trigger/teamsapp.local.yml.tpl @@ -44,10 +44,10 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: cli/runNpmCommand # Run npm command @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/js/sso-tab/.gitignore b/templates/scenarios/js/sso-tab/.gitignore index f5be3d1662..54e67a1b4c 100644 --- a/templates/scenarios/js/sso-tab/.gitignore +++ b/templates/scenarios/js/sso-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/js/sso-tab/.vscode/launch.json b/templates/scenarios/js/sso-tab/.vscode/launch.json index a82c5811fe..f2d0c206dc 100644 --- a/templates/scenarios/js/sso-tab/.vscode/launch.json +++ b/templates/scenarios/js/sso-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { diff --git a/templates/scenarios/js/sso-tab/package.json.tpl b/templates/scenarios/js/sso-tab/package.json.tpl index 169c76a468..00bae54a30 100644 --- a/templates/scenarios/js/sso-tab/package.json.tpl +++ b/templates/scenarios/js/sso-tab/package.json.tpl @@ -24,7 +24,7 @@ "env-cmd": "^10.1.0" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/js/sso-tab/teamsapp.local.yml.tpl b/templates/scenarios/js/sso-tab/teamsapp.local.yml.tpl index 36927b9286..e570ca0eb1 100644 --- a/templates/scenarios/js/sso-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/sso-tab/teamsapp.local.yml.tpl @@ -53,11 +53,11 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -67,7 +67,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/js/workflow/.appserviceignore b/templates/scenarios/js/workflow/.appserviceignore index 955b25b869..89c8d3004e 100644 --- a/templates/scenarios/js/workflow/.appserviceignore +++ b/templates/scenarios/js/workflow/.appserviceignore @@ -1,7 +1,7 @@ .appserviceignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/js/workflow/.gitignore b/templates/scenarios/js/workflow/.gitignore index 33315e77de..600d53ac6c 100644 --- a/templates/scenarios/js/workflow/.gitignore +++ b/templates/scenarios/js/workflow/.gitignore @@ -16,5 +16,5 @@ node_modules/ lib/ # Local data -.localSettings +.localConfigs .notification.localstore.json diff --git a/templates/scenarios/js/workflow/.vscode/launch.json b/templates/scenarios/js/workflow/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/js/workflow/.vscode/launch.json +++ b/templates/scenarios/js/workflow/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/js/workflow/package.json.tpl b/templates/scenarios/js/workflow/package.json.tpl index bf63bf9981..2f3356cebf 100644 --- a/templates/scenarios/js/workflow/package.json.tpl +++ b/templates/scenarios/js/workflow/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./src/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --inspect=9239 --signal SIGINT ./src/index.js", "start": "node ./src/index.js", "watch": "nodemon ./src/index.js", diff --git a/templates/scenarios/js/workflow/teamsapp.local.yml.tpl b/templates/scenarios/js/workflow/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/js/workflow/teamsapp.local.yml.tpl +++ b/templates/scenarios/js/workflow/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/command-and-response/.appserviceignore b/templates/scenarios/ts/command-and-response/.appserviceignore index 955b25b869..89c8d3004e 100644 --- a/templates/scenarios/ts/command-and-response/.appserviceignore +++ b/templates/scenarios/ts/command-and-response/.appserviceignore @@ -1,7 +1,7 @@ .appserviceignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/command-and-response/.gitignore b/templates/scenarios/ts/command-and-response/.gitignore index 33315e77de..600d53ac6c 100644 --- a/templates/scenarios/ts/command-and-response/.gitignore +++ b/templates/scenarios/ts/command-and-response/.gitignore @@ -16,5 +16,5 @@ node_modules/ lib/ # Local data -.localSettings +.localConfigs .notification.localstore.json diff --git a/templates/scenarios/ts/command-and-response/.vscode/launch.json b/templates/scenarios/ts/command-and-response/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/command-and-response/.vscode/launch.json +++ b/templates/scenarios/ts/command-and-response/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/command-and-response/package.json.tpl b/templates/scenarios/ts/command-and-response/package.json.tpl index 2c45e5fc3c..86067754c9 100644 --- a/templates/scenarios/ts/command-and-response/package.json.tpl +++ b/templates/scenarios/ts/command-and-response/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --watch ./src --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./src/index.ts", "build": "tsc --build && shx cp -r ./src/adaptiveCards ./lib/src", "start": "node ./lib/src/index.js", diff --git a/templates/scenarios/ts/command-and-response/teamsapp.local.yml.tpl b/templates/scenarios/ts/command-and-response/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/ts/command-and-response/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/command-and-response/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/dashboard-tab/.gitignore b/templates/scenarios/ts/dashboard-tab/.gitignore index be708ac9e1..30bee5153b 100644 --- a/templates/scenarios/ts/dashboard-tab/.gitignore +++ b/templates/scenarios/ts/dashboard-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.dev.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/ts/dashboard-tab/.vscode/launch.json b/templates/scenarios/ts/dashboard-tab/.vscode/launch.json index a82c5811fe..f2d0c206dc 100644 --- a/templates/scenarios/ts/dashboard-tab/.vscode/launch.json +++ b/templates/scenarios/ts/dashboard-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { diff --git a/templates/scenarios/ts/dashboard-tab/package.json.tpl b/templates/scenarios/ts/dashboard-tab/package.json.tpl index 5d5ae92031..d60be10ab2 100644 --- a/templates/scenarios/ts/dashboard-tab/package.json.tpl +++ b/templates/scenarios/ts/dashboard-tab/package.json.tpl @@ -26,7 +26,7 @@ "typescript": "^4.1.2" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/ts/dashboard-tab/teamsapp.local.yml.tpl b/templates/scenarios/ts/dashboard-tab/teamsapp.local.yml.tpl index 8c8ebd301a..b394577cc2 100644 --- a/templates/scenarios/ts/dashboard-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/dashboard-tab/teamsapp.local.yml.tpl @@ -34,11 +34,11 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -48,7 +48,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/ts/default-bot-message-extension/.gitignore b/templates/scenarios/ts/default-bot-message-extension/.gitignore index 58303a9d35..5ae79201b4 100644 --- a/templates/scenarios/ts/default-bot-message-extension/.gitignore +++ b/templates/scenarios/ts/default-bot-message-extension/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/ts/default-bot-message-extension/.vscode/launch.json b/templates/scenarios/ts/default-bot-message-extension/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/default-bot-message-extension/.vscode/launch.json +++ b/templates/scenarios/ts/default-bot-message-extension/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/default-bot-message-extension/.webappignore b/templates/scenarios/ts/default-bot-message-extension/.webappignore index 0943a22526..bd23901b4f 100644 --- a/templates/scenarios/ts/default-bot-message-extension/.webappignore +++ b/templates/scenarios/ts/default-bot-message-extension/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/default-bot-message-extension/README.md b/templates/scenarios/ts/default-bot-message-extension/README.md index 808241606a..f1e549ba96 100644 --- a/templates/scenarios/ts/default-bot-message-extension/README.md +++ b/templates/scenarios/ts/default-bot-message-extension/README.md @@ -37,6 +37,12 @@ This is a simple hello world application with both Bot and Message extension cap - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/ts/default-bot-message-extension/package.json.tpl b/templates/scenarios/ts/default-bot-message-extension/package.json.tpl index 62d8ba0c3e..de2fc86a4a 100644 --- a/templates/scenarios/ts/default-bot-message-extension/package.json.tpl +++ b/templates/scenarios/ts/default-bot-message-extension/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./index.ts", "build": "tsc --build && shx cp -r ./adaptiveCards ./lib/", "start": "node ./lib/index.js", diff --git a/templates/scenarios/ts/default-bot-message-extension/teamsapp.local.yml.tpl b/templates/scenarios/ts/default-bot-message-extension/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/ts/default-bot-message-extension/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/default-bot-message-extension/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/default-bot/.gitignore b/templates/scenarios/ts/default-bot/.gitignore index 58303a9d35..5ae79201b4 100644 --- a/templates/scenarios/ts/default-bot/.gitignore +++ b/templates/scenarios/ts/default-bot/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/ts/default-bot/.vscode/launch.json b/templates/scenarios/ts/default-bot/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/default-bot/.vscode/launch.json +++ b/templates/scenarios/ts/default-bot/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/default-bot/.webappignore b/templates/scenarios/ts/default-bot/.webappignore index 0943a22526..bd23901b4f 100644 --- a/templates/scenarios/ts/default-bot/.webappignore +++ b/templates/scenarios/ts/default-bot/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/default-bot/README.md b/templates/scenarios/ts/default-bot/README.md index 01ae4b1342..56531a3688 100644 --- a/templates/scenarios/ts/default-bot/README.md +++ b/templates/scenarios/ts/default-bot/README.md @@ -33,6 +33,12 @@ This is a simple hello world application with Bot capabilities. - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/ts/default-bot/package.json.tpl b/templates/scenarios/ts/default-bot/package.json.tpl index 62d8ba0c3e..de2fc86a4a 100644 --- a/templates/scenarios/ts/default-bot/package.json.tpl +++ b/templates/scenarios/ts/default-bot/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./index.ts", "build": "tsc --build && shx cp -r ./adaptiveCards ./lib/", "start": "node ./lib/index.js", diff --git a/templates/scenarios/ts/default-bot/teamsapp.local.yml.tpl b/templates/scenarios/ts/default-bot/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/ts/default-bot/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/default-bot/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/m365-message-extension/.gitignore b/templates/scenarios/ts/m365-message-extension/.gitignore index 58303a9d35..5ae79201b4 100644 --- a/templates/scenarios/ts/m365-message-extension/.gitignore +++ b/templates/scenarios/ts/m365-message-extension/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/ts/m365-message-extension/.vscode/launch.json b/templates/scenarios/ts/m365-message-extension/.vscode/launch.json index 7d5199b438..6a87b6a80d 100644 --- a/templates/scenarios/ts/m365-message-extension/.vscode/launch.json +++ b/templates/scenarios/ts/m365-message-extension/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch Remote in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Launch Remote in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "presentation": { @@ -47,7 +47,7 @@ }, { "name": "Launch App in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -61,7 +61,7 @@ }, { "name": "Launch App in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -75,7 +75,7 @@ }, { "name": "Launch App in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "cascadeTerminateToConfigurations": [ @@ -89,7 +89,7 @@ }, { "name": "Launch App in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/mail?${account-hint}", "cascadeTerminateToConfigurations": [ @@ -103,7 +103,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/m365-message-extension/.webappignore b/templates/scenarios/ts/m365-message-extension/.webappignore index 0943a22526..bd23901b4f 100644 --- a/templates/scenarios/ts/m365-message-extension/.webappignore +++ b/templates/scenarios/ts/m365-message-extension/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/m365-message-extension/README.md b/templates/scenarios/ts/m365-message-extension/README.md index add5c24da5..b1224e1e89 100644 --- a/templates/scenarios/ts/m365-message-extension/README.md +++ b/templates/scenarios/ts/m365-message-extension/README.md @@ -40,7 +40,12 @@ Follow below instructions to get started with this application template for loca 1. Select a target Microsoft application where the message extension runs: `Debug in Teams`, `Debug in Outlook` and click the `Run and Debug` green arrow button. ### Test your application with TeamsFx CLI - +1. Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. +1. In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` 1. Executing the command `teamsfx provision --env local` in your project directory. 1. Executing the command `teamsfx deploy --env local` in your project directory. 1. Executing the command `teamsfx preview --env local --m365-host ` in your project directory, where options for `m365-host` are `teams` or `outlook`. diff --git a/templates/scenarios/ts/m365-message-extension/package.json.tpl b/templates/scenarios/ts/m365-message-extension/package.json.tpl index e53cec2001..ab9261249d 100644 --- a/templates/scenarios/ts/m365-message-extension/package.json.tpl +++ b/templates/scenarios/ts/m365-message-extension/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./index.ts", "build": "tsc --build", "start": "node ./lib/index.js", diff --git a/templates/scenarios/ts/m365-message-extension/teamsapp.local.yml.tpl b/templates/scenarios/ts/m365-message-extension/teamsapp.local.yml.tpl index 47134adb0f..01622d3435 100644 --- a/templates/scenarios/ts/m365-message-extension/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/m365-message-extension/teamsapp.local.yml.tpl @@ -44,7 +44,7 @@ provision: with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -58,7 +58,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/m365-message-extension/teamsapp.yml.tpl b/templates/scenarios/ts/m365-message-extension/teamsapp.yml.tpl index 521710f21d..03f7f66927 100644 --- a/templates/scenarios/ts/m365-message-extension/teamsapp.yml.tpl +++ b/templates/scenarios/ts/m365-message-extension/teamsapp.yml.tpl @@ -44,7 +44,7 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/templates/scenarios/ts/m365-tab/.gitignore b/templates/scenarios/ts/m365-tab/.gitignore index 4838e168ce..857402bd0c 100644 --- a/templates/scenarios/ts/m365-tab/.gitignore +++ b/templates/scenarios/ts/m365-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/ts/m365-tab/.vscode/launch.json b/templates/scenarios/ts/m365-tab/.vscode/launch.json index 493b579172..92acc20ec6 100644 --- a/templates/scenarios/ts/m365-tab/.vscode/launch.json +++ b/templates/scenarios/ts/m365-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch Remote in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{M365_APP_ID}}?${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Launch Remote in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{M365_APP_ID}}?${account-hint}", "presentation": { @@ -47,18 +47,18 @@ }, { "name": "Launch Remote in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&${account-hint}", "presentation": { - "group": "group 3: Office", + "group": "group 3: the Microsoft 365 app", "order": 3 }, "internalConsoleOptions": "neverOpen" }, { "name": "Launch Remote in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -69,7 +69,7 @@ }, { "name": "Attach to Frontend in Teams (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -80,7 +80,7 @@ }, { "name": "Attach to Frontend in Teams (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -91,7 +91,7 @@ }, { "name": "Attach to Frontend in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "presentation": { @@ -102,7 +102,7 @@ }, { "name": "Attach to Frontend in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "presentation": { @@ -113,7 +113,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "presentation": { @@ -124,7 +124,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "presentation": { diff --git a/templates/scenarios/ts/m365-tab/package.json.tpl b/templates/scenarios/ts/m365-tab/package.json.tpl index 6a8a231f5b..1840acf712 100644 --- a/templates/scenarios/ts/m365-tab/package.json.tpl +++ b/templates/scenarios/ts/m365-tab/package.json.tpl @@ -29,7 +29,7 @@ "typescript": "^4.1.2" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/ts/m365-tab/teamsapp.local.yml.tpl b/templates/scenarios/ts/m365-tab/teamsapp.local.yml.tpl index a429c61ce5..77cde0e2b7 100644 --- a/templates/scenarios/ts/m365-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/m365-tab/teamsapp.local.yml.tpl @@ -54,7 +54,7 @@ provision: with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). @@ -62,11 +62,11 @@ provision: appId: M365_APP_ID deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -77,7 +77,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/ts/m365-tab/teamsapp.yml.tpl b/templates/scenarios/ts/m365-tab/teamsapp.yml.tpl index 1ac825d42a..80218bb0c9 100644 --- a/templates/scenarios/ts/m365-tab/teamsapp.yml.tpl +++ b/templates/scenarios/ts/m365-tab/teamsapp.yml.tpl @@ -61,7 +61,7 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/templates/scenarios/ts/message-extension/.gitignore b/templates/scenarios/ts/message-extension/.gitignore index 58303a9d35..5ae79201b4 100644 --- a/templates/scenarios/ts/message-extension/.gitignore +++ b/templates/scenarios/ts/message-extension/.gitignore @@ -1,7 +1,7 @@ # TeamsFx files env/.env.*.user env/.env.local -.localSettings +.localConfigs # dependencies node_modules/ diff --git a/templates/scenarios/ts/message-extension/.vscode/launch.json b/templates/scenarios/ts/message-extension/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/message-extension/.vscode/launch.json +++ b/templates/scenarios/ts/message-extension/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/message-extension/.webappignore b/templates/scenarios/ts/message-extension/.webappignore index 7a3ce47f53..841e258b8e 100644 --- a/templates/scenarios/ts/message-extension/.webappignore +++ b/templates/scenarios/ts/message-extension/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/message-extension/README.md b/templates/scenarios/ts/message-extension/README.md index 184b2612ca..329d29b96c 100644 --- a/templates/scenarios/ts/message-extension/README.md +++ b/templates/scenarios/ts/message-extension/README.md @@ -35,6 +35,12 @@ This is a simple hello world application with Message extension capabilities. - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/ts/message-extension/package.json.tpl b/templates/scenarios/ts/message-extension/package.json.tpl index 9390a1dfeb..470a5c24d8 100644 --- a/templates/scenarios/ts/message-extension/package.json.tpl +++ b/templates/scenarios/ts/message-extension/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./index.ts", "build": "tsc --build", "start": "node ./lib/index.js", diff --git a/templates/scenarios/ts/message-extension/teamsapp.local.yml.tpl b/templates/scenarios/ts/message-extension/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/ts/message-extension/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/message-extension/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/.gitignore b/templates/scenarios/ts/non-sso-tab-default-bot/.gitignore index ff5f1be2b0..aa5c66936c 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/.gitignore +++ b/templates/scenarios/ts/non-sso-tab-default-bot/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/.vscode/launch.json b/templates/scenarios/ts/non-sso-tab-default-bot/.vscode/launch.json index dc928fba91..c55e669e75 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/.vscode/launch.json +++ b/templates/scenarios/ts/non-sso-tab-default-bot/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/bot/.webappignore b/templates/scenarios/ts/non-sso-tab-default-bot/bot/.webappignore index c11734b66a..0148487072 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/bot/.webappignore +++ b/templates/scenarios/ts/non-sso-tab-default-bot/bot/.webappignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/bot/README.md b/templates/scenarios/ts/non-sso-tab-default-bot/bot/README.md index 7705f2b7c1..752e964cec 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/bot/README.md +++ b/templates/scenarios/ts/non-sso-tab-default-bot/bot/README.md @@ -19,6 +19,12 @@ This is a simple hello world application with both Bot and Message extension cap - From Visual Studio Code: Start debugging the project by hitting the `F5` key in Visual Studio Code. - Alternatively use the `Run and Debug Activity Panel` in Visual Studio Code and click the `Run and Debug` green arrow button. - From TeamsFx CLI: + - Install [ngrok](https://ngrok.com/download) and start your local tunnel service by running the command `ngrok http 3978`. + - In the `env/.env.local` file, fill in the values for `BOT_DOMAIN` and `BOT_ENDPOINT` with your ngrok URL. + ``` + BOT_DOMAIN=sample-id.ngrok.io + BOT_ENDPOINT=http://sample-id.ngrok.io + ``` - Executing the command `teamsfx provision --env local` in your project directory. - Executing the command `teamsfx deploy --env local` in your project directory. - Executing the command `teamsfx preview --env local` in your project directory. diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/bot/package.json.tpl b/templates/scenarios/ts/non-sso-tab-default-bot/bot/package.json.tpl index 5e1f0a78b9..ac0aa24b28 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/bot/package.json.tpl +++ b/templates/scenarios/ts/non-sso-tab-default-bot/bot/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./index.ts", "build": "tsc --build && shx cp -r ./adaptiveCards ./lib/", "start": "node ./lib/index.js", diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/tab/package.json.tpl b/templates/scenarios/ts/non-sso-tab-default-bot/tab/package.json.tpl index e231bef7a3..a11917e246 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/tab/package.json.tpl +++ b/templates/scenarios/ts/non-sso-tab-default-bot/tab/package.json.tpl @@ -25,7 +25,7 @@ "typescript": "^4.1.2" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl b/templates/scenarios/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl index 607617698b..b688b250f7 100644 --- a/templates/scenarios/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/non-sso-tab-default-bot/teamsapp.local.yml.tpl @@ -50,11 +50,11 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -64,7 +64,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables for tab with: - target: ./tab/.localSettings + target: ./tab/.localConfigs envs: BROWSER: none HTTPS: true @@ -74,7 +74,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables for bot with: - target: ./bot/.localSettings + target: ./bot/.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/non-sso-tab/.gitignore b/templates/scenarios/ts/non-sso-tab/.gitignore index 4838e168ce..857402bd0c 100644 --- a/templates/scenarios/ts/non-sso-tab/.gitignore +++ b/templates/scenarios/ts/non-sso-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/ts/non-sso-tab/.vscode/launch.json b/templates/scenarios/ts/non-sso-tab/.vscode/launch.json index a82c5811fe..f2d0c206dc 100644 --- a/templates/scenarios/ts/non-sso-tab/.vscode/launch.json +++ b/templates/scenarios/ts/non-sso-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { diff --git a/templates/scenarios/ts/non-sso-tab/package.json.tpl b/templates/scenarios/ts/non-sso-tab/package.json.tpl index e231bef7a3..a11917e246 100644 --- a/templates/scenarios/ts/non-sso-tab/package.json.tpl +++ b/templates/scenarios/ts/non-sso-tab/package.json.tpl @@ -25,7 +25,7 @@ "typescript": "^4.1.2" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/ts/non-sso-tab/teamsapp.local.yml.tpl b/templates/scenarios/ts/non-sso-tab/teamsapp.local.yml.tpl index 1b222dbd14..deb9993f21 100644 --- a/templates/scenarios/ts/non-sso-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/non-sso-tab/teamsapp.local.yml.tpl @@ -33,11 +33,11 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). sslCertFile: SSL_CRT_FILE sslKeyFile: SSL_KEY_FILE @@ -47,7 +47,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/ts/notification-http-timer-trigger/.funcignore b/templates/scenarios/ts/notification-http-timer-trigger/.funcignore index 64e76b8e51..2c81ec7dba 100644 --- a/templates/scenarios/ts/notification-http-timer-trigger/.funcignore +++ b/templates/scenarios/ts/notification-http-timer-trigger/.funcignore @@ -2,7 +2,7 @@ .development .DS_Store .git* -.localSettings +.localConfigs .notification.localstore.json .vscode *.js.map diff --git a/templates/scenarios/ts/notification-http-timer-trigger/.gitignore b/templates/scenarios/ts/notification-http-timer-trigger/.gitignore index 8c8ac69899..c9b27b1323 100644 --- a/templates/scenarios/ts/notification-http-timer-trigger/.gitignore +++ b/templates/scenarios/ts/notification-http-timer-trigger/.gitignore @@ -25,7 +25,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/ts/notification-http-timer-trigger/.vscode/launch.json b/templates/scenarios/ts/notification-http-timer-trigger/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/notification-http-timer-trigger/.vscode/launch.json +++ b/templates/scenarios/ts/notification-http-timer-trigger/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/notification-http-timer-trigger/package.json.tpl b/templates/scenarios/ts/notification-http-timer-trigger/package.json.tpl index 38ad36c1bb..da1f84f551 100644 --- a/templates/scenarios/ts/notification-http-timer-trigger/package.json.tpl +++ b/templates/scenarios/ts/notification-http-timer-trigger/package.json.tpl @@ -8,7 +8,7 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "func start --typescript --language-worker=\"--inspect=9239\" --port \"3978\" --cors \"*\"", "prepare-storage:teamsfx": "azurite --silent --location ./_storage_emulator --debug ./_storage_emulator/debug.log", "watch:teamsfx": "tsc --watch", diff --git a/templates/scenarios/ts/notification-http-timer-trigger/teamsapp.local.yml.tpl b/templates/scenarios/ts/notification-http-timer-trigger/teamsapp.local.yml.tpl index eb893fd2ef..d7632aa347 100644 --- a/templates/scenarios/ts/notification-http-timer-trigger/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/notification-http-timer-trigger/teamsapp.local.yml.tpl @@ -44,10 +44,10 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: cli/runNpmCommand # Run npm command @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/notification-http-trigger/.funcignore b/templates/scenarios/ts/notification-http-trigger/.funcignore index 64e76b8e51..2c81ec7dba 100644 --- a/templates/scenarios/ts/notification-http-trigger/.funcignore +++ b/templates/scenarios/ts/notification-http-trigger/.funcignore @@ -2,7 +2,7 @@ .development .DS_Store .git* -.localSettings +.localConfigs .notification.localstore.json .vscode *.js.map diff --git a/templates/scenarios/ts/notification-http-trigger/.gitignore b/templates/scenarios/ts/notification-http-trigger/.gitignore index 8c8ac69899..c9b27b1323 100644 --- a/templates/scenarios/ts/notification-http-trigger/.gitignore +++ b/templates/scenarios/ts/notification-http-trigger/.gitignore @@ -25,7 +25,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/ts/notification-http-trigger/.vscode/launch.json b/templates/scenarios/ts/notification-http-trigger/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/notification-http-trigger/.vscode/launch.json +++ b/templates/scenarios/ts/notification-http-trigger/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/notification-http-trigger/package.json.tpl b/templates/scenarios/ts/notification-http-trigger/package.json.tpl index 38ad36c1bb..da1f84f551 100644 --- a/templates/scenarios/ts/notification-http-trigger/package.json.tpl +++ b/templates/scenarios/ts/notification-http-trigger/package.json.tpl @@ -8,7 +8,7 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "func start --typescript --language-worker=\"--inspect=9239\" --port \"3978\" --cors \"*\"", "prepare-storage:teamsfx": "azurite --silent --location ./_storage_emulator --debug ./_storage_emulator/debug.log", "watch:teamsfx": "tsc --watch", diff --git a/templates/scenarios/ts/notification-http-trigger/teamsapp.local.yml.tpl b/templates/scenarios/ts/notification-http-trigger/teamsapp.local.yml.tpl index eb893fd2ef..d7632aa347 100644 --- a/templates/scenarios/ts/notification-http-trigger/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/notification-http-trigger/teamsapp.local.yml.tpl @@ -44,10 +44,10 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: cli/runNpmCommand # Run npm command @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/notification-restify/.appserviceignore b/templates/scenarios/ts/notification-restify/.appserviceignore index 0069f08ef3..383ab4c2f5 100644 --- a/templates/scenarios/ts/notification-restify/.appserviceignore +++ b/templates/scenarios/ts/notification-restify/.appserviceignore @@ -1,7 +1,7 @@ .appserviceignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/notification-restify/.gitignore b/templates/scenarios/ts/notification-restify/.gitignore index 33315e77de..600d53ac6c 100644 --- a/templates/scenarios/ts/notification-restify/.gitignore +++ b/templates/scenarios/ts/notification-restify/.gitignore @@ -16,5 +16,5 @@ node_modules/ lib/ # Local data -.localSettings +.localConfigs .notification.localstore.json diff --git a/templates/scenarios/ts/notification-restify/.vscode/launch.json b/templates/scenarios/ts/notification-restify/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/notification-restify/.vscode/launch.json +++ b/templates/scenarios/ts/notification-restify/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/notification-restify/package.json.tpl b/templates/scenarios/ts/notification-restify/package.json.tpl index a249763960..f505a37bf9 100644 --- a/templates/scenarios/ts/notification-restify/package.json.tpl +++ b/templates/scenarios/ts/notification-restify/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./lib/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --watch ./src --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./src/index.ts", "build": "tsc --build && shx cp -r ./src/adaptiveCards ./lib/src", "start": "node ./lib/src/index.js", diff --git a/templates/scenarios/ts/notification-restify/teamsapp.local.yml.tpl b/templates/scenarios/ts/notification-restify/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/ts/notification-restify/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/notification-restify/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/notification-restify/teamsapp.yml.tpl b/templates/scenarios/ts/notification-restify/teamsapp.yml.tpl index a4d1649fef..e4ab93caab 100644 --- a/templates/scenarios/ts/notification-restify/teamsapp.yml.tpl +++ b/templates/scenarios/ts/notification-restify/teamsapp.yml.tpl @@ -37,6 +37,7 @@ provision: with: manifestPath: ./appPackage/manifest.json # Path to manifest template outputZipPath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip + outputJsonPath: ./appPackage/build/manifest.${{TEAMSFX_ENV}}.json - uses: teamsApp/validateAppPackage # Validate app package using validation rules with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. diff --git a/templates/scenarios/ts/notification-timer-trigger/.funcignore b/templates/scenarios/ts/notification-timer-trigger/.funcignore index ff40877397..1f244ea7c3 100644 --- a/templates/scenarios/ts/notification-timer-trigger/.funcignore +++ b/templates/scenarios/ts/notification-timer-trigger/.funcignore @@ -2,7 +2,7 @@ .development .DS_Store .git* -.localSettings +.localConfigs .notification.localstore.json .vscode *.js.map diff --git a/templates/scenarios/ts/notification-timer-trigger/.gitignore b/templates/scenarios/ts/notification-timer-trigger/.gitignore index 8c8ac69899..c9b27b1323 100644 --- a/templates/scenarios/ts/notification-timer-trigger/.gitignore +++ b/templates/scenarios/ts/notification-timer-trigger/.gitignore @@ -25,7 +25,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/ts/notification-timer-trigger/.vscode/launch.json b/templates/scenarios/ts/notification-timer-trigger/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/notification-timer-trigger/.vscode/launch.json +++ b/templates/scenarios/ts/notification-timer-trigger/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/notification-timer-trigger/package.json.tpl b/templates/scenarios/ts/notification-timer-trigger/package.json.tpl index 38ad36c1bb..da1f84f551 100644 --- a/templates/scenarios/ts/notification-timer-trigger/package.json.tpl +++ b/templates/scenarios/ts/notification-timer-trigger/package.json.tpl @@ -8,7 +8,7 @@ "author": "Microsoft", "license": "MIT", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "func start --typescript --language-worker=\"--inspect=9239\" --port \"3978\" --cors \"*\"", "prepare-storage:teamsfx": "azurite --silent --location ./_storage_emulator --debug ./_storage_emulator/debug.log", "watch:teamsfx": "tsc --watch", diff --git a/templates/scenarios/ts/notification-timer-trigger/teamsapp.local.yml.tpl b/templates/scenarios/ts/notification-timer-trigger/teamsapp.local.yml.tpl index eb893fd2ef..d7632aa347 100644 --- a/templates/scenarios/ts/notification-timer-trigger/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/notification-timer-trigger/teamsapp.local.yml.tpl @@ -44,10 +44,10 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: func: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). funcPath: FUNC_PATH - uses: cli/runNpmCommand # Run npm command @@ -56,7 +56,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file diff --git a/templates/scenarios/ts/office-addin/.gitignore b/templates/scenarios/ts/office-addin/.gitignore index 8c8ac69899..c9b27b1323 100644 --- a/templates/scenarios/ts/office-addin/.gitignore +++ b/templates/scenarios/ts/office-addin/.gitignore @@ -25,7 +25,7 @@ appsettings.json _storage_emulator # Local data -.localSettings +.localConfigs .notification.localstore.json # production diff --git a/templates/scenarios/ts/office-addin/README.md b/templates/scenarios/ts/office-addin/README.md index c5aba35cda..bcd5964e08 100644 --- a/templates/scenarios/ts/office-addin/README.md +++ b/templates/scenarios/ts/office-addin/README.md @@ -38,10 +38,13 @@ To sideload the deployed add-in: ## Validate manifest file +Known issue: manifest validation is not supported for now. + To check that your manifest file is valid: -- From Visual Studio Code: open the command palette and select: `Teams: Validate manifest file`. +- From Visual Studio Code: open the command palette and select: `Teams: Validate Application` and select `Validate using manifest schema`. - From TeamsFx CLI: run command `teamsfx validate` in your project directory. ## Known Issues -- Publish doesn't work for a Outlook add-in project now. \ No newline at end of file +- Publish is not supported for an Outlook add-in project now. +- Manifest validation is not supported for now. \ No newline at end of file diff --git a/templates/scenarios/ts/spfx-tab/.vscode/launch.json b/templates/scenarios/ts/spfx-tab/.vscode/launch.json index d655d08b41..b2a0e393c3 100644 --- a/templates/scenarios/ts/spfx-tab/.vscode/launch.json +++ b/templates/scenarios/ts/spfx-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Hosted workbench (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://enter-your-SharePoint-site/_layouts/workbench.aspx", "webRoot": "${workspaceRoot}/src", @@ -27,7 +27,7 @@ }, { "name": "Hosted workbench (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://enter-your-SharePoint-site/_layouts/workbench.aspx", "webRoot": "${workspaceRoot}/src", @@ -51,7 +51,7 @@ }, { "name": "Start Teams workbench (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "webRoot": "${workspaceRoot}/src", @@ -70,7 +70,7 @@ }, { "name": "Start Teams workbench (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "webRoot": "${workspaceRoot}/src", @@ -89,7 +89,7 @@ }, { "name": "Attach to Frontend in Outlook (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "webRoot": "${workspaceRoot}/src", @@ -109,7 +109,7 @@ }, { "name": "Attach to Frontend in Outlook (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://outlook.office.com/host/${{local:M365_APP_ID}}?${account-hint}", "webRoot": "${workspaceRoot}/src", @@ -129,7 +129,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "webRoot": "${workspaceRoot}/src", @@ -149,7 +149,7 @@ }, { "name": "Attach to Frontend in the Microsoft 365 app (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://www.office.com/m365apps/${{local:M365_APP_ID}}?auth=2&${account-hint}", "webRoot": "${workspaceRoot}/src", diff --git a/templates/scenarios/ts/spfx-tab/teamsapp.local.yml.tpl b/templates/scenarios/ts/spfx-tab/teamsapp.local.yml.tpl index 294950585b..a6d6662095 100644 --- a/templates/scenarios/ts/spfx-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/spfx-tab/teamsapp.local.yml.tpl @@ -27,7 +27,7 @@ provision: with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/templates/scenarios/ts/spfx-tab/teamsapp.yml.tpl b/templates/scenarios/ts/spfx-tab/teamsapp.yml.tpl index 7a83e3d158..e878034a86 100644 --- a/templates/scenarios/ts/spfx-tab/teamsapp.yml.tpl +++ b/templates/scenarios/ts/spfx-tab/teamsapp.yml.tpl @@ -47,7 +47,7 @@ provision: - uses: teamsApp/update # Apply the Teams app manifest to an existing Teams app in Teams Developer Portal. Will use the app id in manifest file to determine which Teams app to update. with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. - - uses: m365Title/acquire # Upload your app to Outlook and the Microsoft 365 app + - uses: teamsApp/extendToM365 # Extend your Teams app to Outlook and the Microsoft 365 app with: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to the built app package. writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s). diff --git a/templates/scenarios/ts/sso-tab/.gitignore b/templates/scenarios/ts/sso-tab/.gitignore index f5be3d1662..54e67a1b4c 100644 --- a/templates/scenarios/ts/sso-tab/.gitignore +++ b/templates/scenarios/ts/sso-tab/.gitignore @@ -2,7 +2,7 @@ env/.env.*.user env/.env.local .DS_Store -.localSettings +.localConfigs build # dependencies diff --git a/templates/scenarios/ts/sso-tab/.vscode/launch.json b/templates/scenarios/ts/sso-tab/.vscode/launch.json index a82c5811fe..f2d0c206dc 100644 --- a/templates/scenarios/ts/sso-tab/.vscode/launch.json +++ b/templates/scenarios/ts/sso-tab/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Attach to Frontend (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -36,7 +36,7 @@ }, { "name": "Attach to Frontend (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { diff --git a/templates/scenarios/ts/sso-tab/package.json.tpl b/templates/scenarios/ts/sso-tab/package.json.tpl index 8dc6b8ee42..166d62bc81 100644 --- a/templates/scenarios/ts/sso-tab/package.json.tpl +++ b/templates/scenarios/ts/sso-tab/package.json.tpl @@ -29,7 +29,7 @@ "typescript": "^4.1.2" }, "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run start", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run start", "start": "react-scripts start", "build": "react-scripts build", "eject": "react-scripts eject", diff --git a/templates/scenarios/ts/sso-tab/teamsapp.local.yml.tpl b/templates/scenarios/ts/sso-tab/teamsapp.local.yml.tpl index 3f419b8072..e570ca0eb1 100644 --- a/templates/scenarios/ts/sso-tab/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/sso-tab/teamsapp.local.yml.tpl @@ -53,12 +53,13 @@ provision: appPackagePath: ./appPackage/build/appPackage.${{TEAMSFX_ENV}}.zip # Relative path to this file. This is the path for built zip file. deploy: - - uses: prerequisite/install # Install dependencies + - uses: devTool/install # Install development tool(s) with: devCert: trust: true - writeToEnvironmentFile: # Write the information of installed dependencies into environment file for the specified environment variable(s). - funcPath: FUNC_PATH + writeToEnvironmentFile: # Write the information of installed development tool(s) into environment file for the specified environment variable(s). + sslCertFile: SSL_CRT_FILE + sslKeyFile: SSL_KEY_FILE - uses: cli/runNpmCommand # Run npm command with: @@ -66,7 +67,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BROWSER: none HTTPS: true diff --git a/templates/scenarios/ts/workflow/.appserviceignore b/templates/scenarios/ts/workflow/.appserviceignore index 7a3ce47f53..841e258b8e 100644 --- a/templates/scenarios/ts/workflow/.appserviceignore +++ b/templates/scenarios/ts/workflow/.appserviceignore @@ -1,7 +1,7 @@ .webappignore .fx .deployment -.localSettings +.localConfigs .vscode *.js.map *.ts.map diff --git a/templates/scenarios/ts/workflow/.gitignore b/templates/scenarios/ts/workflow/.gitignore index 33315e77de..600d53ac6c 100644 --- a/templates/scenarios/ts/workflow/.gitignore +++ b/templates/scenarios/ts/workflow/.gitignore @@ -16,5 +16,5 @@ node_modules/ lib/ # Local data -.localSettings +.localConfigs .notification.localstore.json diff --git a/templates/scenarios/ts/workflow/.vscode/launch.json b/templates/scenarios/ts/workflow/.vscode/launch.json index 31ae2b60d0..063ae2e524 100644 --- a/templates/scenarios/ts/workflow/.vscode/launch.json +++ b/templates/scenarios/ts/workflow/.vscode/launch.json @@ -3,7 +3,7 @@ "configurations": [ { "name": "Launch Remote (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -14,7 +14,7 @@ }, { "name": "Launch Remote (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "presentation": { @@ -25,7 +25,7 @@ }, { "name": "Launch App (Edge)", - "type": "pwa-msedge", + "type": "msedge", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -39,7 +39,7 @@ }, { "name": "Launch App (Chrome)", - "type": "pwa-chrome", + "type": "chrome", "request": "launch", "url": "https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}", "cascadeTerminateToConfigurations": [ @@ -53,7 +53,7 @@ }, { "name": "Attach to Local Service", - "type": "pwa-node", + "type": "node", "request": "attach", "port": 9239, "restart": true, diff --git a/templates/scenarios/ts/workflow/.vscode/tasks.json b/templates/scenarios/ts/workflow/.vscode/tasks.json index d24bdb1d81..585f86ae9a 100644 --- a/templates/scenarios/ts/workflow/.vscode/tasks.json +++ b/templates/scenarios/ts/workflow/.vscode/tasks.json @@ -36,6 +36,7 @@ { // Start the local tunnel service to forward public URL to local port and inspect traffic. // See https://aka.ms/teamsfx-tasks/local-tunnel for the detailed args definitions. + "label": "Start local tunnel", "type": "teamsfx", "command": "debug-start-local-tunnel", "args": { diff --git a/templates/scenarios/ts/workflow/package.json.tpl b/templates/scenarios/ts/workflow/package.json.tpl index 53b358d53a..d210bbba8a 100644 --- a/templates/scenarios/ts/workflow/package.json.tpl +++ b/templates/scenarios/ts/workflow/package.json.tpl @@ -9,7 +9,7 @@ "license": "MIT", "main": "./src/index.js", "scripts": { - "dev:teamsfx": "env-cmd --silent -f .localSettings npm run dev", + "dev:teamsfx": "env-cmd --silent -f .localConfigs npm run dev", "dev": "nodemon --watch ./src --exec node --inspect=9239 --signal SIGINT -r ts-node/register ./src/index.ts", "build": "tsc --build && shx cp -r ./src/adaptiveCards ./lib/src", "start": "node ./lib/src/index.js", diff --git a/templates/scenarios/ts/workflow/teamsapp.local.yml.tpl b/templates/scenarios/ts/workflow/teamsapp.local.yml.tpl index 15c7b807f5..d14be9316a 100644 --- a/templates/scenarios/ts/workflow/teamsapp.local.yml.tpl +++ b/templates/scenarios/ts/workflow/teamsapp.local.yml.tpl @@ -50,7 +50,7 @@ deploy: - uses: file/createOrUpdateEnvironmentFile # Generate runtime environment variables with: - target: ./.localSettings + target: ./.localConfigs envs: BOT_ID: ${{BOT_ID}} BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}} \ No newline at end of file