
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
contentful-to-sanity
Advanced tools
This package liberates Contentful spaces, creating Sanity projects and schemas as it goes.
npm i -g contentful-to-sanity
Or use it on demand with npx
:
npx contentful-to-sanity@latest --help
Find the contentful space ID of your project (under Space settings → General). Create a content management token (under Space settings → API keys → Content management tokens → Generate personal token).
npx sanity@latest init --template clean --output-path ./migrate
dataset.ndjson
file for the later import step:npx contentful-to-sanity@latest -s <space-id> -t <management-token> ./migrate
cd ./migrate && npx sanity dataset import ./dataset.ndjson
./migrate/sanity.config.ts
If you chose the clean
template it should look like this
import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {visionTool} from '@sanity/vision'
import {schemaTypes} from './schemas'
export default defineConfig({
name: 'default',
title: '<project-name>',
projectId: '<project-id>',
dataset: '<dataset>',
plugins: [deskTool(), visionTool()],
schema: {
types: schemaTypes,
},
})
Now replace the schemaTypes
import with the generated one:
import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {visionTool} from '@sanity/vision'
-import {schemaTypes} from './schemas'
+import {types as schemaTypes} from './schema'
export default defineConfig({
name: 'default',
title: '<project-name>',
npx sanity dev
You don't have to wait for the npx sanity dataset import ./migrate/dataset.ndjson
job to finish before the Studio is ready for use. The Studio will keep up to speed with the progress of the import job in real-time.
For more information on the available commands and their options, run contentful-to-sanity --help
.
Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
MIT © Sanity.io
FAQs
Migration tool from Contentful to Sanity
The npm package contentful-to-sanity receives a total of 15 weekly downloads. As such, contentful-to-sanity popularity was classified as not popular.
We found that contentful-to-sanity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 53 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.