diff --git a/messages/config.md b/messages/config.md deleted file mode 100644 index 27b441f5..00000000 --- a/messages/config.md +++ /dev/null @@ -1,7 +0,0 @@ -# error.invalidBooleanConfigValue - -The config value can only be set to true or false - -# org-metadata-rest-deploy - -Whether deployments use the Metadata REST API (true) or SOAP API (false, default value). diff --git a/src/configMeta.ts b/src/configMeta.ts index 1f2336f8..3303bf36 100644 --- a/src/configMeta.ts +++ b/src/configMeta.ts @@ -5,10 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { ConfigValue, Messages } from '@salesforce/core'; - -Messages.importMessagesDirectory(__dirname); -const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'config'); +import type { ConfigValue } from '@salesforce/core'; export enum ConfigVars { /** @@ -20,11 +17,12 @@ export enum ConfigVars { export default [ { key: ConfigVars.ORG_METADATA_REST_DEPLOY, - description: messages.getMessage(ConfigVars.ORG_METADATA_REST_DEPLOY), + // @salesforce/core's Messages class is not used here because it's an expensive import to be used in an init hook + description: 'Whether deployments use the Metadata REST API (true) or SOAP API (false, default value).', hidden: true, input: { validator: (value: ConfigValue): boolean => typeof value === 'string' && ['true', 'false'].includes(value), - failedMessage: messages.getMessage('error.invalidBooleanConfigValue'), + failedMessage: 'The config value can only be set to true or false', }, }, ];