"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const supi_1 = require("supi");
const createStoreController_1 = require("../createStoreController");
async function default_1(args, opts, command) {
    const store = await createStoreController_1.default(opts);
    const rebuildOpts = Object.assign(opts, {
        store: store.path,
        storeController: store.ctrl,
    });
    if (args.length === 0) {
        await supi_1.rebuild([{ buildIndex: 0, prefix: rebuildOpts.prefix }], rebuildOpts);
    }
    await supi_1.rebuildPkgs([{ prefix: rebuildOpts.prefix }], args, rebuildOpts);
}
exports.default = default_1;
//# sourceMappingURL=rebuild.js.map