
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@etchteam/contentful
Advanced tools
Helpers we use at Etch for working with Contentful.
npm install @etchteam/contentful
The CLI depends on the following environment variables being present
Use --help
to display help for a command.
npx etch-contentful-cli migration:install
Creates a directory at /integrations/contentful/migrations
containing a 0-init
migration.
When migrations are run, this will set the migration content type on your configured contentful space.
npx etch-contentful-cli migration:new "MIGRATION_NAME"
Creates a new migration file at /integrations/contentful/migrations
with the "MIGRATION_NAME"
provided.
npx etch-contentful-cli migration:run
Runs all migrations that haven't already been run.
The migration:run
command accepts an optional spaces argument --spaces <spaceOne,spaceTwo>
.
This will filter out any migrations that don't export a matching space name as part of its module.exports.spaces
array:
module.exports.spaces = ['spaceOne', 'spaceTwo'];
If no spaces argument is provided, all migrations will run.
npx etch-contentful-cli typegen
Generate GraphQL API compatible types based on your content in Contentful
The typegen
command accepts an optional filename argument --filename <filename>
. If omitted the filename will default to contentful.d.ts.
Some basic validators are available to use with content types, they can be imported:
import { validator } from '@etchteam/contentful';
Then used with their corresponding Contentful input type:
newEntity
.createField('summary')
.type('RichText')
.name('Summary')
.validations(validator.richText.boldAndItalicOnly);
FAQs
Helpers we use at Etch for working with Contentful
The npm package @etchteam/contentful receives a total of 7 weekly downloads. As such, @etchteam/contentful popularity was classified as not popular.
We found that @etchteam/contentful demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.