UNPKG

prisma-zod-generator

Version:

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

1 lines 12.2 kB
'use strict';(function(_0xf839ef,_0x151af2){function _0x57e96d(_0x30ee85,_0x34732f,_0x31f110,_0x47bc7f){return pzg_0x3e06(_0x47bc7f- -0x197,_0x34732f);}const _0xc59f19=_0xf839ef();function _0x3340c7(_0x4c0968,_0x288887,_0x174575,_0x1ab349){return pzg_0x3e06(_0x174575- -0x226,_0x1ab349);}while(!![]){try{const _0x52da36=-parseInt(_0x3340c7(-0xa6,-0xc5,-0xba,-0xc2))/(0x1c7f+-0xed5+-0xd*0x10d)*(parseInt(_0x57e96d(-0x1c,-0x57,-0x35,-0x43))/(0x2342+0x122b*0x1+-0x356b))+parseInt(_0x3340c7(-0xcc,-0xef,-0xce,-0xe7))/(0x1740+0x4e4+-0x1c21)*(-parseInt(_0x57e96d(0x6,0x28,-0x21,0x4))/(0xb*-0x143+0x2e*-0x2b+0x7b*0x2d))+-parseInt(_0x3340c7(-0xb4,-0xad,-0xbf,-0xa8))/(-0x1490+0x13eb+0xaa)*(-parseInt(_0x3340c7(-0xf1,-0xd5,-0xd1,-0xcf))/(-0x1121*-0x1+0x63a+0x1*-0x1755))+parseInt(_0x3340c7(-0xda,-0xcd,-0xcb,-0xc7))/(-0x2b1+0x1d6d+-0x1ab5)+parseInt(_0x57e96d(-0x1f,-0x5d,-0x29,-0x37))/(0x1d82+-0x1a13+-0x367)+-parseInt(_0x3340c7(-0xda,-0xee,-0xca,-0xa8))/(-0x1*-0x1f0f+-0x1d9b+-0x16b)+parseInt(_0x3340c7(-0xd2,-0xb7,-0xb5,-0x92))/(-0x2*-0xc6d+0x3a5*-0x9+0x1*0x7fd);if(_0x52da36===_0x151af2)break;else _0xc59f19['push'](_0xc59f19['shift']());}catch(_0x3f0d54){_0xc59f19['push'](_0xc59f19['shift']());}}}(pzg_0x5aa5,-0xf*0x23f9+-0x1a9e2+-0x5*-0x12616));function pzg_0x220600(_0x148425,_0x37281b,_0x196c46,_0x5cb638){return pzg_0x3e06(_0x5cb638- -0x172,_0x37281b);}const pzg_0x2cecec={};function pzg_0x3e06(_0x442332,_0x3e5979){const _0x4d7e79=pzg_0x5aa5();return pzg_0x3e06=function(_0x8175e1,_0x1f3252){_0x8175e1=_0x8175e1-(0xb*0x121+-0x21a2+0x168a);let _0x433719=_0x4d7e79[_0x8175e1];if(pzg_0x3e06['fSsPUJ']===undefined){var _0x3f2413=function(_0x5e506b){const _0x330875='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x164f74='',_0x2cffed='';for(let _0x2552f1=-0x497+-0xaf+0xe1*0x6,_0x39d98a,_0x385287,_0x4cfb25=0x1580+0xc81+-0x2201;_0x385287=_0x5e506b['charAt'](_0x4cfb25++);~_0x385287&&(_0x39d98a=_0x2552f1%(-0xcaf+0x809+-0x2*-0x255)?_0x39d98a*(0xef0*0x2+0x9*-0x3cb+0x483)+_0x385287:_0x385287,_0x2552f1++%(-0x681+0x178f*-0x1+-0x8c*-0x37))?_0x164f74+=String['fromCharCode'](-0x1*-0xe73+0x19*0x174+-0x31c8*0x1&_0x39d98a>>(-(0x418*0x8+0x1*-0x122b+0x29*-0x5b)*_0x2552f1&0x4*-0x97+0x1*-0x20f5+-0x1*-0x2357)):-0x8ef+0x422+-0x1*-0x4cd){_0x385287=_0x330875['indexOf'](_0x385287);}for(let _0x433a8a=-0x9d1+-0xe5*0x25+0x2aea,_0x131f97=_0x164f74['length'];_0x433a8a<_0x131f97;_0x433a8a++){_0x2cffed+='%'+('00'+_0x164f74['charCodeAt'](_0x433a8a)['toString'](0x1a2*-0xf+0x247f+-0xbf1))['slice'](-(0x58c+-0x62f+0xa5));}return decodeURIComponent(_0x2cffed);};pzg_0x3e06['bUnNWc']=_0x3f2413,_0x442332=arguments,pzg_0x3e06['fSsPUJ']=!![];}const _0x1451ef=_0x4d7e79[0x24c7+0x2061+-0x4528],_0x21f8f8=_0x8175e1+_0x1451ef,_0x127e83=_0x442332[_0x21f8f8];return!_0x127e83?(_0x433719=pzg_0x3e06['bUnNWc'](_0x433719),_0x442332[_0x21f8f8]=_0x433719):_0x433719=_0x127e83,_0x433719;},pzg_0x3e06(_0x442332,_0x3e5979);}pzg_0x2cecec[pzg_0x220600(0xe,0x28,0x21,0x16)]=!![],Object[pzg_0x220600(0x1f,0x44,0x2d,0x22)+'erty'](exports,pzg_0x6c6546(0x363,0x372,0x380,0x38f),pzg_0x2cecec);function pzg_0x6c6546(_0x5d6fd3,_0x2cf70b,_0x3ec52f,_0x32a032){return pzg_0x3e06(_0x2cf70b-0x1e0,_0x5d6fd3);}function pzg_0x5aa5(){const _0x47370d=['t2XZq0G','mNftvxHVzG','nJG4otjSsgr6tKm','zgvSsw50zxjMyq','se1HvM4','mtq2nJK3t3HHA2nt','DhjPBq','z2vUzxjHDgvnBW','mte4ntyZmLPwsxrdua','mtm3odGWwgDKsvvx','zMLSDgvY','Dw5ZDxbWB3j0zq','zw51Bq','oduWnZi4DK1Kzu1y','z2v0rMLLBgruEq','zM9YrwfJAa','Aw9U','BgLZDa','C3rYAw5N','qM9VBgvHBG','ntv6CKjiEMe','zMLLBgrZ','C3rYAw5NihWGBG','ChjPBwfYEuTLEq','sw50','mJi0ndK1BuDOr0Xi','BNn0CMfPBNrZ','BwfW','Axnszxf1AxjLza','AM9PBG','mJeXntyWmfDuv2H4uq','zxjMywnLia','BhrjC2e','C2nHBgfY','z2v0uhjPBwfYEq','zg9JDw1LBNrHDa','A2LUza','B3b0Aw9UywW','zxHWB3j0igLUDa','B0zsCNq','sNnVBG','re1nrKHLBhbLCG','zgvMyxvSDa','rgvJAw1HBa','BMfTzq','CMvXDwLYzwq','ChjLy2LZAw9U','Bwf0y2G','s2v5rMLLBgrZ','Dw5RBM93BG','yM9VBgvHBG','CgfYC2veyKnVBG','C3rYywLUDhm','DMfSDwu','vLzdqKG','BNvTyMvY','CMvWBgfJzq','z2v0u2nHBgfYva','DhLWzq','ihWGBNvSBa','Axnjza','u3rYAw5N','qLf3twC','x19LC01VzhvSzq','s05bv3K','zgvMAw5LuhjVCa','qgrIlLrLEhq','qNL0zxm','qMLrBxm','ChvZAa','vMfSDwu','CgvtDhjPBMC','mJbwsfLnEfC','zgvMyxvSDfzHBa','Dw1Izxi','Bwf4tgvUz3rO','AgfZrgvMyxvSDa','ExbLu3rYAw5N','AxnmAxn0'];pzg_0x5aa5=function(){return _0x47370d;};return pzg_0x5aa5();}exports[pzg_0x6c6546(0x33b,0x35c,0x34a,0x359)+'s']=void(0xe86+0x3*0x4f7+-0x1d6b*0x1);class DMMFHelpers{constructor(_0x2b6fdc){this['context']=_0x2b6fdc;}['getFieldCo'+pzg_0x6c6546(0x359,0x34d,0x330,0x374)](_0x1b2aee){function _0x37f0d0(_0x5925b4,_0x11e95e,_0x1869ef,_0x32a606){return pzg_0x6c6546(_0x5925b4,_0x11e95e- -0x576,_0x1869ef-0xc1,_0x32a606-0x12b);}const _0x1ce751={};_0x1ce751[_0x5a6a1f(0x34e,0x352,0x327,0x332)]=_0x1b2aee[_0x37f0d0(-0x217,-0x227,-0x241,-0x213)]&&!_0x1b2aee['hasDefault'+_0x5a6a1f(0x354,0x366,0x33c,0x34b)],_0x1ce751['unique']=_0x1b2aee['isUnique'];function _0x5a6a1f(_0x1af835,_0x46229d,_0x42f309,_0x1dc810){return pzg_0x6c6546(_0x1af835,_0x1dc810- -0x2e,_0x42f309-0x136,_0x1dc810-0x91);}_0x1ce751[_0x5a6a1f(0x304,0x318,0x308,0x316)]=_0x1b2aee[_0x37f0d0(-0x1f2,-0x1f5,-0x1ea,-0x200)],_0x1ce751[_0x37f0d0(-0x217,-0x21e,-0x203,-0x20d)]=!_0x1b2aee['isRequired'],_0x1ce751[_0x5a6a1f(0x341,0x366,0x368,0x351)]=_0x1b2aee[_0x5a6a1f(0x34b,0x32d,0x34f,0x351)+'Value'],_0x1ce751[_0x37f0d0(-0x1d3,-0x1fa,-0x210,-0x220)+'ue']=_0x1b2aee[_0x37f0d0(-0x224,-0x219,-0x1fb,-0x219)];const _0x39b9df=_0x1ce751;if(_0x1b2aee[_0x37f0d0(-0x215,-0x220,-0x22b,-0x221)+_0x5a6a1f(0x2f4,0x2f9,0x2f2,0x315)]){const _0x36fcd5=this[_0x37f0d0(-0x206,-0x210,-0x20c,-0x236)+_0x5a6a1f(0x311,0x32e,0x320,0x339)](_0x1b2aee['documentat'+_0x5a6a1f(0x33c,0x2fb,0x325,0x315)]);Object['assign'](_0x39b9df,_0x36fcd5);}return _0x39b9df;}[pzg_0x6c6546(0x37a,0x366,0x377,0x354)+pzg_0x6c6546(0x384,0x367,0x37a,0x368)](_0x3039e1){const _0x5d25c8={'HMaVn':function(_0x5abe7e,_0x1c815b,_0x45861f){return _0x5abe7e(_0x1c815b,_0x45861f);},'KNAWy':function(_0x5ce437,_0x278f91,_0x4f7a23){return _0x5ce437(_0x278f91,_0x4f7a23);}},_0x17051c={},_0x4690d5=_0x3039e1[_0x20f67e(0x322,0x340,0x319,0x33b)](/@db\.VarChar\((\d+)\)/);function _0x20f67e(_0x4f3ddb,_0x5b6f38,_0x48954d,_0x49daf0){return pzg_0x6c6546(_0x5b6f38,_0x48954d- -0x49,_0x48954d-0xc1,_0x49daf0-0x1e0);}_0x4690d5&&(_0x17051c[_0x562942(0x3ac,0x387,0x3c7,0x3bd)]=_0x5d25c8[_0x562942(0x365,0x36a,0x360,0x33f)](parseInt,_0x4690d5[-0x2*-0x65a+0x15c4+0x207*-0x11],0x1*0xcc7+0x1*-0xc7d+-0x40));function _0x562942(_0x59be47,_0x5139c1,_0x273aef,_0x1b6d7e){return pzg_0x220600(_0x59be47-0xcf,_0x5139c1,_0x273aef-0xa3,_0x59be47-0x380);}_0x3039e1['includes'](_0x562942(0x3a3,0x39f,0x3a5,0x3a4))&&(_0x17051c['type']='text');const _0x42b6b3=_0x3039e1[_0x562942(0x390,0x385,0x383,0x385)](/@db\.Decimal\((\d+),\s*(\d+)\)/);return _0x42b6b3&&(_0x17051c[_0x20f67e(0x2f3,0x33d,0x318,0x311)]=_0x5d25c8['KNAWy'](parseInt,_0x42b6b3[-0x1*-0x220d+0x1e17+-0x4023],0xce4+-0x716+-0x52*0x12),_0x17051c['scale']=_0x5d25c8[_0x562942(0x3a1,0x3a9,0x389,0x3b0)](parseInt,_0x42b6b3[-0x1bed*-0x1+-0x16f*0x6+-0x1*0x1351],0x2*-0x832+-0x1*-0xa81+0x5ed)),_0x17051c;}[pzg_0x6c6546(0x354,0x355,0x365,0x348)+pzg_0x220600(0x31,-0x6,-0x1,0x11)](_0x5d942a){if(_0x5d942a[_0x4c1f25(0x3f,0x64,0x72,0x5a)])return _0x5d942a[_0x2fe40b(-0x195,-0x197,-0x190,-0x1b8)][_0x4c1f25(0x3f,0x62,0x55,0x52)][_0x2fe40b(-0x1b1,-0x198,-0x1b7,-0x1b4)](_0x3b225a=>_0x5d942a['fields']['find'](_0x4cdce5=>_0x4cdce5['name']===_0x3b225a))['filter'](Boolean);function _0x2fe40b(_0x34b5af,_0x5e3fa2,_0x4577c8,_0x54c0a4){return pzg_0x220600(_0x34b5af-0x79,_0x4577c8,_0x4577c8-0xff,_0x54c0a4- -0x1b0);}function _0x4c1f25(_0x41843c,_0x5f4542,_0x3795e3,_0x1deb28){return pzg_0x6c6546(_0x3795e3,_0x5f4542- -0x2e6,_0x3795e3-0x72,_0x1deb28-0x94);}return _0x5d942a[_0x4c1f25(0x6d,0x62,0x86,0x82)][_0x2fe40b(-0x1c1,-0x1e2,-0x1d3,-0x1c5)](_0x59f6f2=>_0x59f6f2[_0x4c1f25(0x94,0x89,0x95,0x7a)]);}[pzg_0x220600(-0x20,-0x5,-0x20,-0x18)+pzg_0x6c6546(0x334,0x336,0x34c,0x345)+'ce'](_0x233d95){function _0x4ce19e(_0x23065f,_0x2b2adf,_0x106664,_0x39555c){return pzg_0x6c6546(_0x106664,_0x23065f- -0x120,_0x106664-0x174,_0x39555c-0x11b);}const _0x271513=[];_0x271513[_0x3fbff8(0x234,0x21f,0x234,0x22e)](_0x3fbff8(0x215,0x1f5,0x1fb,0x234)+_0x4ce19e(0x232,0x218,0x211,0x23a)+_0x233d95[_0x4ce19e(0x23f,0x245,0x24c,0x24e)]+'\x20{'),_0x233d95[_0x3fbff8(0x204,0x1df,0x21d,0x1fc)][_0x3fbff8(0x1fe,0x209,0x1f7,0x213)](_0xa1c04e=>{const _0x291a03=this[_0x18c837(0x4f5,0x4f8,0x512,0x518)+_0x18c837(0x552,0x531,0x53a,0x531)](_0xa1c04e),_0xaff99c=!_0xa1c04e['isRequired']?'?':'';function _0x18c837(_0x1515e0,_0xfc9d20,_0x4e2ed3,_0x4fa32e){return _0x3fbff8(_0xfc9d20-0x2fb,_0xfc9d20-0x109,_0x4e2ed3,_0x4fa32e-0x19e);}const _0x3db1d2=_0xa1c04e[_0x124561(0x284,0x260,0x292,0x2ac)+_0x124561(0x271,0x283,0x295,0x264)]?'\x20//\x20'+_0xa1c04e[_0x18c837(0x503,0x50d,0x4fc,0x52c)+_0x124561(0x271,0x252,0x28b,0x264)][_0x124561(0x299,0x295,0x290,0x2be)](/\s*\n\s*/g,'\x20')[_0x124561(0x267,0x27c,0x246,0x273)]():'';function _0x124561(_0x1a19bc,_0x14704e,_0xe67f8f,_0x3bc451){return _0x4ce19e(_0x1a19bc-0x4e,_0x14704e-0x123,_0x3bc451,_0x3bc451-0xb1);}_0x271513[_0x124561(0x2a6,0x2cc,0x2b9,0x2b9)]('\x20\x20'+_0xa1c04e['name']+_0xaff99c+':\x20'+_0x291a03+';'+_0x3db1d2);}),_0x271513['push']('}');function _0x3fbff8(_0x3bd802,_0x12209c,_0x4f7040,_0xc7d29f){return pzg_0x220600(_0x3bd802-0x9,_0x4f7040,_0x4f7040-0x164,_0x3bd802-0x20e);}return _0x271513[_0x3fbff8(0x20c,0x222,0x1e7,0x214)]('\x0a');}[pzg_0x220600(-0x8,0x1,-0x4,-0x11)+pzg_0x6c6546(0x383,0x37a,0x38c,0x38a)](_0x1ae4dd){const _0x344eb6={};_0x344eb6[_0x4b566d(0x486,0x487,0x482,0x485)]='object';function _0x48b0c6(_0x3fe11a,_0x25b553,_0x4ae32a,_0x6dacd9){return pzg_0x220600(_0x3fe11a-0x99,_0x25b553,_0x4ae32a-0x1a7,_0x4ae32a-0x155);}_0x344eb6[_0x4b566d(0x46a,0x471,0x466,0x454)]=_0x4b566d(0x4a1,0x482,0x48c,0x4a5);const _0x5125e9=_0x344eb6;let _0x8372ab;function _0x4b566d(_0x37656e,_0x17c3ab,_0x3f507e,_0x3f3868){return pzg_0x220600(_0x37656e-0x196,_0x37656e,_0x3f507e-0x33,_0x17c3ab-0x470);}switch(_0x1ae4dd[_0x4b566d(0x486,0x475,0x49c,0x477)]){case _0x4b566d(0x48e,0x472,0x490,0x48f):_0x8372ab=this[_0x48b0c6(0x191,0x18d,0x16f,0x175)+_0x48b0c6(0x16e,0x17c,0x183,0x171)](_0x1ae4dd['type']);break;case _0x5125e9[_0x48b0c6(0x15d,0x18a,0x16c,0x147)]:_0x8372ab=_0x1ae4dd[_0x48b0c6(0x167,0x16f,0x170,0x165)];break;case _0x48b0c6(0x168,0x12d,0x142,0x13a):_0x8372ab=_0x1ae4dd[_0x48b0c6(0x169,0x179,0x170,0x18d)];break;case _0x4b566d(0x438,0x45c,0x449,0x465)+'d':_0x8372ab=_0x5125e9[_0x48b0c6(0x15f,0x143,0x156,0x145)];break;default:_0x8372ab=_0x4b566d(0x48c,0x482,0x460,0x496);}return _0x1ae4dd['isList']&&(_0x8372ab+='[]'),!_0x1ae4dd[_0x48b0c6(0x17a,0x149,0x152,0x174)]&&(_0x8372ab+=_0x48b0c6(0x170,0x17d,0x171,0x16a)),_0x8372ab;}[pzg_0x220600(0x3,0x34,-0xb,0x1a)+pzg_0x6c6546(0x379,0x380,0x38b,0x364)](_0x2cb3d8){const _0x2204a8={};_0x2204a8['BQwMg']=_0x41e153(-0xdb,-0xd3,-0xb9,-0xb7),_0x2204a8[_0x3dd275(0x1b6,0x18b,0x191,0x1a2)]=_0x3dd275(0x157,0x172,0x15d,0x174)+_0x3dd275(0x18b,0x186,0x1af,0x1a8),_0x2204a8['oFRrt']=_0x41e153(-0xe1,-0xf0,-0xf8,-0xef),_0x2204a8[_0x41e153(-0x112,-0x107,-0x104,-0xef)]=_0x41e153(-0x100,-0x10e,-0xf9,-0xfa);const _0x3d749b=_0x2204a8,_0x595ee5={};_0x595ee5[_0x3dd275(0x191,0x198,0x17f,0x19b)]=_0x3dd275(0x180,0x15e,0x178,0x170),_0x595ee5[_0x41e153(-0xff,-0x10d,-0x11a,-0xe2)]=_0x41e153(-0xe0,-0xbc,-0xe9,-0xdd),_0x595ee5[_0x3dd275(0x170,0x197,0x15d,0x176)]='number',_0x595ee5['Float']=_0x3d749b[_0x3dd275(0x17e,0x179,0x1c2,0x19c)],_0x595ee5['BigInt']=_0x3d749b[_0x3dd275(0x18a,0x18f,0x1b8,0x1a2)];function _0x3dd275(_0x3787e7,_0x317ca8,_0x36eca4,_0x31baa0){return pzg_0x220600(_0x3787e7-0x1b5,_0x317ca8,_0x36eca4-0xd2,_0x31baa0-0x17d);}function _0x41e153(_0x4216db,_0xac2e03,_0x3854ed,_0x29c6f9){return pzg_0x6c6546(_0x29c6f9,_0x4216db- -0x445,_0x3854ed-0x19c,_0x29c6f9-0x7a);}_0x595ee5[_0x3dd275(0x163,0x1a9,0x1a7,0x189)]=_0x3d749b['BiQms'],_0x595ee5['DateTime']='string',_0x595ee5[_0x3dd275(0x160,0x1a0,0x176,0x186)]=_0x3d749b[_0x41e153(-0xeb,-0xd0,-0x103,-0x10d)],_0x595ee5[_0x41e153(-0xcf,-0xbc,-0xd5,-0xe5)]=_0x3d749b['OlsCH'];const _0x27cf7c=_0x595ee5;return _0x27cf7c[_0x2cb3d8]||_0x2cb3d8;}}exports[pzg_0x220600(0x21,-0xa,0x0,0xa)+'s']=DMMFHelpers;