Skip to content

Commit

Permalink
Merge branch 'dev' into hui/manifest-apime-aad
Browse files Browse the repository at this point in the history
  • Loading branch information
huimiu committed Jun 12, 2024
2 parents 68d6898 + a398979 commit 815fed2
Show file tree
Hide file tree
Showing 144 changed files with 675 additions and 647 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

// TODO: remove this link after clean the useless code.
export const defaultHelpLink = "https://aka.ms/teamsfx-envchecker-help";
export const v3DefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";

export const functionDepsVersionsLink = "https://aka.ms/functions-node-versions";
Expand All @@ -14,10 +12,6 @@ export const nodeInstallationLink = "https://nodejs.org";
export const dotnetDefaultHelpLink = "https://aka.ms/teamsfx-actions/devtool-install";
export const dotnetExplanationHelpLink = dotnetDefaultHelpLink;
export const dotnetFailToInstallHelpLink = dotnetDefaultHelpLink;
// TODO: remove this link after clean the useless code.
export const dotnetNotSupportTargetVersionHelpLink = `${defaultHelpLink}#dotnetnotsupporttargetversion`;

export const vxTestAppInstallHelpLink = `${defaultHelpLink}#failtoinstallteamsvideoextensibilitytestapp`;

export const v3NodeNotFoundHelpLink = "https://aka.ms/teamsfx-node";
export const v3NodeNotSupportedHelpLink = "https://aka.ms/teamsfx-node";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as path from "path";
import * as os from "os";

