"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadJsonLockFile = void 0;
const fs = require("node:fs");
const path = require("node:path");
const loadJsonLockFile = (boundedContextName, moduleName) => {
    const jsonPath = path.join(process.cwd(), 'cliter', boundedContextName.toKebabCase(), moduleName.toKebabCase() + '-lock.json');
    if (!fs.existsSync(jsonPath))
        return [];
    const lockFiles = (JSON.parse(fs.readFileSync(jsonPath, 'utf8')).files);
    // if windows, replace \\ with /
    if (path.sep === '\\') {
        for (const lockFile of lockFiles) {
            lockFile.path = lockFile.path.replace(/\//g, '\\');
        }
    }
    return lockFiles;
};
exports.loadJsonLockFile = loadJsonLockFile;
