包详细信息

@salesforce/schemas

forcedotcom1.4mISC1.9.0

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

自述文件

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.

更新日志

1.9.0 (2024-05-17)

Features

1.8.1 (2024-05-14)

Bug Fixes

1.8.0 (2024-05-14)

Features

1.7.0 (2024-04-01)

Features

  • add schemas for registry customization (#84) (542b61d)

1.6.1 (2023-10-26)

Bug Fixes

  • add scopeProfiles property to package directories (#80) (3f32839)

1.6.0 (2023-06-27)

Features

  • new property for replacements to allow unset envs (#76) (886aa05)

1.5.1 (2023-03-10)

Bug Fixes

  • tweak schema for replacements (39a9937)

1.5.0 (2023-01-25)

Features

  • adds seedMetadata for package version creation command (#69) (d8e7b7e)

1.4.0 (2022-11-09)

Features

  • major update for 56 and Functions fix (#63) (5107300)

1.3.1 (2022-11-09)

1.3.0 (2022-11-09)

Features

  • add github actions replaces circleci for build (#60) (fe70589)
  • packageDirectory.functions (#57) (65e11fd)

Reverts

  • Revert "chore: formatting" (5f43920)

1.1.3 (2022-06-15)

1.1.2 (2022-06-15)

Features

  • add apexTestAccess to sfdx-project (#36) (6516668)
  • allow branch specification for package directories and package dependencies (#38) (3d63f82)
  • pushPackageDirectoriesSequentially (#42) (ddb3693)
  • scratch-def: add 'release' to schema properties for autocomplete (#52) (905ff61)

1.1.0 (2021-04-14)

Features

  • sfdx-project: add name property to project schema (#35) (074a2fb)

1.0.4 (2021-03-08)

Bug Fixes

  • add EnableSetPasswordInApi as feature (#31) (06ac602)

Features

  • update scripts for scratch definition schema (#32) (f72ff07)

1.0.3 (2020-10-09)

Bug Fixes

  • update repo structure and fix circleci publish job (#28) (b3469fc)

1.0.2 (2020-10-06)

Features

  • add optional unpackaged metadata to packageDirectories objects (#22) (cef92ab)