diff --git a/packages/generator-teams/src/app/manifestGeneration/ManifestGeneratorFactory.ts b/packages/generator-teams/src/app/manifestGeneration/ManifestGeneratorFactory.ts index 8f79d55..f1c8f1b 100644 --- a/packages/generator-teams/src/app/manifestGeneration/ManifestGeneratorFactory.ts +++ b/packages/generator-teams/src/app/manifestGeneration/ManifestGeneratorFactory.ts @@ -12,6 +12,7 @@ import { ManifestGenerator as ManifestGenerator112 } from "./manifestGenerators/ import { ManifestGenerator as ManifestGenerator113 } from "./manifestGenerators/generator113/ManifestGenerator"; import { ManifestGenerator as ManifestGenerator114 } from "./manifestGenerators/generator114/ManifestGenerator"; import { ManifestGenerator as ManifestGenerator115 } from "./manifestGenerators/generator115/ManifestGenerator"; +import { ManifestGenerator as ManifestGenerator116 } from "./manifestGenerators/generator116/ManifestGenerator"; import { ManifestGenerator as ManifestGeneratorDevPreview } from "./manifestGenerators/generatorDevPreview/ManifestGenerator"; import { ManifestGenerator as ManifestGeneratorM365DevPreview } from "./manifestGenerators/generatorM365DevPreview/ManifestGenerator"; import { BaseManifestGenerator } from "./BaseManifestGenerator"; @@ -78,6 +79,14 @@ export class ManifestGeneratorFactory { hide: false, comment: "With support for extending Teams apps to other parts of the Microsoft 365 ecosystem" }, + { + manifestVersion: ManifestVersions.v116, + schemaUrl: "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json", + manifestValue: "1.16", + default: true, + hide: false, + comment: "With support for extending Teams apps to other parts of the Microsoft 365 ecosystem" + }, { manifestVersion: ManifestVersions.devPreview, schemaUrl: "https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json", @@ -129,6 +138,8 @@ export class ManifestGeneratorFactory { return new ManifestGenerator114(); } else if (manifestVersion == ManifestVersions.v115) { return new ManifestGenerator115(); + } else if (manifestVersion == ManifestVersions.v116) { + return new ManifestGenerator116(); } else if (manifestVersion == ManifestVersions.devPreview) { return new ManifestGeneratorDevPreview(); } else if (manifestVersion == ManifestVersions.m365DevPreview) { diff --git a/packages/generator-teams/src/app/manifestGeneration/ManifestVersions.ts b/packages/generator-teams/src/app/manifestGeneration/ManifestVersions.ts index a536c21..bf61675 100644 --- a/packages/generator-teams/src/app/manifestGeneration/ManifestVersions.ts +++ b/packages/generator-teams/src/app/manifestGeneration/ManifestVersions.ts @@ -11,6 +11,7 @@ export enum ManifestVersions { v113 = "v1.13", v114 = "v1.14", v115 = "v1.15", + v116 = "v1.16", devPreview = "devPreview", m365DevPreview = "m365DevPreview" } \ No newline at end of file diff --git a/packages/generator-teams/src/app/manifestGeneration/manifestGenerators/generator116/ManifestGenerator.ts b/packages/generator-teams/src/app/manifestGeneration/manifestGenerators/generator116/ManifestGenerator.ts new file mode 100644 index 0000000..750be87 --- /dev/null +++ b/packages/generator-teams/src/app/manifestGeneration/manifestGenerators/generator116/ManifestGenerator.ts @@ -0,0 +1,55 @@ +// Copyright (c) Wictor Wilén. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT license. + +import { BaseManifestGenerator } from "../../BaseManifestGenerator"; +import { TabManifestUpdater } from "../generator19/TabManifestUpdater"; +import { BotManifestUpdater } from "../generator18/BotManifestUpdater"; +import { ConnectorManifestUpdater } from "../generator18/ConnectorManifestUpdater"; +import { MessageExtensionManifestUpdater } from "../generator18/MessageExtensionManifestUpdater"; +import { GeneratorTeamsAppOptions } from "../../../GeneratorTeamsAppOptions"; +import { LocalizationManifestUpdater } from "../generator18/LocalizationManifestUpdater"; +import * as chalk from 'chalk'; + + +export class ManifestGenerator extends BaseManifestGenerator { + constructor() { + super(); + this.tabUpdater = new TabManifestUpdater(); + this.botUpdater = new BotManifestUpdater(); + this.connectorUpdater = new ConnectorManifestUpdater(); + this.messageExtensionUpdater = new MessageExtensionManifestUpdater(); + this.localizationUpdater = new LocalizationManifestUpdater(); + } + + public generateManifest(options: GeneratorTeamsAppOptions): any { + const manifest = super.generateManifest(options); + manifest["$schema"] = "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json"; + manifest.manifestVersion = "1.16"; + + return manifest; + } + + public supportsUpdateManifest(from: string): boolean { + return from === "1.8" || from === "1.9" || from === "1.10" || from === "1.11" || from === "1.12" || from === "1.13" || from === "1.14" || from === "1.15"; + } + + public updateManifest(manifest: any, log?: (message?: string, context?: any) => void): any { + switch (manifest.manifestVersion) { + case "1.8": + case "1.9": + case "1.10": + case "1.11": + case "1.12": + case "1.13": + case "1.14": + case "1.15": + manifest["$schema"] = "https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json"; + manifest.manifestVersion = "1.16"; + return manifest; + default: + throw "Unable to update manifest"; + + } + }; +} diff --git a/packages/generator-teams/tests/helpers/TestHelper.ts b/packages/generator-teams/tests/helpers/TestHelper.ts index af78111..90242ae 100644 --- a/packages/generator-teams/tests/helpers/TestHelper.ts +++ b/packages/generator-teams/tests/helpers/TestHelper.ts @@ -125,10 +125,11 @@ export const SCHEMA_112 = 'https://developer.microsoft.com/en-us/json-schemas/te export const SCHEMA_113 = 'https://developer.microsoft.com/en-us/json-schemas/teams/v1.13/MicrosoftTeams.schema.json'; export const SCHEMA_114 = 'https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json'; export const SCHEMA_115 = 'https://developer.microsoft.com/en-us/json-schemas/teams/v1.15/MicrosoftTeams.schema.json'; +export const SCHEMA_116 = 'https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json'; export const SCHEMA_DEVPREVIEW = 'https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json'; export const SCHEMA_M365DEVPREVIEW = 'https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json'; -export const INTEGRATION_TEST_VERSIONS = ["v1.13", "devPreview"]; // only keep two versions, so we can stay under Github 360 minute rule +export const INTEGRATION_TEST_VERSIONS = ["v1.16", "devPreview"]; // only keep two versions, so we can stay under Github 360 minute rule export const SCHEMAS: { [key: string]: string } = { // "v1.8": SCHEMA_18, @@ -139,6 +140,7 @@ export const SCHEMAS: { [key: string]: string } = { "v1.13": SCHEMA_113, "v1.14": SCHEMA_114, "v1.15": SCHEMA_115, + "v1.16": SCHEMA_116, "devPreview": SCHEMA_DEVPREVIEW, "m365DevPreview": SCHEMA_M365DEVPREVIEW } diff --git a/packages/generator-teams/tests/tests.json b/packages/generator-teams/tests/tests.json index 97fe156..0e6a7f7 100644 --- a/packages/generator-teams/tests/tests.json +++ b/packages/generator-teams/tests/tests.json @@ -7,6 +7,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], "prompts": { @@ -21,6 +22,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview", "m365DevPreview" ], @@ -36,6 +38,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], "prompts": { @@ -53,6 +56,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], "prompts": { @@ -68,6 +72,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], "prompts": { @@ -89,6 +94,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], "prompts": { @@ -111,6 +117,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -133,6 +140,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -157,6 +165,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -181,6 +190,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -202,6 +212,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -219,6 +230,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -234,6 +246,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -256,6 +269,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -273,6 +287,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -290,6 +305,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -308,6 +324,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -330,6 +347,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -351,6 +369,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -370,6 +389,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -390,6 +410,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -410,6 +431,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ], @@ -429,6 +451,7 @@ "v1.13", "v1.14", "v1.15", + "v1.16", "devPreview" ],