UNPKG

@constructor-io/constructorio-connect-cli

Version:

CLI tool to enable users to interface with the Constructor Connect Ecosystem

21 lines (19 loc) 1.08 kB
"use strict"; 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_command_1 = require("./refresh-connections-command"); class TriggerCatalogSync extends refresh_connections_command_1.RefreshConnectionsCommand { static args = {}; static description = ` Triggers a catalog sync for selected connection. The 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;