Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
sanity-plugin-migration
Advanced tools
Empower content editors to migrate Documents and Assets between Sanity Datasets from inside Sanity Studio
Proof of Concept for empowering content editors to migrate Documents and Assets between Sanity Datasets from inside Sanity Studio.
🚧 Important Notes: 🚧
Before starting a Migration you can select which Documents and Assets to include. Keep in mind Migrations will likely fail if every Referenced Document or Asset is not already present at the destination Dataset.
Both methods can gather References –- and do a recursive search for References of References –- so the Migration has every Document and Asset it needs to complete.
The Migration Tool allows you to migrate Documents that are returned from any GROQ query.
The Migration Document Action allows you to migrate an individual Document.
Note: If your Studio registerd Document Actions, the plugin config will be overruled. You may need to look at how the plugin adds the Action, and import it into your own configuration:
import {MigrateAction} from 'sanity-plugin-migration'
import config from 'config:migration'
You must have Spaces configured to use this plugin. Spaces are still listed as an experimental feature but have been supported for some time.
All Datasets setup in Spaces will become selectable "destinations" for Migrations. This means you can have additional datasets in the project that cannot be Migrated to.
Once setup, you will see a dropdown menu next to the Search bar in the Studio with the Datasets you have configured in Spaces.
The plugin has some configuration options. These can be set by adding a config file to your studio at ./config/migration.json
.
For example:
{
"tool": true,
"types": ["article", "page"]
}
Options:
tool
(boolean, default: true) – Set whether the Migration Tool is enabled.types
(Array[String], default: []) – Set which Schema Types the Migration Action should be enabled in.To Migrate Assets between Datasets an additional Authentication Token is required. You will be prompted for this the first time you attempt to use either the Tool or Document Action on any Dataset.
This plugin uses Sanity Secrets to store the token in the Dataset itself.
You can reveal the token belonging to your user account with sanity debug --secrets
FAQs
Empower content editors to migrate Documents and Assets between Sanity Projects and Datasets from inside Sanity Studio
The npm package sanity-plugin-migration receives a total of 1 weekly downloads. As such, sanity-plugin-migration popularity was classified as not popular.
We found that sanity-plugin-migration demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.