import { ConfigFolderName } from "@microsoft/teamsfx-api";
import { Messages, vxTestAppInstallHelpLink } from "../constant";
import { Messages } from "../constant";
import { DepsCheckerError, VxTestAppCheckError } from "../depsError";
import { DepsLogger } from "../depsLogger";
import { DepsTelemetry } from "../depsTelemetry";
Expand Down Expand Up @@ -52,10 +52,8 @@ export class VxTestAppChecker implements DepsChecker {
public async resolve(installOptions?: BaseInstallOptions): Promise<DependencyStatus> {
if (!this.isValidInstallOptions(installOptions)) {
return VxTestAppChecker.newDependencyStatusForInstallError(
new VxTestAppCheckError(
Messages.failToValidateVxTestAppInstallOptions(),
vxTestAppInstallHelpLink
)
// documentation no longer exists, replaced with empty string.
new VxTestAppCheckError(Messages.failToValidateVxTestAppInstallOptions(), "")
);
}

Expand All @@ -78,7 +76,8 @@ export class VxTestAppChecker implements DepsChecker {
// TODO: need to chmod to add executable permission for non-Windows OS
if (!(await this.isValidInstalltion(projectInstallDir, installOptions.version))) {
return VxTestAppChecker.newDependencyStatusForInstallError(
new VxTestAppCheckError(Messages.failToValidateVxTestApp(), vxTestAppInstallHelpLink)
// documentation no longer exists, replaced with empty string.
new VxTestAppCheckError(Messages.failToValidateVxTestApp(), "")
);
}

Expand All @@ -99,10 +98,8 @@ export class VxTestAppChecker implements DepsChecker {
public async getInstallationInfo(installOptions?: BaseInstallOptions): Promise<DependencyStatus> {
if (!this.isValidInstallOptions(installOptions)) {
return VxTestAppChecker.newDependencyStatusForInstallError(
new VxTestAppCheckError(
Messages.failToValidateVxTestAppInstallOptions(),
vxTestAppInstallHelpLink
)
// documentation no longer exists, replaced with empty string.
new VxTestAppCheckError(Messages.failToValidateVxTestAppInstallOptions(), "")
);
}

Expand Down
18 changes: 9 additions & 9 deletions packages/fx-core/src/component/driver/teamsApp/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const CONFIGURABLE_TABS_TPL_V3: IConfigurableTab[] = [
{
configurationUrl: `{{{state.${TAB_STATE_KEY}.endpoint}}}{{{state.${TAB_STATE_KEY}.indexPath}}}/config`,
canUpdateConfiguration: true,
scopes: ["team", "groupchat"],
scopes: ["team", "groupChat"],
},
];

Expand All @@ -41,12 +41,12 @@ const BOT_ID_PLACEHOLDER = `{{state.${BOT_STATE_KEY}.botId}}`;
export const BOTS_TPL_FOR_COMMAND_AND_RESPONSE_V3: IBot[] = [
{
botId: BOT_ID_PLACEHOLDER,
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
commandLists: [
{
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
commands: [
{
title: "helloWorld",
Expand All @@ -61,7 +61,7 @@ export const BOTS_TPL_FOR_COMMAND_AND_RESPONSE_V3: IBot[] = [
export const BOTS_TPL_FOR_NOTIFICATION_V3: IBot[] = [
{
botId: BOT_ID_PLACEHOLDER,
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
},
Expand All @@ -70,12 +70,12 @@ export const BOTS_TPL_FOR_NOTIFICATION_V3: IBot[] = [
export const BOTS_TPL_V3: IBot[] = [
{
botId: BOT_ID_PLACEHOLDER,
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
commandLists: [
{
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
commands: [
{
title: "welcome",
Expand Down Expand Up @@ -278,12 +278,12 @@ export const DEFAULT_DESCRIPTION = {
export const BOTS_TPL_EXISTING_APP: IBot[] = [
{
botId: "{{config.manifest.botId}}",
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
supportsFiles: false,
isNotificationOnly: false,
commandLists: [
{
scopes: ["personal", "team", "groupchat"],
scopes: ["personal", "team", "groupChat"],
commands: [],
},
],
Expand All @@ -309,7 +309,7 @@ export const CONFIGURABLE_TABS_TPL_EXISTING_APP: IConfigurableTab[] = [
{
configurationUrl: "{{config.manifest.tabConfigurationUrl}}",
canUpdateConfiguration: true,
scopes: ["team", "groupchat"],
scopes: ["team", "groupChat"],
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const includeGroupChatScope = (scopes: string[]): boolean => {
export enum CommandScope {
Team = "team",
Personal = "personal",
GroupChat = "groupchat",
GroupChat = "groupChat",
}

export enum MeetingsContext {
Expand Down
3 changes: 0 additions & 3 deletions packages/fx-core/src/core/environmentName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ class EnvironmentNameManager {
public readonly envStateNameRegex = /^state\.(?<envName>[\w\d-_]+)\.json$/i;

public readonly schema = "https://aka.ms/teamsfx-env-config-schema";
public readonly envConfigDescription =
`You can customize the TeamsFx config for different environments.` +
` Visit https://aka.ms/teamsfx-env-config to get more info about this.`;

private readonly defaultEnvName = "dev";
private readonly localEnvName = "local";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ describe("App Studio API Test", () => {
displayName: "fakeApp",
developerName: "Teams",
version: "0.0.1",
manifestVersion: "1.16",
manifestVersion: "1.17",
},
},
};
Expand Down Expand Up @@ -1275,7 +1275,7 @@ describe("App Studio API Test", () => {
appId: "fakeAppId",
status: AsyncAppValidationStatus.Completed,
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
createdAt: Date(),
updatedAt: Date(),
validationResults: {
Expand Down
42 changes: 21 additions & 21 deletions packages/fx-core/tests/component/driver/teamsApp/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ describe("teamsApp/validateAppPackage", async () => {
{
id: "632652a7-0cf8-43c7-a65d-6a19e5822467",
title: "Manifest Version is valid",
code: "The app is using manifest version '1.16'",
code: "The app is using manifest version '1.17'",
} as any as IAppValidationNote,
],
addInDetails: {
Expand Down Expand Up @@ -802,7 +802,7 @@ describe("teamsApp/validateAppPackage", async () => {
{
id: "632652a7-0cf8-43c7-a65d-6a19e5822467",
title: "Manifest Version is valid",
code: "The app is using manifest version '1.16'",
code: "The app is using manifest version '1.17'",
} as any as IAppValidationNote,
],
addInDetails: {
Expand Down Expand Up @@ -1011,7 +1011,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1020,7 +1020,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1041,7 +1041,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
successes: [
{
Expand Down Expand Up @@ -1130,7 +1130,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1139,7 +1139,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.InProgress,
createdAt: new Date(),
updatedAt: new Date(),
Expand Down Expand Up @@ -1175,7 +1175,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1184,7 +1184,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Created,
createdAt: new Date(),
updatedAt: new Date(),
Expand Down Expand Up @@ -1224,7 +1224,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1233,7 +1233,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.InProgress,
createdAt: new Date(),
updatedAt: new Date(),
Expand Down Expand Up @@ -1274,7 +1274,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
successes: [
{
Expand Down Expand Up @@ -1323,7 +1323,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1332,7 +1332,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1349,7 +1349,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
successes: [
{
Expand Down Expand Up @@ -1434,7 +1434,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1443,7 +1443,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1460,7 +1460,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
failures: [],
warnings: [],
Expand Down Expand Up @@ -1502,7 +1502,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Completed,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1511,7 +1511,7 @@ describe("teamsApp/validateWithTestCases", async () => {
id: "fakeId2",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
status: AsyncAppValidationStatus.Aborted,
createdAt: new Date(),
updatedAt: new Date(),
Expand All @@ -1528,7 +1528,7 @@ describe("teamsApp/validateWithTestCases", async () => {
appValidationId: "fakeId",
appId: "fakeAppId",
appVersion: "1.0.0",
manifestVersion: "1.16",
manifestVersion: "1.17",
validationResults: {
failures: [],
warnings: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ describe("SPFxGenerator", function () {
if (directory.includes("teams")) {
return {
$schema:
"https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
manifestVersion: "1.16",
"https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json",
manifestVersion: "1.17",
id: "fakedId",
name: {
short: "thisisaverylongappnametotestifitwillbetruncated",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("utils", () => {
objectId: "objId",
configurationUrl: "https://url",
canUpdateConfiguration: false,
scopes: ["groupchat"],
scopes: ["groupChat"],
context: [MeetingsContext.ChannelTab],
sharePointPreviewImage: "img",
supportedSharePointHosts: [],
Expand Down Expand Up @@ -61,7 +61,7 @@ describe("utils", () => {
objectId: "objId",
configurationUrl: "https://url",
canUpdateConfiguration: false,
scopes: ["groupchat", CommandScope.Team],
scopes: ["groupChat", CommandScope.Team],
context: [MeetingsContext.SidePanel],
sharePointPreviewImage: "img",
supportedSharePointHosts: [],
Expand Down
Loading

0 comments on commit 815fed2

Please sign in to comment.