@salesforce/plugin-custom-metadata 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022, Salesforce.com, Inc.
1
+ Copyright (c) 2023, Salesforce.com, Inc.
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -1 +1 @@
1
- {"version":"2.0.8","commands":{"force:cmdt:create":{"id":"force:cmdt:create","description":"creates a new custom metadata type in the current project","strict":true,"usage":"<%= command.id %> -n <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a custom metadata type with developer name 'MyCustomType'; this name will also be used as the label:"," $ sfdx force:cmdt:create --typename MyCustomType","Create a protected custom metadata type with a specific label:"," $ sfdx force:cmdt:create --typename MyCustomType --label \"Custom Type\" --plurallabel \"Custom Types\" --visibility Protected"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"n","description":"unique object name for the custom metadata type","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type","multiple":false},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label","multiple":false},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","multiple":false,"options":["PackageProtected","Protected","Public"],"default":"Public"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store the newly-created custom metadata type files","multiple":false,"default":""}},"args":[{"name":"file"}],"longDescription":"Creates a new custom metadata type in the current project.","flagsConfig":{"typename":{"kind":"string","char":"n","description":"unique object name for the custom metadata type","longDescription":"The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.","required":true,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the custom metadata type","longDescription":"A label for the custom metadata type.","input":[],"multiple":false,"type":"option"},"plurallabel":{"kind":"string","char":"p","description":"plural version of the label value; if blank, uses label","longDescription":"The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.","input":[],"multiple":false,"type":"option"},"visibility":{"kind":"enum","helpValue":"(PackageProtected|Protected|Public)","char":"v","description":"visibility of the custom metadata type","longDescription":"The visibility of the custom metadata type.","options":["PackageProtected","Protected","Public"],"default":"Public","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store the newly-created custom metadata type files","longDescription":"The directory to store the newly-created custom metadata type files. The location can be an absolute path or relative to the current working directory. The default is the current directory.","default":"","input":[],"multiple":false,"type":"option"}},"requiresProject":true},"force:cmdt:generate":{"id":"force:cmdt:generate","description":"generates a custom metadata type and all its records for the provided sObject","strict":true,"usage":"<%= command.id %> -n <string> -s <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-i] [-d <directory>] [-r <directory>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Generate a custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c","Generate a custom metadata type from an sObject in the specified target org; ignore unsupported field types instead of converting them to text:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c --ignoreunsupported --targetusername 'alias or user email of the org containing the source type'","Generate a protected custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomObject__c --visibility Protected","Generate a protected custom metadata type with a specific label from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --label \"My CMDT\" --plurallabel \"My CMDTs\" --sobjectname SourceCustomSetting__c --visibility Protected","Generate a custom metadata type from an sObject in the default target org; put the resulting type metadata file in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --typeoutputdir 'path/to/my/cmdt/directory'","Generate a custom metadata type from an sObject in the default target org; put the resulting record metadata file(s) in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --recordsoutputdir 'path/to/my/cmdt/record/directory'"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"devname":{"name":"devname","type":"option","char":"n","description":"name of the custom metadata type","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type","multiple":false},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label","multiple":false},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","multiple":false,"options":["PackageProtected","Protected","Public"],"default":"Public"},"sobjectname":{"name":"sobjectname","type":"option","char":"s","description":"API name of the sObject source for custom metadata generation","required":true,"multiple":false},"ignoreunsupported":{"name":"ignoreunsupported","type":"boolean","char":"i","description":"ignore unsupported field types","allowNo":false},"typeoutputdir":{"name":"typeoutputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata type files","multiple":false,"default":"force-app/main/default/objects"},"recordsoutputdir":{"name":"recordsoutputdir","type":"option","char":"r","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"}},"args":[{"name":"file"}],"longDescription":"Generates a custom metadata type and all its records for the provided sObject.","flagsConfig":{"devname":{"kind":"string","char":"n","required":true,"description":"name of the custom metadata type","longDescription":"The name of the custom metadata type.","input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the custom metadata type","longDescription":"The label for the custom metadata type.","input":[],"multiple":false,"type":"option"},"plurallabel":{"kind":"string","char":"p","description":"plural version of the label value; if blank, uses label","longDescription":"The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.","input":[],"multiple":false,"type":"option"},"visibility":{"kind":"enum","helpValue":"(PackageProtected|Protected|Public)","char":"v","description":"visibility of the custom metadata type","longDescription":"The visibility of the custom metadata type.","options":["PackageProtected","Protected","Public"],"default":"Public","input":[],"multiple":false,"type":"option"},"sobjectname":{"kind":"string","char":"s","required":true,"description":"API name of the sObject source for custom metadata generation","longDescription":"The API name of the sObject source for custom metadata generation.","input":[],"multiple":false,"type":"option"},"ignoreunsupported":{"kind":"boolean","char":"i","description":"ignore unsupported field types","longDescription":"Ignore unsupported field types (these fields will not be created). The default is to create Text fields and convert the source value to text.","allowNo":false,"type":"boolean"},"typeoutputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata type files","longDescription":"The directory to store newly-created custom metadata type files.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"recordsoutputdir":{"kind":"directory","char":"r","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"}},"requiresUsername":true,"requiresProject":true},"force:cmdt:field:create":{"id":"force:cmdt:field:create","description":"generate a custom metadata field based on the field type provided","strict":true,"usage":"<%= command.id %> -n <string> -f Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url [-p <array>] [-s <number>] [-l <string>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a metadata file for a custom checkbox field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Checkbox","Create a metadata file for a custom picklist field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Picklist --picklistvalues \"A,B,C\"","Create a metadata file for a custom number field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Number --decimalplaces 2"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"fieldname":{"name":"fieldname","type":"option","char":"n","description":"unique name for the field","required":true,"multiple":false},"fieldtype":{"name":"fieldtype","type":"option","char":"f","description":"type of field","required":true,"helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","multiple":false,"options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"]},"picklistvalues":{"name":"picklistvalues","type":"option","char":"p","description":"comma-separated list of picklist values; required for Picklist fields","multiple":false},"decimalplaces":{"name":"decimalplaces","type":"option","char":"s","description":"number of decimal places to use for Number or Percent fields","multiple":false,"default":0},"label":{"name":"label","type":"option","char":"l","description":"label for the field","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created field definition files","multiple":false,"default":""}},"args":[{"name":"file"}],"longDescription":"Generate a custom metadata field based on the field type provided.","flagsConfig":{"fieldname":{"kind":"string","char":"n","required":true,"description":"unique name for the field","longDescription":"The unique name for the field.","input":[],"multiple":false,"type":"option"},"fieldtype":{"kind":"enum","helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","char":"f","required":true,"description":"type of field","longDescription":"The unique name for the field.","options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"],"input":[],"multiple":false,"type":"option"},"picklistvalues":{"kind":"array","char":"p","description":"comma-separated list of picklist values; required for Picklist fields","longDescription":"A comma-separated list of picklist values. These values are required when creating a Picklist field.","input":[],"multiple":false,"type":"option"},"decimalplaces":{"kind":"number","char":"s","description":"number of decimal places to use for Number or Percent fields","longDescription":"The number of decimal places to use for Number or Percent fields. The value must be greater than or equal to zero.","default":0,"min":0,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the field","longDescription":"The label for the field.","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created field definition files","longDescription":"The directory to store the newly-created field definition files. The location can be an absolute path or relative to the current working directory. The default is the current directory.","default":"","input":[],"multiple":false,"type":"option"}},"requiresProject":true},"force:cmdt:record:create":{"id":"force:cmdt:record:create","description":"create a new record for a given custom metadata type in the current project","strict":true,"usage":"<%= command.id %> [name=value...] -t <string> -n <string> [-l <string>] [-p <string>] [-i <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a record metadata file for custom metadata type 'MyCMT' with values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord My_Custom_Field_1=Foo My_Custom_Field_2=Bar","Create a protected record metadata file for custom metadata type 'MyCMT' with a specific label and values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord --label \"My Record\" --protected true My_Custom_Field_1=Foo My_Custom_Field_2=Bar"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type to create a record for","required":true,"multiple":false},"recordname":{"name":"recordname","type":"option","char":"n","description":"name for the new record","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the new record","multiple":false},"protected":{"name":"protected","type":"option","char":"p","description":"protect the record when it is in a managed package","multiple":false,"options":["true","false"],"default":"false"},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","multiple":false,"default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"}},"args":[],"longDescription":"Create a new record for a given custom metadata type in the current project.","flagsConfig":{"typename":{"kind":"string","char":"t","description":"API name of the custom metadata type to create a record for","longDescription":"The API name of the custom metadata type to create a record for.","required":true,"input":[],"multiple":false,"type":"option"},"recordname":{"kind":"string","char":"n","description":"name for the new record","longDescription":"The name for the new record.","required":true,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the new record","longDescription":"The label for the new record.","input":[],"multiple":false,"type":"option"},"protected":{"kind":"string","char":"p","description":"protect the record when it is in a managed package","longDescription":"Protect the record when it is in a managed package. Protected records can only be accessed by code in the same managed package namespace.","options":["true","false"],"default":"false","input":[],"multiple":false,"type":"option"},"inputdir":{"kind":"directory","char":"i","description":"directory to pull the custom metadata type definition from","longDescription":"The directory to pull the custom metadata type definition from.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"}},"varargs":{"required":false},"requiresProject":true},"force:cmdt:record:insert":{"id":"force:cmdt:record:insert","description":"create new custom metadata type records from a CSV file","strict":true,"usage":"<%= command.id %> -f <string> -t <string> [-i <directory>] [-d <directory>] [-n <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create record metadata files for type 'My_CMDT_Name' (from your local project) based on values in a CSV file, using 'Name' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name","Create record metadata files for type 'My_CMDT_Name' (from the specified directory) based on values in a CSV file, using 'PrimaryKey' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name --inputdir \"path/to/my/cmdt/directory\" --namecolumn \"PrimaryKey\""],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"filepath":{"name":"filepath","type":"option","char":"f","description":"path to the CSV file","required":true,"multiple":false},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type","required":true,"multiple":false},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","multiple":false,"default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"},"namecolumn":{"name":"namecolumn","type":"option","char":"n","description":"column that is used to determine the name of the record","multiple":false,"default":"Name"}},"args":[],"longDescription":"Create new custom metadata type records from a CSV file.","flagsConfig":{"filepath":{"kind":"string","char":"f","description":"path to the CSV file","longDescription":"The path to the CSV file.","required":true,"input":[],"multiple":false,"type":"option"},"typename":{"kind":"string","char":"t","description":"API name of the custom metadata type","longDescription":"The API Name of the custom metadata type. The '__mdt' suffix will be appended to the end of the name if it is omitted.","required":true,"input":[],"multiple":false,"type":"option"},"inputdir":{"kind":"directory","char":"i","description":"directory to pull the custom metadata type definition from","longDescription":"The directory to pull the custom metadata type definition from.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"},"namecolumn":{"kind":"string","char":"n","description":"column that is used to determine the name of the record","longDescription":"The column that is used to determine the name of the record.","default":"Name","input":[],"multiple":false,"type":"option"}},"requiresProject":true}}}
1
+ {"version":"2.0.9","commands":{"force:cmdt:create":{"id":"force:cmdt:create","description":"creates a new custom metadata type in the current project","strict":true,"usage":"<%= command.id %> -n <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a custom metadata type with developer name 'MyCustomType'; this name will also be used as the label:"," $ sfdx force:cmdt:create --typename MyCustomType","Create a protected custom metadata type with a specific label:"," $ sfdx force:cmdt:create --typename MyCustomType --label \"Custom Type\" --plurallabel \"Custom Types\" --visibility Protected"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"n","description":"unique object name for the custom metadata type","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type","multiple":false},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label","multiple":false},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","multiple":false,"options":["PackageProtected","Protected","Public"],"default":"Public"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store the newly-created custom metadata type files","multiple":false,"default":""}},"args":[{"name":"file"}],"longDescription":"Creates a new custom metadata type in the current project.","flagsConfig":{"typename":{"kind":"string","char":"n","description":"unique object name for the custom metadata type","longDescription":"The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.","required":true,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the custom metadata type","longDescription":"A label for the custom metadata type.","input":[],"multiple":false,"type":"option"},"plurallabel":{"kind":"string","char":"p","description":"plural version of the label value; if blank, uses label","longDescription":"The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.","input":[],"multiple":false,"type":"option"},"visibility":{"kind":"enum","helpValue":"(PackageProtected|Protected|Public)","char":"v","description":"visibility of the custom metadata type","longDescription":"The visibility of the custom metadata type.","options":["PackageProtected","Protected","Public"],"default":"Public","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store the newly-created custom metadata type files","longDescription":"The directory to store the newly-created custom metadata type files. The location can be an absolute path or relative to the current working directory. The default is the current directory.","default":"","input":[],"multiple":false,"type":"option"}},"requiresProject":true},"force:cmdt:generate":{"id":"force:cmdt:generate","description":"generates a custom metadata type and all its records for the provided sObject","strict":true,"usage":"<%= command.id %> -n <string> -s <string> [-l <string>] [-p <string>] [-v PackageProtected|Protected|Public] [-i] [-d <directory>] [-r <directory>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Generate a custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c","Generate a custom metadata type from an sObject in the specified target org; ignore unsupported field types instead of converting them to text:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname MySourceObject__c --ignoreunsupported --targetusername 'alias or user email of the org containing the source type'","Generate a protected custom metadata type from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomObject__c --visibility Protected","Generate a protected custom metadata type with a specific label from an sObject in the default target org:"," $ sfdx force:cmdt:generate --devname MyCMDT --label \"My CMDT\" --plurallabel \"My CMDTs\" --sobjectname SourceCustomSetting__c --visibility Protected","Generate a custom metadata type from an sObject in the default target org; put the resulting type metadata file in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --typeoutputdir 'path/to/my/cmdt/directory'","Generate a custom metadata type from an sObject in the default target org; put the resulting record metadata file(s) in the specified directory:"," $ sfdx force:cmdt:generate --devname MyCMDT --sobjectname SourceCustomSetting__c --recordsoutputdir 'path/to/my/cmdt/record/directory'"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"targetusername":{"name":"targetusername","type":"option","char":"u","description":"username or alias for the target org; overrides default target org","multiple":false},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command","multiple":false},"devname":{"name":"devname","type":"option","char":"n","description":"name of the custom metadata type","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type","multiple":false},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label","multiple":false},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","multiple":false,"options":["PackageProtected","Protected","Public"],"default":"Public"},"sobjectname":{"name":"sobjectname","type":"option","char":"s","description":"API name of the sObject source for custom metadata generation","required":true,"multiple":false},"ignoreunsupported":{"name":"ignoreunsupported","type":"boolean","char":"i","description":"ignore unsupported field types","allowNo":false},"typeoutputdir":{"name":"typeoutputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata type files","multiple":false,"default":"force-app/main/default/objects"},"recordsoutputdir":{"name":"recordsoutputdir","type":"option","char":"r","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"}},"args":[{"name":"file"}],"longDescription":"Generates a custom metadata type and all its records for the provided sObject.","flagsConfig":{"devname":{"kind":"string","char":"n","required":true,"description":"name of the custom metadata type","longDescription":"The name of the custom metadata type.","input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the custom metadata type","longDescription":"The label for the custom metadata type.","input":[],"multiple":false,"type":"option"},"plurallabel":{"kind":"string","char":"p","description":"plural version of the label value; if blank, uses label","longDescription":"The plural version of the label value. If this flag is missing or blank, the singular label is used as the plural label.","input":[],"multiple":false,"type":"option"},"visibility":{"kind":"enum","helpValue":"(PackageProtected|Protected|Public)","char":"v","description":"visibility of the custom metadata type","longDescription":"The visibility of the custom metadata type.","options":["PackageProtected","Protected","Public"],"default":"Public","input":[],"multiple":false,"type":"option"},"sobjectname":{"kind":"string","char":"s","required":true,"description":"API name of the sObject source for custom metadata generation","longDescription":"The API name of the sObject source for custom metadata generation.","input":[],"multiple":false,"type":"option"},"ignoreunsupported":{"kind":"boolean","char":"i","description":"ignore unsupported field types","longDescription":"Ignore unsupported field types (these fields will not be created). The default is to create Text fields and convert the source value to text.","allowNo":false,"type":"boolean"},"typeoutputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata type files","longDescription":"The directory to store newly-created custom metadata type files.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"recordsoutputdir":{"kind":"directory","char":"r","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"}},"requiresUsername":true,"requiresProject":true},"force:cmdt:field:create":{"id":"force:cmdt:field:create","description":"generate a custom metadata field based on the field type provided","strict":true,"usage":"<%= command.id %> -n <string> -f Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url [-p <array>] [-s <number>] [-l <string>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a metadata file for a custom checkbox field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Checkbox","Create a metadata file for a custom picklist field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Picklist --picklistvalues \"A,B,C\"","Create a metadata file for a custom number field:"," $ sfdx force:cmdt:field:create --fieldname MyField --fieldtype Number --decimalplaces 2"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"fieldname":{"name":"fieldname","type":"option","char":"n","description":"unique name for the field","required":true,"multiple":false},"fieldtype":{"name":"fieldtype","type":"option","char":"f","description":"type of field","required":true,"helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","multiple":false,"options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"]},"picklistvalues":{"name":"picklistvalues","type":"option","char":"p","description":"comma-separated list of picklist values; required for Picklist fields","multiple":false},"decimalplaces":{"name":"decimalplaces","type":"option","char":"s","description":"number of decimal places to use for Number or Percent fields","multiple":false,"default":0},"label":{"name":"label","type":"option","char":"l","description":"label for the field","multiple":false},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created field definition files","multiple":false,"default":""}},"args":[{"name":"file"}],"longDescription":"Generate a custom metadata field based on the field type provided.","flagsConfig":{"fieldname":{"kind":"string","char":"n","required":true,"description":"unique name for the field","longDescription":"The unique name for the field.","input":[],"multiple":false,"type":"option"},"fieldtype":{"kind":"enum","helpValue":"(Checkbox|Date|DateTime|Email|Number|Percent|Phone|Picklist|Text|TextArea|LongTextArea|Url)","char":"f","required":true,"description":"type of field","longDescription":"The unique name for the field.","options":["Checkbox","Date","DateTime","Email","Number","Percent","Phone","Picklist","Text","TextArea","LongTextArea","Url"],"input":[],"multiple":false,"type":"option"},"picklistvalues":{"kind":"array","char":"p","description":"comma-separated list of picklist values; required for Picklist fields","longDescription":"A comma-separated list of picklist values. These values are required when creating a Picklist field.","input":[],"multiple":false,"type":"option"},"decimalplaces":{"kind":"number","char":"s","description":"number of decimal places to use for Number or Percent fields","longDescription":"The number of decimal places to use for Number or Percent fields. The value must be greater than or equal to zero.","default":0,"min":0,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the field","longDescription":"The label for the field.","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created field definition files","longDescription":"The directory to store the newly-created field definition files. The location can be an absolute path or relative to the current working directory. The default is the current directory.","default":"","input":[],"multiple":false,"type":"option"}},"requiresProject":true},"force:cmdt:record:create":{"id":"force:cmdt:record:create","description":"create a new record for a given custom metadata type in the current project","strict":true,"usage":"<%= command.id %> [name=value...] -t <string> -n <string> [-l <string>] [-p <string>] [-i <directory>] [-d <directory>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create a record metadata file for custom metadata type 'MyCMT' with values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord My_Custom_Field_1=Foo My_Custom_Field_2=Bar","Create a protected record metadata file for custom metadata type 'MyCMT' with a specific label and values specified for two custom fields:"," $ sfdx force:cmdt:record:create --typename MyCMT__mdt --recordname MyRecord --label \"My Record\" --protected true My_Custom_Field_1=Foo My_Custom_Field_2=Bar"],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type to create a record for","required":true,"multiple":false},"recordname":{"name":"recordname","type":"option","char":"n","description":"name for the new record","required":true,"multiple":false},"label":{"name":"label","type":"option","char":"l","description":"label for the new record","multiple":false},"protected":{"name":"protected","type":"option","char":"p","description":"protect the record when it is in a managed package","multiple":false,"options":["true","false"],"default":"false"},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","multiple":false,"default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"}},"args":[],"longDescription":"Create a new record for a given custom metadata type in the current project.","flagsConfig":{"typename":{"kind":"string","char":"t","description":"API name of the custom metadata type to create a record for","longDescription":"The API name of the custom metadata type to create a record for.","required":true,"input":[],"multiple":false,"type":"option"},"recordname":{"kind":"string","char":"n","description":"name for the new record","longDescription":"The name for the new record.","required":true,"input":[],"multiple":false,"type":"option"},"label":{"kind":"string","char":"l","description":"label for the new record","longDescription":"The label for the new record.","input":[],"multiple":false,"type":"option"},"protected":{"kind":"string","char":"p","description":"protect the record when it is in a managed package","longDescription":"Protect the record when it is in a managed package. Protected records can only be accessed by code in the same managed package namespace.","options":["true","false"],"default":"false","input":[],"multiple":false,"type":"option"},"inputdir":{"kind":"directory","char":"i","description":"directory to pull the custom metadata type definition from","longDescription":"The directory to pull the custom metadata type definition from.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"}},"varargs":{"required":false},"requiresProject":true},"force:cmdt:record:insert":{"id":"force:cmdt:record:insert","description":"create new custom metadata type records from a CSV file","strict":true,"usage":"<%= command.id %> -f <string> -t <string> [-i <directory>] [-d <directory>] [-n <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-custom-metadata","pluginAlias":"@salesforce/plugin-custom-metadata","pluginType":"core","aliases":[],"examples":["Create record metadata files for type 'My_CMDT_Name' (from your local project) based on values in a CSV file, using 'Name' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name","Create record metadata files for type 'My_CMDT_Name' (from the specified directory) based on values in a CSV file, using 'PrimaryKey' as the column that specifies the record name:"," $ sfdx force:cmdt:record:insert --filepath path/to/my.csv --typename My_CMDT_Name --inputdir \"path/to/my/cmdt/directory\" --namecolumn \"PrimaryKey\""],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","multiple":false,"options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"filepath":{"name":"filepath","type":"option","char":"f","description":"path to the CSV file","required":true,"multiple":false},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type","required":true,"multiple":false},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","multiple":false,"default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","multiple":false,"default":"force-app/main/default/customMetadata"},"namecolumn":{"name":"namecolumn","type":"option","char":"n","description":"column that is used to determine the name of the record","multiple":false,"default":"Name"}},"args":[],"longDescription":"Create new custom metadata type records from a CSV file.","flagsConfig":{"filepath":{"kind":"string","char":"f","description":"path to the CSV file","longDescription":"The path to the CSV file.","required":true,"input":[],"multiple":false,"type":"option"},"typename":{"kind":"string","char":"t","description":"API name of the custom metadata type","longDescription":"The API Name of the custom metadata type. The '__mdt' suffix will be appended to the end of the name if it is omitted.","required":true,"input":[],"multiple":false,"type":"option"},"inputdir":{"kind":"directory","char":"i","description":"directory to pull the custom metadata type definition from","longDescription":"The directory to pull the custom metadata type definition from.","default":"force-app/main/default/objects","input":[],"multiple":false,"type":"option"},"outputdir":{"kind":"directory","char":"d","description":"directory to store newly-created custom metadata record files","longDescription":"The directory to store newly-created custom metadata record files.","default":"force-app/main/default/customMetadata","input":[],"multiple":false,"type":"option"},"namecolumn":{"kind":"string","char":"n","description":"column that is used to determine the name of the record","longDescription":"The column that is used to determine the name of the record.","default":"Name","input":[],"multiple":false,"type":"option"}},"requiresProject":true}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-custom-metadata",
3
3
  "description": "Tools for working with custom metadata types and their records.",
