@salesforce/plugin-custom-metadata 1.0.10 → 1.1.0
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/CHANGELOG.md +16 -0
- package/README.md +96 -43
- package/lib/commands/force/cmdt/create.d.ts +4 -4
- package/lib/commands/force/cmdt/create.js +84 -80
- package/lib/commands/force/cmdt/create.js.map +1 -1
- package/lib/commands/force/cmdt/field/create.d.ts +3 -3
- package/lib/commands/force/cmdt/field/create.js +102 -89
- package/lib/commands/force/cmdt/field/create.js.map +1 -1
- package/lib/commands/force/cmdt/generate.d.ts +6 -6
- package/lib/commands/force/cmdt/generate.js +256 -243
- package/lib/commands/force/cmdt/generate.js.map +1 -1
- package/lib/commands/force/cmdt/record/create.d.ts +6 -6
- package/lib/commands/force/cmdt/record/create.js +130 -124
- package/lib/commands/force/cmdt/record/create.js.map +1 -1
- package/lib/commands/force/cmdt/record/insert.d.ts +5 -5
- package/lib/commands/force/cmdt/record/insert.js +105 -105
- package/lib/commands/force/cmdt/record/insert.js.map +1 -1
- package/lib/index.js +3 -3
- package/lib/lib/helpers/createUtil.js +14 -10
- package/lib/lib/helpers/createUtil.js.map +1 -1
- package/lib/lib/helpers/fileWriter.d.ts +2 -0
- package/lib/lib/helpers/fileWriter.js +5 -3
- package/lib/lib/helpers/fileWriter.js.map +1 -1
- package/lib/lib/helpers/metadataUtil.d.ts +2 -2
- package/lib/lib/helpers/metadataUtil.js +22 -15
- package/lib/lib/helpers/metadataUtil.js.map +1 -1
- package/lib/lib/helpers/validationUtil.js +9 -6
- package/lib/lib/helpers/validationUtil.js.map +1 -1
- package/lib/lib/interfaces/createConfig.js +3 -3
- package/lib/lib/interfaces/customField.js +3 -3
- package/lib/lib/interfaces/errorMessage.js +3 -3
- package/lib/lib/interfaces/record.js +3 -3
- package/lib/lib/interfaces/saveResults.js +3 -3
- package/lib/lib/templates/templates.d.ts +2 -0
- package/lib/lib/templates/templates.js +64 -23
- package/lib/lib/templates/templates.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/lib/templates/templates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA6C;AAE7C,MAAa,SAAS;
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/lib/templates/templates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,2CAA6C;AAE7C,MAAa,SAAS;IACpB;;;;;OAKG;IACI,eAAe,CAAC,IAAI,EAAE,UAAU;QACrC,IAAI,WAAW,GAAG,0CAA0C,CAAC;QAC7D,WAAW;YACT,kEAAkE,CAAC;QACrE,WAAW,IAAI,YAAY,IAAI,CAAC,KAAK,YAAY,CAAC;QAClD,WAAW,IAAI,kBAAkB,IAAI,CAAC,WAAW,kBAAkB,CAAC;QACpE,WAAW,IAAI,iBAAiB,UAAU,iBAAiB,CAAC;QAC5D,WAAW,IAAI,mBAAmB,CAAC;QACnC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACI,cAAc,CAAC,IAAI,EAAE,eAAwB;QAClD,IAAI,WAAW,GAAG,0CAA0C,CAAC;QAC7D,WAAW;YACT,iEAAiE,CAAC;QACpE,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACtC,WAAW,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACzC,WAAW,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACxC,WAAW,IAAI,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,WAAW,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;QAC5C,WAAW,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACnC,WAAW,IAAI,IAAI,CAAC,OAAO,CAAC,IA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U,IAAI,iBACZ,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,IAAI,KAC7C,aAAa,CAAC;YACd,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;gBACvD,UAAU,IAAI,iBAAiB,CAAC;gBAChC,UAAU,IAAI,qBAAqB,KAAK,CAAC,QAAQ,eAAe,CAAC;gBACjE,UAAU,IAAI,oBAAoB,KAAK,CAAC,OAAO,IAAI,KAAK,cAAc,CAAC;gBACvE,UAAU,IAAI,kBAAkB,KAAK,CAAC,KAAK,YAAY,CAAC;gBACxD,UAAU,IAAI,kBAAkB,CAAC;YACnC,CAAC,CAAC,CAAC;YACH,UAAU,IAAI,6BAA6B,CAAC;YAC5C,UAAU,IAAI,iBAAiB,CAAC;SACjC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAEO,oBAAoB,CAAC,MAAgB;QAC3C,MAAM,cAAc,GAAG,EAAE,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACvB,cAAc,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;QACH,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AAnRD,8BAmRC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.10","commands":{"force:cmdt:create":{"id":"force:cmdt:create","description":"creates a new custom metadata type in the current project","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","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)","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},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type"},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label"},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","options":["PackageProtected","Protected","Public"],"default":"Public"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store the newly-created custom metadata type files"}},"args":[{"name":"file"}]},"force:cmdt:generate":{"id":"force:cmdt:generate","description":"generates a custom metadata type and all its records for the provided sObject","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","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)","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"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"devname":{"name":"devname","type":"option","char":"n","description":"name of the custom metadata type","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type"},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label"},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","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},"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","default":"force-app/main/default/objects/"},"recordsoutputdir":{"name":"recordsoutputdir","type":"option","char":"r","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata/"}},"args":[{"name":"file"}]},"force:cmdt:field:create":{"id":"force:cmdt:field:create","description":"generate a custom metadata field based on the field type provided","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","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)","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},"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)","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"},"decimalplaces":{"name":"decimalplaces","type":"option","char":"s","description":"number of decimal places to use for Number or Percent fields","default":0},"label":{"name":"label","type":"option","char":"l","description":"label for the field"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created field definition files"}},"args":[{"name":"file"}]},"force:cmdt:record:create":{"id":"force:cmdt:record:create","description":"create a new record for a given custom metadata type in the current project","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","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)","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},"recordname":{"name":"recordname","type":"option","char":"n","description":"name for the new record","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the new record"},"protected":{"name":"protected","type":"option","char":"p","description":"protect the record when it is in a managed package","options":["true","false"],"default":"false"},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata"}},"args":[]},"force:cmdt:record:insert":{"id":"force:cmdt:record:insert","description":"create new custom metadata type records from a CSV file","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","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)","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},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type","required":true},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","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","default":"Name"}},"args":[]}}}
|
|
1
|
+
{"version":"1.1.0","commands":{"force:cmdt:create":{"id":"force:cmdt:create","description":"creates a new custom metadata type in the current project","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","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)","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},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type"},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label"},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","options":["PackageProtected","Protected","Public"],"default":"Public"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store the newly-created custom metadata type files"}},"args":[{"name":"file"}]},"force:cmdt:generate":{"id":"force:cmdt:generate","description":"generates a custom metadata type and all its records for the provided sObject","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","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)","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"},"apiversion":{"name":"apiversion","type":"option","description":"override the api version used for api requests made by this command"},"devname":{"name":"devname","type":"option","char":"n","description":"name of the custom metadata type","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the custom metadata type"},"plurallabel":{"name":"plurallabel","type":"option","char":"p","description":"plural version of the label value; if blank, uses label"},"visibility":{"name":"visibility","type":"option","char":"v","description":"visibility of the custom metadata type","helpValue":"(PackageProtected|Protected|Public)","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},"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","default":"force-app/main/default/objects/"},"recordsoutputdir":{"name":"recordsoutputdir","type":"option","char":"r","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata/"}},"args":[{"name":"file"}]},"force:cmdt:field:create":{"id":"force:cmdt:field:create","description":"generate a custom metadata field based on the field type provided","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","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)","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},"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)","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"},"decimalplaces":{"name":"decimalplaces","type":"option","char":"s","description":"number of decimal places to use for Number or Percent fields","default":0},"label":{"name":"label","type":"option","char":"l","description":"label for the field"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created field definition files"}},"args":[{"name":"file"}]},"force:cmdt:record:create":{"id":"force:cmdt:record:create","description":"create a new record for a given custom metadata type in the current project","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","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)","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},"recordname":{"name":"recordname","type":"option","char":"n","description":"name for the new record","required":true},"label":{"name":"label","type":"option","char":"l","description":"label for the new record"},"protected":{"name":"protected","type":"option","char":"p","description":"protect the record when it is in a managed package","options":["true","false"],"default":"false"},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","default":"force-app/main/default/customMetadata"}},"args":[]},"force:cmdt:record:insert":{"id":"force:cmdt:record:insert","description":"create new custom metadata type records from a CSV file","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","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)","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},"typename":{"name":"typename","type":"option","char":"t","description":"API name of the custom metadata type","required":true},"inputdir":{"name":"inputdir","type":"option","char":"i","description":"directory to pull the custom metadata type definition from","default":"force-app/main/default/objects"},"outputdir":{"name":"outputdir","type":"option","char":"d","description":"directory to store newly-created custom metadata record files","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","default":"Name"}},"args":[]}}}
|
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": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Carolyn Grabill",
|
|
@@ -42,38 +42,38 @@
|
|
|
42
42
|
],
|
|
43
43
|
"bugs": "https://github.com/salesforcecli/plugin-custom-metadata/issues",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@oclif/
|
|
46
|
-
"@
|
|
47
|
-
"@
|
|
48
|
-
"@salesforce/command": "^3.0.0",
|
|
45
|
+
"@oclif/config": "^1.18.1",
|
|
46
|
+
"@salesforce/command": "^4.2.0",
|
|
47
|
+
"@salesforce/core": "^2.31.0",
|
|
49
48
|
"@salesforce/ts-types": "^1.2.2",
|
|
50
|
-
"tslib": "^2
|
|
49
|
+
"tslib": "^2"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
|
-
"@oclif/dev-cli": "^1.
|
|
54
|
-
"@oclif/plugin-command-snapshot": "^
|
|
55
|
-
"@oclif/plugin-help": "^3.
|
|
56
|
-
"@oclif/test": "^1.2.
|
|
57
|
-
"@salesforce/dev-config": "^1.
|
|
58
|
-
"@salesforce/dev-scripts": "0.
|
|
59
|
-
"@salesforce/plugin-command-reference": "^1.
|
|
52
|
+
"@oclif/dev-cli": "^1.26.6",
|
|
53
|
+
"@oclif/plugin-command-snapshot": "^2.2.2",
|
|
54
|
+
"@oclif/plugin-help": "^3.2.10",
|
|
55
|
+
"@oclif/test": "^1.2.8",
|
|
56
|
+
"@salesforce/dev-config": "^2.1.2",
|
|
57
|
+
"@salesforce/dev-scripts": "1.0.2",
|
|
58
|
+
"@salesforce/plugin-command-reference": "^1.3.17",
|
|
60
59
|
"@salesforce/ts-sinon": "^1.1.2",
|
|
61
60
|
"@semantic-release/git": "^9.0.0",
|
|
62
61
|
"@types/chai": "^4.2.11",
|
|
63
|
-
"@types/jsforce": "1.9.
|
|
62
|
+
"@types/jsforce": "1.9.35",
|
|
64
63
|
"@types/mocha": "^7.0.2",
|
|
65
64
|
"@types/node": "^14.0.9",
|
|
66
65
|
"@types/xml2js": "^0.4.5",
|
|
66
|
+
"bluebird": "3.7.2",
|
|
67
67
|
"chai": "^4.2.0",
|
|
68
68
|
"globby": "^11.0.1",
|
|
69
69
|
"husky": "^4.2.5",
|
|
70
|
-
"mocha": "^
|
|
70
|
+
"mocha": "^9.1.3",
|
|
71
71
|
"nyc": "^15.1.0",
|
|
72
72
|
"semantic-release": "^17.0.8",
|
|
73
73
|
"shx": "0.2.2",
|
|
74
74
|
"sinon": "9.0.2",
|
|
75
75
|
"ts-node": "^8.10.2",
|
|
76
|
-
"typescript": "^3.
|
|
76
|
+
"typescript": "^4.3.2",
|
|
77
77
|
"xml2js": "^0.4.23"
|
|
78
78
|
},
|
|
79
79
|
"engines": {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"compile": "tsc -b",
|
|
121
121
|
"build": "yarn run clean:lib && yarn compile",
|
|
122
122
|
"postpack": "rm -f oclif.manifest.json",
|
|
123
|
-
"posttest": "
|
|
123
|
+
"posttest": "yarn test:deprecation-policy && yarn test:command-reference",
|
|
124
124
|
"prepack": "rm -rf lib && tsc && oclif-dev manifest && oclif-dev readme",
|
|
125
125
|
"test": "nyc mocha --forbid-only \"test/**/*.test.ts\"",
|
|
126
126
|
"version": "oclif-dev readme && git add README.md",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"access": "public"
|
|
138
138
|
},
|
|
139
139
|
"sfdx": {
|
|
140
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/
|
|
141
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/
|
|
140
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/1.1.0.crt",
|
|
141
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-custom-metadata/1.1.0.sig"
|
|
142
142
|
}
|
|
143
143
|
}
|