import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-NFXHUITK.js';
import './chunk-GQTSTRG7.js';
import './chunk-YFS5KLHD.js';
import { init_esm_shims } from './chunk-MU732G7I.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-5XVYKNMT.js.map
//# sourceMappingURL=versionGetCommand-5XVYKNMT.js.map