import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-3YWCQTFR.js';
import './chunk-SGKKZASK.js';
import './chunk-Y45LX2LV.js';
import { init_esm_shims } from './chunk-LC652GLE.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-UAKMJNFL.js.map
//# sourceMappingURL=versionGetCommand-UAKMJNFL.js.map