import { loadToken, createInternalClientContext, third_party_applications_exports } from './chunk-PQ6FNECV.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/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-75SYHE2J.js.map
//# sourceMappingURL=versionSetCommand-75SYHE2J.js.map