prisma-zod-generator
Version:
Prisma 2+ generator to emit Zod schemas from your Prisma schema
1 lines • 12.5 kB
JavaScript
;(function(_0x158ce3,_0xdf4ca5){const _0x3d7d79=_0x158ce3();function _0x303c35(_0x289135,_0x31bd62,_0x17aa12,_0x8ef202){return pzg_0x1679(_0x17aa12-0x177,_0x8ef202);}function _0x1bbfb8(_0x1ebe13,_0x1a427e,_0x10c254,_0x53a6d4){return pzg_0x1679(_0x1ebe13-0x16d,_0x1a427e);}while(!![]){try{const _0x3a419b=parseInt(_0x1bbfb8(0x203,0x20b,0x1dd,0x214))/(0x113c+0x98d+-0x1ac8)*(parseInt(_0x303c35(0x210,0x209,0x217,0x1fb))/(0x10c3+-0x602*0x3+0x19*0xd))+parseInt(_0x1bbfb8(0x245,0x24c,0x257,0x234))/(0x2446+-0x11*0x55+-0x1e9e)*(parseInt(_0x303c35(0x20f,0x24a,0x231,0x224))/(-0x224+0x5a4*-0x3+0x1314))+parseInt(_0x303c35(0x229,0x23c,0x24e,0x26a))/(0x3e*-0x2f+-0x1cdc*0x1+0x3a9*0xb)+parseInt(_0x1bbfb8(0x23e,0x228,0x251,0x261))/(0xefd+-0x1*0x752+-0x7a5)*(parseInt(_0x303c35(0x25c,0x21f,0x23a,0x25a))/(-0x1e*0x113+0x23e3+-0x3a2))+parseInt(_0x303c35(0x211,0x1f1,0x214,0x1fe))/(-0x3cd+0x198b+0x18d*-0xe)*(parseInt(_0x1bbfb8(0x24b,0x237,0x262,0x26b))/(-0x561+0x134d+0xed*-0xf))+-parseInt(_0x1bbfb8(0x248,0x269,0x233,0x243))/(-0x40e+-0x209a+0x4d*0x7a)*(parseInt(_0x303c35(0x20d,0x20a,0x20a,0x21b))/(0x2*-0x11ff+0x24ce+-0xc5*0x1))+-parseInt(_0x1bbfb8(0x201,0x20d,0x1ee,0x21f))/(-0x1d87+0xcbb+0x10d8);if(_0x3a419b===_0xdf4ca5)break;else _0x3d7d79['push'](_0x3d7d79['shift']());}catch(_0x572232){_0x3d7d79['push'](_0x3d7d79['shift']());}}}(pzg_0x3031,0x128*0x35b+0x45ea4+-0x523bd));const pzg_0x104a26={};pzg_0x104a26[pzg_0x166ce9(-0x2dc,-0x2eb,-0x2f1,-0x303)]=!![],Object[pzg_0x2fb7f8(0x271,0x2a0,0x28b,0x2ae)+pzg_0x2fb7f8(0x2a3,0x2a0,0x27f,0x291)](exports,'__esModule',pzg_0x104a26),exports[pzg_0x2fb7f8(0x279,0x28b,0x267,0x274)+'s']=void(-0x92a+0x1*-0x217b+0x2aa5*0x1);function pzg_0x1679(_0x4ff871,_0x4b708f){const _0x5d7d06=pzg_0x3031();return pzg_0x1679=function(_0x5661ac,_0x6f9b9c){_0x5661ac=_0x5661ac-(-0xa7*0x17+-0x1*0x823+0x17b6);let _0x2c7e89=_0x5d7d06[_0x5661ac];if(pzg_0x1679['LAuBIC']===undefined){var _0x211b8d=function(_0x432e3b){const _0x2f5e1a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x328e02='',_0x3ff4da='';for(let _0x5b3f75=-0xb5*-0x31+0x727*-0x2+0x1457*-0x1,_0x13b058,_0x1b148e,_0x1d4598=0x1abe+-0x1*0x17e6+-0x2d8;_0x1b148e=_0x432e3b['charAt'](_0x1d4598++);~_0x1b148e&&(_0x13b058=_0x5b3f75%(-0x329*0x2+0x332*0x6+-0xcd6)?_0x13b058*(0x5*0x32b+-0x46a+-0xb2d)+_0x1b148e:_0x1b148e,_0x5b3f75++%(0x1a50+0x4e3+0x9*-0x377))?_0x328e02+=String['fromCharCode'](0xa52+0x2af*-0x7+-0x1*-0x976&_0x13b058>>(-(0x2638+0x1d*-0xb+0x1*-0x24f7)*_0x5b3f75&-0x127b+-0x2*-0x32e+0xc25)):-0x17c8+-0x25d7+0xc53*0x5){_0x1b148e=_0x2f5e1a['indexOf'](_0x1b148e);}for(let _0x37b467=0x2*-0x8ef+0x25*0xb3+-0x2ab*0x3,_0xea8b6a=_0x328e02['length'];_0x37b467<_0xea8b6a;_0x37b467++){_0x3ff4da+='%'+('00'+_0x328e02['charCodeAt'](_0x37b467)['toString'](0xa*-0x23+0x445*0x9+-0x21*0x11f))['slice'](-(-0x186d+-0x2*0x12fb+-0x1*-0x3e65));}return decodeURIComponent(_0x3ff4da);};pzg_0x1679['LFNlXP']=_0x211b8d,_0x4ff871=arguments,pzg_0x1679['LAuBIC']=!![];}const _0x38c0ae=_0x5d7d06[0x1c1*-0x12+-0x6bc+0x264e],_0x5bdef2=_0x5661ac+_0x38c0ae,_0x99276f=_0x4ff871[_0x5bdef2];return!_0x99276f?(_0x2c7e89=pzg_0x1679['LFNlXP'](_0x2c7e89),_0x4ff871[_0x5bdef2]=_0x2c7e89):_0x2c7e89=_0x99276f,_0x2c7e89;},pzg_0x1679(_0x4ff871,_0x4b708f);}class DMMFHelpers{constructor(_0x57ad02){function _0x465294(_0x43ed13,_0x1f7305,_0x277b43,_0x2c3352){return pzg_0x166ce9(_0x1f7305,_0x1f7305-0x132,_0x43ed13-0x681,_0x2c3352-0x150);}this[_0x465294(0x386,0x389,0x39c,0x366)]=_0x57ad02;}[pzg_0x166ce9(-0x311,-0x2d6,-0x2e9,-0x2dc)+pzg_0x2fb7f8(0x25d,0x290,0x26f,0x25f)](_0xc0bea1){const _0x6411b2={};function _0x479852(_0x233613,_0x860ca3,_0xfb1f1a,_0x44ce81){return pzg_0x2fb7f8(_0x233613-0xd5,_0x44ce81,_0x860ca3-0x8,_0x44ce81-0x18a);}function _0x2f488b(_0x46aa8e,_0x4f2d89,_0x470b30,_0x8602db){return pzg_0x2fb7f8(_0x46aa8e-0x1a0,_0x8602db,_0x4f2d89- -0xe6,_0x8602db-0x51);}_0x6411b2[_0x2f488b(0x1d1,0x1ad,0x1b4,0x1cf)]=_0xc0bea1[_0x479852(0x299,0x29e,0x2a9,0x2b5)]&&!_0xc0bea1['hasDefault'+'Value'],_0x6411b2[_0x479852(0x264,0x26c,0x284,0x293)]=_0xc0bea1[_0x2f488b(0x155,0x17a,0x17c,0x184)],_0x6411b2['list']=_0xc0bea1[_0x479852(0x24a,0x258,0x27d,0x246)],_0x6411b2['optional']=!_0xc0bea1[_0x2f488b(0x1bb,0x1b0,0x1c9,0x1d4)],_0x6411b2[_0x2f488b(0x188,0x19d,0x1ad,0x1a8)]=_0xc0bea1[_0x479852(0x264,0x28b,0x287,0x274)+'Value'],_0x6411b2[_0x479852(0x264,0x25a,0x244,0x26d)+'ue']=_0xc0bea1[_0x2f488b(0x15b,0x169,0x14b,0x158)];const _0x503fa3=_0x6411b2;if(_0xc0bea1[_0x2f488b(0x18c,0x1aa,0x1a6,0x1c3)+_0x2f488b(0x164,0x187,0x1a8,0x16a)]){const _0x3a93bb=this[_0x479852(0x26d,0x288,0x290,0x27b)+'straints'](_0xc0bea1[_0x2f488b(0x188,0x1aa,0x184,0x1bd)+_0x2f488b(0x181,0x187,0x193,0x17e)]);Object[_0x2f488b(0x15f,0x184,0x174,0x19d)](_0x503fa3,_0x3a93bb);}return _0x503fa3;}['parseDbCon'+pzg_0x166ce9(-0x2ff,-0x2dd,-0x2f6,-0x2e3)](_0x4b024a){const _0x54a70d={'YPVLn':function(_0x53ce65,_0x395e9f,_0x3fdc7c){return _0x53ce65(_0x395e9f,_0x3fdc7c);}},_0x1653dd={},_0x3865cc=_0x4b024a[_0x2368dc(0x473,0x47a,0x458,0x46c)](/@db\.VarChar\((\d+)\)/);_0x3865cc&&(_0x1653dd[_0x50e866(0x154,0x156,0x159,0x140)]=parseInt(_0x3865cc[0x23c6*0x1+-0x1*-0x463+0x2*-0x1414],0x116+-0x49*-0x77+-0x22fb));function _0x2368dc(_0x370df9,_0xb4ae9b,_0xd212ef,_0x4debbf){return pzg_0x2fb7f8(_0x370df9-0x31,_0xb4ae9b,_0x370df9-0x1ef,_0x4debbf-0x167);}_0x4b024a[_0x50e866(0x144,0x147,0x17d,0x157)]('@db.Text')&&(_0x1653dd[_0x2368dc(0x440,0x463,0x43e,0x466)]=_0x2368dc(0x455,0x450,0x450,0x454));function _0x50e866(_0x543d3c,_0x4249d0,_0x88f99a,_0x5314a9){return pzg_0x166ce9(_0x543d3c,_0x4249d0-0xf4,_0x5314a9-0x454,_0x5314a9-0x18d);}const _0x2a3660=_0x4b024a[_0x2368dc(0x473,0x465,0x459,0x454)](/@db\.Decimal\((\d+),\s*(\d+)\)/);return _0x2a3660&&(_0x1653dd['precision']=_0x54a70d[_0x50e866(0x168,0x14f,0x154,0x15f)](parseInt,_0x2a3660[0x2*-0xb1a+-0x13af*-0x1+0x286],-0x1cfd*0x1+0x1*0x476+-0x1*-0x1891),_0x1653dd[_0x2368dc(0x486,0x48f,0x48a,0x49b)]=parseInt(_0x2a3660[0x1357*0x1+0xff*-0x25+0x1186],0x5*0x14c+-0x1f1b+0x18a9)),_0x1653dd;}[pzg_0x2fb7f8(0x293,0x293,0x270,0x280)+'KeyFields'](_0x59da6d){function _0x3825ce(_0x3a92c0,_0x195fa0,_0x4f9186,_0x313feb){return pzg_0x166ce9(_0x4f9186,_0x195fa0-0x89,_0x313feb-0x50f,_0x313feb-0x17c);}function _0x54843a(_0x34603e,_0xc08167,_0x45473a,_0x35355c){return pzg_0x166ce9(_0x35355c,_0xc08167-0x4f,_0xc08167-0x729,_0x35355c-0xe2);}if(_0x59da6d[_0x3825ce(0x206,0x1e6,0x21d,0x208)])return _0x59da6d['primaryKey'][_0x3825ce(0x217,0x1db,0x21e,0x1f8)][_0x3825ce(0x245,0x1fb,0x223,0x222)](_0x109aec=>_0x59da6d['fields']['find'](_0x4a20a4=>_0x4a20a4[_0x3825ce(0x206,0x22b,0x216,0x223)]===_0x109aec))[_0x54843a(0x453,0x43f,0x424,0x45f)](Boolean);return _0x59da6d[_0x3825ce(0x1eb,0x1fb,0x1d8,0x1f8)][_0x3825ce(0x213,0x225,0x215,0x225)](_0x43eea3=>_0x43eea3[_0x54843a(0x400,0x409,0x430,0x3e7)]);}[pzg_0x166ce9(-0x30f,-0x2df,-0x2f7,-0x2fc)+'delInterfa'+'ce'](_0x196903){function _0x1bbd30(_0x4cb145,_0x17f68b,_0x1b8615,_0x5a00c9){return pzg_0x2fb7f8(_0x4cb145-0x1c4,_0x1b8615,_0x5a00c9- -0x187,_0x5a00c9-0x1ce);}function _0x1aa380(_0x1e6197,_0x189fcf,_0x10b9f3,_0x5680b3){return pzg_0x166ce9(_0x189fcf,_0x189fcf-0x13c,_0x10b9f3-0x145,_0x5680b3-0xa1);}const _0x15e516=[];return _0x15e516['push']('export\x20int'+_0x1aa380(-0x1e8,-0x1b8,-0x1c9,-0x1bf)+_0x196903[_0x1bbd30(0xed,0xf1,0x10b,0x100)]+'\x20{'),_0x196903[_0x1aa380(-0x1c1,-0x1f6,-0x1d2,-0x1da)][_0x1aa380(-0x1bb,-0x1a6,-0x1a1,-0x1a5)](_0x223511=>{const _0x3b8828=this[_0x441b1e(0x16,-0x1f,-0xc,0x3)+_0x441b1e(-0x7,-0x21,-0x5,0x2)](_0x223511),_0x4f0349=!_0x223511['isRequired']?'?':'';function _0x441b1e(_0xd92da1,_0x38789d,_0x40d2d2,_0x2d0b44){return _0x1bbd30(_0xd92da1-0x191,_0x38789d-0x179,_0x38789d,_0x40d2d2- -0xf0);}function _0x2eded7(_0x19fd08,_0x4d43ae,_0x33e04c,_0x3fd120){return _0x1aa380(_0x19fd08-0x119,_0x3fd120,_0x19fd08-0x634,_0x3fd120-0x1cf);}const _0x261407=_0x223511[_0x2eded7(0x496,0x47d,0x473,0x4ba)+_0x2eded7(0x473,0x49b,0x490,0x45d)]?_0x441b1e(0x4,0x25,0x1a,0x30)+_0x223511['documentat'+'ion']['replace'](/\s*\n\s*/g,'\x20')[_0x2eded7(0x463,0x45d,0x44d,0x45a)]():'';_0x15e516[_0x2eded7(0x481,0x497,0x470,0x460)]('\x20\x20'+_0x223511[_0x441b1e(0x2d,-0xf,0x10,0xb)]+_0x4f0349+':\x20'+_0x3b8828+';'+_0x261407);}),_0x15e516[_0x1bbd30(0xd0,0x108,0xf2,0xf4)]('}'),_0x15e516[_0x1aa380(-0x1b4,-0x1b2,-0x1d0,-0x1ce)]('\x0a');}[pzg_0x2fb7f8(0x249,0x264,0x26b,0x25e)+pzg_0x2fb7f8(0x282,0x254,0x272,0x267)](_0x620f44){const _0x156905={};_0x156905[_0x1c33c9(0x169,0x162,0x165,0x153)]=_0x530d20(0x28b,0x2a5,0x2ca,0x2b2),_0x156905['hmRsE']=_0x1c33c9(0x13d,0x15c,0x12b,0x145),_0x156905[_0x1c33c9(0x161,0x150,0x17c,0x13c)]=_0x530d20(0x2a3,0x28f,0x276,0x29c);const _0x37e027=_0x156905;let _0xbdc119;switch(_0x620f44['kind']){case _0x37e027[_0x1c33c9(0x169,0x166,0x17a,0x14c)]:_0xbdc119=this[_0x1c33c9(0x14a,0x15a,0x16f,0x154)+'ypeString'](_0x620f44[_0x1c33c9(0x126,0x143,0x12e,0x14d)]);break;case _0x37e027[_0x1c33c9(0x11e,0x13f,0xf9,0x13c)]:_0xbdc119=_0x620f44[_0x530d20(0x276,0x27d,0x269,0x288)];break;case'enum':_0xbdc119=_0x620f44[_0x1c33c9(0x126,0x148,0x13d,0x11c)];break;case _0x530d20(0x2a7,0x2ad,0x2ce,0x28b)+'d':_0xbdc119=_0x37e027['XmhFT'];break;default:_0xbdc119=_0x37e027[_0x1c33c9(0x161,0x13e,0x14f,0x157)];}_0x620f44[_0x1c33c9(0x125,0x12c,0xfd,0x112)]&&(_0xbdc119+='[]');function _0x530d20(_0x6865c1,_0x5c2d7d,_0x5a8b89,_0x5bd455){return pzg_0x2fb7f8(_0x6865c1-0x1a8,_0x5bd455,_0x5c2d7d-0x2c,_0x5bd455-0x47);}function _0x1c33c9(_0x3d9341,_0x196ceb,_0x487060,_0x1392a6){return pzg_0x2fb7f8(_0x3d9341-0x99,_0x487060,_0x3d9341- -0x12b,_0x1392a6-0x5c);}return!_0x620f44['isRequired']&&(_0xbdc119+=_0x1c33c9(0x12e,0x13a,0x13a,0x137)),_0xbdc119;}[pzg_0x2fb7f8(0x29b,0x269,0x275,0x257)+'ypeString'](_0x258993){const _0x76d791={};_0x76d791[_0x1c6c31(0x31d,0x2ec,0x2ed,0x306)]='string',_0x76d791[_0x1c6c31(0x349,0x339,0x342,0x32b)]=_0x2a0424(-0x1ab,-0x18f,-0x16c,-0x188);function _0x2a0424(_0xa456df,_0x150db1,_0x2494fc,_0x35201d){return pzg_0x166ce9(_0x2494fc,_0x150db1-0x30,_0x150db1-0x170,_0x35201d-0x15b);}function _0x1c6c31(_0x540c66,_0x72b651,_0x79df88,_0xfee116){return pzg_0x2fb7f8(_0x540c66-0xa,_0x72b651,_0xfee116-0xb8,_0xfee116-0x1b3);}_0x76d791['DyjUe']=_0x2a0424(-0x1ad,-0x195,-0x1a5,-0x1bb),_0x76d791['wWHFy']='unknown';const _0x28160a=_0x76d791,_0x5114c5={};_0x5114c5[_0x2a0424(-0x199,-0x1a8,-0x1a5,-0x1ca)]=_0x28160a[_0x1c6c31(0x32c,0x309,0x2ef,0x306)],_0x5114c5[_0x1c6c31(0x335,0x334,0x2f1,0x310)]=_0x28160a[_0x2a0424(-0x190,-0x190,-0x19c,-0x17d)],_0x5114c5['Int']=_0x28160a[_0x1c6c31(0x354,0x328,0x361,0x33d)],_0x5114c5[_0x1c6c31(0x2f5,0x30b,0x2f0,0x312)]=_0x1c6c31(0x30f,0x314,0x2ff,0x326),_0x5114c5[_0x1c6c31(0x2e5,0x2fc,0x30d,0x304)]=_0x2a0424(-0x199,-0x1a1,-0x1ae,-0x1b5)+_0x2a0424(-0x1ba,-0x1a2,-0x1b8,-0x1ae),_0x5114c5[_0x2a0424(-0x186,-0x19a,-0x185,-0x1a0)]=_0x1c6c31(0x31e,0x33c,0x319,0x31a)+_0x1c6c31(0x33d,0x30f,0x324,0x319),_0x5114c5['DateTime']=_0x2a0424(-0x1aa,-0x1ad,-0x1c5,-0x18f),_0x5114c5[_0x1c6c31(0x327,0x2f9,0x328,0x30d)]=_0x28160a[_0x1c6c31(0x310,0x339,0x324,0x32f)],_0x5114c5['Bytes']=_0x28160a[_0x1c6c31(0x306,0x327,0x2fa,0x306)];const _0xd221c1=_0x5114c5;return _0xd221c1[_0x258993]||_0x258993;}}function pzg_0x3031(){const _0x1f2267=['BNvTyMvY','BNn0CMfPBNrZ','z2v0uhjPBwfYEq','oefJthrsua','CgvtDhjPBMC','yMvPA28','yM9VBgvHBG','z2v0u2nHBgfYva','Aw5JBhvKzxm','D1DirNK','y29UDgv4Da','C2nHBgfY','odKWmdvssNb1ww8','ChvZAa','z2vUzxjHDgvnBW','C3rYywLUDhm','wvbwtg4','zxj0Eq','CgfYC2veyKnVBG','Dw5ZDxbWB3j0zq','DMfSDwu','AgfZrgvMyxvSDa','Bwf0y2G','rhLQvwu','BwfW','BMfTzq','mZbKzeTRCgK','zMLSDgvY','z2v0rMLLBgrdBW','zgvMAw5LuhjVCa','wg1OrLq','zM9YrwfJAa','nZq4ntu1suHxvw1l','mty5mZq3DgjYqunX','zg9JDw1LBNrHDa','ic8Via','otm3nZbTtuLJCKu','CMvXDwLYzwq','EKjjwgS','mZy3nJC3EgTeuMX5','Axnszxf1AxjLza','C2nHBgu','Ag1sC0u','mJC1rLrItuTJ','nJm0mteZnM91CNjXwG','qMLNsw50','mtmXnZG2AKX0CKf1','CKXRrxm','zgvMyxvSDa','AxnmAxn0','DhLWzq','zgvMyxvSDfzHBa','Axnjza','ndHIALfnDgW','sNnVBG','C3rYAw5N','nNjAEgLdDa','qM9VBgvHBG','ihWGBNvSBa','rMXVyxq','u3rYAw5N','zMLLBgrZ','DhjPBq','AM9PBG','Bwf4tgvUz3rO','AxnvBMLXDwu','Dw1Izxi','C3rYAw5NihWGBG','Dw5RBM93BG','Dw5PCxvL','zxjMywnLia','Dgv4Da','re1nrKHLBhbLCG','B2jQzwn0','rgvJAw1HBa','yxnZAwDU','z2v0rMLLBgruEq','ChjPBwfYEuTLEq','Aw9U'];pzg_0x3031=function(){return _0x1f2267;};return pzg_0x3031();}function pzg_0x2fb7f8(_0x1390c2,_0x2f45fc,_0x2aa24c,_0x4f1282){return pzg_0x1679(_0x2aa24c-0x1b7,_0x2f45fc);}function pzg_0x166ce9(_0x4ccaf9,_0x162e06,_0x3886c7,_0x116929){return pzg_0x1679(_0x3886c7- -0x3bc,_0x4ccaf9);}exports[pzg_0x166ce9(-0x31e,-0x328,-0x30c,-0x323)+'s']=DMMFHelpers;