How to use the @salesforce/command.core function in @salesforce/command

To help you get started, we’ve selected a few @salesforce/command examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github afawcett / dependencies-cli / src / commands / dependency / component / report.js View on Github external
_.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
var command_1 = require("@salesforce/command");
var process = require("child_process");
var clusterPackager_1 = require("../../../lib/clusterPackager");
var dependencyGraph_1 = require("../../../lib/dependencyGraph");
var fileWriter_1 = require("../../../lib/fileWriter");
var PackageMerger_1 = require("../../../lib/PackageMerger");
command_1.core.Messages.importMessagesDirectory(__dirname);
var messages = command_1.core.Messages.loadMessages('dependencies-cli', 'depends');
var Report = /** @class */ (function (_super) {
    __extends(Report, _super);
    function Report() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Report.prototype.run = function () {
        return __awaiter(this, void 0, void 0, function () {
            var conn, deps, records, excludeMap, nodes, allRecords, xmlTempString;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        conn = this.org.getConnection();
                        conn.version = '43.0';
                        deps = new dependencyGraph_1.DependencyGraph(conn.tooling, conn);
                        return [4 /*yield*/, deps.init()];
                    case 1:
github afawcett / dependencies-cli / src / commands / dependency / component / report.js View on Github external
if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
exports.__esModule = true;
var command_1 = require("@salesforce/command");
var process = require("child_process");
var clusterPackager_1 = require("../../../lib/clusterPackager");
var dependencyGraph_1 = require("../../../lib/dependencyGraph");
var fileWriter_1 = require("../../../lib/fileWriter");
var PackageMerger_1 = require("../../../lib/PackageMerger");
command_1.core.Messages.importMessagesDirectory(__dirname);
var messages = command_1.core.Messages.loadMessages('dependencies-cli', 'depends');
var Report = /** @class */ (function (_super) {
    __extends(Report, _super);
    function Report() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Report.prototype.run = function () {
        return __awaiter(this, void 0, void 0, function () {
            var conn, deps, records, excludeMap, nodes, allRecords, xmlTempString;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        conn = this.org.getConnection();
                        conn.version = '43.0';
                        deps = new dependencyGraph_1.DependencyGraph(conn.tooling, conn);
                        return [4 /*yield*/, deps.init()];