Registry / devops / dfds-content-management-tools

dfds-content-management-tools

JSON →
library1.21.0jsnpmunverified

Contentful content type migration management tool for automating and simplifying Contentful migration workflows. Version 1.x active development. Provides CLI scripts to automate migration script generation from Contentful type diffs, manual migration support, migration reordering, editor interface copying, and CI pipeline integration. Differentiates from Contentful's native migration CLI by automating diff-based script creation and enforcing a structured workflow with version control integration.

npm install dfds-content-management-tools
INSTALL
IMPORT
SIG · DFDS-CONTENT-MANAG
D
dfds-content-management-tools
devopsjavascriptv1.21.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import contentfulManagement from 'contentful-management'
contentful-management is a default export commonjs package
migration
import migration from 'contentful-migration'
contentful-migration is a CLI tool, not a library; use CLI scripts
createMigrationLog
import { createMigrationLog } from 'dfds-content-management-tools/migrationLog'
import { createMigrationLog } from 'dfds-content-management-tools'
Utilities are in subpath exports not always available from root index

Shows setup and usage of migration CLI: install, auto-generate from type diff, and apply migrations to environments.

#!/usr/bin/env bash # Ensure environment variables are set export CONTENTFUL_SPACE_ID="your_space_id" export CONTENTFUL_MANAGEMENT_ACCESS_TOKEN="your_mgmt_token" # Install the package yarn add -D dfds-content-management-tools@1.21.0 # Download migrations for a new type yarn migrate-auto --environment-id=dev --id=myNewType # Apply migrations to an environment yarn migrate-apply --environment-id=staging
Debug
Known issues
gotchaCONTENTFUL_SPACE_ID and CONTENTFUL_MANAGEMENT_ACCESS_TOKEN environment variables required
fix
Set environment variables before running any migrate command
affects: >=1.0.0
gotchamigrate-auto only works for adding new types or adding fields; non-trivial changes require migrate-manual
fix
Use migrate-manual with manual migration script for field deletions, renames, or transformations
affects: >=1.0.0
gotchamigrationLog singleton entry must exist in Contentful space for migrate-apply to work properly
fix
Run migrate-apply once on a fresh environment to create the log entry, or ensure it exists
affects: >=1.0.0
gotchaEditor interfaces are copied only once from dev to staging/production; after that PROD becomes authoritative
fix
Use migrate-interfaces sparingly; prefer manual updates after initial migration
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'dfds-content-management-tools'
Package not installed or missing from node_modules
fix
Run 'yarn add -D dfds-content-management-tools' or 'npm install --save-dev dfds-content-management-tools'
Error: ENOENT: no such file or directory, open 'migration/migrations/...'
migration directory structure not initialized
fix
Create 'migration/migrations' and 'migration/contentTypes' directories, then run command again
Error: Missing environment variable: CONTENTFUL_SPACE_ID
CONTENTFUL_SPACE_ID not set
fix
export CONTENTFUL_SPACE_ID='your_space_id'
Upgrade
Version history
1.21.0latest on npm
Audit
Dependencies
contentful-managementrequiredContentful Management API client for space operations
contentful-migrationrequiredContentful migration CLI for applying migration scripts
Agent activity
4 hits · last 30 days
node
4
Resources