Gathering detailed insights and metrics for contentful-migration-tool
Gathering detailed insights and metrics for contentful-migration-tool
Gathering detailed insights and metrics for contentful-migration-tool
Gathering detailed insights and metrics for contentful-migration-tool
Run Contentful migrations more easily with just one command. It makes migration processes a breeze.
npm install contentful-migration-tool
Typescript
Module System
Min. Node Version
Node Version
NPM Version
59.9
Supply Chain
95.5
Quality
71.9
Maintenance
100
Vulnerability
98.6
License
TypeScript (95.18%)
JavaScript (3.69%)
Dockerfile (1.13%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
3 Stars
58 Commits
1 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Apr 28, 2024
Latest Version
1.3.0
Package Id
contentful-migration-tool@1.3.0
Unpacked Size
44.25 kB
Size
8.79 kB
File Count
16
NPM Version
10.5.0
Node Version
18.20.2
Published on
Apr 28, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
1
Run Contentful migrations more easily with just one command.
I decided to create this CLI when I read this article: "Integrating migrations in a continuous delivery pipeline with CircleCI". I found that approach very interesting, so I decided to build something very close to that.
With this CLI you can run migrations easier and keep track of migrations you already run.
You can integrate this into your existing CI without any effort.
The official contentful-migration
is a peerDependency, so it is required.
You can run this command:
1npx -p contentful-migration@latest -p contentful-migration-tool@latest contentful-migration-tool run ./migrations
Or you can install contentful-migration and contentful-migration-tool as devDependencies and then just run:
1# install dependencies 2npm install --save-dev contentful-migration@latest contentful-migration-tool@latest 3 4# run migrations 5npx contentful-migration-tool run ./migrations
If you use TypeScript, you will also need tsx to run TypeScript migrations:
1# install dependencies 2npm install --save-dev contentful-migration@latest contentful-migration-tool@latest tsx 3 4# run migrations 5npx tsx ./node_modules/.bin/contentful-migration-tool run ./migrations
Remember to set the required environment variables before running the above commands.
CONTENT_MANAGEMENT_TOKEN
- required - Contentful Content Management Token. You can create one from the section API keys under your space settings.
SPACE_ID
- required - Contentful Space ID. You can get the Space ID from the section General settings under your space settings. The Space ID is also visibile in the url.
ENVIRONMENT_ID
- required - Contentful Environment ID.
With this Docker image, you don't even need Node.js
1docker run --rm --tty --name contentful-migration-runner -e CONTENT_MANAGEMENT_TOKEN=$CONTENT_MANAGEMENT_TOKEN -e SPACE_ID=$SPACE_ID -e ENVIRONMENT_ID=$ENVIRONMENT_ID -v $(pwd)/migrations:/app/migrations marcomontalbano/contentful-migration
CONTENT_MANAGEMENT_TOKEN
- required - Contentful Content Management Token. You can create one from the section API keys under your space settings.
SPACE_ID
- required - Contentful Space ID. You can get the Space ID from the section General settings under your space settings. The Space ID is also visible in the url.
ENVIRONMENT_ID
- required - Contentful Environment ID.
/app/migrations
- required - Migrations folder.--cfmversion 4.0.0
- optional - Use this argument if you want to change the contentful-migration
version. (default to latest
)Either you use Docker or CLI, you should create a /migrations
(or whatever name) folder. This folder will contain all your migration description files.
A migration description file is a .js
or .ts
file that contains a migration script. These scripts are written using Contentful Migration syntax which you are already familiar with.
The filename must follow this naming convention:
<version>
-
<description>
.ts
version starts from 1
and must be incremental.
description is used to easily recognize the purpose of the migration.
A real example can be: 1-create-author.ts
e.g. javascript
1module.exports = function (migration, context) { 2 const author = migration.createContentType('author'); 3 const name = author.createField('name'); 4 name.type('Symbol').required(true); 5};
e.g. typescript
1import { MigrationFunction } from 'contentful-migration' 2 3const migrate: MigrationFunction = (migration) => { 4 const author = migration.createContentType('author'); 5 const name = author.createField('name'); 6 name.type('Symbol').required(true); 7} 8 9export = migrate
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
8 existing vulnerabilities detected
Details
Reason
Found 0/26 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More