UNPKG

prisma-zod-generator

Version:

Prisma 2+ generator to emit Zod schemas from your Prisma schema

1 lines 4.81 kB
'use strict';(function(_0x169154,_0x1ce89e){function _0x417409(_0x4dc9a6,_0x3dcc97,_0x56b1b3,_0x2a4829){return pzg_0x56b4(_0x56b1b3- -0x38,_0x3dcc97);}const _0x2304c3=_0x169154();function _0x5eef31(_0xc48213,_0x2efc85,_0x3acba0,_0x3d035c){return pzg_0x56b4(_0x3d035c- -0x263,_0x3acba0);}while(!![]){try{const _0x2336b3=-parseInt(_0x417409(0xf4,0xf7,0xed,0xef))/(0x88b+-0xe63+0x5d9)*(-parseInt(_0x5eef31(-0x14d,-0x13c,-0x142,-0x142))/(-0x13+-0x174b+0x176*0x10))+-parseInt(_0x5eef31(-0x136,-0x135,-0x13a,-0x13b))/(0x26f2+-0x7f*0x49+-0x2b8)+-parseInt(_0x5eef31(-0x13b,-0x13b,-0x13a,-0x137))/(0x5*0xb+-0xe41*0x2+-0x1*-0x1c4f)*(-parseInt(_0x417409(0xfc,0xfc,0xf2,0xef))/(-0xa*-0x106+-0x25ec+0x1bb5))+parseInt(_0x417409(0xea,0xde,0xe7,0xe6))/(-0x214f+0x23*-0xf6+0x229*0x1f)+-parseInt(_0x5eef31(-0x140,-0x147,-0x136,-0x13c))/(-0xb63+-0x1*-0xf59+-0x3ef)*(-parseInt(_0x5eef31(-0x12c,-0x135,-0x139,-0x135))/(-0x1203+-0x1953+-0xd*-0x356))+-parseInt(_0x417409(0x100,0xfc,0xf8,0x103))/(-0x996+-0x1fa*-0x7+-0x437)+-parseInt(_0x417409(0xfc,0xf4,0xf3,0xeb))/(0x1*0x21b5+0x18be+-0x3a69)*(parseInt(_0x417409(0xf5,0xeb,0xea,0xf5))/(0x1e7*0x7+-0x2201+-0x57*-0x3d));if(_0x2336b3===_0x1ce89e)break;else _0x2304c3['push'](_0x2304c3['shift']());}catch(_0x7959a3){_0x2304c3['push'](_0x2304c3['shift']());}}}(pzg_0x2bf1,0x4a3b7+0x9938f*0x1+0x20a4*0x5));function pzg_0x12e6f3(_0x153a7f,_0x19730d,_0x36a0bd,_0x547ddd){return pzg_0x56b4(_0x153a7f-0xb5,_0x547ddd);}function pzg_0x2bf1(){const _0x126a8d=['DMfSDwu','mtmWmJe1mJrst2neveu','zw5LCMf0B3jdBW','zxj0Eq','ug9ZDgDYzxnsta','ndqZmZeXmMvWBNvgBW','u0DLBMvYyxrVCG','otrAq1PLzem','mtfUrLnZt0K','z2vUzxjHDgu','BNrLEhq','mZiWotLWuLHxDKO','CM9Tre1nrG','mty2ntuZogPWyLPdCa','mZC2nteZnuvHve5oDa','zgvMAw5LuhjVCa','nJi0ntq2nxHcsLnNuq','ntm1mdG1mgLWA3jTEq','ngPqugf1DG','x19LC01VzhvSzq','mJrWtKnVzMK'];pzg_0x2bf1=function(){return _0x126a8d;};return pzg_0x2bf1();}function pzg_0x56b4(_0x1cea21,_0x2ff259){const _0x5e8327=pzg_0x2bf1();return pzg_0x56b4=function(_0x343283,_0x1cf6aa){_0x343283=_0x343283-(0x17ca+0x212d*0x1+-0x37db);let _0x1bd9ee=_0x5e8327[_0x343283];if(pzg_0x56b4['GESgdv']===undefined){var _0x488ecf=function(_0x1048cc){const _0x4fcc46='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49d9a2='',_0x3c9fc2='';for(let _0x36a991=0xfc9+0x2e1+0x2*-0x955,_0x5423a1,_0x3846f6,_0x1043d0=-0x31*-0x98+-0x31*0x17+-0x18b1;_0x3846f6=_0x1048cc['charAt'](_0x1043d0++);~_0x3846f6&&(_0x5423a1=_0x36a991%(0x1ce9+0x1728+0x215*-0x19)?_0x5423a1*(0x1*-0x21eb+-0x7*0x377+0x1d36*0x2)+_0x3846f6:_0x3846f6,_0x36a991++%(-0x2122+0xe2f*0x1+-0x3cb*-0x5))?_0x49d9a2+=String['fromCharCode'](-0x644*-0x4+-0x73*-0x21+-0x26e4&_0x5423a1>>(-(0x8b1+-0x57*0x13+-0x23a)*_0x36a991&0x12eb+0x255b*-0x1+-0x2*-0x93b)):0xda5*0x1+0x2664+-0x3409){_0x3846f6=_0x4fcc46['indexOf'](_0x3846f6);}for(let _0x1bc0cb=0x35a+0x32*0x21+-0xb*0xe4,_0x137358=_0x49d9a2['length'];_0x1bc0cb<_0x137358;_0x1bc0cb++){_0x3c9fc2+='%'+('00'+_0x49d9a2['charCodeAt'](_0x1bc0cb)['toString'](-0x183a*0x1+0x16f5+0x155))['slice'](-(0x15a*-0x3+0x1ef+-0x221*-0x1));}return decodeURIComponent(_0x3c9fc2);};pzg_0x56b4['bDrfny']=_0x488ecf,_0x1cea21=arguments,pzg_0x56b4['GESgdv']=!![];}const _0x33be94=_0x5e8327[-0x1029+-0xd*0x175+0x231a],_0x1b470f=_0x343283+_0x33be94,_0xa490c9=_0x1cea21[_0x1b470f];return!_0xa490c9?(_0x1bd9ee=pzg_0x56b4['bDrfny'](_0x1bd9ee),_0x1cea21[_0x1b470f]=_0x1bd9ee):_0x1bd9ee=_0xa490c9,_0x1bd9ee;},pzg_0x56b4(_0x1cea21,_0x2ff259);}const pzg_0x4bf343={};pzg_0x4bf343[pzg_0x12e6f3(0x1e4,0x1eb,0x1dc,0x1e4)]=!![],Object[pzg_0x12e6f3(0x1de,0x1d5,0x1e9,0x1df)+pzg_0x12e6f3(0x1d2,0x1d5,0x1d3,0x1cb)](exports,pzg_0x12e6f3(0x1e2,0x1eb,0x1eb,0x1e9),pzg_0x4bf343),exports['generatePo'+'stgresRLSF'+pzg_0x5607f6(0x3ba,0x3b3,0x3aa,0x3b8)]=generatePostgresRLSFromDMMF;const ProGeneratorContext_1=require('../../core/ProGeneratorContext');function pzg_0x5607f6(_0x28d2ac,_0x40687d,_0x384d4d,_0x1b099b){return pzg_0x56b4(_0x40687d-0x28d,_0x28d2ac);}const PostgresRLSGenerator_1=require('./PostgresRLSGenerator');async function generatePostgresRLSFromDMMF(_0x3fa56a,_0x3b5439,_0x35b1da,_0x1eac9c,_0x3a1312,_0x53aa29,_0x73fbf7={},_0x410001){function _0x2c6428(_0x584933,_0x42c5f4,_0x24b11c,_0x53d2a6){return pzg_0x5607f6(_0x24b11c,_0x42c5f4- -0x2ef,_0x24b11c-0x66,_0x53d2a6-0x15f);}const _0x11a7d3=(0x12f*-0x1a+-0x70a+0x25d0,ProGeneratorContext_1['createProG'+_0x2c6428(0xc2,0xba,0xb3,0xb6)+_0x2c6428(0xbb,0xc2,0xcd,0xc8)])(_0x3fa56a,_0x3b5439,_0x35b1da,_0x1eac9c,_0x3a1312,_0x53aa29,_0x410001);function _0x4529ea(_0xbf309f,_0x413c2c,_0x3b04bd,_0xe125ce){return pzg_0x5607f6(_0xbf309f,_0xe125ce- -0x542,_0x3b04bd-0xf9,_0xe125ce-0x1d);}const _0x51d744=new PostgresRLSGenerator_1[(_0x2c6428(0xc7,0xbc,0xc5,0xbf))+(_0x4529ea(-0x19e,-0x196,-0x18e,-0x195))](_0x11a7d3,_0x73fbf7);await _0x51d744[_0x2c6428(0xc8,0xc1,0xbd,0xc9)]();}