-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #369 from stephanbisser/preview
Added support for Manifest Version 1.16
- Loading branch information
Showing
5 changed files
with
93 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...tor-teams/src/app/manifestGeneration/manifestGenerators/generator116/ManifestGenerator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
|
||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters