@burdenoff/microfe-workflows

中文文档
2026.1108.1发布于 2026/11/08TypeScriptES Module近 30 天下载 1.1万

Workflows microfrontend for Burdenoff products - thin shell over @burdenoff/fluidgrids-fe-sdk

原始使用文档
文档目录3 节
  1. Host integration
  2. Routes
  3. Development

@burdenoff/microfe-workflows

Shared Layer 2 workflow UI for Fluidgrids and product shells. This package hosts @burdenoff/fluidgrids-fe-sdk; product MFEs must not initialize a parallel SDK.

Host integration

Mount inside the shell's gateway providers, router and permission context. The shell supplies both workspace and global gateway clients. Wait until workspace selection has issued a workspace JWT before mounting:

import { WorkflowsRoot } from '@burdenoff/microfe-workflows';

return workspaceId && workspaceToken ? (
  <WorkflowsRoot
    basePath="/myproduct/workflows"
    navigate={navigate}
    currentUser={user}
    productId="myproduct"
    productName="My Product"
    workspaceId={workspaceId}
    workspaceToken={workspaceToken}
    tenantId={tenantId}
    apiGatewayUrl={workspaceGatewayUrl}
    authToken={authToken}
  />
) : <div role="status">Loading your workspace…</div>;

workspaceToken is required. Upgrading hosts must pass it explicitly and gate mounting until it is available; authToken alone cannot authorize workspace operations. The shell client sends both Authorization and X-Workspace-Authorization. Product selection narrows access; the gateway still enforces authentication, product access and RBAC.

Pin the same SDK version in the shell as this package's peer dependency. Include this package's published files in Tailwind's source scan. Do not use local source aliases to validate a production package build.

The provider initializes configuration before the node palette. Gateway, tenant, workspace, product or user changes end the execution session and clear old selections and local run state. Token and callback refreshes preserve the current view. Mount one workflow host at a time.

Routes

Routes are relative to basePath:

  • list: workflow definitions
  • new: new workflow builder
  • workflow/:id/:version: existing workflow builder
  • runs and runs/:runId: current user's product-scoped runs
  • insights, templates, nodes, settings: shared SDK pages
  • any unknown path redirects to list

Product-specific bot or application bindings use the workspace gateway and navigate to these routes; they do not own SDK configuration.

Development

Run bun install and bun run sanity to validate lint, formatting, types, unit tests and the published library build. GraphQL operations are owned by the SDK; this wrapper has no separate generated operation layer, so it carries no schema snapshot.

bun run test runs the bun unit suite under src/ (happy-dom, see src/test-support/): the route table and its permission gates, nav and footer registration, the provider session boundary, the translation hook, and a check that every tr(key, fallback) call has its key in src/translations/en.ts. The same suite gates the PR check and the publish workflow.

React Doctor runs on every pull request (.github/workflows/react-doctor.yml, config in doctor.config.json, reviewed findings in .react-doctor/false-positives.md). Locally: npx -y react-doctor@latest . --verbose.

The complete reusable guide is in the dev repository: platform/context/automation/fluidgrids/HOW_TO_INTEGRATE_FLUIDGRIDS.md.

版本与发布记录

@burdenoff/microfe-workflows 共发布 76 个版本,首次发布于 2026/05/11;过去 12 个月发布了 76 个版本。

版本发布日期距今
2026.1108.1latest2026/11/08今天
2026.1101.12026/11/026 天前
2026.1030.12026/10/309 天前
2026.1029.12026/10/2910 天前
2026.1023.42026/10/2316 天前
2026.1023.32026/10/2316 天前

关于 @burdenoff/microfe-workflows 的常见问题

@burdenoff/microfe-workflows 是什么?

Workflows microfrontend for Burdenoff products - thin shell over @burdenoff/fluidgrids-fe-sdk

如何安装 @burdenoff/microfe-workflows?

在项目目录运行 npm install @burdenoff/microfe-workflows,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^19.0.0)、react-dom(^19.0.0)、framer-motion(^12.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@burdenoff/microfe-workflows 支持 TypeScript 吗?

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

@burdenoff/microfe-workflows 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@burdenoff/microfe-workflows 可以商用吗?

@burdenoff/microfe-workflows 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@burdenoff/microfe-workflows 的下载量有多少?

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

@burdenoff/microfe-workflows 还在维护吗?

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