@nike/whisker-module-kit
The shared module-manifest types, Zod schema, admin-aware merge function, and
the whisker CLI consumed by every WhiskerPlatform UI module.
Full reference (exports, CLI commands, host-side script contract, BFF resolution): whisker-docs → Module Kit.
Install
Section titled “Install”pnpm add @nike/whisker-module-kitThis package ships a whisker CLI binary as well; modules invoke it through
pnpm exec whisker ... or via the one-line script wrappers generated by
@nike/create-whisker.
At a glance
Section titled “At a glance”| Export | Purpose |
|---|---|
ModuleManifest, ModuleManifestSchema |
TypeScript type + Zod schema — single source of truth for the manifest contract |
mergeManifestForUpsert |
Admin-aware merge used by the Lambda (and reusable elsewhere) |
resolveFederationExposes(projectRoot) |
Derives the Module Federation exposes map straight from config/module-manifest.json’s componentPath values — spread it into module-federation.config.ts#exposes so pages/widgets/nav items never need hand-syncing between the manifest and the federation config |
| CLI command | Description |
|---|---|
whisker generate-manifest |
Run src/moduleManifest.ts and write config/module-manifest.json |
whisker dev / whisker dev:prod |
Full local stack against the test / prod BFF |
whisker doctor |
Pre-flight checks (host path, ports, node, BFF reachability, …) |
whisker update-check |
Diff this module against the running host’s live contract (read-only) |
whisker upgrade |
Apply mechanical migrations for newer kit conventions — dry-run by default, --write to apply. Run this after bumping @nike/whisker-module-kit |
See whisker-docs → Module Kit for the full export list, every CLI command, and the host-side script contract.
Navigation icon contract
Section titled “Navigation icon contract”ui.navigation[].iconremains the standard/default icon declaration (Nike design-system icon name).ui.navigation[].componentPathis optional and only needed when a module ships a custom icon component.
