
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
@microsoft/app-manifest
Advanced tools
@microsoft/app-manifest
A collection of TypeScript definitions and converters for Microsoft 365 App manifests.
Strongly‑typed interfaces for three manifest types with all versions generated from Microsoft’s official JSON schemas, guaranteeing compile‑time type correctness:
Bi‑directional conversions from JSON to manifest or from manifest to JSON(jsonToManifest
and manifestToJson
) with runtime type validation.
Schema validation utilities to validating manifests against schemas
File I/O helpers to conveniently load manifest from file or dump manifest to file in JSON format.
Modular versioning: manifests organized per version file, avoiding type collisions.
npm install @microsoft/app-manifest
Automatic version inference
You can assign a manifest object directly to the discriminated union types (TeamsManifest
, DeclarativeAgentManifest
or APIPluginManifest
) without specifying a concrete version type. TypeScript will infer the specific version based on the manifestVersion
field:
Manually specified version
You can specify a concrete version type:
Convert JSON string to Teams manifest type and check the version at run time:
const json = "{ \"manifestVersion\": \"1.20\", \"id\": \"app-id\", ...}";
const manifest = TeamsManifestConverter.jsonToManifest(json);
if (manifest.manifestVersion === "1.20") {
// TypeScript will infer the type as TeamsManifestV1D20
const manifestV1D20 = manifest as TeamsManifestV1D20.TeamsManifestV1D20;
// You can now access properties specific to TeamsManifestV1D20
}
Convert JSON string to Teams manifest type by specifying the version at compile time:
const json = "{ \"manifestVersion\": \"1.20\", \"id\": \"app-id\", ...}";
const manifest = TeamsManifestConverter.jsonToManifest(json) as TeamsManifestV1D20.TeamsManifestV1D20;
// You can now access properties specific to TeamsManifestV1D20
Convert JSON string to declarative agent manifest type and api plugin manifest type:
const daManifest = DeclarativeAgentManifestConverter.jsonToManifest(daManifestJSON) as DeclarativeAgentManifest;
const pluginManifest = ApiPluginManifestConverter.jsonToManifest(pluginManifestJSON) as APIPluginManifest;
Convert manifest object to JSON string:
const jsonString = TeamsManifestConverter.manifestToJson(manifest);
const daJsonString = DeclarativeAgentManifestConverter.manifestToJson(daManifest);
const pluginJsonString = ApiPluginManifestConverter.manifestToJson(pluginManifest);
Note that the converts to/from JSON will throw runtime type check failures.
Validate manifest against schema:
const failures = await AppManifestUtils.validateAgainstSchema(manifest);
Read and write manifest:
const teamsManifestPath = "path/to/your/teams_manifest.json";
// read Teams manifest with type check
const teamsManifest1 = await AppManifestUtils.readTeamsManifest(teamsManifestPath);
// read Teams manifest and validate against schema
const [teamsManifest2, failedValidations1] = await AppManifestUtils.readAndValidateTeamsManifest(teamsManifestPath);
const daManifestPath = "path/to/your/da_manifest.json";
// read declarative agent manifest with type check
const daManifest1 = await AppManifestUtils.readDeclarativeAgentManifest(daManifestPath);
// read declarative agent manifest and validate against schema
const [daManifest2, failedValidations2] = await AppManifestUtils.readAndValidateDeclarativeAgentManifest(daManifestPath);
const pluginManifestPath = "path/to/your/plugin_manifest.json";
// read API plugin manifest with type check
const pluginManifest1 = await AppManifestUtils.readApiPluginManifest(pluginManifestPath);
// read API plugin manifest and validate against schema
const [pluginManifest2, failedValidations3] = await AppManifestUtils.readAndValidateApiPluginManifest(pluginManifestPath);
FAQs
`@microsoft/app-manifest`
The npm package @microsoft/app-manifest receives a total of 38,322 weekly downloads. As such, @microsoft/app-manifest popularity was classified as popular.
We found that @microsoft/app-manifest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.