import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-WYC3GIR7.js';
import './chunk-PBYE7BDH.js';
import './chunk-N67QHFFS.js';
import { init_esm_shims } from './chunk-H26U4HNL.js';
import { consola } from 'consola';

// src/commands/site/version/get/versionGetCommand.mts
init_esm_shims();
async function versionGetCommand({
  foundryUrl,
  application,
  token,
  tokenFile
}) {
  const loadedToken = await loadToken(token, tokenFile);
  const tokenProvider = () => loadedToken;
  const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
  consola.start("Getting live version");
  const website = await third_party_applications_exports.getWebsite(clientCtx, application);
  const deployedVersion = website?.deployedVersion;
  if (!deployedVersion) {
    consola.info("No live site version set");
  } else {
    consola.success(`Live site version is ${deployedVersion}`);
  }
}

export { versionGetCommand as default };
//# sourceMappingURL=versionGetCommand-QUT6D6I5.js.map
//# sourceMappingURL=versionGetCommand-QUT6D6I5.js.map