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/set/versionSetCommand.mts
init_esm_shims();
async function versionSetCommand({
  version,
  application,
  foundryUrl,
  token,
  tokenFile
}) {
  consola.start(`Setting live version`);
  const loadedToken = await loadToken(token, tokenFile);
  const tokenProvider = () => loadedToken;
  const clientCtx = createInternalClientContext(foundryUrl, tokenProvider);
  if (version) {
    await third_party_applications_exports.deployWebsite(clientCtx, application, {
      version
    });
  }
  consola.success(`Set live version to ${version}`);
}

export { versionSetCommand as default };
//# sourceMappingURL=versionSetCommand-YESYTFUN.js.map
//# sourceMappingURL=versionSetCommand-YESYTFUN.js.map