"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateJsonLockFile = void 0;
const fs = require("node:fs");
const path = require("node:path");
const config_1 = require("../../config");
const generateJsonLockFile = (generateCommandState, lockFiles = []) => {
    const jsonPath = path.join(process.cwd(), 'cliter', generateCommandState.schema.boundedContextName.toKebabCase());
    if (!fs.existsSync(jsonPath))
        fs.mkdirSync(jsonPath, { recursive: true });
    const jsonLockFile = {
        version: config_1.cliterConfig.lockJsonVersion,
        files: lockFiles,
    };
    fs.writeFileSync(path.join(jsonPath, `${generateCommandState.schema.moduleName}-lock.json`), JSON.stringify(jsonLockFile, null, 4), 'utf8');
};
exports.generateJsonLockFile = generateJsonLockFile;
