prisma-generator-fake-data
Version:
The easiest way to generate mock data based on your Prisma models!
14 lines • 890 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractClientPath = void 0;
function extractClientPath(options) {
var _a, _b;
const clientPath = (_b = (_a = options.otherGenerators.find((g) => { var _a; return ((_a = g === null || g === void 0 ? void 0 : g.provider) === null || _a === void 0 ? void 0 : _a.value) === 'prisma-client-js'; })) === null || _a === void 0 ? void 0 : _a.output) === null || _b === void 0 ? void 0 : _b.value;
if ((clientPath === null || clientPath === void 0 ? void 0 : clientPath.includes('node_modules/@prisma/client')) ||
(clientPath === null || clientPath === void 0 ? void 0 : clientPath.includes('node_modules\\@prisma\\client'))) {
return '@prisma/client';
}
return clientPath || undefined;
}
exports.extractClientPath = extractClientPath;
//# sourceMappingURL=generatorUtils.js.map