# @cms-lab/strapi

> Strapi document adapter for cms-lab.

Latest version **1.2.6** (published 2026-05-26) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @cms-lab/strapi
pnpm add @cms-lab/strapi
yarn add @cms-lab/strapi
bun add @cms-lab/strapi
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.2.6 |
| Published | 2026-05-26 |
| First published | 2026-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.10 |
| Dependencies | 1 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Afaq Rashid |
| Maintainers | afaqrashid |
| Keywords | cms, strapi, testing |

## Links

- npm: https://www.npmjs.com/package/@cms-lab/strapi
- Repository: https://github.com/i-afaqrashid/cms-lab
- Homepage: https://cmslab.afaqrashid.com
- Issues: https://github.com/i-afaqrashid/cms-lab/issues
- npm.io page: https://npm.io/package/@cms-lab/strapi

## Dependencies (1)

- [@cms-lab/core](https://npm.io/package/@cms-lab/core.md) 1.2.6

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.2.6 (latest) — 2026-05-26
- 1.2.5 — 2026-05-26
- 1.2.4 — 2026-05-26
- 1.2.3 — 2026-05-26
- 1.2.2 — 2026-05-26
- 1.2.1 — 2026-05-26
- 1.2.0 — 2026-05-26
- 1.1.0 — 2026-05-26
- 1.0.10 — 2026-05-26
- 1.0.9 — 2026-05-25
- 1.0.8 — 2026-05-25
- 1.0.6 — 2026-05-25
- 1.0.5 — 2026-05-25
- 1.0.4 — 2026-05-24
- 1.0.3 — 2026-05-24
- … 2 more at https://npm.io/package/@cms-lab/strapi/versions

## README

# @cms-lab/strapi

Strapi adapter for cms-lab.

```ts
cms: {
  provider: "strapi",
  url: "http://localhost:1337",
  token: process.env.STRAPI_TOKEN,
  locale: "en",
  collections: [
    {
      type: "page",
      endpoint: "pages",
      uidField: "routing.slug",
      urlField: "routing.url",
    },
  ],
  singleTypes: [
    {
      type: "navbar",
      endpoint: "navbar",
    },
  ],
}
```

The adapter reads Strapi REST collection and single-type responses and
normalizes them into cms-lab `CMSDocument` objects. It supports Strapi v4
`attributes` payloads and newer flat REST payloads, keeps native SEO/media
fields in `document.data`, uses `documentId`, `slug`, or numeric `id` as stable
identity values, and treats non-published statuses as `draft`.

Single types are marked as non-routable by default. cms-lab still runs field,
SEO, and image-alt checks on them, but it does not report missing route mappings
for layout or site-wide content such as navbars, footers, and homepage sections.

Use `uidField` or `urlField` when your project stores route values in custom
fields. Both options read dotted paths from `document.data`.

Set `cms.locale` to fetch all configured collections and single types for a
locale. Individual collection or single-type entries can override it with their
own `locale` value.

For Next.js Pages Router projects, start with:

```sh
cms-lab init --cms strapi --router pages
```

The generated config includes collection routes, single types, and
`strapiRelationSlug` for relation-based URL segments.

See the public [adapter maturity matrix](https://cmslab.afaqrashid.com/docs/tested-with)
for current test coverage and known limits.

## Release History

See the repository [changelog](https://github.com/i-afaqrashid/cms-lab/blob/main/CHANGELOG.md)
and [GitHub Releases](https://github.com/i-afaqrashid/cms-lab/releases) for
version-by-version notes.

## Open Source

MIT licensed. See the repository [license](https://github.com/i-afaqrashid/cms-lab/blob/main/LICENSE), [contributing guide](https://github.com/i-afaqrashid/cms-lab/blob/main/CONTRIBUTING.md), and [support guide](https://github.com/i-afaqrashid/cms-lab/blob/main/SUPPORT.md).

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