office-addin-manifest
Advanced tools
Comparing version 1.12.2 to 1.12.3
@@ -1,2 +0,2 @@ | ||
import { TeamsAppManifest } from "@microsoft/teams-manifest"; | ||
import { devPreview, TeamsAppManifest } from "@microsoft/teams-manifest"; | ||
import { ManifestInfo } from "../manifestInfo"; | ||
@@ -7,4 +7,4 @@ import { ManifestHandler } from "./manifestHandler"; | ||
parseManifest(): Promise<ManifestInfo>; | ||
getManifestInfo(teamsAppManifest: any): ManifestInfo; | ||
getManifestInfo(appManifest: devPreview.DevPreviewSchema): ManifestInfo; | ||
writeManifestData(manifestData: TeamsAppManifest): Promise<void>; | ||
} |
@@ -23,3 +23,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
try { | ||
const teamsAppManifest = yield teams_manifest_1.ManifestUtil.loadFromPath(this.manifestPath); | ||
const appManifest = yield teams_manifest_1.ManifestUtil.loadFromPath(this.manifestPath); | ||
if (typeof guid !== "undefined") { | ||
@@ -29,8 +29,8 @@ if (!guid || guid === "random") { | ||
} | ||
teamsAppManifest.id = guid; | ||
appManifest.id = guid; | ||
} | ||
if (typeof displayName !== "undefined") { | ||
teamsAppManifest.name.short = displayName; | ||
appManifest.name.short = displayName; | ||
} | ||
return teamsAppManifest; | ||
return appManifest; | ||
} | ||
@@ -53,23 +53,20 @@ catch (err) { | ||
} | ||
// TODO: change teamsAppManifest type to TeamsAppManifest | ||
getManifestInfo(teamsAppManifest) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; | ||
getManifestInfo(appManifest) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; | ||
const manifestInfo = new manifestInfo_1.ManifestInfo(); | ||
// Need to handle mutliple version of the prerelease json manifest schema | ||
const extensionElement = (teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.extensions) | ||
? teamsAppManifest.extensions[0] | ||
: teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.extension; | ||
manifestInfo.id = teamsAppManifest.id; | ||
manifestInfo.appDomains = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.validDomains; | ||
manifestInfo.defaultLocale = (_a = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.localizationInfo) === null || _a === void 0 ? void 0 : _a.defaultLanguageTag; | ||
manifestInfo.description = (_b = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.description) === null || _b === void 0 ? void 0 : _b.short; | ||
manifestInfo.displayName = (_c = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.name) === null || _c === void 0 ? void 0 : _c.short; | ||
manifestInfo.highResolutionIconUrl = (_d = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.icons) === null || _d === void 0 ? void 0 : _d.color; | ||
manifestInfo.hosts = (_e = extensionElement === null || extensionElement === void 0 ? void 0 : extensionElement.requirements) === null || _e === void 0 ? void 0 : _e.scopes; | ||
manifestInfo.iconUrl = (_f = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.icons) === null || _f === void 0 ? void 0 : _f.color; | ||
manifestInfo.officeAppType = (_j = (_h = (_g = extensionElement === null || extensionElement === void 0 ? void 0 : extensionElement.requirements) === null || _g === void 0 ? void 0 : _g.capabilities) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.name; | ||
manifestInfo.permissions = (_o = (_m = (_l = (_k = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.authorization) === null || _k === void 0 ? void 0 : _k.permissions) === null || _l === void 0 ? void 0 : _l.resourceSpecific) === null || _m === void 0 ? void 0 : _m[0]) === null || _o === void 0 ? void 0 : _o.name; | ||
manifestInfo.providerName = (_p = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.developer) === null || _p === void 0 ? void 0 : _p.name; | ||
manifestInfo.supportUrl = (_q = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.developer) === null || _q === void 0 ? void 0 : _q.websiteUrl; | ||
manifestInfo.version = teamsAppManifest === null || teamsAppManifest === void 0 ? void 0 : teamsAppManifest.version; | ||
const extensionElement = (_a = appManifest.extensions) === null || _a === void 0 ? void 0 : _a[0]; | ||
manifestInfo.id = appManifest.id; | ||
manifestInfo.appDomains = appManifest.validDomains; | ||
manifestInfo.defaultLocale = (_b = appManifest.localizationInfo) === null || _b === void 0 ? void 0 : _b.defaultLanguageTag; | ||
manifestInfo.description = appManifest.description.short; | ||
manifestInfo.displayName = appManifest.name.short; | ||
manifestInfo.highResolutionIconUrl = appManifest.icons.color; | ||
manifestInfo.hosts = (_c = extensionElement === null || extensionElement === void 0 ? void 0 : extensionElement.requirements) === null || _c === void 0 ? void 0 : _c.scopes; | ||
manifestInfo.iconUrl = appManifest.icons.color; | ||
manifestInfo.officeAppType = (_f = (_e = (_d = extensionElement === null || extensionElement === void 0 ? void 0 : extensionElement.requirements) === null || _d === void 0 ? void 0 : _d.capabilities) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.name; | ||
manifestInfo.permissions = (_k = (_j = (_h = (_g = appManifest.authorization) === null || _g === void 0 ? void 0 : _g.permissions) === null || _h === void 0 ? void 0 : _h.resourceSpecific) === null || _j === void 0 ? void 0 : _j[0]) === null || _k === void 0 ? void 0 : _k.name; | ||
manifestInfo.providerName = appManifest.developer.name; | ||
manifestInfo.supportUrl = appManifest.developer.websiteUrl; | ||
manifestInfo.version = appManifest.version; | ||
return manifestInfo; | ||
@@ -76,0 +73,0 @@ } |
{ | ||
"name": "office-addin-manifest", | ||
"version": "1.12.2", | ||
"version": "1.12.3", | ||
"description": "Read and modify Office Add-in manifest files.", | ||
@@ -25,3 +25,3 @@ "main": "./lib/main.js", | ||
"dependencies": { | ||
"@microsoft/teams-manifest": "^0.0.7", | ||
"@microsoft/teams-manifest": "^0.0.9", | ||
"adm-zip": "^0.5.9", | ||
@@ -32,3 +32,3 @@ "chalk": "^2.4.2", | ||
"node-fetch": "^2.6.1", | ||
"office-addin-usage-data": "^1.6.4", | ||
"office-addin-usage-data": "^1.6.5", | ||
"path": "^0.12.7", | ||
@@ -50,3 +50,3 @@ "uuid": "^8.3.2", | ||
"mocha": "^9.1.1", | ||
"office-addin-lint": "^2.2.4", | ||
"office-addin-lint": "^2.2.5", | ||
"rimraf": "^3.0.2", | ||
@@ -65,3 +65,3 @@ "ts-node": "^10.9.1", | ||
"prettier": "office-addin-prettier-config", | ||
"gitHead": "439f7924d9bac887e4f1990ade0917e36a1f3431" | ||
"gitHead": "2bc6f1206b382e3f22b4a0601875331143eba263" | ||
} |
@@ -5,6 +5,6 @@ # Office-Addin-Manifest | ||
For more information, see the [documentation]( | ||
https://docs.microsoft.com/en-us/office/dev/add-ins/develop/add-in-manifests). | ||
For more information, see the [documentation](https://learn.microsoft.com/office/dev/add-ins/develop/add-in-manifests). | ||
## Command-Line Interface | ||
* [info](#info) | ||
@@ -17,5 +17,6 @@ * [modify](#modify) | ||
### info | ||
Display the information in the Office Add-in manifest. | ||
### info | ||
Display the information in the Office Add-in manifest. | ||
Syntax: | ||
@@ -30,2 +31,3 @@ | ||
### modify | ||
Modify values in the Office Add-in manifest file. | ||
@@ -37,3 +39,3 @@ | ||
`manifest`: path to manifest file. | ||
`manifest`: path to manifest file. | ||
@@ -45,7 +47,7 @@ Options: | ||
Update the unique id for the Office Add-in. If the guid is not provided, a random guid is used. | ||
Update the unique ID for the Office Add-in. If the GUID is not provided, a random GUID is used. | ||
This value is the `<Id>` element of `<OfficeApp>`. | ||
For more info, see [OfficeApp documentation](https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/officeapp) | ||
For more information, see [OfficeApp documentation](https://learn.microsoft.com/javascript/api/manifest/officeapp). | ||
@@ -57,9 +59,10 @@ `-d <name>`<br> | ||
This value is the `<DisplayName>` element of `<OfficeApp>`. | ||
This value is the `<DisplayName>` element of `<OfficeApp>`. | ||
For more info, see [OfficeApp documentation](https://docs.microsoft.com/en-us/office/dev/add-ins/reference/manifest/officeapp). | ||
For more information, see [OfficeApp documentation](https://learn.microsoft.com/javascript/api/manifest/officeapp). | ||
# | ||
### validate | ||
### validate | ||
Determines whether the Office Add-in manifest is valid. | ||
@@ -74,4 +77,5 @@ | ||
### export | ||
Packages up the json manifest file and some icons into a zip file | ||
Packages up the json manifest file and some icons into a zip file. | ||
Syntax: | ||
@@ -83,6 +87,6 @@ | ||
`-m <manfest>`<br> | ||
`--manifest <manfest>` | ||
`-m <manifest>`<br> | ||
`--manifest <manifest>` | ||
Specify the path to the manifest file. Default is './manifest.json' | ||
Specify the path to the manifest file. Default is './manifest.json'. | ||
@@ -92,2 +96,2 @@ `-o <output>`<br> | ||
Specify the path to save the package to. Default is next to the manifest file | ||
Specify the path to save the package to. Default is next to the manifest file. |
Sorry, the diff of this file is not supported yet
89
96858
1476
+ Added@microsoft/teams-manifest@0.0.9(transitive)
- Removed@microsoft/teams-manifest@0.0.7(transitive)