UNPKG

@tsclean/scaffold

Version:

This CLI creates an initial structure of a project based on clean architecture.

38 lines 3.19 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.MESSAGES = void 0; const chalk_1 = __importDefault(require("chalk")); const emojis_1 = require("./emojis"); exports.MESSAGES = { PROJECT_SUCCESS: (basePath) => chalk_1.default.green("Project created inside " + chalk_1.default.blue(basePath) + " directory."), PROJECT_EXISTS: (basePath) => `Project ${chalk_1.default.blue(basePath)} already exists`, FILE_SUCCESS: (type, path) => chalk_1.default.green(`${type} ${chalk_1.default.blue(path)} has been created successfully`), REPOSITORY_SUCCESS: (pathRepository) => " " + emojis_1.EMOJIS.ROCKET + " " + chalk_1.default.green(`Repository ${chalk_1.default.blue(pathRepository)} has been created successfully.\n`), PROVIDER_SUCCESS: (pathAdapter) => " " + emojis_1.EMOJIS.ROCKET + " " + chalk_1.default.green(`Provider ${chalk_1.default.blue(pathAdapter)} has been created successfully.\n`), UPDATE_FILE_SUCCESS: (base) => emojis_1.EMOJIS.ROCKET + " " + chalk_1.default.blue(`File ${chalk_1.default.green(base + "/src/application/server.ts")} has been updated successfully.`), FILE_EXISTS: (path) => `${emojis_1.EMOJIS.NO_ENTRY} File ${chalk_1.default.blue(path)} already exists`, CONFIG_ENV: () => `${chalk_1.default.green(`Continue setting the environment variables in the ${chalk_1.default.blue(".env")} file`)}`, ERROR_HANDLER: (message) => `${chalk_1.default.black.bgRedBright(message)}`, ERROR_MODEL: (name) => `${emojis_1.EMOJIS.NO_ENTRY} First you must create the entity ${chalk_1.default.red(name)} in order to be imported into the file.`, ERROR_MANAGER: (manager, args) => `${emojis_1.EMOJIS.NO_ENTRY} The manager ${chalk_1.default.red(manager)} can not be implemented because it already has the implementation of ${chalk_1.default.blue(args)}`, ERROR_INTERFACE: (path) => `${emojis_1.EMOJIS.NO_ENTRY} Path ${chalk_1.default.blue(path)} does not correspond to models, service the infra.`, ERROR_ORM: (orm) => `${emojis_1.EMOJIS.NO_ENTRY} ORM ${chalk_1.default.blue(orm)} does not correspond to mongoose the sequelize.`, ERROR_DATABASE: (manager) => `${emojis_1.EMOJIS.NO_ENTRY} Database manager ${chalk_1.default.blue(manager)} does not correspond to mysql the postgres.`, MESSAGE_ERROR_HANDLER: `${chalk_1.default.white("The interface to connect the domain layer with the infrastructure layer has not been created.")}`, ERROR_UPDATE_INDEX: (filePath) => `${emojis_1.EMOJIS.NO_ENTRY} SingletonInitializers array not found in ${chalk_1.default.red(filePath)} this configuration must exist in order to create the Adapter. \n Example: export const singletonInitializers: Array<() => Promise<void>> = []; \n if it does not exist, please include it in the file ${chalk_1.default.blue(filePath)}`, UPDATE_INDEX_SUCCESSFULLY: (filePath) => `${chalk_1.default.green(`The file ${chalk_1.default.blue(`${filePath}`)} was updated correctly`)}` }; //# sourceMappingURL=messages.js.map