"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const graphSequencer = require("graph-sequencer");
const pkgs_graph_1 = require("pkgs-graph");
exports.default = (pkgs) => {
    const pkgGraphResult = pkgs_graph_1.default(pkgs);
    const graph = new Map(Object.keys(pkgGraphResult.graph).map((pkgPath) => [pkgPath, pkgGraphResult.graph[pkgPath].dependencies]));
    const graphSequencerResult = graphSequencer({
        graph,
        groups: [Object.keys(pkgGraphResult.graph)],
    });
    return {
        chunks: graphSequencerResult.chunks,
        graph: pkgGraphResult.graph,
    };
};
//# sourceMappingURL=dividePackagesToChunks.js.map