Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@salesforce/schemas

Package Overview
Dependencies
Maintainers
48
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce/schemas

This repository contains the spec and schema for the Scratch Org Definition Configuration file and `sfdx-project.json` file.

  • 1.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
270K
decreased by-12.34%
Maintainers
48
Weekly downloads
 
Created
Source

Salesforce DX Schemas

Commitizen friendly

JSON Schemas help with validation and code completion of json files. Below are the schemas that are available in this repository.

Using the Schemas

If you are using the Salesforce Extensions for Visual Studio Code these schemas are already included for you.

For most other editors, you can use the schemas by adding the $schema property to the top of your JSON file with the link to the schema document as shown below.

{
  "$schema": "https://raw.githubusercontent.com/forcedotcom/schemas/main/sfdx-project.schema.json"
  //...
}

You can also use these schemas programatically. For example, Salesforce CLI uses these schema to do certain validation.

const schemas = require('@salesforce/schemas');
const projectJsonSchema = require(schemas['sfdx-project']);
// OR
const projectJsonSchema = require('@salesforce/schema/sfdx-project-schema.json']);

Updating project-scratch-def.schema.json

Run the features-update and settings-update scripts on every major release and open a PR with the new changes against the main branch to keep the schema files up to date

Generating Schema from TS files

the /src folder contains the TS type used to generate the replacements project property.

You can define (or import and re-export) TS types and then use this extension. It adds a "Generate JSON Schema from type" action to your palette.

The results go into /compiled, which can be used to copy-paste into the project.

Bugs and Feedback

To report issues or feedback with the schemas, open a bug on GitHub.

FAQs

Package last updated on 01 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc