@constructor-io/constructorio-connect-cli
Version:
CLI tool to enable users to interface with the Constructor Connect Ecosystem
18 lines (17 loc) • 1.06 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const trigger_catalog_sync_1 = require("../http/trigger-catalog-sync");
const select_connections_1 = require("../prompt-data/select-connections");
const render_tip_1 = require("../rendering/render-tip");
const refresh_connections_1 = require("./refresh-connections");
class TriggerCatalogSync extends refresh_connections_1.RefreshConnectionsCommand {
static args = {};
static description = "Triggers a catalog sync for selected connection. \n\nThe script will use the `CONNECT_AUTH_TOKEN` environment variable to authenticate with Constructor.";
static examples = ["$ <%= config.bin %>"];
async runCommand() {
const connection = await (0, select_connections_1.selectConnections)("Choose the connection to a trigger catalog sync");
await (0, trigger_catalog_sync_1.triggerCatalogSync)({ connectionId: connection.id });
(0, render_tip_1.renderTip)(["🚀 Catalog sync triggered successfully!"]);
}
}
exports.default = TriggerCatalogSync;