"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCoreVersion = void 0;
var os_1 = __importDefault(require("os"));
var path_1 = __importDefault(require("path"));
var fs_1 = __importDefault(require("fs"));
var corePath = path_1.default.join(os_1.default.homedir(), '.s', 'cache', 'core');
var corePackagePath = path_1.default.join(corePath, 'package.json');
function getCore() {
    // if (fs.existsSync(corePackagePath)) {
    //   const localCoreVersion = require('@serverless-devs/core/package.json').version;
    //   const cacheCoreVersion = getCoreVersion();
    //   return semver.gt(localCoreVersion, cacheCoreVersion) ? require('@serverless-devs/core') : require(corePath);
    // }
    return require('@xsahxl/core');
}
function getCoreVersion() {
    return fs_1.default.existsSync(corePath) ? require(corePackagePath).version : undefined;
}
exports.getCoreVersion = getCoreVersion;
exports.default = getCore();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jb3JlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLDBDQUFvQjtBQUNwQiw4Q0FBd0I7QUFDeEIsMENBQW9CO0FBRXBCLElBQU0sUUFBUSxHQUFHLGNBQUksQ0FBQyxJQUFJLENBQUMsWUFBRSxDQUFDLE9BQU8sRUFBRSxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsTUFBTSxDQUFDLENBQUM7QUFDaEUsSUFBTSxlQUFlLEdBQUcsY0FBSSxDQUFDLElBQUksQ0FBQyxRQUFRLEVBQUUsY0FBYyxDQUFDLENBQUM7QUFFNUQsU0FBUyxPQUFPO0lBQ2Qsd0NBQXdDO0lBQ3hDLG9GQUFvRjtJQUNwRiwrQ0FBK0M7SUFDL0MsaUhBQWlIO0lBQ2pILElBQUk7SUFDSixPQUFPLE9BQU8sQ0FBQyxjQUFjLENBQUMsQ0FBQztBQUNqQyxDQUFDO0FBRUQsU0FBZ0IsY0FBYztJQUM1QixPQUFPLFlBQUUsQ0FBQyxVQUFVLENBQUMsUUFBUSxDQUFDLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxlQUFlLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQztBQUNoRixDQUFDO0FBRkQsd0NBRUM7QUFFRCxrQkFBZSxPQUFPLEVBQUUsQ0FBQyJ9