"use strict";
/** @format */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var os_1 = __importDefault(require("os"));
var path_1 = __importDefault(require("path"));
var fs_extra_1 = __importDefault(require("fs-extra"));
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_extra_1.default.existsSync(corePackagePath)) {
        return require(corePath);
    }
    return require('@serverless-devs/core');
}
exports.default = getCore;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicy1jb3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3V0aWxzL3MtY29yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsY0FBYzs7Ozs7QUFFZCwwQ0FBb0I7QUFDcEIsOENBQXdCO0FBQ3hCLHNEQUEwQjtBQUUxQixJQUFNLFFBQVEsR0FBRyxjQUFJLENBQUMsSUFBSSxDQUFDLFlBQUUsQ0FBQyxPQUFPLEVBQUUsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE1BQU0sQ0FBQyxDQUFDO0FBQ2hFLElBQU0sZUFBZSxHQUFHLGNBQUksQ0FBQyxJQUFJLENBQUMsUUFBUSxFQUFFLGNBQWMsQ0FBQyxDQUFDO0FBRTVELFNBQVMsT0FBTztJQUNkLElBQUksa0JBQUUsQ0FBQyxVQUFVLENBQUMsZUFBZSxDQUFDLEVBQUU7UUFDbEMsT0FBTyxPQUFPLENBQUMsUUFBUSxDQUFDLENBQUM7S0FDMUI7SUFDRCxPQUFPLE9BQU8sQ0FBQyx1QkFBdUIsQ0FBQyxDQUFDO0FBQzFDLENBQUM7QUFFRCxrQkFBZSxPQUFPLENBQUMifQ==