# @openmfe/manifest

> ## Loading and Validation

Latest version **0.3.0** (published 2023-01-28) · 0 weekly downloads

## Install

```sh
npm install @openmfe/manifest
pnpm add @openmfe/manifest
yarn add @openmfe/manifest
bun add @openmfe/manifest
```

Provides the commands `openmfe-contract`, `openmfe-validate`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2023-01-28 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 24.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tui-releases, lxg |

## Links

- npm: https://www.npmjs.com/package/@openmfe/manifest
- npm.io page: https://npm.io/package/@openmfe/manifest

## Dependencies (6)

- [ajv](https://npm.io/package/ajv.md) ^6.12.6
- [yaml](https://npm.io/package/yaml.md) ^1.10.2
- [rollup](https://npm.io/package/rollup.md) ^2.63.0
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7
- [deep-object-diff](https://npm.io/package/deep-object-diff.md) ^1.1.0
- [rollup-plugin-copy](https://npm.io/package/rollup-plugin-copy.md) ^3.4.0

## Recent versions

- 0.3.0 (latest) — 2023-01-28
- 0.2.3 — 2022-06-29
- 0.2.2 — 2022-06-23
- 0.2.1 — 2022-05-10
- 0.2.0 — 2022-04-20
- 0.1.4 — 2022-03-21
- 0.1.3 — 2022-03-20
- 0.1.2 — 2022-03-20
- 0.1.1 — 2022-03-20
- 0.1.0 — 2022-02-14
- 0.0.1 — 2022-02-10

## README

# The OpenMFE Manifest Tool

## Loading and Validation

The `@openmfe/manifest` tool retrieves and validates the contract of an OpenMFE microfrontend. It also resolves relative paths to full URLs. When you load a microfrontend’s manifest with this tool, you can be sure that the manifest complies with the OpenMFE specification.

The tool can be installed to any JavaScript project.

```shell
npm i @openmfe/manifest
```

Here’s how to run a manifest validation from the command line:

```shell
npx openmfe-validate http://localhost:8081/manifest/openmfe.yaml
```

You can also invoke it programmatically by loading it as a module (both ES and CommonJS are supported).

```js
import getManifest from "@openmfe/manifest"
const url = "http://localhost:8081/manifest/openmfe.yaml"
const manifest = getManifest(url) // returns the validated manifest.
```

### The Contract History Checker

The contract history checker makes sure that a microfrontend’s contract doesn’t introduce breaking changes over time. This is important because a microfrontend is supposed to be always deployed under the same URL. Therefore, its consumers must be confident that attributes, events and other aspects of the interface do not change in a breaking way. For this purpose, the contract checker installs a small `.contracts` file in the project and checks if the manifest at a given URL breaks the contract for the given microfrontend.

```shell
npx openmfe-contract http://localhost:8081/manifest/openmfe.yaml
```

This can be done in the microfrontend project itself or in a consuming project. It can also manage multiple microfrontends at the same time. So, if you are maintaining a website that uses multiple microfrontends, it can keep track of all of them and notify you if something breaks.

---
_Source: https://npm.io/package/@openmfe/manifest · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