4
- "version": "2.0.8",
4
+ "version": "2.0.9",
5
5
  "contributors": [
6
6
  {
7
7
  "name": "Carolyn Grabill",
@@ -58,11 +58,11 @@
58
58
  "@salesforce/prettier-config": "^0.0.2",
59
59
  "@salesforce/ts-sinon": "^1.4.2",
60
60
  "@semantic-release/git": "^9.0.0",
61
- "@swc/core": "^1.3.19",
61
+ "@swc/core": "^1.3.25",
62
62
  "@typescript-eslint/eslint-plugin": "^5.44.0",
63
- "@typescript-eslint/parser": "^5.42.1",
63
+ "@typescript-eslint/parser": "^5.46.1",
64
64
  "bluebird": "3.7.2",
65
- "chai": "^4.2.0",
65
+ "chai": "^4.3.7",
66
66
  "eslint": "^8.28.0",
67
67
  "eslint-config-prettier": "^8.5.0",
68
68
  "eslint-config-salesforce": "^1.1.0",
@@ -72,16 +72,16 @@
72
72
  "eslint-plugin-import": "^2.26.0",
73
73
  "eslint-plugin-jsdoc": "^39.6.4",
74
74
  "husky": "^7.0.4",
75
- "jsforce": "2.0.0-beta.10",
75
+ "jsforce": "2.0.0-beta.19",
76
76
  "mocha": "^9.1.3",
77
77
  "nyc": "^15.1.0",
78
78
  "oclif": "^3.2.28",
79
- "prettier": "^2.8.0",
79
+ "prettier": "^2.8.1",
80
80
  "pretty-quick": "^3.1.0",
81
81
  "shx": "0.2.2",
82
82
  "sinon": "10.0.0",
83
83
  "ts-node": "^10.0.0",
84
- "typescript": "^4.9.3"
84
+ "typescript": "^4.9.4"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=14.0.0"
@@ -147,7 +147,7 @@
147
147
  "access": "public"
148
148
  },
149
149
  "sfdx": {
150
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/2.0.8.crt",
151
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/2.0.8.sig"
150
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/2.0.9.crt",
151
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/2.0.9.sig"
152
152
  }
153
153
  }