UNPKG

ruch

Version:

Revolutionary React TypeScript CLI with hexagonal architecture & AI-powered development assistance. Create maintainable, scalable applications with domain-driven design and integrated AI tooling.

26 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.deleteDomain = void 0; const file_operations_1 = require("../utils/file-operations"); const logger_1 = require("../utils/logger"); const logging_1 = require("../utils/logging"); const paths_1 = require("../utils/paths"); const deleteDomain = async (domainName, force = false, fileSystem = require('fs-extra'), log = logger_1.logger) => { const domainPath = (0, paths_1.buildDomainDirectoryPath)(domainName); try { // Check if domain exists const domainExists = await (0, file_operations_1.validateFileExists)(fileSystem, domainPath); if (!domainExists) { (0, logging_1.logDomainNotFound)(log, domainName, domainPath); return; } // Delete domain directory await (0, file_operations_1.removeFile)(fileSystem, domainPath); (0, logging_1.logSuccess)(log, `Domain "${domainName}" deleted successfully!`); } catch (error) { (0, logging_1.logError)(log, `Error deleting domain "${domainName}": ${error instanceof Error ? error.message : 'Unknown error'}`); } }; exports.deleteDomain = deleteDomain; //# sourceMappingURL=delete.js.map