"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.timestampReadable = exports.airnodeAddressReadable = exports.cloudProviderReadable = exports.printableArguments = exports.longArguments = void 0;
const date_fns_tz_1 = require("date-fns-tz");
const join_1 = __importDefault(require("lodash/join"));
const omitBy_1 = __importDefault(require("lodash/omitBy"));
function longArguments(args) {
    return JSON.stringify((0, omitBy_1.default)(args, (_, arg) => arg === '$0' || arg.length === 1));
}
exports.longArguments = longArguments;
function printableArguments(args) {
    return (0, join_1.default)(args.map((arg) => `--${arg}`), ', ');
}
exports.printableArguments = printableArguments;
function cloudProviderReadable(cloudProvider) {
    return `${cloudProvider.type.toUpperCase()} (${cloudProvider.region})`;
}
exports.cloudProviderReadable = cloudProviderReadable;
function airnodeAddressReadable(airnodeAddress) {
    return `${airnodeAddress.slice(0, 8)}...${airnodeAddress.slice(-6)}`;
}
exports.airnodeAddressReadable = airnodeAddressReadable;
function timestampReadable(timestamp) {
    return (0, date_fns_tz_1.format)(parseInt(timestamp), 'yyyy-MM-dd HH:mm:ss zzz');
}
exports.timestampReadable = timestampReadable;
//# sourceMappingURL=cli.js.map