@capaj/prisma-typegraphql-types-generator
Version:
Prisma generator for generating TypeGraphQL class types and enums, It works like a copilot where the generated output is very human readable and can be edited
35 lines • 1.19 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.logger = void 0;
const chalk_1 = __importDefault(require("chalk"));
const tags = {
error: chalk_1.default.red('prisma:error'),
warn: chalk_1.default.yellow('prisma:warn'),
info: chalk_1.default.cyan('prisma:info'),
query: chalk_1.default.blue('prisma:query'),
};
const should = {
warn: !process.env.PRISMA_DISABLE_WARNINGS,
};
function log(...data) {
console.log(...data);
}
function warn(message, ...optionalParams) {
if (should.warn) {
console.warn(`${tags.warn} ${message}`, ...optionalParams);
}
}
function info(message, ...optionalParams) {
console.info(`${tags.info} ${message}`, ...optionalParams);
}
function error(message, ...optionalParams) {
console.error(`${tags.error} ${message}`, ...optionalParams);
}
function query(message, ...optionalParams) {
console.log(`${tags.query} ${message}`, ...optionalParams);
}
exports.logger = { query, error, info, warn, log };
//# sourceMappingURL=logger.js.map