
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@greenberry/datocms-migration-utils
Advanced tools
A collection of utils to help with the development of DatoCMS migration files
@greenberry/datocms-migration-utils
A collection of utils to help with the development of DatoCMS migration files.
yarn add @greenberry/datocms-migration-utils -D
Each field creator method need 3 arguments a working DatoCMS SiteClient
, field options
and the modelId
you want to attach the field to.
await createFieldMethod(client, options, modelId);
createBoolean
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createColor
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
presetColors | [#000] | ❌ |
enableAlpha | Boolean | ❌ |
createCTA
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createDate
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
dateRange | {min: 'ISO-8601', max: 'ISO-8601'} | ❌ |
createDateTime
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
dateRange | {min: 'ISO-8601', max: 'ISO-8601'} | ❌ |
createEnum
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
options | [String] | ✅ |
defaultValue | String | ❌ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createImage
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createLink
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
items | [ItemType ID] | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
unique | Boolean | ❌ |
createLinks
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
items | [ItemType ID] | ✅ |
size | { min: Number, max: Number } | ❌ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createModularContent
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
blockIds | [ItemType ID] | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createNumber
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createSEO
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
createSingleLine
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
heading | Boolean | ❌ |
createSlug
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
titleField | Field | ✅ |
prefix | String | ❌ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createTextArea
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
createWysiwyg
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
hint | String | ❌ |
localized | Boolean | ❌ |
required | Boolean | ❌ |
toolbar | Array | ❌ |
updateModularContent
Key | Type | Required |
---|---|---|
label | String | ✅ |
apiKey | String | ✅ |
localized | Boolean | ❌ |
hint | String | ❌ |
blockIds | [ItemType ID] | ✅ |
uploadFile
Key | Type | Required |
---|---|---|
DatoCMS only accepts a specific format when filling colors. That is why we added a util to format hex values in a shape acceptable by DatoCMS.
const color = formatColor('#000000');
console.log(color);
// {
// red: 0,
// blue: 0,
// green: 0,
// alpha: 255,
// }
formatColor
also accepts a second argument to specify the alpha of the color, this works in the same way as CSS opacity.
const color = formatColor('#000000', 0.8);
console.log(color);
// {
// red: 0,
// blue: 0,
// green: 0,
// alpha: 204,
// }
FAQs
A collection of utils to help with the development of DatoCMS migration files
We found that @greenberry/datocms-migration-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.