UNPKG

@flxbl-io/sfp

Version:

sfp is a CLI tool to help you manage your Salesforce projects in an artifact centric model

1,139 lines (1,138 loc) 52.3 kB
{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://github.com/flxbl-io/sfp/blob/main/resources/sfdx-project.schema.json", "title": "sfp DX Project File", "description": "The properties and shape of the SFDX project enhanced for sfp", "type": "object", "additionalProperties": true, "required": [ "packageDirectories" ], "properties": { "$schema": { "description": "Support editors like vscode to help with IntelliSense", "type": "string", "default": "https://raw.githubusercontent.com/flxblio/sfp/main/resources/schemas/sfdx-project.schema.json" }, "packageDirectories": { "title": "Package Directories", "type": "array", "description": "Package directories indicate which directories to target when syncing source to and from the scratch org. These directories can contain source from your managed package, unmanaged package, or unpackaged source, for example, ant tool or change set.", "$comment": "The properties ancestorId & ancestorVersion cannot be included together, but this schema optimizes for VS Code code completion rather than pure validation.", "minItems": 1, "items": { "type": "object", "dependencies": { "ancestorId": [ "package", "versionNumber" ], "ancestorVersion": [ "package", "versionNumber" ], "apexTestAccess": [ "package", "versionNumber" ], "definitionFile": [ "package", "versionNumber" ], "dependencies": [ "package", "versionNumber" ], "package": [ "versionNumber" ], "postInstallUrl": [ "package", "versionNumber" ], "unpackagedMetadata": [ "package", "versionNumber" ], "releaseNotesUrl": [ "package", "versionNumber" ], "seedMetadata": [ "package", "versionNumber" ], "versionDescription": [ "package", "versionNumber" ], "versionName": [ "package", "versionNumber" ], "versionNumber": [ "package" ], "branch": [ "package" ] }, "required": [ "path" ], "additionalProperties": false, "properties": { "ancestorId": { "$ref": "#/definitions/packageDirectory.ancestorId" }, "ancestorVersion": { "$ref": "#/definitions/packageDirectory.ancestorVersion" }, "apexTestAccess": { "$ref": "#/definitions/packageDirectory.apexTestAccess" }, "default": { "$ref": "#/definitions/packageDirectory.default" }, "definitionFile": { "$ref": "#/definitions/packageDirectory.definitionFile" }, "dependencies": { "$ref": "#/definitions/packageDirectory.dependencies" }, "includeProfileUserLicenses": { "$ref": "#/definitions/packageDirectory.includeProfileUserLicenses" }, "package": { "$ref": "#/definitions/packageDirectory.package" }, "path": { "$ref": "#/definitions/packageDirectory.path" }, "postInstallUrl": { "$ref": "#/definitions/packageDirectory.postInstallUrl" }, "unpackagedMetadata": { "$ref": "#/definitions/packageDirectory.unpackagedMetadata" }, "releaseNotesUrl": { "$ref": "#/definitions/packageDirectory.releaseNotesUrl" }, "seedMetadata": { "$ref": "#/definitions/packageDirectory.seedMetadata" }, "versionDescription": { "$ref": "#/definitions/packageDirectory.versionDescription" }, "versionName": { "$ref": "#/definitions/packageDirectory.versionName" }, "versionNumber": { "$ref": "#/definitions/packageDirectory.versionNumber" }, "aliasfy": { "$ref": "#/definitions/packageDirectory.aliasfy" }, "alwaysDeploy": { "$ref": "#/definitions/packageDirectory.alwaysDeploy" }, "assignPermSetsPreDeployment": { "$ref": "#/definitions/packageDirectory.assignPermSetsPreDeployment" }, "assignPermSetsPostDeployment": { "$ref": "#/definitions/packageDirectory.assignPermSetsPostDeployment" }, "buildCollection": { "$ref": "#/definitions/packageDirectory.buildCollection" }, "destructiveChangePath": { "$ref": "#/definitions/packageDirectory.destructiveChangePath" }, "isOptimizedDeployment": { "$ref": "#/definitions/packageDirectory.isOptimizedDeployment" }, "ignoreOnStage": { "$ref": "#/definitions/packageDirectory.ignoreOnStage" }, "postDeploymentScript": { "$ref": "#/definitions/packageDirectory.postDeploymentScript" }, "preDeploymentScript": { "$ref": "#/definitions/packageDirectory.preDeploymentScript" }, "reconcileProfiles": { "$ref": "#/definitions/packageDirectory.reconcileProfiles" }, "type": { "$ref": "#/definitions/packageDirectory.type" }, "skipCoverageValidation": { "$ref": "#/definitions/packageDirectory.skipCoverageValidation" }, "tags": { "$ref": "#/definitions/packageDirectory.tags" }, "testSynchronous": { "$ref": "#/definitions/packageDirectory.testSynchronous" }, "skipDeployOnOrgs": { "$ref": "#/definitions/packageDirectory.skipDeployOnOrgs" }, "skipInstallOnOrgs": { "$ref": "#/definitions/packageDirectory.skipInstallOnOrgs" }, "skipTesting": { "$ref": "#/definitions/packageDirectory.skipTesting" }, "checkpointForPrepare": { "$ref": "#/definitions/packageDirectory.checkpointForPrepare" }, "enableFHT": { "$ref": "#/definitions/packageDirectory.enableFHT" }, "enableFT": { "$ref": "#/definitions/packageDirectory.enableFT" }, "enableFlowActivation": { "$ref": "#/definitions/packageDirectory.enableFlowActivation" }, "enablePicklist": { "$ref": "#/definitions/packageDirectory.enablePicklist" }, "branch": { "$ref": "#/definitions/packageDirectory.branch" } } } }, "name": { "title": "name", "type": "string", "description": "The name of your Salesforce project." }, "namespace": { "title": "Namespace", "type": "string", "description": "The global namespace that is used with a package. The namespace must be registered with an org that is associated with your Dev Hub org. This namespace is assigned to scratch orgs created with the org:create command. If you’re creating an unlocked package, you have the option to create a package with no namespace." }, "sourceApiVersion": { "title": "Source API Version", "type": "string", "description": "The API version that the source is compatible with. The default is the same version as the Salesforce CLI.", "default": "48.0" }, "sfdcLoginUrl": { "title": "SFDC Login URL", "type": "string", "description": "The login URL that the force:auth commands use. If not specified, the default is login.salesforce.com. Override the default value if you want users to authorize to a specific Salesforce instance. For example, if you want to authorize into a sandbox org, set this parameter to test.salesforce.com.", "default": "https://login.salesforce.com" }, "signupTargetLoginUrl": { "type": "string", "description": "The url that is used when creating new scratch orgs. This is typically only used for testing prerelease environments." }, "sourceBehaviorOptions": { "$ref": "#/definitions/RegistryPresets", "description": "filenames from https://github.com/forcedotcom/source-deploy-retrieve/tree/main/src/registry/presets", "title": "Custom predefined presets for decomposing metadata types" }, "oauthLocalPort": { "type": "number", "description": "By default, the OAuth port is 1717. However, change this port if this port is already in use, and you plan to create a connected app in your Dev Hub org to support JWT-based authorization." }, "pushPackageDirectoriesSequentially": { "type": "boolean", "description": "Whether to push package directories sequentially. If true, the package directories are pushed in the order they are listed in the project file. By default, the package directories are pushed in one deployment." }, "plugins": { "title": "CLI Plugins custom settings", "type": "object", "description": "Salesforce CLI plugin configurations used with this project.", "additionalProperties": true, "properties": { "sfp": { "$ref": "#/definitions/plugins.sfp" } } }, "registryCustomizations": { "$ref": "#/definitions/MetadataRegistry" }, "packageAliases": { "title": "Aliases for packaging ids", "type": "object", "description": "The Salesforce CLI updates this file with the aliases when you create a package or package version. You can also manually update this section for existing packages or package versions. You can use the alias instead of the cryptic package ID when running CLI force:package commands.", "patternProperties": { "^[ -~]+$": { "type": "string", "pattern": "^(0Ho|033|05i|04t)([a-zA-Z0-9]{15}|[a-zA-Z0-9]{12})$" } } } }, "definitions": { "MetadataRegistry": { "additionalProperties": false, "properties": { "childTypes": { "additionalProperties": { "type": "string" }, "type": "object" }, "strictDirectoryNames": { "additionalProperties": { "type": "string" }, "type": "object" }, "suffixes": { "additionalProperties": { "type": "string" }, "type": "object" }, "types": { "additionalProperties": { "additionalProperties": false, "properties": { "aliasFor": { "type": "string" }, "children": { "additionalProperties": false, "properties": { "directories": { "additionalProperties": { "type": "string" }, "type": "object" }, "suffixes": { "additionalProperties": { "type": "string" }, "type": "object" }, "types": { "$ref": "#/definitions/alias-147831185-257-1138-147831185-0-1202" } }, "required": ["types", "suffixes"], "type": "object" }, "directoryName": { "type": "string" }, "folderContentType": { "type": "string" }, "folderType": { "type": "string" }, "id": { "type": "string" }, "ignoreParsedFullName": { "type": "boolean" }, "isAddressable": { "type": "boolean" }, "name": { "type": "string" }, "strategies": { "additionalProperties": false, "properties": { "adapter": { "enum": [ "mixedContent", "matchingContentFile", "decomposed", "bundle", "default" ], "type": "string" }, "decomposition": { "enum": ["topLevel", "folderPerType"], "type": "string" }, "transformer": { "enum": ["decomposed", "staticResource", "standard"], "type": "string" } }, "required": ["adapter"], "type": "object" }, "strictDirectoryName": { "type": "boolean" }, "suffix": { "type": "string" }, "supportsPartialDelete": { "type": "boolean" }, "supportsWildcardAndName": { "type": "boolean" }, "unaddressableWithoutParent": { "type": "boolean" }, "uniqueIdElement": { "type": "string" }, "xmlElementName": { "type": "string" } }, "required": ["id", "name", "directoryName"], "type": "object" }, "type": "object" } }, "required": ["types", "suffixes", "strictDirectoryNames", "childTypes"], "type": "object" }, "RegistryPresets": { "items": { "type": "string" }, "type": "array" }, "Replacements": { "anyOf": [ { "additionalProperties": false, "properties": { "filename": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithFile": { "type": "string" }, "stringToReplace": { "type": "string" } }, "required": ["filename", "replaceWithFile", "stringToReplace"], "type": "object" }, { "additionalProperties": false, "properties": { "allowUnsetEnvVariable": { "type": "boolean" }, "filename": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithEnv": { "type": "string" }, "stringToReplace": { "type": "string" } }, "required": ["filename", "replaceWithEnv", "stringToReplace"], "type": "object" }, { "additionalProperties": false, "properties": { "filename": { "type": "string" }, "regexToReplace": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithFile": { "type": "string" } }, "required": ["filename", "regexToReplace", "replaceWithFile"], "type": "object" }, { "additionalProperties": false, "properties": { "allowUnsetEnvVariable": { "type": "boolean" }, "filename": { "type": "string" }, "regexToReplace": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithEnv": { "type": "string" } }, "required": ["filename", "regexToReplace", "replaceWithEnv"], "type": "object" }, { "additionalProperties": false, "properties": { "glob": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithFile": { "type": "string" }, "stringToReplace": { "type": "string" } }, "required": ["glob", "replaceWithFile", "stringToReplace"], "type": "object" }, { "additionalProperties": false, "properties": { "allowUnsetEnvVariable": { "type": "boolean" }, "glob": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithEnv": { "type": "string" }, "stringToReplace": { "type": "string" } }, "required": ["glob", "replaceWithEnv", "stringToReplace"], "type": "object" }, { "additionalProperties": false, "properties": { "glob": { "type": "string" }, "regexToReplace": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithFile": { "type": "string" } }, "required": ["glob", "regexToReplace", "replaceWithFile"], "type": "object" }, { "additionalProperties": false, "properties": { "allowUnsetEnvVariable": { "type": "boolean" }, "glob": { "type": "string" }, "regexToReplace": { "type": "string" }, "replaceWhenEnv": { "items": { "additionalProperties": false, "properties": { "env": { "type": "string" }, "value": { "type": "string" } }, "required": ["env", "value"], "type": "object" }, "type": "array" }, "replaceWithEnv": { "type": "string" } }, "required": ["glob", "regexToReplace", "replaceWithEnv"], "type": "object" } ] }, "alias-147831185-257-1138-147831185-0-1202": { "additionalProperties": { "additionalProperties": false, "properties": { "aliasFor": { "type": "string" }, "children": { "additionalProperties": false, "properties": { "directories": { "additionalProperties": { "type": "string" }, "type": "object" }, "suffixes": { "additionalProperties": { "type": "string" }, "type": "object" }, "types": { "$ref": "#/definitions/alias-147831185-257-1138-147831185-0-1202" } }, "required": ["types", "suffixes"], "type": "object" }, "directoryName": { "type": "string" }, "folderContentType": { "type": "string" }, "folderType": { "type": "string" }, "id": { "type": "string" }, "ignoreParsedFullName": { "type": "boolean" }, "isAddressable": { "type": "boolean" }, "name": { "type": "string" }, "strategies": { "additionalProperties": false, "properties": { "adapter": { "enum": ["mixedContent", "matchingContentFile", "decomposed", "bundle", "default"], "type": "string" }, "decomposition": { "enum": ["topLevel", "folderPerType"], "type": "string" }, "transformer": { "enum": ["decomposed", "staticResource", "standard"], "type": "string" } }, "required": ["adapter"], "type": "object" }, "strictDirectoryName": { "type": "boolean" }, "suffix": { "type": "string" }, "supportsPartialDelete": { "type": "boolean" }, "supportsWildcardAndName": { "type": "boolean" }, "unaddressableWithoutParent": { "type": "boolean" }, "uniqueIdElement": { "type": "string" }, "xmlElementName": { "type": "string" } }, "required": ["id", "name", "directoryName"], "type": "object" }, "type": "object" }, "packageDirectory.path": { "type": "string", "description": "If you don’t specify a path, the Salesforce CLI uses a placeholder when you create a package." }, "packageDirectory.default": { "title": "Default", "type": "boolean", "description": "If you have specified more than one path, include this parameter for the default path to indicate which is the default package directory.", "default": true }, "packageDirectory.package": { "title": "Package Identifier", "type": "string", "description": "The package name you specified when creating the package." }, "packageDirectory.versionName": { "title": "Version Name", "type": "string", "description": "If not specified, the CLI uses versionNumber as the version name." }, "packageDirectory.versionDescription": { "title": "Version Description", "type": "string", "description": "Human readable version information, format not specified." }, "packageDirectory.versionNumber": { "title": "Version Number", "type": "string", "description": "Version numbers are formatted as major.minor.patch.build. For example, 1.2.1.8." }, "packageDirectory.definitionFile": { "title": "Definition File", "type": "string", "description": "Reference an external .json file to specify the features and org preferences required for the metadata of your package, such as the scratch org definition." }, "packageDirectory.dependencies": { "type": "array", "description": "To specify dependencies for 2GP within the same Dev Hub, use either the package version alias or a combination of the package name and the version number.", "items": { "type": "object", "required": [ "package" ], "properties": { "package": { "type": "string" }, "versionNumber": { "type": "string" }, "branch": { "type": "string" } } } }, "packageDirectory.ancestorId": { "title": "Ancestor ID", "type": "string", "description": "The ancestor that’s the immediate parent of the version that you’re creating. The package version ID to supply starts with '05i'." }, "packageDirectory.ancestorVersion": { "title": "Ancestor Version", "type": "string", "description": "The ancestor that’s the immediate parent of the version that you’re creating. The ancestor version uses the format major.minor.patch.build." }, "packageDirectory.releaseNotesUrl": { "type": "string", "title": "Release Notes Url", "description": "The release notes url." }, "packageDirectory.postInstallUrl": { "type": "string", "title": "Post Install Url", "description": "The post install url." }, "packageDirectory.seedMetadata": { "type": "object", "title": "Seed Metadata", "description": "Metadata not meant to be packaged, but deployed before deploying packaged metadata", "required": [ "path" ], "properties": { "path": { "type": "string", "title": "Path", "description": "The path name of the package directory containing the seed metadata" } } }, "packageDirectory.unpackagedMetadata": { "type": "object", "title": "Unpackaged Metadata", "description": "Metadata not meant to be packaged, but deployed when testing packaged metadata", "required": [ "path" ], "properties": { "path": { "type": "string", "title": "Path", "description": "The path name of the package directory containing the unpackaged metadata" } } }, "packageDirectory.includeProfileUserLicenses": { "type": "boolean", "title": "Include Profile User Licenses", "description": "Whether to include <userLicense> elements in profile metadata " }, "packageDirectory.apexTestAccess": { "type": "object", "title": "Apex Test Access", "description": "Additional access that should be granted to the user when running package Apex tests", "properties": { "permissionSets": { "title": "Permission Sets", "description": "The list of permission sets to enable while running Apex tests", "oneOf": [ { "type": "string", "title": "Permission Set String", "description": "The list of permission set to enable while running Apex tests as a string" }, { "type": "array", "title": "Permission Set Array", "description": "The list of permission set to enable while running Apex tests as an array", "items": { "type": "string", "title": "Permission Set Name", "description": "Name of the permission set to enable while running Apex tests" } } ] }, "permissionSetLicenses": { "title": "Permission Set License", "description": "The list of permission sets licenses to enable while running Apex tests", "oneOf": [ { "type": "string", "title": "Permission Set Licenses String", "description": "The list of permission set licenses to enable while running Apex tests as a string" }, { "type": "array", "title": "Permission Set Licenses Array", "description": "The list of permission set licenses to enable while running Apex tests as an array", "items": { "type": "string", "title": "Permission Set Licenses Developer Name", "description": "Name of the permission set to enable while running Apex tests" } } ] } } }, "packageDirectory.aliasfy": { "type": "boolean", "title": "Aliasfy the package", "description": "Deploy a subfolder in a source package that matches the alias of the org" }, "packageDirectory.alwaysDeploy": { "type": "boolean", "title": "Always deploy the package", "description": "Deploys package, even if it's installed already in the org. The artifact has to be present in the artifact directory for this particular option to work" }, "packageDirectory.assignPermSetsPreDeployment": { "type": "array", "title": "Apply Perm Sets Pre Deployment", "description": "Apply permsets before deploying a package", "items": { "type": "string" } }, "packageDirectory.assignPermSetsPostDeployment": { "type": "array", "title": "Apply Perm Sets Post Deployment", "description": "Apply permsets after deploying a package", "items": { "type": "string" } }, "packageDirectory.buildCollection": { "type": "array", "title": "Build Packages in a Collection", "description": "Utilize this to build packages in unison, it will build all packages in the collection, even if only one of them changes", "items": { "type": "string" } }, "packageDirectory.destructiveChangePath": { "type": "string", "title": "Path to Destructive Changes", "description": "Apply destructive changes during deployment" }, "packageDirectory.isOptimizedDeployment": { "type": "boolean", "title": "Use optimized deployment", "description": "Detects test classes in a source package automatically and utilize it to deploy the provided package" }, "packageDirectory.ignoreOnStage": { "type": "array", "title": "Ignore this package on a stage", "description": "Ignore this package on any provided stage", "items": { "type": "string", "enum": [ "prepare", "build", "deploy", "validate", "release", "quickbuild" ] } }, "packageDirectory.postDeploymentScript": { "type": "string", "title": "PostDeployment Script", "description": "Run an executable script after deploying a package. User need to provide a path to the script file" }, "packageDirectory.preDeploymentScript": { "type": "string", "title": "PreDeployment Script", "description": "Run an executable script before deploying a package. User need to provide a path to the script file" }, "packageDirectory.reconcileProfiles": { "type": "boolean", "title": "Reconcile Profiles", "description": "Reconcile Profiles during a deployment of source packages" }, "packageDirectory.type": { "type": "string", "title": "Type of the Package", "enum": [ "unlocked", "source", "data", "diff" ], "description": "Denotes the type of the package, accepted values are \"source\",\"data\",\"unlocked\" and \"diff\"" }, "packageDirectory.skipCoverageValidation": { "type": "boolean", "title": "Skip Test Coverage Validation", "description": "Skip the coverage validation of a package (unlocked/source)" }, "packageDirectory.tags": { "type": "array", "title": "Annotate a package with tags", "description": "Utilize this to annotate a package with tags", "items": { "type": "string" } }, "packageDirectory.testSynchronous": { "type": "boolean", "title": "Trigger tests synchronously", "description": "This will disable parallel testing in the org and tests packages", "default": false }, "packageDirectory.skipDeployOnOrgs": { "type": "array", "title": "Skip Deployment of the Package", "description": "Skip deployment on a particular org or org(s). Take an array of aliases as the input", "items": { "type": "string" } }, "packageDirectory.skipInstallOnOrgs": { "type": "array", "title": "Skip installation of an artifact", "description": "Skip installation of an artifact on a particular org or org(s). Take an array of aliases as the input", "items": { "type": "string" } }, "packageDirectory.skipTesting": { "type": "boolean", "title": "Skip Unit testing", "description": "Skip unit testing during validate or deployment (source packages)" }, "packageDirectory.checkpointForPrepare": { "type": "boolean", "title": "Is an Checkpoint Package?", "description": "Fail the scratch org,if the any of the checkpoint package fails to deploy on prepare" }, "packageDirectory.enableFHT": { "type": "boolean", "default": true, "title": "Enable Field History Tracking support?", "description": "Enable automated update of field history tracking in the target org upon deployment" }, "packageDirectory.enableFlowActivation": { "type": "boolean", "default": true, "title": "Enable Automated Flow Management?", "description": "Enable automated activation,deactivation of flows in the target org, Enabled by default for source/diff packages" }, "packageDirectory.enableFT": { "type": "boolean", "default": true, "title": "Enable Feed Tracking support?", "description": "Enable automated update of feed tracking in the target org upon deployment" }, "packageDirectory.enablePicklist": { "type": "boolean", "default": true, "title": "Enable Picklist patching for Unlocked Packages", "description": "Enable automated patching of picklist for unlocked packages as unlocked packages ignore changes" }, "packageDirectory.branch": { "type": "string", "title": "Package branch", "description": "branched package for the specific dev team" }, "plugins.sfp": { "type": "object", "title": "sfp plugin configuration", "description": "Configuration for sfp plugin", "additionalProperties": false, "properties": { "ignoreFiles": { "type": "object", "title": "Ignore Files", "description": "Map of stages to forceignore filepaths", "additionalProperties": false, "properties": { "prepare": { "type": "string", "title": "Prepare stage", "description": "Path to forceignore for prepare stage" }, "validate": { "type": "string", "title": "Validate stage", "description": "Path to forceignore for validate stage" }, "quickbuild": { "type": "string", "title": "Quickbuild stage", "description": "Path to forceignore for quickbuild stage" }, "build": { "type": "string", "title": "Build stage", "description": "Path to forceignore for build stage" } } }, "scratchOrgDefFilePaths": { "type": "object", "title": "Scratch Org Definition Files", "description": "Map of packages to scratch org definition files filepaths", "properties": { "enableMultiDefinitionFiles": { "type": "boolean", "title": "Enable Multi Definition Files", "description": "Enable multi definition files for different packages" },