import { taonPackageName } from 'tnp-core/lib';
import { fse, path } from 'tnp-core/lib';
import { Helpers, HelpersTaon } from 'tnp-helpers/lib';
import { Project } from '../abstract/project'; // TODO QUICK FIX for version
import { BaseCli } from './base-cli';
// @ts-ignore TODO weird inheritance problem
export class $Version extends BaseCli {
    //#region _
    async _() {
        const tnpProj = Project.ins.Tnp;
        const taonProj = Project.ins.From([
            fse.realpathSync(path.dirname(tnpProj.location)),
            taonPackageName,
        ]);
        Helpers.success(`

  Taon: ${taonProj?.packageJson.version ? `v${taonProj.packageJson.version}` : '-'}
  Tnp: ${tnpProj?.packageJson.version ? `v${tnpProj.packageJson.version}` : '-'}

    `);
        this._exit();
    }
    //#endregion
    async path() {
        console.log(`

    next path
    ${this.project.packageJson.resolvePossibleNewVersion('patch')}

    `);
        this._exit();
    }
}
export default {
    $Version: HelpersTaon.CLIWRAP($Version, '$Version'),
};
//# sourceMappingURL=cli-VERSION.js.map