
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.
@moller/sanity-plugin-mime
Advanced tools
This is a Sanity Studio v3 plugin.
npm i @moller/sanity-plugin-mime
Add mimePlugin()
to the plugin array in sanity.config.ts
(or .js):
import { mimePlugin } from '@moller/sanity-plugin-mime';
import { contactForm, metadata, selectFieldsConfig } from 'mimeprops';
export default defineConfig({
//...
plugins: [
mimePlugin({
forms: [contactForm],
selectFieldsConfig: selectFieldsConfig,
metadata: metadata,
}),
],
});
This input renders one form template with the basic fields firstname, lastname, email and phone number. In addition the unique fields select:dealership
and text: message to dealership
.
export const contactForm = {
name: 'contactForms',
title: 'Contact forms',
formFields: [
{
_type: 'areacodes',
type: 'select',
label: 'Area Code',
options: 'areacodes',
required: true,
},
{
_type: 'formField',
type: 'text',
label: 'Message',
},
],
};
In order to use the select field dealership
, it has to be configured in selectFieldConfig
export const selectFieldsConfig = [
{
fieldName: 'areacodes',
title: 'Area Code',
endpoint: 'areacodes',
options: [
{
name: 'parameter1',
title: 'Parameter 1',
optionlist: [
{ title: 'X', value: '1' },
{ title: 'Y', value: '2' },
],
},
{
name: 'parameter2',
title: 'Parameter 2',
optionlist: [
{ title: 'A', value: '3' },
{ title: 'B', value: '4' },
],
},
],
},
];
Metadata contain all data which has to be included in the form, but not rendered as a input field. Metadata has three different types readOnly
, options
and toggle
. Note the toggle
has the option to display follow up options.
export const metadata = {
readOnlyFields: [
{
name: 'postUrl',
title: 'Post URL',
initialValue: 'https://example.com/newform',
},
],
optionFields: [
{
name: 'language',
title: 'Language',
optionlist: [
{ title: 'English', value: 'english' },
{ title: 'French', value: 'french' },
],
},
],
toggleFields: [
{
name: 'sendConfirmationMail',
title: 'Send Confirmation Mail',
followUpOptions: {
name: 'confirmationTemplate',
title: 'Confirmation Mail Template',
emptyFieldErrorMessage: 'Select Template',
options: [
{ title: 'SuccessTemplate', value: 'SuccessTemplate' },
{
title: 'SomethingwrongTemplate',
value: 'SomethingwrongTemplate',
},
],
},
},
],
customFields: [],
};
BSD 3-Clause "New" or "Revised" © Bekk
This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.
See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.
FAQs
> This is a **Sanity Studio v3** plugin.
We found that @moller/sanity-plugin-mime demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.