"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
const path_1 = tslib_1.__importDefault(require("path"));
const constants_1 = require("../constants");
exports.assetsTablePath = path_1.default.join(process.env.TUTURE_PATH || process.cwd(), constants_1.TUTURE_ROOT, constants_1.ASSETS_JSON_PATH);
/**
 * Load assets from tuture-assets.json.
 * If not present, return an empty array.
 */
function loadAssetsTable() {
    if (fs_extra_1.default.existsSync(exports.assetsTablePath)) {
        return JSON.parse(fs_extra_1.default.readFileSync(exports.assetsTablePath).toString());
    }
    return [];
}
exports.loadAssetsTable = loadAssetsTable;
