@salesforce/plugin-settings
Version:
configure the Salesforce CLI
35 lines • 1.59 kB
JavaScript
/*
* Copyright 2025, Salesforce, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { ConfigAggregator, Messages } from '@salesforce/core';
import { loglevel, SfCommand, Ux } from '@salesforce/sf-plugins-core';
import { buildSuccessMsg, output } from '../../config.js';
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
const messages = Messages.loadMessages('@salesforce/plugin-settings', 'config.list');
export default class List extends SfCommand {
static description = messages.getMessage('description');
static summary = messages.getMessage('summary');
static examples = messages.getMessages('examples');
static aliases = ['force:config:list'];
static deprecateAliases = true;
static flags = { loglevel };
async run() {
const aggregator = await ConfigAggregator.create();
const responses = aggregator.getConfigInfo().map((c) => buildSuccessMsg(c));
output(new Ux({ jsonEnabled: this.jsonEnabled() }), responses, 'list', true);
return responses;
}
}
//# sourceMappingURL=list.js.map