@ama-mfe/messages

中文文档
15.3.1发布于 2026/11/10BSD-3-ClauseTypeScriptESM + CJS构建来源已验证近 30 天下载 4437

Contains common messages types used for iframes dialog in mfe architecture

原始使用文档
文档目录5 节
  1. Installation
  2. Message interfaces
  3. Navigation messages
  4. v1.0
  5. v1.1

Ama mfe messages package

The @ama-mfe/messages package exposes a set of message interfaces to help the communication between a host application and module applications embedded via iframes.

These interfaces can be used to create messages compatible with the Amadeus Toolkit for Micro Frontends framework.

Installation

npm install @ama-mfe/messages

Message interfaces

The message interfaces exposed in this package cover common use cases such as:

  • Navigation: an embedded application requests its host to navigate to a specific URL.
  • Resize: an embedded application's dimension changed and requests its host to adapt the iframe dimension to fit the new content.
  • [Theme](https://github.com/AmadeusITGroup/otter/blob/main/packages/%40ama-mfe/ng-utils/src/theme/: a host application requests its embedded module to apply a common css theme.

Messages are identified thanks to their type property and are versioned for backward compatibility.

Navigation messages

v1.0

Carries the target url only.

v1.1

Adds an optional extras field to forward a subset of Angular NavigationExtras across the iframe boundary so the receiving router can reproduce the original history/location semantics. Currently supports:

  • replaceUrl: when set, the host navigates by replacing the current history entry instead of pushing a new one. This is the key fix for modules that call router.navigate(..., { replaceUrl: true }) to skip a route from history — without forwarding, the host still pushes a new entry and the browser back button gets stuck in a loop.

版本与发布记录

@ama-mfe/messages 共发布 1,049 个版本,首次发布于 2025/03/05;过去 12 个月发布了 547 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
15.3.1latest2026/11/10今天
15.4.0-prerelease.92026/11/091 天前
15.4.0-prerelease.82026/11/073 天前
15.4.0-prerelease.72026/11/073 天前
15.3.0-rc.2rc2026/11/064 天前
15.4.0-prerelease.62026/11/064 天前

其他发布通道:v12-updated → 12.4.25,next → 14.0.0-next.14,v13-updated → 13.5.13,v14-updated → 14.5.4,v15-updated → 15.1.3,rc → 15.3.0-rc.2。

关于 @ama-mfe/messages 的常见问题

@ama-mfe/messages 是什么?

Contains common messages types used for iframes dialog in mfe architecture

如何安装 @ama-mfe/messages?

在项目目录运行 npm install @ama-mfe/messages,或使用 pnpm add / yarn add / bun add。

@ama-mfe/messages 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@ama-mfe/messages 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@ama-mfe/messages 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.22.3 || ^24.15.0 || ^26.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@ama-mfe/messages 可以商用吗?

@ama-mfe/messages 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@ama-mfe/messages 的下载量有多少?

根据 npm 官方下载统计,@ama-mfe/messages 在 2026/10/06 – 2026/11/04 这 30 天内被下载 4,437 次,日均约 148 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@ama-mfe/messages 还在维护吗?

最新版本 15.3.1 发布于 2026/11/10(今天);至今共发布 1049 个版本,其中过去 12 个月发布了 547 个;首次发布于 2025/03/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。