prisma-json-types-generator
Version:
Changes JsonValues to your custom typescript type
29 lines • 1.36 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.onManifest = onManifest;
const tslib_1 = require("tslib");
const node_util_1 = require("node:util");
const satisfies_1 = tslib_1.__importDefault(require("semver/functions/satisfies"));
/** Generates simple metadata for this generator. */
function onManifest() {
let version;
try {
const pkg = require('../package.json');
version = pkg.version;
const prismaPeerVersion = pkg.peerDependencies?.prisma;
const prismaVersion = require('prisma/package.json').version;
if (!(0, satisfies_1.default)(prismaVersion, prismaPeerVersion)) {
console.log((0, node_util_1.styleText)('red', `\n\nPrisma Json Types Generator@${version} relies on Prisma ${prismaPeerVersion} and was not tested with your Prisma@${prismaVersion} installation.
The generated output might not work correctly or even completely break Prisma Client types.\n`));
}
}
catch { }
return {
version,
// TODO: We should change this to the real output of the generator in some way. But we cannot get its real output here
// because we need to await the prisma client to be generated first.
defaultOutput: './',
prettyName: 'Prisma Json Types Generator'
};
}
//# sourceMappingURL=on-manifest.js.map
;