anncic-api 3.4.32 → 3.4.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- const a8_0x4d2d88=a8_0x5c67;(function(_0x2f8f65,_0x3d37c7){const _0x246c2f=a8_0x5c67,_0x5de2a2=_0x2f8f65();while(!![]){try{const _0x1f5e78=-parseInt(_0x246c2f(0x151))/0x1*(parseInt(_0x246c2f(0x105))/0x2)+-parseInt(_0x246c2f(0x148))/0x3+parseInt(_0x246c2f(0x13d))/0x4+parseInt(_0x246c2f(0x11b))/0x5*(-parseInt(_0x246c2f(0x118))/0x6)+parseInt(_0x246c2f(0x10f))/0x7*(-parseInt(_0x246c2f(0x113))/0x8)+-parseInt(_0x246c2f(0x11c))/0x9+-parseInt(_0x246c2f(0x159))/0xa*(-parseInt(_0x246c2f(0x153))/0xb);if(_0x1f5e78===_0x3d37c7)break;else _0x5de2a2['push'](_0x5de2a2['shift']());}catch(_0x3e9e92){_0x5de2a2['push'](_0x5de2a2['shift']());}}}(a8_0x5f45,0x43cd6));const a8_0x35ab8a=(function(){let _0x20ef69=!![];return function(_0x84e618,_0x48742e){const _0xa413cd=_0x20ef69?function(){if(_0x48742e){const _0x5125a0=_0x48742e['apply'](_0x84e618,arguments);return _0x48742e=null,_0x5125a0;}}:function(){};return _0x20ef69=![],_0xa413cd;};}()),a8_0x573091=a8_0x35ab8a(this,function(){const _0x8dea61=a8_0x5c67;return a8_0x573091[_0x8dea61(0x10d)]()[_0x8dea61(0x14d)](_0x8dea61(0x154))[_0x8dea61(0x10d)]()['constructor'](a8_0x573091)[_0x8dea61(0x14d)]('(((.+)+)+)+$');});a8_0x573091();'use strict';function a8_0x5f45(){const _0x5097d9=['String','concat','type','title','required','File','substring','Object','key','min','route','91940qvIPNf','indexOf','filter','query','flags.label','ACTION_ROUTE_KEY','describe','parameterIndex','description','items','string','868197lUYMKq','@midwayjs/core','pprefix','args','RouteParamTypes','search','function','request','push','1FrOESw','body','11TLzkRG','(((.+)+)+)+$','flags.presence','prefix','endsWith','FILESTREAM','15760070vhQLRK','iterator','RULES_KEY','FILESSTREAM','method','Boolean','array','summary','max','allow','HEADERS','getClassMetadata','static/apitest','join','module','Number','routerOptions','length','startsWith','492634jNEyue','header','FIELDS','name','children','file','/static/apitest','BODY','toString','defineProperty','7BMifQt','WEB_ROUTER_PARAM_KEY','requestMethod','flags.description','2138712XVFWky','只允许:[','keys','文件上传-','find','6tqHOUj','number','boolean','442945VMUlfx','3866670jNlxsZ','intercept','replace','tagName','__esModule','routerName','get','PARAM','getClassExtendedMetadata','isArray','path','noreq','metadata','QUERY','../types/action','@anncic-api/validator','ACTION_KEY','propertyData','routes','object','default','getRoutes'];a8_0x5f45=function(){return _0x5097d9;};return a8_0x5f45();}Object[a8_0x4d2d88(0x10e)](exports,a8_0x4d2d88(0x120),{'value':!![]}),exports[a8_0x4d2d88(0x131)]=void 0x0;const lodash_1=require('lodash'),validator_1=require(a8_0x4d2d88(0x12b)),core_1=require(a8_0x4d2d88(0x149)),core_2=require(a8_0x4d2d88(0x149)),core_3=require(a8_0x4d2d88(0x149)),action_1=require(a8_0x4d2d88(0x12a));function getRoutes(_0x5188eb={'prefix':'/','module':![]}){const _0x5b68bb=a8_0x4d2d88;var _0x1d91e1,_0x5afa84;const _0x5d11d3=(0x0,core_3['listModule'])(action_1['ACTION_KEY']),_0x3c1504={},_0x24ec02=Array[_0x5b68bb(0x125)](_0x5188eb[_0x5b68bb(0x13f)]||[])?_0x5188eb[_0x5b68bb(0x13f)]||[]:[_0x5188eb[_0x5b68bb(0x13f)]];_0x2e5840:for(const _0x8b0614 of _0x5d11d3){let _0x508905=(0x0,core_3[_0x5b68bb(0x164)])(action_1[_0x5b68bb(0x12c)],_0x8b0614),_0x1e04c1=(0x0,core_3[_0x5b68bb(0x164)])(action_1[_0x5b68bb(0x142)],_0x8b0614);if(_0x508905&&_0x1e04c1){let _0x5f2b5c=_0x508905[_0x5b68bb(0x156)],_0x448165={};if(_0x5188eb[_0x5b68bb(0x100)]&&(0x0,lodash_1['get'])(_0x508905,'module',![])!=_0x5188eb['module'])continue _0x2e5840;else{if(_0x5188eb[_0x5b68bb(0x100)]===![]&&!!(0x0,lodash_1[_0x5b68bb(0x122)])(_0x508905,_0x5b68bb(0x100),null))continue _0x2e5840;}if(_0x5188eb[_0x5b68bb(0x156)]&&!_0x5f2b5c[_0x5b68bb(0x104)](_0x5188eb[_0x5b68bb(0x156)]))continue _0x2e5840;_0x5f2b5c!=='/'?(_0x448165[_0x5b68bb(0x160)]=(_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905[_0x5b68bb(0x102)][_0x5b68bb(0x11f)])||(/^\//['test'](_0x5f2b5c)?_0x5f2b5c['split']('/')[0x1]:_0x5f2b5c),_0x448165['description']=(_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905[_0x5b68bb(0x102)][_0x5b68bb(0x145)])||_0x448165[_0x5b68bb(0x160)],_0x448165[_0x5b68bb(0x12e)]=[]):(_0x448165[_0x5b68bb(0x160)]=(_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905[_0x5b68bb(0x102)][_0x5b68bb(0x11f)])||'default',_0x448165[_0x5b68bb(0x145)]=(_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905[_0x5b68bb(0x102)][_0x5b68bb(0x145)])||'',_0x448165[_0x5b68bb(0x12e)]=[]);_0x5188eb['filepath']&&(_0x448165['filepath']=_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905['filepath']);(_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905[_0x5b68bb(0x14a)])&&(_0x448165[_0x5b68bb(0x156)]=_0x508905[_0x5b68bb(0x14a)]);(_0x508905===null||_0x508905===void 0x0?void 0x0:_0x508905[_0x5b68bb(0x100)])&&(_0x448165[_0x5b68bb(0x100)]=_0x508905[_0x5b68bb(0x100)]);let _0x5b650f=(0x0,core_3[_0x5b68bb(0x164)])(core_2['INJECT_CUSTOM_PARAM'],_0x8b0614)||{};if(typeof _0x1e04c1[Symbol[_0x5b68bb(0x15a)]]===_0x5b68bb(0x14e))for(let _0x275cf3 of _0x1e04c1){if((_0x5188eb===null||_0x5188eb===void 0x0?void 0x0:_0x5188eb[_0x5b68bb(0x11d)])&&!(_0x275cf3===null||_0x275cf3===void 0x0?void 0x0:_0x275cf3[_0x5b68bb(0x11d)]))continue;let _0x28928={};_0x28928['method']=_0x275cf3[_0x5b68bb(0x111)],_0x28928[_0x5b68bb(0x13c)]=(_0x5f2b5c+_0x275cf3[_0x5b68bb(0x126)])[_0x5b68bb(0x11e)](/\/{2,}/g,'/'),_0x28928[_0x5b68bb(0x160)]=(_0x275cf3===null||_0x275cf3===void 0x0?void 0x0:_0x275cf3[_0x5b68bb(0x121)])||_0x448165[_0x5b68bb(0x160)]||_0x5b68bb(0x130),_0x28928[_0x5b68bb(0x145)]=(_0x275cf3===null||_0x275cf3===void 0x0?void 0x0:_0x275cf3[_0x5b68bb(0x145)])||'',_0x28928[_0x5b68bb(0x14f)]=[];_0x28928[_0x5b68bb(0x13c)][_0x5b68bb(0x157)]('/')&&(_0x28928[_0x5b68bb(0x13c)]=_0x28928[_0x5b68bb(0x13c)][_0x5b68bb(0x138)](0x0,_0x28928['route'][_0x5b68bb(0x103)]-0x1));if(!(0x0,lodash_1[_0x5b68bb(0x104)])(_0x28928[_0x5b68bb(0x13c)],_0x5b68bb(0xfe))&&!(0x0,lodash_1[_0x5b68bb(0x104)])(_0x28928[_0x5b68bb(0x13c)],_0x5b68bb(0x10b))&&_0x24ec02[_0x5b68bb(0x13e)](_0x28928[_0x5b68bb(0x13c)])===-0x1){if(!(_0x5188eb===null||_0x5188eb===void 0x0?void 0x0:_0x5188eb[_0x5b68bb(0x127)])){let _0x4fecd0=(0x0,core_3['getMethodParamTypes'])(new _0x8b0614(),_0x275cf3[_0x5b68bb(0x15d)]);for(const _0x2465b4 in _0x4fecd0){let _0x1ab56=(_0x1d91e1=_0x5b650f[_0x275cf3['method']])===null||_0x1d91e1===void 0x0?void 0x0:_0x1d91e1[_0x5b68bb(0x117)](_0x54002b=>_0x54002b[_0x5b68bb(0x144)]==_0x2465b4&&_0x54002b[_0x5b68bb(0x13a)]===core_2[_0x5b68bb(0x110)]&&(_0x54002b===null||_0x54002b===void 0x0?void 0x0:_0x54002b[_0x5b68bb(0x128)]));if(_0x1ab56===null||_0x1ab56===void 0x0?void 0x0:_0x1ab56[_0x5b68bb(0x128)]){let _0x14b217=convertTypeToString(_0x1ab56['metadata']['type']||0x0);if([_0x5b68bb(0x140),_0x5b68bb(0x152)][_0x5b68bb(0x13e)](_0x14b217)!=-0x1&&_0x1ab56[_0x5b68bb(0x128)][_0x5b68bb(0x12d)][_0x5b68bb(0x13e)](':')==-0x1&&!_0x28928['request'][_0x5b68bb(0x117)](_0x315d2e=>_0x315d2e['key']==_0x1ab56['metadata'][_0x5b68bb(0x12d)]))_0x28928[_0x5b68bb(0x14f)]['push']({'key':_0x1ab56['metadata'][_0x5b68bb(0x12d)],'title':_0x1ab56[_0x5b68bb(0x128)][_0x5b68bb(0x12d)],'type':convertSchemaType(_0x4fecd0[_0x1ab56['parameterIndex']]['name']),'required':![],'default':'','desc':''});else{if(_0x14b217=='file'){let _0xf3b3c9=((_0x5afa84=_0x1ab56===null||_0x1ab56===void 0x0?void 0x0:_0x1ab56[_0x5b68bb(0x128)])===null||_0x5afa84===void 0x0?void 0x0:_0x5afa84[_0x5b68bb(0x12d)])||_0x5b68bb(0x10a);_0xf3b3c9[_0x5b68bb(0x13e)](':')==-0x1&&!_0x28928[_0x5b68bb(0x14f)][_0x5b68bb(0x117)](_0xd91046=>_0xd91046[_0x5b68bb(0x13a)]==_0xf3b3c9&&_0xd91046[_0x5b68bb(0x134)]=='file')&&_0x28928[_0x5b68bb(0x14f)][_0x5b68bb(0x150)]({'key':_0xf3b3c9,'title':_0x5b68bb(0x116)+_0xf3b3c9,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x15232a=(0x0,core_3[_0x5b68bb(0x124)])(validator_1[_0x5b68bb(0x15b)],_0x4fecd0[_0x2465b4]);_0x15232a&&_0x28928[_0x5b68bb(0x14f)][_0x5b68bb(0x150)](...getJoiRequest(_0x15232a));}}}_0x448165['routes'][_0x5b68bb(0x150)](_0x28928);}}if(_0x448165[_0x5b68bb(0x12e)][_0x5b68bb(0x103)]>0x0){let _0x487184=_0x3c1504[_0x5f2b5c];_0x487184?(_0x487184[_0x5b68bb(0x160)]!=_0x448165[_0x5b68bb(0x160)]&&(_0x487184[_0x5b68bb(0x160)]=_0x487184['summary']+','+_0x448165['summary']),_0x487184[_0x5b68bb(0x145)]!=_0x448165[_0x5b68bb(0x145)]&&(_0x487184[_0x5b68bb(0x145)]=_0x487184[_0x5b68bb(0x145)]+','+_0x448165[_0x5b68bb(0x145)]),_0x487184['routes']=_0x487184[_0x5b68bb(0x12e)][_0x5b68bb(0x133)](_0x448165[_0x5b68bb(0x12e)]),_0x3c1504[_0x5f2b5c]=_0x487184):_0x3c1504[_0x5f2b5c]=_0x448165;}}}return _0x3c1504;}exports[a8_0x4d2d88(0x131)]=getRoutes;function getJoiRequest(_0x3b7d2e){const _0x55938f=a8_0x4d2d88,_0x134845=[];for(let _0x3ca667 in _0x3b7d2e){const _0xe2e4c={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x44e01e=typeof _0x3b7d2e[_0x3ca667][_0x55938f(0x143)]=='function'?_0x3b7d2e[_0x3ca667][_0x55938f(0x143)]():_0x3b7d2e[_0x3ca667];_0xe2e4c[_0x55938f(0x13a)]=_0x3ca667,_0xe2e4c[_0x55938f(0x134)]=_0x44e01e[_0x55938f(0x134)],_0xe2e4c[_0x55938f(0x135)]=(0x0,lodash_1['get'])(_0x44e01e,_0x55938f(0x141),_0x3ca667),_0xe2e4c['default']=(0x0,lodash_1[_0x55938f(0x122)])(_0x44e01e,'flags.default',''),_0xe2e4c['required']=(0x0,lodash_1[_0x55938f(0x122)])(_0x44e01e,_0x55938f(0x155),'')==_0x55938f(0x136),_0xe2e4c['description']=(0x0,lodash_1[_0x55938f(0x122)])(_0x44e01e,_0x55938f(0x112),'');if(_0x44e01e[_0x55938f(0x134)]==_0x55938f(0x12f))_0xe2e4c[_0x55938f(0x109)]=getJoiRequest(_0x44e01e[_0x55938f(0x115)]);else{if(_0x44e01e[_0x55938f(0x134)]==_0x55938f(0x15f)&&_0x44e01e[_0x55938f(0x146)]&&Array['isArray'](_0x44e01e[_0x55938f(0x146)])&&_0x44e01e[_0x55938f(0x146)][0x0]){}}_0x44e01e[_0x55938f(0x162)]&&Array[_0x55938f(0x125)](_0x44e01e[_0x55938f(0x162)])&&_0x44e01e['allow'][_0x55938f(0x103)]>0x0&&(_0xe2e4c['description']=_0x55938f(0x114)+_0x44e01e[_0x55938f(0x162)][_0x55938f(0xff)](',')+'];'+_0xe2e4c['description']);if(_0xe2e4c['key']&&_0xe2e4c[_0x55938f(0x134)]){const _0x347a67={};for(const _0x23c145 of _0x44e01e['rules']||[]){if(_0x23c145[_0x55938f(0x108)]==='min'&&_0x23c145['args'])_0x347a67[_0x55938f(0x13b)]=_0x23c145[_0x55938f(0x14b)]['limit'];else _0x23c145[_0x55938f(0x108)]==='max'&&(_0x347a67[_0x55938f(0x161)]=_0x23c145['args']['limit']);}_0xe2e4c['rules']=_0x347a67;}_0xe2e4c['key']&&_0xe2e4c[_0x55938f(0x135)]&&_0x134845[_0x55938f(0x150)](_0xe2e4c);}return _0x134845;}function a8_0x5c67(_0x1a724e,_0x4b6018){const _0x5a50d6=a8_0x5f45();return a8_0x5c67=function(_0x573091,_0x35ab8a){_0x573091=_0x573091-0xfe;let _0x5f4528=_0x5a50d6[_0x573091];return _0x5f4528;},a8_0x5c67(_0x1a724e,_0x4b6018);}function convertSchemaType(_0x16c1f9){const _0x4363cc=a8_0x4d2d88;switch(_0x16c1f9){case _0x4363cc(0x139):return'object';case _0x4363cc(0x15e):return _0x4363cc(0x11a);case _0x4363cc(0x101):return _0x4363cc(0x119);case _0x4363cc(0x132):return'string';case _0x4363cc(0x137):return _0x4363cc(0x10a);default:return _0x4363cc(0x147);}}function convertTypeToString(_0x5cd68e){const _0x525907=a8_0x4d2d88;switch(_0x5cd68e){case core_1[_0x525907(0x14c)][_0x525907(0x163)]:return _0x525907(0x106);case core_1['RouteParamTypes'][_0x525907(0x129)]:return'query';case core_1[_0x525907(0x14c)][_0x525907(0x123)]:return _0x525907(0x126);case core_1[_0x525907(0x14c)][_0x525907(0x10c)]:return'body';case core_1[_0x525907(0x14c)][_0x525907(0x107)]:case core_1['RouteParamTypes'][_0x525907(0x15c)]:case core_1[_0x525907(0x14c)][_0x525907(0x158)]:return'file';default:return _0x525907(0x106);}}
1
+ const a8_0x13754e=a8_0x4e06;function a8_0x3a9c(){const _0x5a360f=['getMethodParamTypes','2925351xNsfYY','summary','push','Boolean','Object','metadata','HEADERS','42vNvJpV','166541EIydtu','name','tagName','RULES_KEY','flags.presence','pprefix','noreq','INJECT_CUSTOM_PARAM','type','@anncic-api/validator','request','max','boolean','intercept','prefix','../types/action','concat','allow','join','String','function','substring','children','8mHdOLT','/static/apitest','flags.label','split','rules','defineProperty','indexOf','QUERY','required','endsWith','length','BODY','routes','getClassExtendedMetadata','replace','key','keys','2229325AODSKF','parameterIndex','find','describe','1726948rAfenj','isArray','method','test','495nZyViP','getClassMetadata','object','default','startsWith','constructor','routerOptions','title','filter','getRoutes','File','get','FIELDS','只允许:[','(((.+)+)+)+$','number','60tdUVNJ','toString','FILESTREAM','Number','route','args','module','@midwayjs/core','apply','description','文件上传-','iterator','3803844iqSKVi','query','limit','file','PARAM','body','items','248172qpnmMV','10028fSrfQg','__esModule','RouteParamTypes','min','propertyData','lodash','ACTION_KEY','array','search','filepath'];a8_0x3a9c=function(){return _0x5a360f;};return a8_0x3a9c();}(function(_0x3ae1ab,_0x189d16){const _0x253e6b=a8_0x4e06,_0x58ff89=_0x3ae1ab();while(!![]){try{const _0x46a51e=-parseInt(_0x253e6b(0x1f0))/0x1+-parseInt(_0x253e6b(0x1b5))/0x2+parseInt(_0x253e6b(0x1b9))/0x3*(-parseInt(_0x253e6b(0x1dd))/0x4)+parseInt(_0x253e6b(0x1b1))/0x5+-parseInt(_0x253e6b(0x1dc))/0x6*(parseInt(_0x253e6b(0x1ef))/0x7)+parseInt(_0x253e6b(0x207))/0x8*(-parseInt(_0x253e6b(0x1e8))/0x9)+-parseInt(_0x253e6b(0x1c9))/0xa*(-parseInt(_0x253e6b(0x1d5))/0xb);if(_0x46a51e===_0x189d16)break;else _0x58ff89['push'](_0x58ff89['shift']());}catch(_0x25b40f){_0x58ff89['push'](_0x58ff89['shift']());}}}(a8_0x3a9c,0x7b000));const a8_0x47f4f0=(function(){let _0x147fe7=!![];return function(_0x3dc171,_0x3dae4b){const _0x487fa3=_0x147fe7?function(){const _0x36888a=a8_0x4e06;if(_0x3dae4b){const _0x3b3dbe=_0x3dae4b[_0x36888a(0x1d1)](_0x3dc171,arguments);return _0x3dae4b=null,_0x3b3dbe;}}:function(){};return _0x147fe7=![],_0x487fa3;};}()),a8_0x141b4f=a8_0x47f4f0(this,function(){const _0x1cd222=a8_0x4e06;return a8_0x141b4f[_0x1cd222(0x1ca)]()[_0x1cd222(0x1e5)]('(((.+)+)+)+$')[_0x1cd222(0x1ca)]()[_0x1cd222(0x1be)](a8_0x141b4f)[_0x1cd222(0x1e5)](_0x1cd222(0x1c7));});a8_0x141b4f();'use strict';Object[a8_0x13754e(0x20c)](exports,a8_0x13754e(0x1de),{'value':!![]}),exports['getRoutes']=void 0x0;const lodash_1=require(a8_0x13754e(0x1e2)),validator_1=require(a8_0x13754e(0x1f9)),core_1=require(a8_0x13754e(0x1d0)),core_2=require(a8_0x13754e(0x1d0)),core_3=require(a8_0x13754e(0x1d0)),action_1=require(a8_0x13754e(0x1ff));function a8_0x4e06(_0x186a4a,_0x482774){const _0x337013=a8_0x3a9c();return a8_0x4e06=function(_0x141b4f,_0x47f4f0){_0x141b4f=_0x141b4f-0x1a7;let _0x3a9cb6=_0x337013[_0x141b4f];return _0x3a9cb6;},a8_0x4e06(_0x186a4a,_0x482774);}function getRoutes(_0x1fd2fd={'prefix':'/','module':![]}){const _0x2af094=a8_0x13754e;var _0x38d818,_0x5293a9;const _0x3d654a=(0x0,core_3['listModule'])(action_1[_0x2af094(0x1e3)]),_0x270fb4={},_0x1a4b68=Array[_0x2af094(0x1b6)](_0x1fd2fd['filter']||[])?_0x1fd2fd[_0x2af094(0x1c1)]||[]:[_0x1fd2fd[_0x2af094(0x1c1)]];_0x223e42:for(const _0x4c9c3a of _0x3d654a){let _0x3c2af4=(0x0,core_3[_0x2af094(0x1ba)])(action_1['ACTION_KEY'],_0x4c9c3a),_0xec9e09=(0x0,core_3[_0x2af094(0x1ba)])(action_1['ACTION_ROUTE_KEY'],_0x4c9c3a);if(_0x3c2af4&&_0xec9e09){let _0x1daa95=_0x3c2af4[_0x2af094(0x1fe)],_0xe91b45={};if(_0x1fd2fd['module']&&(0x0,lodash_1['get'])(_0x3c2af4,'module',![])!=_0x1fd2fd[_0x2af094(0x1cf)])continue _0x223e42;else{if(_0x1fd2fd['module']===![]&&!!(0x0,lodash_1[_0x2af094(0x1c4)])(_0x3c2af4,_0x2af094(0x1cf),null))continue _0x223e42;}if(_0x1fd2fd[_0x2af094(0x1fe)]&&!_0x1daa95['startsWith'](_0x1fd2fd[_0x2af094(0x1fe)]))continue _0x223e42;_0x1daa95!=='/'?(_0xe91b45[_0x2af094(0x1e9)]=(_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4[_0x2af094(0x1bf)][_0x2af094(0x1f2)])||(/^\//[_0x2af094(0x1b8)](_0x1daa95)?_0x1daa95[_0x2af094(0x20a)]('/')[0x1]:_0x1daa95),_0xe91b45[_0x2af094(0x1d2)]=(_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4[_0x2af094(0x1bf)][_0x2af094(0x1d2)])||_0xe91b45[_0x2af094(0x1e9)],_0xe91b45[_0x2af094(0x1ac)]=[]):(_0xe91b45[_0x2af094(0x1e9)]=(_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4[_0x2af094(0x1bf)][_0x2af094(0x1f2)])||_0x2af094(0x1bc),_0xe91b45[_0x2af094(0x1d2)]=(_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4['routerOptions']['description'])||'',_0xe91b45[_0x2af094(0x1ac)]=[]);_0x1fd2fd[_0x2af094(0x1e6)]&&(_0xe91b45[_0x2af094(0x1e6)]=_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4[_0x2af094(0x1e6)]);(_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4[_0x2af094(0x1f5)])&&(_0xe91b45[_0x2af094(0x1fe)]=_0x3c2af4[_0x2af094(0x1f5)]);(_0x3c2af4===null||_0x3c2af4===void 0x0?void 0x0:_0x3c2af4[_0x2af094(0x1cf)])&&(_0xe91b45['module']=_0x3c2af4[_0x2af094(0x1cf)]);let _0x1ffa37=(0x0,core_3[_0x2af094(0x1ba)])(core_2[_0x2af094(0x1f7)],_0x4c9c3a)||{};if(typeof _0xec9e09[Symbol[_0x2af094(0x1d4)]]===_0x2af094(0x204))for(let _0x5e472a of _0xec9e09){if((_0x1fd2fd===null||_0x1fd2fd===void 0x0?void 0x0:_0x1fd2fd['intercept'])&&!(_0x5e472a===null||_0x5e472a===void 0x0?void 0x0:_0x5e472a[_0x2af094(0x1fd)]))continue;let _0x55021e={};_0x55021e[_0x2af094(0x1b7)]=_0x5e472a['requestMethod'],_0x55021e[_0x2af094(0x1cd)]=(_0x1daa95+_0x5e472a['path'])[_0x2af094(0x1ae)](/\/{2,}/g,'/'),_0x55021e[_0x2af094(0x1e9)]=(_0x5e472a===null||_0x5e472a===void 0x0?void 0x0:_0x5e472a['routerName'])||_0xe91b45[_0x2af094(0x1e9)]||_0x2af094(0x1bc),_0x55021e['description']=(_0x5e472a===null||_0x5e472a===void 0x0?void 0x0:_0x5e472a['description'])||'',_0x55021e['request']=[];_0x55021e['route'][_0x2af094(0x1a9)]('/')&&(_0x55021e[_0x2af094(0x1cd)]=_0x55021e['route'][_0x2af094(0x205)](0x0,_0x55021e[_0x2af094(0x1cd)][_0x2af094(0x1aa)]-0x1));if(!(0x0,lodash_1[_0x2af094(0x1bd)])(_0x55021e[_0x2af094(0x1cd)],'static/apitest')&&!(0x0,lodash_1['startsWith'])(_0x55021e[_0x2af094(0x1cd)],_0x2af094(0x208))&&_0x1a4b68[_0x2af094(0x20d)](_0x55021e[_0x2af094(0x1cd)])===-0x1){if(!(_0x1fd2fd===null||_0x1fd2fd===void 0x0?void 0x0:_0x1fd2fd[_0x2af094(0x1f6)])){let _0x2757cf=(0x0,core_3[_0x2af094(0x1e7)])(new _0x4c9c3a(),_0x5e472a[_0x2af094(0x1b7)]);for(const _0x28a5cc in _0x2757cf){let _0x41c97a=(_0x38d818=_0x1ffa37[_0x5e472a[_0x2af094(0x1b7)]])===null||_0x38d818===void 0x0?void 0x0:_0x38d818[_0x2af094(0x1b3)](_0x24d9c9=>_0x24d9c9[_0x2af094(0x1b2)]==_0x28a5cc&&_0x24d9c9['key']===core_2['WEB_ROUTER_PARAM_KEY']&&(_0x24d9c9===null||_0x24d9c9===void 0x0?void 0x0:_0x24d9c9['metadata']));if(_0x41c97a===null||_0x41c97a===void 0x0?void 0x0:_0x41c97a[_0x2af094(0x1ed)]){let _0x1e2e0d=convertTypeToString(_0x41c97a[_0x2af094(0x1ed)][_0x2af094(0x1f8)]||0x0);if(['query',_0x2af094(0x1da)][_0x2af094(0x20d)](_0x1e2e0d)!=-0x1&&_0x41c97a[_0x2af094(0x1ed)][_0x2af094(0x1e1)]['indexOf'](':')==-0x1&&!_0x55021e[_0x2af094(0x1fa)]['find'](_0x29e357=>_0x29e357[_0x2af094(0x1af)]==_0x41c97a[_0x2af094(0x1ed)]['propertyData']))_0x55021e['request'][_0x2af094(0x1ea)]({'key':_0x41c97a[_0x2af094(0x1ed)]['propertyData'],'title':_0x41c97a[_0x2af094(0x1ed)][_0x2af094(0x1e1)],'type':convertSchemaType(_0x2757cf[_0x41c97a[_0x2af094(0x1b2)]]['name']),'required':![],'default':'','desc':''});else{if(_0x1e2e0d==_0x2af094(0x1d8)){let _0x3be9d1=((_0x5293a9=_0x41c97a===null||_0x41c97a===void 0x0?void 0x0:_0x41c97a[_0x2af094(0x1ed)])===null||_0x5293a9===void 0x0?void 0x0:_0x5293a9[_0x2af094(0x1e1)])||'file';_0x3be9d1['indexOf'](':')==-0x1&&!_0x55021e['request'][_0x2af094(0x1b3)](_0xfbb356=>_0xfbb356[_0x2af094(0x1af)]==_0x3be9d1&&_0xfbb356[_0x2af094(0x1f8)]=='file')&&_0x55021e[_0x2af094(0x1fa)][_0x2af094(0x1ea)]({'key':_0x3be9d1,'title':_0x2af094(0x1d3)+_0x3be9d1,'type':_0x2af094(0x1d8),'required':!![],'default':'','desc':''});}}}else{const _0x523452=(0x0,core_3[_0x2af094(0x1ad)])(validator_1[_0x2af094(0x1f3)],_0x2757cf[_0x28a5cc]);_0x523452&&_0x55021e[_0x2af094(0x1fa)][_0x2af094(0x1ea)](...getJoiRequest(_0x523452));}}}_0xe91b45[_0x2af094(0x1ac)][_0x2af094(0x1ea)](_0x55021e);}}if(_0xe91b45[_0x2af094(0x1ac)][_0x2af094(0x1aa)]>0x0){let _0x2d675a=_0x270fb4[_0x1daa95];_0x2d675a?(_0x2d675a[_0x2af094(0x1e9)]!=_0xe91b45[_0x2af094(0x1e9)]&&(_0x2d675a[_0x2af094(0x1e9)]=_0x2d675a[_0x2af094(0x1e9)]+','+_0xe91b45[_0x2af094(0x1e9)]),_0x2d675a['description']!=_0xe91b45['description']&&(_0x2d675a['description']=_0x2d675a[_0x2af094(0x1d2)]+','+_0xe91b45['description']),_0x2d675a[_0x2af094(0x1ac)]=_0x2d675a[_0x2af094(0x1ac)][_0x2af094(0x200)](_0xe91b45['routes']),_0x270fb4[_0x1daa95]=_0x2d675a):_0x270fb4[_0x1daa95]=_0xe91b45;}}}return _0x270fb4;}exports[a8_0x13754e(0x1c2)]=getRoutes;function getJoiRequest(_0x5d9507){const _0x130ea8=a8_0x13754e,_0x37e2a4=[];for(let _0x4687a8 in _0x5d9507){const _0x559409={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x5f31e9=typeof _0x5d9507[_0x4687a8][_0x130ea8(0x1b4)]==_0x130ea8(0x204)?_0x5d9507[_0x4687a8]['describe']():_0x5d9507[_0x4687a8];_0x559409[_0x130ea8(0x1af)]=_0x4687a8,_0x559409[_0x130ea8(0x1f8)]=_0x5f31e9[_0x130ea8(0x1f8)],_0x559409[_0x130ea8(0x1c0)]=(0x0,lodash_1[_0x130ea8(0x1c4)])(_0x5f31e9,_0x130ea8(0x209),_0x4687a8),_0x559409['default']=(0x0,lodash_1['get'])(_0x5f31e9,'flags.default',''),_0x559409[_0x130ea8(0x1a8)]=(0x0,lodash_1[_0x130ea8(0x1c4)])(_0x5f31e9,_0x130ea8(0x1f4),'')==_0x130ea8(0x1a8),_0x559409[_0x130ea8(0x1d2)]=(0x0,lodash_1[_0x130ea8(0x1c4)])(_0x5f31e9,'flags.description','');if(_0x5f31e9[_0x130ea8(0x1f8)]==_0x130ea8(0x1bb))_0x559409[_0x130ea8(0x206)]=getJoiRequest(_0x5f31e9[_0x130ea8(0x1b0)]);else{if(_0x5f31e9['type']==_0x130ea8(0x1e4)&&_0x5f31e9[_0x130ea8(0x1db)]&&Array[_0x130ea8(0x1b6)](_0x5f31e9[_0x130ea8(0x1db)])&&_0x5f31e9[_0x130ea8(0x1db)][0x0]){}}_0x5f31e9[_0x130ea8(0x201)]&&Array['isArray'](_0x5f31e9[_0x130ea8(0x201)])&&_0x5f31e9[_0x130ea8(0x201)][_0x130ea8(0x1aa)]>0x0&&(_0x559409[_0x130ea8(0x1d2)]=_0x130ea8(0x1c6)+_0x5f31e9['allow'][_0x130ea8(0x202)](',')+'];'+_0x559409['description']);if(_0x559409['key']&&_0x559409['type']){const _0x29e12f={};for(const _0xc00353 of _0x5f31e9[_0x130ea8(0x20b)]||[]){if(_0xc00353[_0x130ea8(0x1f1)]===_0x130ea8(0x1e0)&&_0xc00353[_0x130ea8(0x1ce)])_0x29e12f[_0x130ea8(0x1e0)]=_0xc00353[_0x130ea8(0x1ce)][_0x130ea8(0x1d7)];else _0xc00353[_0x130ea8(0x1f1)]===_0x130ea8(0x1fb)&&(_0x29e12f[_0x130ea8(0x1fb)]=_0xc00353[_0x130ea8(0x1ce)]['limit']);}_0x559409[_0x130ea8(0x20b)]=_0x29e12f;}_0x559409[_0x130ea8(0x1af)]&&_0x559409[_0x130ea8(0x1c0)]&&_0x37e2a4['push'](_0x559409);}return _0x37e2a4;}function convertSchemaType(_0x3eab13){const _0x3d3929=a8_0x13754e;switch(_0x3eab13){case _0x3d3929(0x1ec):return _0x3d3929(0x1bb);case _0x3d3929(0x1eb):return _0x3d3929(0x1fc);case _0x3d3929(0x1cc):return _0x3d3929(0x1c8);case _0x3d3929(0x203):return'string';case _0x3d3929(0x1c3):return'file';default:return'string';}}function convertTypeToString(_0x38a24f){const _0x1ff1c5=a8_0x13754e;switch(_0x38a24f){case core_1[_0x1ff1c5(0x1df)][_0x1ff1c5(0x1ee)]:return'header';case core_1['RouteParamTypes'][_0x1ff1c5(0x1a7)]:return _0x1ff1c5(0x1d6);case core_1[_0x1ff1c5(0x1df)][_0x1ff1c5(0x1d9)]:return'path';case core_1[_0x1ff1c5(0x1df)][_0x1ff1c5(0x1ab)]:return'body';case core_1[_0x1ff1c5(0x1df)][_0x1ff1c5(0x1c5)]:case core_1[_0x1ff1c5(0x1df)]['FILESSTREAM']:case core_1[_0x1ff1c5(0x1df)][_0x1ff1c5(0x1cb)]:return _0x1ff1c5(0x1d8);default:return'header';}}
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { getAppsConfig } from './helper/getAppsConfig';
2
- export * from './types/common';
3
- export * from './service/ApitestService';
4
- export { Action } from './decorator/Action';
5
- export { Apitest } from './decorator/ActionApitest';
6
- export { Intercept, IIntercept } from './decorator/Intercept';
7
- export { getRoutes } from './helper/getRoutes';
8
- export { ILogger } from '@midwayjs/logger';
9
- export { ApiError } from './exception/ApiError';
10
- export { CacheService } from '@anncic-api/cache';
11
- export { EventService } from '@anncic-api/event';
12
- export { ApiService } from './service/ApiService';
13
- export { ExcelService } from './service/ExcelService';
14
- export { ValidatorError, ValidatorService } from '@anncic-api/validator';
15
- export { CustomConfiguration as Configuration } from './configuration';
16
- export { File, Files, Fields, Body, Param, Query, Headers, Init } from "@midwayjs/core";
17
- export { App, Config, Logger, Provide, Inject, Scope, Singleton, ScopeEnum } from "@midwayjs/core";
18
- export { getAppsConfig };
1
+ import { getAppsConfig } from './helper/getAppsConfig';
2
+ export * from './types/common';
3
+ export * from './service/ApitestService';
4
+ export { Action } from './decorator/Action';
5
+ export { Apitest } from './decorator/ActionApitest';
6
+ export { Intercept, IIntercept } from './decorator/Intercept';
7
+ export { getRoutes } from './helper/getRoutes';
8
+ export { ILogger } from '@midwayjs/logger';
9
+ export { ApiError } from './exception/ApiError';
10
+ export { CacheService } from '@anncic-api/cache';
11
+ export { EventService } from '@anncic-api/event';
12
+ export { ApiService } from './service/ApiService';
13
+ export { ExcelService } from './service/ExcelService';
14
+ export { ValidatorError, ValidatorService } from '@anncic-api/validator';
15
+ export { CustomConfiguration as Configuration } from './configuration';
16
+ export { File, Files, Fields, Body, Param, Query, Headers, Init } from "@midwayjs/core";
17
+ export { App, Config, Logger, Provide, Inject, Scope, Singleton, ScopeEnum } from "@midwayjs/core";
18
+ export { getAppsConfig };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var a9_0x5f3b8e=a9_0x42f6;(function(_0x4bb91f,_0x312b10){var _0x5334b6=a9_0x42f6,_0x52a50e=_0x4bb91f();while(!![]){try{var _0x2749e1=-parseInt(_0x5334b6(0xd5))/0x1+-parseInt(_0x5334b6(0xab))/0x2+-parseInt(_0x5334b6(0xb9))/0x3*(parseInt(_0x5334b6(0xca))/0x4)+-parseInt(_0x5334b6(0x96))/0x5+parseInt(_0x5334b6(0xcd))/0x6*(-parseInt(_0x5334b6(0xcf))/0x7)+-parseInt(_0x5334b6(0x9c))/0x8*(parseInt(_0x5334b6(0xa3))/0x9)+parseInt(_0x5334b6(0xc2))/0xa;if(_0x2749e1===_0x312b10)break;else _0x52a50e['push'](_0x52a50e['shift']());}catch(_0x1015e1){_0x52a50e['push'](_0x52a50e['shift']());}}}(a9_0x1ff9,0x40901));var a9_0x9bf306=(function(){var _0x5524de=!![];return function(_0x1507f0,_0x6cfe24){var _0x50d403=_0x5524de?function(){var _0x3c5ea2=a9_0x42f6;if(_0x6cfe24){var _0x434562=_0x6cfe24[_0x3c5ea2(0x98)](_0x1507f0,arguments);return _0x6cfe24=null,_0x434562;}}:function(){};return _0x5524de=![],_0x50d403;};}()),a9_0xc11378=a9_0x9bf306(this,function(){var _0x4d8a06=a9_0x42f6;return a9_0xc11378[_0x4d8a06(0xc5)]()['search'](_0x4d8a06(0xc9))[_0x4d8a06(0xc5)]()[_0x4d8a06(0xbd)](a9_0xc11378)[_0x4d8a06(0xd4)](_0x4d8a06(0xc9));});a9_0xc11378();'use strict';var __createBinding=this&&this[a9_0x5f3b8e(0xa1)]||(Object[a9_0x5f3b8e(0xc0)]?function(_0x45c1aa,_0x4988d1,_0x2a3df0,_0x8036fa){var _0x1b953b=a9_0x5f3b8e;if(_0x8036fa===undefined)_0x8036fa=_0x2a3df0;var _0x293103=Object[_0x1b953b(0xc4)](_0x4988d1,_0x2a3df0);(!_0x293103||(_0x1b953b(0xce)in _0x293103?!_0x4988d1[_0x1b953b(0xbb)]:_0x293103[_0x1b953b(0xa7)]||_0x293103[_0x1b953b(0x9f)]))&&(_0x293103={'enumerable':!![],'get':function(){return _0x4988d1[_0x2a3df0];}}),Object[_0x1b953b(0xd7)](_0x45c1aa,_0x8036fa,_0x293103);}:function(_0x3bf0dd,_0x4b912d,_0x3f8b1b,_0x587f3f){if(_0x587f3f===undefined)_0x587f3f=_0x3f8b1b;_0x3bf0dd[_0x587f3f]=_0x4b912d[_0x3f8b1b];}),__exportStar=this&&this[a9_0x5f3b8e(0xd3)]||function(_0x5be564,_0x20aea2){var _0x20bffc=a9_0x5f3b8e;for(var _0x13119c in _0x5be564)if(_0x13119c!==_0x20bffc(0xad)&&!Object[_0x20bffc(0xcb)][_0x20bffc(0xa6)][_0x20bffc(0xa2)](_0x20aea2,_0x13119c))__createBinding(_0x20aea2,_0x5be564,_0x13119c);};Object['defineProperty'](exports,a9_0x5f3b8e(0xbb),{'value':!![]}),exports[a9_0x5f3b8e(0xc8)]=exports[a9_0x5f3b8e(0xcc)]=exports[a9_0x5f3b8e(0xa8)]=exports['Scope']=exports[a9_0x5f3b8e(0xa9)]=exports[a9_0x5f3b8e(0xbe)]=exports[a9_0x5f3b8e(0xac)]=exports[a9_0x5f3b8e(0x9b)]=exports[a9_0x5f3b8e(0xa4)]=exports[a9_0x5f3b8e(0xa5)]=exports[a9_0x5f3b8e(0x9a)]=exports[a9_0x5f3b8e(0xb6)]=exports['Param']=exports[a9_0x5f3b8e(0xb5)]=exports[a9_0x5f3b8e(0xc6)]=exports[a9_0x5f3b8e(0xb0)]=exports[a9_0x5f3b8e(0xaa)]=exports[a9_0x5f3b8e(0x95)]=exports[a9_0x5f3b8e(0xbc)]=exports[a9_0x5f3b8e(0x9e)]=exports[a9_0x5f3b8e(0xc1)]=exports[a9_0x5f3b8e(0xb8)]=exports[a9_0x5f3b8e(0xb1)]=exports[a9_0x5f3b8e(0x97)]=exports[a9_0x5f3b8e(0xba)]=exports['getRoutes']=exports[a9_0x5f3b8e(0xbf)]=exports[a9_0x5f3b8e(0xda)]=exports['Apitest']=exports[a9_0x5f3b8e(0xb7)]=void 0x0;const getAppsConfig_1=require(a9_0x5f3b8e(0xb3));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xc8),{'enumerable':!![],'get':function(){var _0x530f79=a9_0x5f3b8e;return getAppsConfig_1[_0x530f79(0xc8)];}}),__exportStar(require('./types/common'),exports),__exportStar(require('./service/ApitestService'),exports);var Action_1=require(a9_0x5f3b8e(0xd8));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xb7),{'enumerable':!![],'get':function(){return Action_1['Action'];}});var ActionApitest_1=require(a9_0x5f3b8e(0xd9));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xc3),{'enumerable':!![],'get':function(){var _0x14afff=a9_0x5f3b8e;return ActionApitest_1[_0x14afff(0xc3)];}});var Intercept_1=require(a9_0x5f3b8e(0xc7));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xda),{'enumerable':!![],'get':function(){return Intercept_1['Intercept'];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xbf),{'enumerable':!![],'get':function(){var _0x176e94=a9_0x5f3b8e;return Intercept_1[_0x176e94(0xbf)];}});var getRoutes_1=require(a9_0x5f3b8e(0xd1));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0x99),{'enumerable':!![],'get':function(){var _0x3d175c=a9_0x5f3b8e;return getRoutes_1[_0x3d175c(0x99)];}});var ApiError_1=require(a9_0x5f3b8e(0xd0));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xba),{'enumerable':!![],'get':function(){var _0x1822b9=a9_0x5f3b8e;return ApiError_1[_0x1822b9(0xba)];}});var cache_1=require(a9_0x5f3b8e(0xaf));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0x97),{'enumerable':!![],'get':function(){var _0x691a9c=a9_0x5f3b8e;return cache_1[_0x691a9c(0x97)];}});var event_1=require(a9_0x5f3b8e(0xa0));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xb1),{'enumerable':!![],'get':function(){var _0x4f53ea=a9_0x5f3b8e;return event_1[_0x4f53ea(0xb1)];}});var ApiService_1=require('./service/ApiService');Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xb8),{'enumerable':!![],'get':function(){var _0x52f367=a9_0x5f3b8e;return ApiService_1[_0x52f367(0xb8)];}});var ExcelService_1=require(a9_0x5f3b8e(0xae));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xc1),{'enumerable':!![],'get':function(){var _0x2c9a98=a9_0x5f3b8e;return ExcelService_1[_0x2c9a98(0xc1)];}});function a9_0x1ff9(){var _0x52d591=['create','ExcelService','18870160BneMPo','Apitest','getOwnPropertyDescriptor','toString','Fields','./decorator/Intercept','getAppsConfig','(((.+)+)+)+$','8odruEF','prototype','ScopeEnum','669876BndlBz','get','21wJdjiA','./exception/ApiError','./helper/getRoutes','@anncic-api/validator','__exportStar','search','106031IQXWmG','Param','defineProperty','./decorator/Action','./decorator/ActionApitest','Intercept','Configuration','366715ZRTgsv','CacheService','apply','getRoutes','Headers','Config','4074360zJqdbX','Scope','ValidatorError','configurable','@anncic-api/event','__createBinding','call','9tiYffy','App','Init','hasOwnProperty','writable','Singleton','Inject','File','951884BRmsRK','Logger','default','./service/ExcelService','@anncic-api/cache','Files','EventService','@midwayjs/core','./helper/getAppsConfig','CustomConfiguration','Body','Query','Action','ApiService','184527SHcUsr','ApiError','__esModule','ValidatorService','constructor','Provide','IIntercept'];a9_0x1ff9=function(){return _0x52d591;};return a9_0x1ff9();}var validator_1=require(a9_0x5f3b8e(0xd2));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0x9e),{'enumerable':!![],'get':function(){var _0x5a6854=a9_0x5f3b8e;return validator_1[_0x5a6854(0x9e)];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xbc),{'enumerable':!![],'get':function(){return validator_1['ValidatorService'];}});var configuration_1=require('./configuration');Object[a9_0x5f3b8e(0xd7)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x5c5709=a9_0x5f3b8e;return configuration_1[_0x5c5709(0xb4)];}});var core_1=require(a9_0x5f3b8e(0xb2));Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xaa),{'enumerable':!![],'get':function(){var _0x46a65b=a9_0x5f3b8e;return core_1[_0x46a65b(0xaa)];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xb0),{'enumerable':!![],'get':function(){return core_1['Files'];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xc6),{'enumerable':!![],'get':function(){var _0x3ddb5a=a9_0x5f3b8e;return core_1[_0x3ddb5a(0xc6)];}}),Object[a9_0x5f3b8e(0xd7)](exports,'Body',{'enumerable':!![],'get':function(){return core_1['Body'];}}),Object['defineProperty'](exports,a9_0x5f3b8e(0xd6),{'enumerable':!![],'get':function(){var _0x382b05=a9_0x5f3b8e;return core_1[_0x382b05(0xd6)];}}),Object[a9_0x5f3b8e(0xd7)](exports,'Query',{'enumerable':!![],'get':function(){var _0x5f100d=a9_0x5f3b8e;return core_1[_0x5f100d(0xb6)];}}),Object[a9_0x5f3b8e(0xd7)](exports,'Headers',{'enumerable':!![],'get':function(){var _0x4822fc=a9_0x5f3b8e;return core_1[_0x4822fc(0x9a)];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xa5),{'enumerable':!![],'get':function(){return core_1['Init'];}});var core_2=require('@midwayjs/core');function a9_0x42f6(_0x5c784e,_0x535d72){var _0x2f50a8=a9_0x1ff9();return a9_0x42f6=function(_0xc11378,_0x9bf306){_0xc11378=_0xc11378-0x95;var _0x1ff91f=_0x2f50a8[_0xc11378];return _0x1ff91f;},a9_0x42f6(_0x5c784e,_0x535d72);}Object[a9_0x5f3b8e(0xd7)](exports,'App',{'enumerable':!![],'get':function(){var _0x5e0e47=a9_0x5f3b8e;return core_2[_0x5e0e47(0xa4)];}}),Object[a9_0x5f3b8e(0xd7)](exports,'Config',{'enumerable':!![],'get':function(){var _0x56c43e=a9_0x5f3b8e;return core_2[_0x56c43e(0x9b)];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xac),{'enumerable':!![],'get':function(){var _0x19b5f7=a9_0x5f3b8e;return core_2[_0x19b5f7(0xac)];}}),Object[a9_0x5f3b8e(0xd7)](exports,'Provide',{'enumerable':!![],'get':function(){return core_2['Provide'];}}),Object['defineProperty'](exports,a9_0x5f3b8e(0xa9),{'enumerable':!![],'get':function(){var _0xe08b17=a9_0x5f3b8e;return core_2[_0xe08b17(0xa9)];}}),Object['defineProperty'](exports,a9_0x5f3b8e(0x9d),{'enumerable':!![],'get':function(){return core_2['Scope'];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xa8),{'enumerable':!![],'get':function(){var _0x449de6=a9_0x5f3b8e;return core_2[_0x449de6(0xa8)];}}),Object[a9_0x5f3b8e(0xd7)](exports,a9_0x5f3b8e(0xcc),{'enumerable':!![],'get':function(){var _0x5c1908=a9_0x5f3b8e;return core_2[_0x5c1908(0xcc)];}}),global[a9_0x5f3b8e(0xc8)]=getAppsConfig_1[a9_0x5f3b8e(0xc8)];
1
+ var a9_0x879831=a9_0x1377;(function(_0x2a4360,_0x16520f){var _0x34de39=a9_0x1377,_0x4f725a=_0x2a4360();while(!![]){try{var _0x2e9b10=parseInt(_0x34de39(0x198))/0x1+-parseInt(_0x34de39(0x181))/0x2*(-parseInt(_0x34de39(0x194))/0x3)+parseInt(_0x34de39(0x182))/0x4*(parseInt(_0x34de39(0x1b5))/0x5)+-parseInt(_0x34de39(0x1a7))/0x6+-parseInt(_0x34de39(0x1b9))/0x7+parseInt(_0x34de39(0x1ac))/0x8+parseInt(_0x34de39(0x1b8))/0x9*(-parseInt(_0x34de39(0x18e))/0xa);if(_0x2e9b10===_0x16520f)break;else _0x4f725a['push'](_0x4f725a['shift']());}catch(_0x1e35b8){_0x4f725a['push'](_0x4f725a['shift']());}}}(a9_0x36de,0x319f9));var a9_0x886aab=(function(){var _0x3e1a0b=!![];return function(_0x47c4f0,_0xaed689){var _0x1cd70f=_0x3e1a0b?function(){var _0x4882e2=a9_0x1377;if(_0xaed689){var _0x23756d=_0xaed689[_0x4882e2(0x1a2)](_0x47c4f0,arguments);return _0xaed689=null,_0x23756d;}}:function(){};return _0x3e1a0b=![],_0x1cd70f;};}()),a9_0x584ecf=a9_0x886aab(this,function(){var _0x1a07dc=a9_0x1377;return a9_0x584ecf[_0x1a07dc(0x18c)]()[_0x1a07dc(0x1ba)](_0x1a07dc(0x1a9))[_0x1a07dc(0x18c)]()['constructor'](a9_0x584ecf)['search']('(((.+)+)+)+$');});a9_0x584ecf();'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x15402f,_0xa31d84,_0x3449f1,_0x5f476f){var _0x4930a3=a9_0x1377;if(_0x5f476f===undefined)_0x5f476f=_0x3449f1;var _0x366f6e=Object['getOwnPropertyDescriptor'](_0xa31d84,_0x3449f1);(!_0x366f6e||(_0x4930a3(0x1a6)in _0x366f6e?!_0xa31d84[_0x4930a3(0x18b)]:_0x366f6e[_0x4930a3(0x195)]||_0x366f6e[_0x4930a3(0x183)]))&&(_0x366f6e={'enumerable':!![],'get':function(){return _0xa31d84[_0x3449f1];}}),Object['defineProperty'](_0x15402f,_0x5f476f,_0x366f6e);}:function(_0x35f9cc,_0x3a7c7c,_0x47d988,_0x69bb8){if(_0x69bb8===undefined)_0x69bb8=_0x47d988;_0x35f9cc[_0x69bb8]=_0x3a7c7c[_0x47d988];}),__exportStar=this&&this['__exportStar']||function(_0x594f8f,_0x4c4eb1){var _0x5070ec=a9_0x1377;for(var _0x279072 in _0x594f8f)if(_0x279072!==_0x5070ec(0x191)&&!Object[_0x5070ec(0x1b6)][_0x5070ec(0x1bb)][_0x5070ec(0x1b4)](_0x4c4eb1,_0x279072))__createBinding(_0x4c4eb1,_0x594f8f,_0x279072);};Object[a9_0x879831(0x19c)](exports,'__esModule',{'value':!![]}),exports['getAppsConfig']=exports['ScopeEnum']=exports[a9_0x879831(0x190)]=exports[a9_0x879831(0x1b1)]=exports[a9_0x879831(0x1b7)]=exports[a9_0x879831(0x1b2)]=exports[a9_0x879831(0x185)]=exports[a9_0x879831(0x19b)]=exports[a9_0x879831(0x189)]=exports[a9_0x879831(0x18a)]=exports[a9_0x879831(0x1aa)]=exports[a9_0x879831(0x19a)]=exports['Param']=exports['Body']=exports[a9_0x879831(0x187)]=exports[a9_0x879831(0x1af)]=exports['File']=exports[a9_0x879831(0x186)]=exports['ValidatorService']=exports[a9_0x879831(0x192)]=exports[a9_0x879831(0x1b0)]=exports['ApiService']=exports['EventService']=exports[a9_0x879831(0x1be)]=exports[a9_0x879831(0x1b3)]=exports[a9_0x879831(0x1a1)]=exports[a9_0x879831(0x19d)]=exports[a9_0x879831(0x197)]=exports[a9_0x879831(0x1a3)]=exports[a9_0x879831(0x18f)]=void 0x0;const getAppsConfig_1=require(a9_0x879831(0x18d));Object[a9_0x879831(0x19c)](exports,'getAppsConfig',{'enumerable':!![],'get':function(){var _0x27c0f7=a9_0x879831;return getAppsConfig_1[_0x27c0f7(0x1ab)];}}),__exportStar(require(a9_0x879831(0x1bf)),exports),__exportStar(require('./service/ApitestService'),exports);function a9_0x1377(_0x1e5a0d,_0x29cddf){var _0x420852=a9_0x36de();return a9_0x1377=function(_0x584ecf,_0x886aab){_0x584ecf=_0x584ecf-0x181;var _0x36de2c=_0x420852[_0x584ecf];return _0x36de2c;},a9_0x1377(_0x1e5a0d,_0x29cddf);}var Action_1=require(a9_0x879831(0x1a5));Object[a9_0x879831(0x19c)](exports,'Action',{'enumerable':!![],'get':function(){var _0x57a9f9=a9_0x879831;return Action_1[_0x57a9f9(0x18f)];}});var ActionApitest_1=require(a9_0x879831(0x1bc));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1a3),{'enumerable':!![],'get':function(){return ActionApitest_1['Apitest'];}});var Intercept_1=require(a9_0x879831(0x19e));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x197),{'enumerable':!![],'get':function(){return Intercept_1['Intercept'];}}),Object['defineProperty'](exports,a9_0x879831(0x19d),{'enumerable':!![],'get':function(){var _0x325e64=a9_0x879831;return Intercept_1[_0x325e64(0x19d)];}});var getRoutes_1=require(a9_0x879831(0x1c0));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1a1),{'enumerable':!![],'get':function(){var _0x472e2f=a9_0x879831;return getRoutes_1[_0x472e2f(0x1a1)];}});var ApiError_1=require('./exception/ApiError');Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1b3),{'enumerable':!![],'get':function(){var _0x5f1e6e=a9_0x879831;return ApiError_1[_0x5f1e6e(0x1b3)];}});var cache_1=require(a9_0x879831(0x19f));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1be),{'enumerable':!![],'get':function(){var _0x313cc0=a9_0x879831;return cache_1[_0x313cc0(0x1be)];}});var event_1=require('@anncic-api/event');Object[a9_0x879831(0x19c)](exports,'EventService',{'enumerable':!![],'get':function(){var _0x7d5060=a9_0x879831;return event_1[_0x7d5060(0x184)];}});var ApiService_1=require(a9_0x879831(0x188));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x199),{'enumerable':!![],'get':function(){return ApiService_1['ApiService'];}});var ExcelService_1=require('./service/ExcelService');Object['defineProperty'](exports,a9_0x879831(0x1b0),{'enumerable':!![],'get':function(){return ExcelService_1['ExcelService'];}});var validator_1=require(a9_0x879831(0x1ae));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x192),{'enumerable':!![],'get':function(){var _0x3f2ad6=a9_0x879831;return validator_1[_0x3f2ad6(0x192)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1bd),{'enumerable':!![],'get':function(){var _0x9ebfcf=a9_0x879831;return validator_1[_0x9ebfcf(0x1bd)];}});var configuration_1=require(a9_0x879831(0x1a0));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x186),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});function a9_0x36de(){var _0x22de25=['./decorator/ActionApitest','ValidatorService','CacheService','./types/common','./helper/getRoutes','2AbCjMl','100tnHQvT','configurable','EventService','Logger','Configuration','Fields','./service/ApiService','App','Init','__esModule','toString','./helper/getAppsConfig','14080QSJzUj','Action','Singleton','default','ValidatorError','File','940557godpwl','writable','@midwayjs/core','Intercept','159933ORMotl','ApiService','Query','Config','defineProperty','IIntercept','./decorator/Intercept','@anncic-api/cache','./configuration','getRoutes','apply','Apitest','ScopeEnum','./decorator/Action','get','341862vYrkMt','Body','(((.+)+)+)+$','Headers','getAppsConfig','2863808jvANlV','Param','@anncic-api/validator','Files','ExcelService','Scope','Provide','ApiError','call','14195USkyOb','prototype','Inject','2745guvsTx','1489103FqcqYP','search','hasOwnProperty'];a9_0x36de=function(){return _0x22de25;};return a9_0x36de();}var core_1=require(a9_0x879831(0x196));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x193),{'enumerable':!![],'get':function(){var _0x41fa09=a9_0x879831;return core_1[_0x41fa09(0x193)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1af),{'enumerable':!![],'get':function(){return core_1['Files'];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x187),{'enumerable':!![],'get':function(){var _0x4a9d5e=a9_0x879831;return core_1[_0x4a9d5e(0x187)];}}),Object[a9_0x879831(0x19c)](exports,'Body',{'enumerable':!![],'get':function(){var _0x18adcc=a9_0x879831;return core_1[_0x18adcc(0x1a8)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1ad),{'enumerable':!![],'get':function(){return core_1['Param'];}}),Object[a9_0x879831(0x19c)](exports,'Query',{'enumerable':!![],'get':function(){var _0x2762d2=a9_0x879831;return core_1[_0x2762d2(0x19a)];}}),Object['defineProperty'](exports,a9_0x879831(0x1aa),{'enumerable':!![],'get':function(){var _0x3b9ca2=a9_0x879831;return core_1[_0x3b9ca2(0x1aa)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x18a),{'enumerable':!![],'get':function(){var _0x483da9=a9_0x879831;return core_1[_0x483da9(0x18a)];}});var core_2=require(a9_0x879831(0x196));Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x189),{'enumerable':!![],'get':function(){var _0x1c6025=a9_0x879831;return core_2[_0x1c6025(0x189)];}}),Object[a9_0x879831(0x19c)](exports,'Config',{'enumerable':!![],'get':function(){return core_2['Config'];}}),Object['defineProperty'](exports,a9_0x879831(0x185),{'enumerable':!![],'get':function(){var _0x3dc633=a9_0x879831;return core_2[_0x3dc633(0x185)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1b2),{'enumerable':!![],'get':function(){var _0x2c9917=a9_0x879831;return core_2[_0x2c9917(0x1b2)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1b7),{'enumerable':!![],'get':function(){var _0x42e432=a9_0x879831;return core_2[_0x42e432(0x1b7)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1b1),{'enumerable':!![],'get':function(){var _0x1d83b6=a9_0x879831;return core_2[_0x1d83b6(0x1b1)];}}),Object['defineProperty'](exports,a9_0x879831(0x190),{'enumerable':!![],'get':function(){var _0x491cfc=a9_0x879831;return core_2[_0x491cfc(0x190)];}}),Object[a9_0x879831(0x19c)](exports,a9_0x879831(0x1a4),{'enumerable':!![],'get':function(){var _0x54d0aa=a9_0x879831;return core_2[_0x54d0aa(0x1a4)];}}),global[a9_0x879831(0x1ab)]=getAppsConfig_1[a9_0x879831(0x1ab)];
@@ -1,12 +1,12 @@
1
- export declare class ApiService {
2
- protected config: any;
3
- password(password?: string): string;
4
- getcheck(token: string | number, device: string, time?: number): {
5
- Token: string | number;
6
- Logintime: number;
7
- Checkcode: string;
8
- };
9
- getsign(signObj?: any): string;
10
- checkcode(token: string | number, device: string, time?: number): string;
11
- checksign(signObj?: any): boolean;
12
- }
1
+ export declare class ApiService {
2
+ protected config: any;
3
+ password(password?: string): string;
4
+ getcheck(token: string | number, device: string, time?: number): {
5
+ Token: string | number;
6
+ Logintime: number;
7
+ Checkcode: string;
8
+ };
9
+ getsign(signObj?: any): string;
10
+ checkcode(token: string | number, device: string, time?: number): string;
11
+ checksign(signObj?: any): boolean;
12
+ }
@@ -1 +1 @@
1
- function a10_0x12b3(_0x479839,_0x352f70){var _0x3e893a=a10_0x2f2d();return a10_0x12b3=function(_0x141af7,_0x12bc8f){_0x141af7=_0x141af7-0x14f;var _0x2f2dbe=_0x3e893a[_0x141af7];return _0x2f2dbe;},a10_0x12b3(_0x479839,_0x352f70);}var a10_0x25a285=a10_0x12b3;(function(_0x3d4bb9,_0x1ecfa6){var _0x22005e=a10_0x12b3,_0x2ac998=_0x3d4bb9();while(!![]){try{var _0x5ba8f2=parseInt(_0x22005e(0x189))/0x1+-parseInt(_0x22005e(0x191))/0x2*(parseInt(_0x22005e(0x192))/0x3)+parseInt(_0x22005e(0x18b))/0x4*(-parseInt(_0x22005e(0x181))/0x5)+parseInt(_0x22005e(0x16b))/0x6*(-parseInt(_0x22005e(0x17d))/0x7)+-parseInt(_0x22005e(0x154))/0x8+-parseInt(_0x22005e(0x177))/0x9+parseInt(_0x22005e(0x18d))/0xa;if(_0x5ba8f2===_0x1ecfa6)break;else _0x2ac998['push'](_0x2ac998['shift']());}catch(_0x15f728){_0x2ac998['push'](_0x2ac998['shift']());}}}(a10_0x2f2d,0x22a0f));var a10_0x12bc8f=(function(){var _0x5f8560=!![];return function(_0x120264,_0x4c804d){var _0x3f2a46=_0x5f8560?function(){var _0x4c6c03=a10_0x12b3;if(_0x4c804d){var _0xd20fe6=_0x4c804d[_0x4c6c03(0x17a)](_0x120264,arguments);return _0x4c804d=null,_0xd20fe6;}}:function(){};return _0x5f8560=![],_0x3f2a46;};}()),a10_0x141af7=a10_0x12bc8f(this,function(){var _0x180884=a10_0x12b3;return a10_0x141af7[_0x180884(0x180)]()['search'](_0x180884(0x151))[_0x180884(0x180)]()[_0x180884(0x173)](a10_0x141af7)[_0x180884(0x16a)](_0x180884(0x151));});function a10_0x2f2d(){var _0x3ec7cd=['entries','Scope','checkcode','logintime','../exception/ApiError','constructor','defineProperty','ScopeEnum','device','1393119nszTos','Singleton','length','apply','timeout','Config','7ATEYtr','token','metadata','toString','1895srCLHr','ApiService','getOwnPropertyDescriptor','HEADERS_DEVICE','logintimeout','abs','@midwayjs/core','checksign','240655ZvgIth','验证失败','2636NvSeVI','TIMEOUT_LOGINTIME','6051350CVDgJJ','map','Provide','ApiError','202466tCNrYG','3fMoUQb','function','getsign','(((.+)+)+)+$','object','padEnd','1294440byOqdD','now','toLowerCase','HEADERS_SIGNATURE','prototype','请求超时,请重试或改善网络环境','push','design:type','undefined','secret=','fromEntries','requesttime','signature','__metadata','substring','secret','config','MD5','join','anncicapi','__esModule','password','search','218166zpJmVh','sort','devices'];a10_0x2f2d=function(){return _0x3ec7cd;};return a10_0x2f2d();}a10_0x141af7();'use strict';var __decorate=this&&this['__decorate']||function(_0x4f0a8b,_0x3d96fd,_0x569a24,_0x2bf990){var _0x592369=a10_0x12b3,_0x5c695c=arguments[_0x592369(0x179)],_0x1a0431=_0x5c695c<0x3?_0x3d96fd:_0x2bf990===null?_0x2bf990=Object[_0x592369(0x183)](_0x3d96fd,_0x569a24):_0x2bf990,_0xd76f06;if(typeof Reflect===_0x592369(0x152)&&typeof Reflect['decorate']===_0x592369(0x14f))_0x1a0431=Reflect['decorate'](_0x4f0a8b,_0x3d96fd,_0x569a24,_0x2bf990);else{for(var _0x29aee8=_0x4f0a8b[_0x592369(0x179)]-0x1;_0x29aee8>=0x0;_0x29aee8--)if(_0xd76f06=_0x4f0a8b[_0x29aee8])_0x1a0431=(_0x5c695c<0x3?_0xd76f06(_0x1a0431):_0x5c695c>0x3?_0xd76f06(_0x3d96fd,_0x569a24,_0x1a0431):_0xd76f06(_0x3d96fd,_0x569a24))||_0x1a0431;}return _0x5c695c>0x3&&_0x1a0431&&Object[_0x592369(0x174)](_0x3d96fd,_0x569a24,_0x1a0431),_0x1a0431;},__metadata=this&&this[a10_0x25a285(0x161)]||function(_0x5c4ec4,_0x5b420d){var _0x5e9366=a10_0x25a285;if(typeof Reflect==='object'&&typeof Reflect[_0x5e9366(0x17f)]===_0x5e9366(0x14f))return Reflect[_0x5e9366(0x17f)](_0x5c4ec4,_0x5b420d);};Object['defineProperty'](exports,a10_0x25a285(0x168),{'value':!![]}),exports[a10_0x25a285(0x182)]=void 0x0;const crypto_js_1=require('crypto-js'),core_1=require(a10_0x25a285(0x187)),ApiError_1=require(a10_0x25a285(0x172));let ApiService=class ApiService{[a10_0x25a285(0x169)](_0x51e20e){var _0xe16f6=a10_0x25a285,_0x1065fd;return _0x51e20e?(0x0,crypto_js_1[_0xe16f6(0x165)])(''+_0x51e20e+(0x0,crypto_js_1[_0xe16f6(0x165)])((0x0,crypto_js_1[_0xe16f6(0x165)])(''+_0x51e20e)[_0xe16f6(0x180)]()+(''+((_0x1065fd=this[_0xe16f6(0x164)])===null||_0x1065fd===void 0x0?void 0x0:_0x1065fd[_0xe16f6(0x169)])))[_0xe16f6(0x180)]())[_0xe16f6(0x180)]():'';}['getcheck'](_0x3b3d9b,_0x685b9,_0x2d47c7=Date[a10_0x25a285(0x155)]()){return{'Token':_0x3b3d9b,'Logintime':_0x2d47c7,'Checkcode':this['checkcode'](_0x3b3d9b,_0x685b9,_0x2d47c7)};}[a10_0x25a285(0x150)](_0x4a5cd4={}){var _0x5cc15e=a10_0x25a285,_0x7ac555,_0x4bba3a;const _0x7a675a=[],_0x5221d5=Object[_0x5cc15e(0x15e)](Object[_0x5cc15e(0x16e)](_0x4a5cd4)[_0x5cc15e(0x18e)](_0x43c3aa=>[_0x43c3aa[0x0][_0x5cc15e(0x156)](),_0x43c3aa[0x1]]));for(let _0x123a4c of[_0x5cc15e(0x176),_0x5cc15e(0x15f),'token',_0x5cc15e(0x171),_0x5cc15e(0x170)]){if(typeof _0x5221d5[_0x123a4c]==_0x5cc15e(0x15c))throw new AnnError(ApiError_1[_0x5cc15e(0x190)]['HEADERS_LACK'],{'message':_0x5cc15e(0x18a)});_0x7a675a[_0x5cc15e(0x15a)](_0x123a4c+'='+_0x5221d5[_0x123a4c]);}_0x5221d5[_0x5cc15e(0x15f)]&&((_0x7ac555=_0x5221d5['requesttime'])===null||_0x7ac555===void 0x0?void 0x0:_0x7ac555[_0x5cc15e(0x179)])==0xa&&(_0x5221d5[_0x5cc15e(0x15f)]=_0x5221d5[_0x5cc15e(0x15f)]*0x3e8);if(this[_0x5cc15e(0x164)][_0x5cc15e(0x17b)]&&parseInt((''+Date[_0x5cc15e(0x155)]())[_0x5cc15e(0x162)](0x0,0xd)['padEnd'](0xd,'0'))-parseInt((''+Math[_0x5cc15e(0x186)](_0x5221d5['requesttime']))[_0x5cc15e(0x162)](0x0,0xd)[_0x5cc15e(0x153)](0xd,'0'))>parseInt(this[_0x5cc15e(0x164)][_0x5cc15e(0x17b)]))throw new AnnError(ApiError_1['ApiError']['TIMEOUT'],{'message':_0x5cc15e(0x159),'requesttime':_0x5221d5[_0x5cc15e(0x15f)],'timestamp':Date['now']()});if((((_0x4bba3a=this[_0x5cc15e(0x164)][_0x5cc15e(0x16d)][_0x5221d5['device']])===null||_0x4bba3a===void 0x0?void 0x0:_0x4bba3a[_0x5cc15e(0x185)])||0x0)>0x0&&Date[_0x5cc15e(0x155)]()-Math[_0x5cc15e(0x186)](_0x5221d5[_0x5cc15e(0x171)])>this[_0x5cc15e(0x164)][_0x5cc15e(0x16d)][_0x5221d5['device']][_0x5cc15e(0x185)])throw new AnnError(ApiError_1[_0x5cc15e(0x190)][_0x5cc15e(0x18c)]);if(!this['config']['devices'][_0x5221d5['device']]||!this[_0x5cc15e(0x164)][_0x5cc15e(0x16d)][_0x5221d5['device']][_0x5cc15e(0x163)]||!this[_0x5cc15e(0x164)][_0x5cc15e(0x16d)][_0x5221d5[_0x5cc15e(0x176)]][_0x5cc15e(0x170)])throw new AnnError(ApiError_1['ApiError'][_0x5cc15e(0x184)]);if(_0x5221d5[_0x5cc15e(0x17e)]&&_0x5221d5[_0x5cc15e(0x170)]!=this[_0x5cc15e(0x170)](_0x5221d5[_0x5cc15e(0x17e)],_0x5221d5[_0x5cc15e(0x176)],_0x5221d5[_0x5cc15e(0x171)]))throw new AnnError(ApiError_1[_0x5cc15e(0x190)]['HEADERS_CHECKCODE']);return _0x7a675a[_0x5cc15e(0x15a)](_0x5cc15e(0x15d)+this[_0x5cc15e(0x164)][_0x5cc15e(0x16d)][_0x5221d5[_0x5cc15e(0x176)]]['secret']),(0x0,crypto_js_1[_0x5cc15e(0x165)])(_0x7a675a[_0x5cc15e(0x16c)]()[_0x5cc15e(0x166)](''))[_0x5cc15e(0x180)]();}[a10_0x25a285(0x170)](_0x188c44,_0x45255f,_0x518619=Date['now']()){var _0x4c8532=a10_0x25a285,_0x1d97b1,_0x682dad,_0x1f4bc7;if(!((_0x1d97b1=this[_0x4c8532(0x164)])===null||_0x1d97b1===void 0x0?void 0x0:_0x1d97b1[_0x4c8532(0x16d)][_0x45255f])||!((_0x1f4bc7=(_0x682dad=this[_0x4c8532(0x164)])===null||_0x682dad===void 0x0?void 0x0:_0x682dad['devices'][_0x45255f])===null||_0x1f4bc7===void 0x0?void 0x0:_0x1f4bc7[_0x4c8532(0x170)]))throw new AnnError(ApiError_1[_0x4c8532(0x190)]['HEADERS_DEVICE']);return(0x0,crypto_js_1['MD5'])(''+_0x188c44+(0x0,crypto_js_1[_0x4c8532(0x165)])(''+_0x518619+(''+this[_0x4c8532(0x164)][_0x4c8532(0x16d)][_0x45255f][_0x4c8532(0x170)]))[_0x4c8532(0x180)]())[_0x4c8532(0x180)]();}[a10_0x25a285(0x188)](_0x39c8cc={}){var _0x2b7622=a10_0x25a285;const _0x17924a=Object[_0x2b7622(0x15e)](Object[_0x2b7622(0x16e)](_0x39c8cc)['map'](_0x150cd7=>[_0x150cd7[0x0][_0x2b7622(0x156)](),_0x150cd7[0x1]]));if(!(_0x17924a===null||_0x17924a===void 0x0?void 0x0:_0x17924a[_0x2b7622(0x160)]))throw new AnnError(ApiError_1[_0x2b7622(0x190)]['HEADERS_LACK'],{'message':_0x2b7622(0x18a)});if((_0x17924a===null||_0x17924a===void 0x0?void 0x0:_0x17924a[_0x2b7622(0x160)])!=this[_0x2b7622(0x150)](_0x17924a))throw new AnnError(ApiError_1['ApiError'][_0x2b7622(0x157)],{'message':_0x2b7622(0x18a)});return!![];}};exports[a10_0x25a285(0x182)]=ApiService,__decorate([(0x0,core_1[a10_0x25a285(0x17c)])(a10_0x25a285(0x167)),__metadata(a10_0x25a285(0x15b),Object)],ApiService[a10_0x25a285(0x158)],a10_0x25a285(0x164),void 0x0),exports['ApiService']=ApiService=__decorate([(0x0,core_1[a10_0x25a285(0x18f)])(),(0x0,core_1[a10_0x25a285(0x16f)])(core_1[a10_0x25a285(0x175)][a10_0x25a285(0x178)])],ApiService);
1
+ var a10_0x45738b=a10_0x2162;(function(_0xf63c66,_0x305b2a){var _0x110b63=a10_0x2162,_0x31d00d=_0xf63c66();while(!![]){try{var _0x5c853c=-parseInt(_0x110b63(0xe9))/0x1*(parseInt(_0x110b63(0xdf))/0x2)+parseInt(_0x110b63(0xc0))/0x3*(parseInt(_0x110b63(0xf0))/0x4)+-parseInt(_0x110b63(0xe1))/0x5+-parseInt(_0x110b63(0xf6))/0x6+parseInt(_0x110b63(0xbc))/0x7+-parseInt(_0x110b63(0xd2))/0x8+parseInt(_0x110b63(0xd7))/0x9*(parseInt(_0x110b63(0xb7))/0xa);if(_0x5c853c===_0x305b2a)break;else _0x31d00d['push'](_0x31d00d['shift']());}catch(_0x47a524){_0x31d00d['push'](_0x31d00d['shift']());}}}(a10_0x515d,0x78d92));var a10_0x4cfd66=(function(){var _0x304052=!![];return function(_0x2c1aee,_0x27548c){var _0x4bc0d2=_0x304052?function(){var _0x180c9e=a10_0x2162;if(_0x27548c){var _0x2a1620=_0x27548c[_0x180c9e(0xe7)](_0x2c1aee,arguments);return _0x27548c=null,_0x2a1620;}}:function(){};return _0x304052=![],_0x4bc0d2;};}()),a10_0x973b45=a10_0x4cfd66(this,function(){var _0x4a9631=a10_0x2162;return a10_0x973b45[_0x4a9631(0xc4)]()[_0x4a9631(0xd5)](_0x4a9631(0xc9))['toString']()[_0x4a9631(0xd8)](a10_0x973b45)[_0x4a9631(0xd5)](_0x4a9631(0xc9));});function a10_0x2162(_0x1739f9,_0x508e46){var _0x2e2f9d=a10_0x515d();return a10_0x2162=function(_0x973b45,_0x4cfd66){_0x973b45=_0x973b45-0xb7;var _0x515df8=_0x2e2f9d[_0x973b45];return _0x515df8;},a10_0x2162(_0x1739f9,_0x508e46);}a10_0x973b45();'use strict';function a10_0x515d(){var _0x4808c9=['13730nKueNs','../exception/ApiError','map','checkcode','requesttime','638939mmwJJV','push','getsign','验证失败','3ycgmvJ','__esModule','password','checksign','toString','length','entries','@midwayjs/core','ScopeEnum','(((.+)+)+)+$','logintimeout','__decorate','TIMEOUT','sort','decorate','device','HEADERS_LACK','ApiService','791272XyWFWT','defineProperty','prototype','search','devices','7326YPbzzG','constructor','HEADERS_CHECKCODE','function','toLowerCase','padEnd','ApiError','design:type','2WNSFvI','MD5','1598920CMvfGx','signature','__metadata','metadata','undefined','TIMEOUT_LOGINTIME','apply','now','214161XmWQOC','getcheck','logintime','substring','token','config','HEADERS_SIGNATURE','1054580PQIFqx','HEADERS_DEVICE','timeout','Config','abs','secret=','2068176feESyQ'];a10_0x515d=function(){return _0x4808c9;};return a10_0x515d();}var __decorate=this&&this[a10_0x45738b(0xcb)]||function(_0x4541c3,_0x17eaf3,_0x11fc96,_0x4bbf18){var _0x432574=a10_0x45738b,_0x29997c=arguments['length'],_0x513e23=_0x29997c<0x3?_0x17eaf3:_0x4bbf18===null?_0x4bbf18=Object['getOwnPropertyDescriptor'](_0x17eaf3,_0x11fc96):_0x4bbf18,_0x5d2ffd;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x432574(0xda))_0x513e23=Reflect[_0x432574(0xce)](_0x4541c3,_0x17eaf3,_0x11fc96,_0x4bbf18);else{for(var _0x18c567=_0x4541c3[_0x432574(0xc5)]-0x1;_0x18c567>=0x0;_0x18c567--)if(_0x5d2ffd=_0x4541c3[_0x18c567])_0x513e23=(_0x29997c<0x3?_0x5d2ffd(_0x513e23):_0x29997c>0x3?_0x5d2ffd(_0x17eaf3,_0x11fc96,_0x513e23):_0x5d2ffd(_0x17eaf3,_0x11fc96))||_0x513e23;}return _0x29997c>0x3&&_0x513e23&&Object[_0x432574(0xd3)](_0x17eaf3,_0x11fc96,_0x513e23),_0x513e23;},__metadata=this&&this[a10_0x45738b(0xe3)]||function(_0x52b787,_0x25e880){var _0x3e14a7=a10_0x45738b;if(typeof Reflect==='object'&&typeof Reflect[_0x3e14a7(0xe4)]===_0x3e14a7(0xda))return Reflect['metadata'](_0x52b787,_0x25e880);};Object[a10_0x45738b(0xd3)](exports,a10_0x45738b(0xc1),{'value':!![]}),exports[a10_0x45738b(0xd1)]=void 0x0;const crypto_js_1=require('crypto-js'),core_1=require(a10_0x45738b(0xc7)),ApiError_1=require(a10_0x45738b(0xb8));let ApiService=class ApiService{['password'](_0x4a5191){var _0x1f1446=a10_0x45738b,_0x2ea3fa;return _0x4a5191?(0x0,crypto_js_1['MD5'])(''+_0x4a5191+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1[_0x1f1446(0xe0)])(''+_0x4a5191)[_0x1f1446(0xc4)]()+(''+((_0x2ea3fa=this['config'])===null||_0x2ea3fa===void 0x0?void 0x0:_0x2ea3fa[_0x1f1446(0xc2)])))[_0x1f1446(0xc4)]())[_0x1f1446(0xc4)]():'';}[a10_0x45738b(0xea)](_0x3924e0,_0x32c537,_0x14915c=Date[a10_0x45738b(0xe8)]()){return{'Token':_0x3924e0,'Logintime':_0x14915c,'Checkcode':this['checkcode'](_0x3924e0,_0x32c537,_0x14915c)};}['getsign'](_0x39a30c={}){var _0x57eab1=a10_0x45738b,_0x4b0fa2,_0x2d0022;const _0x23b7c9=[],_0x5c2d0c=Object['fromEntries'](Object[_0x57eab1(0xc6)](_0x39a30c)[_0x57eab1(0xb9)](_0x2b0866=>[_0x2b0866[0x0][_0x57eab1(0xdb)](),_0x2b0866[0x1]]));for(let _0x8607e4 of[_0x57eab1(0xcf),_0x57eab1(0xbb),_0x57eab1(0xed),_0x57eab1(0xeb),_0x57eab1(0xba)]){if(typeof _0x5c2d0c[_0x8607e4]==_0x57eab1(0xe5))throw new AnnError(ApiError_1[_0x57eab1(0xdd)][_0x57eab1(0xd0)],{'message':_0x57eab1(0xbf)});_0x23b7c9[_0x57eab1(0xbd)](_0x8607e4+'='+_0x5c2d0c[_0x8607e4]);}_0x5c2d0c[_0x57eab1(0xbb)]&&((_0x4b0fa2=_0x5c2d0c[_0x57eab1(0xbb)])===null||_0x4b0fa2===void 0x0?void 0x0:_0x4b0fa2[_0x57eab1(0xc5)])==0xa&&(_0x5c2d0c['requesttime']=_0x5c2d0c[_0x57eab1(0xbb)]*0x3e8);if(this[_0x57eab1(0xee)][_0x57eab1(0xf2)]&&parseInt((''+Date[_0x57eab1(0xe8)]())[_0x57eab1(0xec)](0x0,0xd)[_0x57eab1(0xdc)](0xd,'0'))-parseInt((''+Math[_0x57eab1(0xf4)](_0x5c2d0c[_0x57eab1(0xbb)]))[_0x57eab1(0xec)](0x0,0xd)[_0x57eab1(0xdc)](0xd,'0'))>parseInt(this[_0x57eab1(0xee)][_0x57eab1(0xf2)]))throw new AnnError(ApiError_1['ApiError'][_0x57eab1(0xcc)],{'message':'请求超时,请重试或改善网络环境','requesttime':_0x5c2d0c[_0x57eab1(0xbb)],'timestamp':Date[_0x57eab1(0xe8)]()});if((((_0x2d0022=this[_0x57eab1(0xee)][_0x57eab1(0xd6)][_0x5c2d0c[_0x57eab1(0xcf)]])===null||_0x2d0022===void 0x0?void 0x0:_0x2d0022[_0x57eab1(0xca)])||0x0)>0x0&&Date[_0x57eab1(0xe8)]()-Math[_0x57eab1(0xf4)](_0x5c2d0c[_0x57eab1(0xeb)])>this[_0x57eab1(0xee)]['devices'][_0x5c2d0c[_0x57eab1(0xcf)]][_0x57eab1(0xca)])throw new AnnError(ApiError_1[_0x57eab1(0xdd)][_0x57eab1(0xe6)]);if(!this['config'][_0x57eab1(0xd6)][_0x5c2d0c['device']]||!this[_0x57eab1(0xee)]['devices'][_0x5c2d0c[_0x57eab1(0xcf)]]['secret']||!this[_0x57eab1(0xee)]['devices'][_0x5c2d0c['device']][_0x57eab1(0xba)])throw new AnnError(ApiError_1['ApiError'][_0x57eab1(0xf1)]);if(_0x5c2d0c[_0x57eab1(0xed)]&&_0x5c2d0c[_0x57eab1(0xba)]!=this[_0x57eab1(0xba)](_0x5c2d0c[_0x57eab1(0xed)],_0x5c2d0c[_0x57eab1(0xcf)],_0x5c2d0c[_0x57eab1(0xeb)]))throw new AnnError(ApiError_1['ApiError'][_0x57eab1(0xd9)]);return _0x23b7c9['push'](_0x57eab1(0xf5)+this[_0x57eab1(0xee)][_0x57eab1(0xd6)][_0x5c2d0c[_0x57eab1(0xcf)]]['secret']),(0x0,crypto_js_1[_0x57eab1(0xe0)])(_0x23b7c9[_0x57eab1(0xcd)]()['join'](''))[_0x57eab1(0xc4)]();}[a10_0x45738b(0xba)](_0x8a2294,_0x3b8c89,_0x366268=Date['now']()){var _0x4bebde=a10_0x45738b,_0x56a586,_0x449407,_0x2638bf;if(!((_0x56a586=this['config'])===null||_0x56a586===void 0x0?void 0x0:_0x56a586[_0x4bebde(0xd6)][_0x3b8c89])||!((_0x2638bf=(_0x449407=this['config'])===null||_0x449407===void 0x0?void 0x0:_0x449407[_0x4bebde(0xd6)][_0x3b8c89])===null||_0x2638bf===void 0x0?void 0x0:_0x2638bf[_0x4bebde(0xba)]))throw new AnnError(ApiError_1[_0x4bebde(0xdd)][_0x4bebde(0xf1)]);return(0x0,crypto_js_1[_0x4bebde(0xe0)])(''+_0x8a2294+(0x0,crypto_js_1[_0x4bebde(0xe0)])(''+_0x366268+(''+this[_0x4bebde(0xee)]['devices'][_0x3b8c89][_0x4bebde(0xba)]))['toString']())[_0x4bebde(0xc4)]();}[a10_0x45738b(0xc3)](_0x52d041={}){var _0x2aef2d=a10_0x45738b;const _0x10807f=Object['fromEntries'](Object[_0x2aef2d(0xc6)](_0x52d041)[_0x2aef2d(0xb9)](_0x3a9a11=>[_0x3a9a11[0x0]['toLowerCase'](),_0x3a9a11[0x1]]));if(!(_0x10807f===null||_0x10807f===void 0x0?void 0x0:_0x10807f[_0x2aef2d(0xe2)]))throw new AnnError(ApiError_1[_0x2aef2d(0xdd)][_0x2aef2d(0xd0)],{'message':_0x2aef2d(0xbf)});if((_0x10807f===null||_0x10807f===void 0x0?void 0x0:_0x10807f[_0x2aef2d(0xe2)])!=this[_0x2aef2d(0xbe)](_0x10807f))throw new AnnError(ApiError_1[_0x2aef2d(0xdd)][_0x2aef2d(0xef)],{'message':_0x2aef2d(0xbf)});return!![];}};__decorate([(0x0,core_1[a10_0x45738b(0xf3)])('anncicapi'),__metadata(a10_0x45738b(0xde),Object)],ApiService[a10_0x45738b(0xd4)],a10_0x45738b(0xee),void 0x0),ApiService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1['Scope'])(core_1[a10_0x45738b(0xc8)]['Singleton'])],ApiService),exports['ApiService']=ApiService;
@@ -1,19 +1,19 @@
1
- import { Context } from '@midwayjs/koa';
2
- import { MidwayEnvironmentService } from '@midwayjs/core';
3
- import { getRouteOption } from "../helper/getRoutes";
4
- export declare class ApitestService {
5
- protected config: any;
6
- apidoc(filter?: getRouteOption): Promise<string>;
7
- }
8
- export declare class ApitestStaticController {
9
- protected ctx: Context;
10
- protected Environment: MidwayEnvironmentService;
11
- protected ApitestService: ApitestService;
12
- protected apitest: boolean;
13
- protected config: {
14
- [key: string]: any;
15
- };
16
- apitesthtml(): Promise<string>;
17
- apitestmodule(module: string): Promise<string>;
18
- apiteststatic(): Promise<string>;
19
- }
1
+ import { Context } from '@midwayjs/koa';
2
+ import { MidwayEnvironmentService } from '@midwayjs/core';
3
+ import { getRouteOption } from "../helper/getRoutes";
4
+ export declare class ApitestService {
5
+ protected config: any;
6
+ apidoc(filter?: getRouteOption): Promise<string>;
7
+ }
8
+ export declare class ApitestStaticController {
9
+ protected ctx: Context;
10
+ protected Environment: MidwayEnvironmentService;
11
+ protected ApitestService: ApitestService;
12
+ protected apitest: boolean;
13
+ protected config: {
14
+ [key: string]: any;
15
+ };
16
+ apitesthtml(): Promise<string>;
17
+ apitestmodule(module: string): Promise<string>;
18
+ apiteststatic(): Promise<string>;
19
+ }
@@ -1 +1 @@
1
- const a11_0x4552e5=a11_0x2a7e;(function(_0x11df63,_0x520c5c){const _0x1d5dc2=a11_0x2a7e,_0x53976d=_0x11df63();while(!![]){try{const _0x467562=parseInt(_0x1d5dc2(0xe6))/0x1+parseInt(_0x1d5dc2(0xe9))/0x2+parseInt(_0x1d5dc2(0xe7))/0x3*(parseInt(_0x1d5dc2(0xf0))/0x4)+-parseInt(_0x1d5dc2(0xb5))/0x5*(-parseInt(_0x1d5dc2(0xb4))/0x6)+-parseInt(_0x1d5dc2(0xf3))/0x7+-parseInt(_0x1d5dc2(0xc9))/0x8+parseInt(_0x1d5dc2(0xfa))/0x9*(-parseInt(_0x1d5dc2(0xcb))/0xa);if(_0x467562===_0x520c5c)break;else _0x53976d['push'](_0x53976d['shift']());}catch(_0x4e7521){_0x53976d['push'](_0x53976d['shift']());}}}(a11_0x5502,0xe8437));const a11_0xd2a819=(function(){let _0x37bb8f=!![];return function(_0x2271ed,_0x50f12e){const _0x4c0eb1=_0x37bb8f?function(){const _0x73f335=a11_0x2a7e;if(_0x50f12e){const _0x556f47=_0x50f12e[_0x73f335(0xdd)](_0x2271ed,arguments);return _0x50f12e=null,_0x556f47;}}:function(){};return _0x37bb8f=![],_0x4c0eb1;};}()),a11_0x5d292d=a11_0xd2a819(this,function(){const _0x4c4390=a11_0x2a7e;return a11_0x5d292d[_0x4c4390(0xb3)]()[_0x4c4390(0xdf)](_0x4c4390(0xe0))[_0x4c4390(0xb3)]()['constructor'](a11_0x5d292d)[_0x4c4390(0xdf)](_0x4c4390(0xe0));});a11_0x5d292d();'use strict';var __decorate=this&&this['__decorate']||function(_0x3f1718,_0x1e2fd0,_0xa1a174,_0x119c3f){const _0x2a80b1=a11_0x2a7e;var _0x3969af=arguments['length'],_0x547a78=_0x3969af<0x3?_0x1e2fd0:_0x119c3f===null?_0x119c3f=Object[_0x2a80b1(0xdc)](_0x1e2fd0,_0xa1a174):_0x119c3f,_0x4c458e;if(typeof Reflect===_0x2a80b1(0xb1)&&typeof Reflect[_0x2a80b1(0xe8)]===_0x2a80b1(0xe1))_0x547a78=Reflect[_0x2a80b1(0xe8)](_0x3f1718,_0x1e2fd0,_0xa1a174,_0x119c3f);else{for(var _0x4c7fa4=_0x3f1718[_0x2a80b1(0xc6)]-0x1;_0x4c7fa4>=0x0;_0x4c7fa4--)if(_0x4c458e=_0x3f1718[_0x4c7fa4])_0x547a78=(_0x3969af<0x3?_0x4c458e(_0x547a78):_0x3969af>0x3?_0x4c458e(_0x1e2fd0,_0xa1a174,_0x547a78):_0x4c458e(_0x1e2fd0,_0xa1a174))||_0x547a78;}return _0x3969af>0x3&&_0x547a78&&Object['defineProperty'](_0x1e2fd0,_0xa1a174,_0x547a78),_0x547a78;},__metadata=this&&this[a11_0x4552e5(0xab)]||function(_0x2d31ae,_0x18f0a3){const _0x3af343=a11_0x4552e5;if(typeof Reflect===_0x3af343(0xb1)&&typeof Reflect['metadata']===_0x3af343(0xe1))return Reflect['metadata'](_0x2d31ae,_0x18f0a3);},__param=this&&this[a11_0x4552e5(0xd3)]||function(_0x431e6d,_0x25283d){return function(_0x5c17fc,_0x44a091){_0x25283d(_0x5c17fc,_0x44a091,_0x431e6d);};};Object[a11_0x4552e5(0xe4)](exports,a11_0x4552e5(0xda),{'value':!![]}),exports[a11_0x4552e5(0xa9)]=exports[a11_0x4552e5(0xd4)]=void 0x0;const path_1=require(a11_0x4552e5(0xf6)),fs_1=require('fs'),core_1=require('@midwayjs/core'),core_2=require(a11_0x4552e5(0xf7)),core_3=require(a11_0x4552e5(0xf7)),getRoutes_1=require(a11_0x4552e5(0xcf));let ApitestService=class ApitestService{async['apidoc'](_0x31a856){const _0x1aa5ac=a11_0x4552e5,_0x12130a=(0x0,getRoutes_1[_0x1aa5ac(0xca)])(_0x31a856),_0x8d9301=[];for(let _0x5c748d in _0x12130a){for(let _0x3d872c in _0x12130a[_0x5c748d][_0x1aa5ac(0xb7)]){let _0x60faf5=_0x12130a[_0x5c748d][_0x1aa5ac(0xb7)][_0x3d872c],_0x385e16=[];for(let _0x347580 in _0x60faf5[_0x1aa5ac(0xe5)]){_0x385e16[_0x1aa5ac(0xed)](_0x60faf5[_0x1aa5ac(0xe5)][_0x347580]);}_0x8d9301[_0x1aa5ac(0xed)]({'title':_0x12130a[_0x5c748d][_0x1aa5ac(0xbc)]+':'+_0x60faf5[_0x1aa5ac(0xbc)],'prefix':_0x12130a[_0x5c748d][_0x1aa5ac(0xcd)],'router':_0x60faf5[_0x1aa5ac(0xdb)],'method':_0x60faf5[_0x1aa5ac(0xd7)],'describe':_0x60faf5['description']||'','filepath':_0x12130a[_0x5c748d][_0x1aa5ac(0xc7)]||'','request':_0x385e16});}}const _0x48dd2f=(0x0,path_1[_0x1aa5ac(0xb6)])(__dirname,_0x1aa5ac(0xb8));return(0x0,fs_1[_0x1aa5ac(0xae)])(_0x48dd2f,{'encoding':'utf-8'})[_0x1aa5ac(0xb0)](/__res__/g,'/apiteststatic/')[_0x1aa5ac(0xb0)](_0x1aa5ac(0xe2),JSON[_0x1aa5ac(0xaf)](_0x8d9301))[_0x1aa5ac(0xb0)](_0x1aa5ac(0xf9),JSON[_0x1aa5ac(0xaf)](this[_0x1aa5ac(0xbe)][_0x1aa5ac(0xef)]));}};exports[a11_0x4552e5(0xd4)]=ApitestService,__decorate([(0x0,core_3['Config'])(a11_0x4552e5(0xf4)),__metadata(a11_0x4552e5(0xf2),Object)],ApitestService[a11_0x4552e5(0xea)],'config',void 0x0),exports['ApitestService']=ApitestService=__decorate([(0x0,core_2['Provide'])('apitest'),(0x0,core_3[a11_0x4552e5(0xd0)])(core_3['ScopeEnum'][a11_0x4552e5(0xc4)])],ApitestService);function a11_0x2a7e(_0x9689a0,_0x80325d){const _0x56ff6c=a11_0x5502();return a11_0x2a7e=function(_0x5d292d,_0xd2a819){_0x5d292d=_0x5d292d-0xa9;let _0x55025f=_0x56ff6c[_0x5d292d];return _0x55025f;},a11_0x2a7e(_0x9689a0,_0x80325d);}let ApitestStaticController=class ApitestStaticController{async[a11_0x4552e5(0xaa)](){const _0x41fb95=a11_0x4552e5;if(this['apitest']){const _0x19a766={'module':![]};return this['Environment'][_0x41fb95(0xc0)]()&&(_0x19a766[_0x41fb95(0xc7)]=!![]),await this[_0x41fb95(0xd4)][_0x41fb95(0xfb)](_0x19a766);}return'';}async['apitestmodule'](_0x381bf8){const _0x2b0b93=a11_0x4552e5;if(this[_0x2b0b93(0xd8)]){const _0x1d61a4={'module':_0x381bf8};return this['Environment'][_0x2b0b93(0xc0)]()&&(_0x1d61a4[_0x2b0b93(0xc7)]=!![]),await this[_0x2b0b93(0xd4)][_0x2b0b93(0xfb)](_0x1d61a4);}return'';}async['apiteststatic'](){const _0x43f885=a11_0x4552e5;if((0x0,path_1[_0x43f885(0xd6)])(this[_0x43f885(0xf5)][_0x43f885(0xe5)][_0x43f885(0xec)])){var _0x1ea85b=(0x0,path_1[_0x43f885(0xb6)])(__dirname,_0x43f885(0xcc)+this['ctx'][_0x43f885(0xe5)][_0x43f885(0xec)][_0x43f885(0xb0)]('/apiteststatic/','/'));if(_0x1ea85b[_0x43f885(0xbb)](_0x1ea85b[_0x43f885(0xc6)]-0xb)!=_0x43f885(0xac)){this['ctx']['set']('cache-control','public,\x20max-age=604800');if((0x0,path_1[_0x43f885(0xd6)])(this['ctx']['request']['url'])=='.js')this['ctx'][_0x43f885(0xb9)]('content-type',_0x43f885(0xee));else(0x0,path_1[_0x43f885(0xd6)])(this['ctx'][_0x43f885(0xe5)][_0x43f885(0xec)])==_0x43f885(0xde)&&this[_0x43f885(0xf5)][_0x43f885(0xb9)](_0x43f885(0xd1),_0x43f885(0xba));return(0x0,fs_1['existsSync'])(_0x1ea85b)&&(0x0,fs_1[_0x43f885(0xae)])(_0x1ea85b,{'encoding':_0x43f885(0xb2)});}}return'';}};exports[a11_0x4552e5(0xa9)]=ApitestStaticController,__decorate([(0x0,core_3[a11_0x4552e5(0xf8)])(),__metadata(a11_0x4552e5(0xf2),Object)],ApitestStaticController[a11_0x4552e5(0xea)],a11_0x4552e5(0xf5),void 0x0),__decorate([(0x0,core_3[a11_0x4552e5(0xf8)])(),__metadata('design:type',core_1[a11_0x4552e5(0xc8)])],ApitestStaticController['prototype'],a11_0x4552e5(0xeb),void 0x0),__decorate([(0x0,core_3['Inject'])(),__metadata('design:type',ApitestService)],ApitestStaticController[a11_0x4552e5(0xea)],a11_0x4552e5(0xd4),void 0x0),__decorate([(0x0,core_3[a11_0x4552e5(0xc5)])(a11_0x4552e5(0xd8)),__metadata(a11_0x4552e5(0xf2),Boolean)],ApitestStaticController[a11_0x4552e5(0xea)],a11_0x4552e5(0xd8),void 0x0),__decorate([(0x0,core_3[a11_0x4552e5(0xc5)])(a11_0x4552e5(0xf4)),__metadata(a11_0x4552e5(0xf2),Object)],ApitestStaticController[a11_0x4552e5(0xea)],a11_0x4552e5(0xbe),void 0x0),__decorate([(0x0,core_2[a11_0x4552e5(0xc1)])(a11_0x4552e5(0xd2)),__metadata(a11_0x4552e5(0xf2),Function),__metadata(a11_0x4552e5(0xbf),[]),__metadata(a11_0x4552e5(0xad),Promise)],ApitestStaticController[a11_0x4552e5(0xea)],'apitesthtml',null),__decorate([(0x0,core_2[a11_0x4552e5(0xc1)])(a11_0x4552e5(0xc2)),__param(0x0,(0x0,core_2[a11_0x4552e5(0xbd)])(a11_0x4552e5(0xd5))),__metadata(a11_0x4552e5(0xf2),Function),__metadata(a11_0x4552e5(0xbf),[String]),__metadata(a11_0x4552e5(0xad),Promise)],ApitestStaticController[a11_0x4552e5(0xea)],a11_0x4552e5(0xce),null),__decorate([(0x0,core_2[a11_0x4552e5(0xc1)])(a11_0x4552e5(0xc3)),__metadata(a11_0x4552e5(0xf2),Function),__metadata('design:paramtypes',[]),__metadata(a11_0x4552e5(0xad),Promise)],ApitestStaticController[a11_0x4552e5(0xea)],a11_0x4552e5(0xe3),null),exports[a11_0x4552e5(0xa9)]=ApitestStaticController=__decorate([(0x0,core_2['Controller'])('/'),(0x0,core_3[a11_0x4552e5(0xd0)])(core_3[a11_0x4552e5(0xd9)][a11_0x4552e5(0xf1)])],ApitestStaticController);function a11_0x5502(){const _0x4402a2=['__esModule','route','getOwnPropertyDescriptor','apply','.css','search','(((.+)+)+)+$','function','__apiList__','apiteststatic','defineProperty','request','1157262tkpKWv','78wEQimZ','decorate','507956qBRvck','prototype','Environment','url','push','application/javascript;\x20charset=utf-8','devices','212060LXrneU','Request','design:type','1096592ZytElU','anncicapi','ctx','path','@midwayjs/core','Inject','__devices__','45lVYMqw','apidoc','ApitestStaticController','apitesthtml','__metadata','/index.html','design:returntype','readFileSync','stringify','replace','object','utf-8','toString','73722ddGmrd','70sQZGiT','join','routes','../../public/index.html','set','text/css;\x20charset=utf-8','substring','summary','Param','config','design:paramtypes','isDevelopmentEnvironment','Get','/apitest-:module','/apiteststatic/*','Singleton','Config','length','filepath','MidwayEnvironmentService','4644848blfyny','getRoutes','2546070nXPErU','../../public/','prefix','apitestmodule','../helper/getRoutes','Scope','content-type','/apitest','__param','ApitestService','module','extname','method','apitest','ScopeEnum'];a11_0x5502=function(){return _0x4402a2;};return a11_0x5502();}
1
+ const a11_0x4881e5=a11_0x518e;function a11_0x518e(_0x410e55,_0x300a6e){const _0x35d149=a11_0x530a();return a11_0x518e=function(_0x227c7c,_0xca2e9c){_0x227c7c=_0x227c7c-0x1a4;let _0x530aa6=_0x35d149[_0x227c7c];return _0x530aa6;},a11_0x518e(_0x410e55,_0x300a6e);}(function(_0x4fdbe0,_0x69b440){const _0x3209cf=a11_0x518e,_0x43abb1=_0x4fdbe0();while(!![]){try{const _0x27c4c8=-parseInt(_0x3209cf(0x1cc))/0x1*(-parseInt(_0x3209cf(0x1aa))/0x2)+-parseInt(_0x3209cf(0x1d1))/0x3*(-parseInt(_0x3209cf(0x1bc))/0x4)+-parseInt(_0x3209cf(0x1ca))/0x5+-parseInt(_0x3209cf(0x1f2))/0x6+parseInt(_0x3209cf(0x1ec))/0x7*(-parseInt(_0x3209cf(0x1ae))/0x8)+parseInt(_0x3209cf(0x1f1))/0x9*(-parseInt(_0x3209cf(0x1b2))/0xa)+parseInt(_0x3209cf(0x1de))/0xb*(parseInt(_0x3209cf(0x1af))/0xc);if(_0x27c4c8===_0x69b440)break;else _0x43abb1['push'](_0x43abb1['shift']());}catch(_0x57c0bf){_0x43abb1['push'](_0x43abb1['shift']());}}}(a11_0x530a,0x21afe));const a11_0xca2e9c=(function(){let _0x14fe1f=!![];return function(_0x52f2ec,_0x33bc90){const _0x2d2f6c=_0x14fe1f?function(){const _0xc10e88=a11_0x518e;if(_0x33bc90){const _0xa0b7a6=_0x33bc90[_0xc10e88(0x1ee)](_0x52f2ec,arguments);return _0x33bc90=null,_0xa0b7a6;}}:function(){};return _0x14fe1f=![],_0x2d2f6c;};}()),a11_0x227c7c=a11_0xca2e9c(this,function(){const _0x8d15a8=a11_0x518e;return a11_0x227c7c[_0x8d15a8(0x1e3)]()[_0x8d15a8(0x1c4)](_0x8d15a8(0x1b4))[_0x8d15a8(0x1e3)]()['constructor'](a11_0x227c7c)[_0x8d15a8(0x1c4)]('(((.+)+)+)+$');});a11_0x227c7c();'use strict';var __decorate=this&&this[a11_0x4881e5(0x1d7)]||function(_0x3a1442,_0x341fb6,_0x4e60c1,_0x54a8f5){const _0x43708c=a11_0x4881e5;var _0x2a1e73=arguments['length'],_0x471ded=_0x2a1e73<0x3?_0x341fb6:_0x54a8f5===null?_0x54a8f5=Object['getOwnPropertyDescriptor'](_0x341fb6,_0x4e60c1):_0x54a8f5,_0x2ab17d;if(typeof Reflect===_0x43708c(0x1dd)&&typeof Reflect[_0x43708c(0x1a5)]===_0x43708c(0x1be))_0x471ded=Reflect[_0x43708c(0x1a5)](_0x3a1442,_0x341fb6,_0x4e60c1,_0x54a8f5);else{for(var _0x5eeda1=_0x3a1442[_0x43708c(0x1b3)]-0x1;_0x5eeda1>=0x0;_0x5eeda1--)if(_0x2ab17d=_0x3a1442[_0x5eeda1])_0x471ded=(_0x2a1e73<0x3?_0x2ab17d(_0x471ded):_0x2a1e73>0x3?_0x2ab17d(_0x341fb6,_0x4e60c1,_0x471ded):_0x2ab17d(_0x341fb6,_0x4e60c1))||_0x471ded;}return _0x2a1e73>0x3&&_0x471ded&&Object['defineProperty'](_0x341fb6,_0x4e60c1,_0x471ded),_0x471ded;},__metadata=this&&this[a11_0x4881e5(0x1d8)]||function(_0x5142b0,_0x1dc60a){const _0xc3036c=a11_0x4881e5;if(typeof Reflect===_0xc3036c(0x1dd)&&typeof Reflect[_0xc3036c(0x1cd)]==='function')return Reflect['metadata'](_0x5142b0,_0x1dc60a);},__param=this&&this['__param']||function(_0x5ee468,_0x35124b){return function(_0x1e568f,_0x47c371){_0x35124b(_0x1e568f,_0x47c371,_0x5ee468);};};Object[a11_0x4881e5(0x1bf)](exports,a11_0x4881e5(0x1ce),{'value':!![]}),exports['ApitestStaticController']=exports[a11_0x4881e5(0x1eb)]=void 0x0;const path_1=require(a11_0x4881e5(0x1d9)),fs_1=require('fs'),core_1=require(a11_0x4881e5(0x1b0)),core_2=require(a11_0x4881e5(0x1b0)),core_3=require(a11_0x4881e5(0x1b0)),getRoutes_1=require('../helper/getRoutes');let ApitestService=class ApitestService{async[a11_0x4881e5(0x1f4)](_0x2a6a5f){const _0x11de3e=a11_0x4881e5,_0x4028c2=(0x0,getRoutes_1[_0x11de3e(0x1d2)])(_0x2a6a5f),_0x501281=[];for(let _0x59b2d1 in _0x4028c2){for(let _0x51be26 in _0x4028c2[_0x59b2d1][_0x11de3e(0x1c1)]){let _0x4edaa5=_0x4028c2[_0x59b2d1][_0x11de3e(0x1c1)][_0x51be26],_0x599d1a=[];for(let _0x325cff in _0x4edaa5[_0x11de3e(0x1c7)]){_0x599d1a[_0x11de3e(0x1ef)](_0x4edaa5[_0x11de3e(0x1c7)][_0x325cff]);}_0x501281[_0x11de3e(0x1ef)]({'title':_0x4028c2[_0x59b2d1][_0x11de3e(0x1f5)]+':'+_0x4edaa5[_0x11de3e(0x1f5)],'prefix':_0x4028c2[_0x59b2d1][_0x11de3e(0x1c0)],'router':_0x4edaa5[_0x11de3e(0x1cf)],'method':_0x4edaa5['method'],'describe':_0x4edaa5['description']||'','filepath':_0x4028c2[_0x59b2d1][_0x11de3e(0x1db)]||'','request':_0x599d1a});}}const _0x389dbe=(0x0,path_1[_0x11de3e(0x1c9)])(__dirname,_0x11de3e(0x1da));return(0x0,fs_1['readFileSync'])(_0x389dbe,{'encoding':_0x11de3e(0x1bb)})[_0x11de3e(0x1ac)](/__res__/g,_0x11de3e(0x1ab))['replace'](_0x11de3e(0x1ba),JSON['stringify'](_0x501281))['replace'](_0x11de3e(0x1c5),JSON[_0x11de3e(0x1df)](this[_0x11de3e(0x1d4)]['devices']));}};__decorate([(0x0,core_3['Config'])(a11_0x4881e5(0x1cb)),__metadata('design:type',Object)],ApitestService[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1d4),void 0x0),ApitestService=__decorate([(0x0,core_2[a11_0x4881e5(0x1a7)])(a11_0x4881e5(0x1d3)),(0x0,core_3['Scope'])(core_3[a11_0x4881e5(0x1e7)]['Singleton'])],ApitestService),exports[a11_0x4881e5(0x1eb)]=ApitestService;function a11_0x530a(){const _0x167805=['apitestmodule','139119HFmDvI','getRoutes','apitest','config','application/javascript;\x20charset=utf-8','design:returntype','__decorate','__metadata','path','../../public/index.html','filepath','cache-control','object','3333xeNiET','stringify','/apitest-:module','extname','Inject','toString','Environment','module','substring','ScopeEnum','set','../../public/','Param','ApitestService','77yUipzP','ctx','apply','push','text/css;\x20charset=utf-8','954ARgJwA','339792EtNzeG','Scope','apidoc','summary','MidwayEnvironmentService','readFileSync','decorate','existsSync','Provide','apiteststatic','Config','38VGnaIP','/apiteststatic/','replace','isDevelopmentEnvironment','132376OczOoy','10716KmpARg','@midwayjs/core','/index.html','22930XbvRIl','length','(((.+)+)+)+$','prototype','/apiteststatic/*','Controller','.css','design:paramtypes','__apiList__','utf-8','20zeUHqc','content-type','function','defineProperty','prefix','routes','design:type','Get','search','__devices__','apitesthtml','request','url','join','194770PFexsh','anncicapi','8221KhoUcZ','metadata','__esModule','route'];a11_0x530a=function(){return _0x167805;};return a11_0x530a();}let ApitestStaticController=class ApitestStaticController{async[a11_0x4881e5(0x1c6)](){const _0x206210=a11_0x4881e5;if(this['apitest']){const _0x380ff9={'module':![]};return this['Environment'][_0x206210(0x1ad)]()&&(_0x380ff9[_0x206210(0x1db)]=!![]),await this[_0x206210(0x1eb)][_0x206210(0x1f4)](_0x380ff9);}return'';}async[a11_0x4881e5(0x1d0)](_0x3dc863){const _0x3cdd75=a11_0x4881e5;if(this[_0x3cdd75(0x1d3)]){const _0x1535a7={'module':_0x3dc863};return this[_0x3cdd75(0x1e4)][_0x3cdd75(0x1ad)]()&&(_0x1535a7[_0x3cdd75(0x1db)]=!![]),await this[_0x3cdd75(0x1eb)][_0x3cdd75(0x1f4)](_0x1535a7);}return'';}async[a11_0x4881e5(0x1a8)](){const _0x4b81b4=a11_0x4881e5;if((0x0,path_1[_0x4b81b4(0x1e1)])(this['ctx']['request'][_0x4b81b4(0x1c8)])){var _0x18fbf1=(0x0,path_1['join'])(__dirname,_0x4b81b4(0x1e9)+this['ctx']['request']['url']['replace'](_0x4b81b4(0x1ab),'/'));if(_0x18fbf1[_0x4b81b4(0x1e6)](_0x18fbf1[_0x4b81b4(0x1b3)]-0xb)!=_0x4b81b4(0x1b1)){this[_0x4b81b4(0x1ed)][_0x4b81b4(0x1e8)](_0x4b81b4(0x1dc),'public,\x20max-age=604800');if((0x0,path_1[_0x4b81b4(0x1e1)])(this[_0x4b81b4(0x1ed)][_0x4b81b4(0x1c7)][_0x4b81b4(0x1c8)])=='.js')this[_0x4b81b4(0x1ed)][_0x4b81b4(0x1e8)](_0x4b81b4(0x1bd),_0x4b81b4(0x1d5));else(0x0,path_1[_0x4b81b4(0x1e1)])(this['ctx'][_0x4b81b4(0x1c7)][_0x4b81b4(0x1c8)])==_0x4b81b4(0x1b8)&&this[_0x4b81b4(0x1ed)][_0x4b81b4(0x1e8)](_0x4b81b4(0x1bd),_0x4b81b4(0x1f0));return(0x0,fs_1[_0x4b81b4(0x1a6)])(_0x18fbf1)&&(0x0,fs_1[_0x4b81b4(0x1a4)])(_0x18fbf1,{'encoding':_0x4b81b4(0x1bb)});}}return'';}};__decorate([(0x0,core_3[a11_0x4881e5(0x1e2)])(),__metadata('design:type',Object)],ApitestStaticController[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1ed),void 0x0),__decorate([(0x0,core_3[a11_0x4881e5(0x1e2)])(),__metadata('design:type',core_1[a11_0x4881e5(0x1f6)])],ApitestStaticController[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1e4),void 0x0),__decorate([(0x0,core_3[a11_0x4881e5(0x1e2)])(),__metadata('design:type',ApitestService)],ApitestStaticController[a11_0x4881e5(0x1b5)],'ApitestService',void 0x0),__decorate([(0x0,core_3['Config'])(a11_0x4881e5(0x1d3)),__metadata(a11_0x4881e5(0x1c2),Boolean)],ApitestStaticController[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1d3),void 0x0),__decorate([(0x0,core_3[a11_0x4881e5(0x1a9)])(a11_0x4881e5(0x1cb)),__metadata(a11_0x4881e5(0x1c2),Object)],ApitestStaticController[a11_0x4881e5(0x1b5)],'config',void 0x0),__decorate([(0x0,core_2['Get'])('/apitest'),__metadata(a11_0x4881e5(0x1c2),Function),__metadata('design:paramtypes',[]),__metadata(a11_0x4881e5(0x1d6),Promise)],ApitestStaticController[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1c6),null),__decorate([(0x0,core_2[a11_0x4881e5(0x1c3)])(a11_0x4881e5(0x1e0)),__param(0x0,(0x0,core_2[a11_0x4881e5(0x1ea)])(a11_0x4881e5(0x1e5))),__metadata(a11_0x4881e5(0x1c2),Function),__metadata(a11_0x4881e5(0x1b9),[String]),__metadata(a11_0x4881e5(0x1d6),Promise)],ApitestStaticController[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1d0),null),__decorate([(0x0,core_2['Get'])(a11_0x4881e5(0x1b6)),__metadata(a11_0x4881e5(0x1c2),Function),__metadata(a11_0x4881e5(0x1b9),[]),__metadata(a11_0x4881e5(0x1d6),Promise)],ApitestStaticController[a11_0x4881e5(0x1b5)],a11_0x4881e5(0x1a8),null),ApitestStaticController=__decorate([(0x0,core_2[a11_0x4881e5(0x1b7)])('/'),(0x0,core_3[a11_0x4881e5(0x1f3)])(core_3[a11_0x4881e5(0x1e7)]['Request'])],ApitestStaticController),exports['ApitestStaticController']=ApitestStaticController;
@@ -1,46 +1,46 @@
1
- import * as exceljs from 'exceljs';
2
- import { IMidwayApplication } from '@midwayjs/core';
3
- import { ExcelStream } from './ExcelStream';
4
- interface ExcelColumn {
5
- key: string;
6
- header: string;
7
- }
8
- interface ExcelColumnParse extends ExcelColumn {
9
- onRead?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
10
- handler?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
11
- }
12
- interface ExcelColumnExport extends ExcelColumn {
13
- onWrite?: (row: any, options?: {
14
- row: exceljs.Row;
15
- col: exceljs.Column;
16
- cell: exceljs.Cell;
17
- sheet: exceljs.Worksheet;
18
- }) => any | Promise<any>;
19
- handler?: (row: any, options?: {
20
- row: exceljs.Row;
21
- col: exceljs.Column;
22
- cell: exceljs.Cell;
23
- sheet: exceljs.Worksheet;
24
- }) => any | Promise<any>;
25
- }
26
- export declare class ExcelService {
27
- protected app: IMidwayApplication;
28
- parse(filepath: string, column: ExcelColumnParse[], sheets?: Array<number | string>): Promise<Array<{
29
- [key: string]: any;
30
- }>>;
31
- export(filename: string, column: Array<ExcelColumnExport>, tmpEntitys: Array<{
32
- [key: string]: any;
33
- }>, savepath?: string, beforSave?: (options: {
34
- workbook: exceljs.Workbook;
35
- worksheet: exceljs.Worksheet;
36
- }) => Promise<void>): Promise<{
37
- filename: string;
38
- filepath: string;
39
- }>;
40
- stream(file: string, option?: {
41
- root?: string;
42
- suffix?: string[];
43
- }): Promise<ExcelStream>;
44
- download(ctx: any, filepath: string): Promise<void>;
45
- }
46
- export {};
1
+ import * as exceljs from 'exceljs';
2
+ import { IMidwayApplication } from '@midwayjs/core';
3
+ import { ExcelStream } from './ExcelStream';
4
+ interface ExcelColumn {
5
+ key: string;
6
+ header: string;
7
+ }
8
+ interface ExcelColumnParse extends ExcelColumn {
9
+ onRead?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
10
+ handler?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
11
+ }
12
+ interface ExcelColumnExport extends ExcelColumn {
13
+ onWrite?: (row: any, options?: {
14
+ row: exceljs.Row;
15
+ col: exceljs.Column;
16
+ cell: exceljs.Cell;
17
+ sheet: exceljs.Worksheet;
18
+ }) => any | Promise<any>;
19
+ handler?: (row: any, options?: {
20
+ row: exceljs.Row;
21
+ col: exceljs.Column;
22
+ cell: exceljs.Cell;
23
+ sheet: exceljs.Worksheet;
24
+ }) => any | Promise<any>;
25
+ }
26
+ export declare class ExcelService {
27
+ protected app: IMidwayApplication;
28
+ parse(filepath: string, column: ExcelColumnParse[], sheets?: Array<number | string>): Promise<Array<{
29
+ [key: string]: any;
30
+ }>>;
31
+ export(filename: string, column: Array<ExcelColumnExport>, tmpEntitys: Array<{
32
+ [key: string]: any;
33
+ }>, savepath?: string, beforSave?: (options: {
34
+ workbook: exceljs.Workbook;
35
+ worksheet: exceljs.Worksheet;
36
+ }) => Promise<void>): Promise<{
37
+ filename: string;
38
+ filepath: string;
39
+ }>;
40
+ stream(file: string, option?: {
41
+ root?: string;
42
+ suffix?: string[];
43
+ }): Promise<ExcelStream>;
44
+ download(ctx: any, filepath: string): Promise<void>;
45
+ }
46
+ export {};
@@ -1 +1 @@
1
- const a12_0x32846f=a12_0x28e8;(function(_0x3e9ac6,_0x404214){const _0x551eaa=a12_0x28e8,_0x5d0ffd=_0x3e9ac6();while(!![]){try{const _0xa10d8=-parseInt(_0x551eaa(0x1ac))/0x1*(-parseInt(_0x551eaa(0x195))/0x2)+-parseInt(_0x551eaa(0x1b6))/0x3+parseInt(_0x551eaa(0x19e))/0x4*(-parseInt(_0x551eaa(0x1cf))/0x5)+-parseInt(_0x551eaa(0x198))/0x6+parseInt(_0x551eaa(0x1a5))/0x7*(-parseInt(_0x551eaa(0x18e))/0x8)+parseInt(_0x551eaa(0x1b2))/0x9*(-parseInt(_0x551eaa(0x1be))/0xa)+parseInt(_0x551eaa(0x1c2))/0xb;if(_0xa10d8===_0x404214)break;else _0x5d0ffd['push'](_0x5d0ffd['shift']());}catch(_0x451a9a){_0x5d0ffd['push'](_0x5d0ffd['shift']());}}}(a12_0x1b5b,0x2ba7d));const a12_0x107378=(function(){let _0x3e690b=!![];return function(_0x2fac68,_0x399f58){const _0x43b4ac=_0x3e690b?function(){if(_0x399f58){const _0x2ec176=_0x399f58['apply'](_0x2fac68,arguments);return _0x399f58=null,_0x2ec176;}}:function(){};return _0x3e690b=![],_0x43b4ac;};}()),a12_0xc68840=a12_0x107378(this,function(){const _0x52dd9c=a12_0x28e8;return a12_0xc68840[_0x52dd9c(0x1c3)]()[_0x52dd9c(0x18d)]('(((.+)+)+)+$')[_0x52dd9c(0x1c3)]()[_0x52dd9c(0x1aa)](a12_0xc68840)[_0x52dd9c(0x18d)]('(((.+)+)+)+$');});a12_0xc68840();function a12_0x28e8(_0x2a034c,_0x47b2d8){const _0x17cc21=a12_0x1b5b();return a12_0x28e8=function(_0xc68840,_0x107378){_0xc68840=_0xc68840-0x18c;let _0x1b5b95=_0x17cc21[_0xc68840];return _0x1b5b95;},a12_0x28e8(_0x2a034c,_0x47b2d8);}'use strict';function a12_0x1b5b(){const _0x37dd36=['Api\x20Excel\x20Error:\x20','65yTJWAS','object','Sheet\x201','readFile','col','stream','download','replace','keys','ScopeEnum','__metadata','YYYY/MM/DD','search','23992hbuDEd','parse','Provide','mkdirSync','ExcelStream','Scope','koa-send','190kRahEU','get','__esModule','1235724tIelXD','getWorksheet','./ExcelStream','log','app','frozen','100180CMyjWi','filter','value','cellCount','decorate','writeFile','set','287oRbPHi','export','key','model','xls','constructor','ExcelService','2945lWsTfM','function','handler','Workbook','isNumber','endsWith','38043IlcQNY','addRow','header','metadata','12399AcXsQT','getCell','getRow','length','rowCount','onRead','exceljs','values','320UFwJfV','instance','getAppDir','startsWith','7622263pqTIME','toString','onWrite','/public/xlsx/','findRows','defineProperty','addWorksheet','prototype','xlsx','.xlsx','__decorate','Singleton'];a12_0x1b5b=function(){return _0x37dd36;};return a12_0x1b5b();}var __decorate=this&&this[a12_0x32846f(0x1cc)]||function(_0x27b00e,_0x447dfb,_0x5f5165,_0x27ab27){const _0x39cf08=a12_0x32846f;var _0x570b0e=arguments[_0x39cf08(0x1b9)],_0x1660ab=_0x570b0e<0x3?_0x447dfb:_0x27ab27===null?_0x27ab27=Object['getOwnPropertyDescriptor'](_0x447dfb,_0x5f5165):_0x27ab27,_0x2dba1a;if(typeof Reflect==='object'&&typeof Reflect[_0x39cf08(0x1a2)]==='function')_0x1660ab=Reflect[_0x39cf08(0x1a2)](_0x27b00e,_0x447dfb,_0x5f5165,_0x27ab27);else{for(var _0x8ac50=_0x27b00e[_0x39cf08(0x1b9)]-0x1;_0x8ac50>=0x0;_0x8ac50--)if(_0x2dba1a=_0x27b00e[_0x8ac50])_0x1660ab=(_0x570b0e<0x3?_0x2dba1a(_0x1660ab):_0x570b0e>0x3?_0x2dba1a(_0x447dfb,_0x5f5165,_0x1660ab):_0x2dba1a(_0x447dfb,_0x5f5165))||_0x1660ab;}return _0x570b0e>0x3&&_0x1660ab&&Object[_0x39cf08(0x1c7)](_0x447dfb,_0x5f5165,_0x1660ab),_0x1660ab;},__metadata=this&&this[a12_0x32846f(0x1d9)]||function(_0x590a43,_0x2a8f78){const _0x3afbe1=a12_0x32846f;if(typeof Reflect===_0x3afbe1(0x1d0)&&typeof Reflect[_0x3afbe1(0x1b5)]==='function')return Reflect[_0x3afbe1(0x1b5)](_0x590a43,_0x2a8f78);};Object[a12_0x32846f(0x1c7)](exports,a12_0x32846f(0x197),{'value':!![]}),exports[a12_0x32846f(0x1ab)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x32846f(0x1bc)),koasend=require(a12_0x32846f(0x194)),core_1=require('@midwayjs/core'),ExcelStream_1=require(a12_0x32846f(0x19a));let ExcelService=class ExcelService{async[a12_0x32846f(0x18f)](_0x502a4b,_0x50d398,_0x25d9f4=[0x0]){const _0xbd0b03=a12_0x32846f;var _0x24e634,_0x123e69;const _0x4d6702=new exceljs[(_0xbd0b03(0x1af))](),_0x508779=[];let _0x62f964=_0x502a4b[_0xbd0b03(0x1d6)](/(\\|\/)/g,'/')[_0xbd0b03(0x1d6)](/\/{2,}/g,'/');!(_0x62f964===null||_0x62f964===void 0x0?void 0x0:_0x62f964[_0xbd0b03(0x1c1)]('/'))&&(_0x62f964=this[_0xbd0b03(0x19c)][_0xbd0b03(0x1c0)]()+'/'+_0x62f964);try{await _0x4d6702[_0xbd0b03(0x1ca)][_0xbd0b03(0x1d2)](_0x62f964);}catch(_0x373fcf){return console[_0xbd0b03(0x19b)](_0xbd0b03(0x1ce)+_0x62f964+'\x20is\x20read\x20fail'),_0x508779;}for(const _0x54f215 of _0x25d9f4){const _0x2222fd=lodash[_0xbd0b03(0x1b0)](_0x54f215)?((_0x24e634=_0x4d6702['worksheets'])===null||_0x24e634===void 0x0?void 0x0:_0x24e634[_0x54f215])||undefined:_0x4d6702[_0xbd0b03(0x199)](_0x54f215);if(_0x2222fd){var _0x3b0c80=0x1;const _0x8bfc4c=_0x2222fd[_0xbd0b03(0x1b8)](0x1),_0x2d5593=await new Promise(_0x38d9d4=>{const _0x553cc6={};_0x8bfc4c['eachCell']((_0x528a27,_0x41d228)=>{const _0x23abac=a12_0x28e8;for(const _0x5e9a43 of _0x50d398){if(_0x528a27[_0x23abac(0x1a0)]==_0x5e9a43[_0x23abac(0x1b4)])_0x3b0c80=0x2,_0x553cc6[_0x5e9a43[_0x23abac(0x1a7)]]={'header':_0x528a27[_0x23abac(0x1d3)],'handler':(_0x5e9a43===null||_0x5e9a43===void 0x0?void 0x0:_0x5e9a43[_0x23abac(0x1bb)])||(_0x5e9a43===null||_0x5e9a43===void 0x0?void 0x0:_0x5e9a43['handler'])};else{if(!_0x553cc6[_0x5e9a43[_0x23abac(0x1a7)]])try{const _0x12f351=_0x8bfc4c&&_0x8bfc4c['getCell'](_0x5e9a43['header']);_0x12f351&&(_0x553cc6[_0x5e9a43[_0x23abac(0x1a7)]]={'header':_0x12f351[_0x23abac(0x1d3)],'handler':(_0x5e9a43===null||_0x5e9a43===void 0x0?void 0x0:_0x5e9a43[_0x23abac(0x1bb)])||(_0x5e9a43===null||_0x5e9a43===void 0x0?void 0x0:_0x5e9a43[_0x23abac(0x1ae)])});}catch{}}}_0x8bfc4c[_0x23abac(0x1a1)]==_0x41d228&&_0x38d9d4(_0x553cc6);});});_0x5c7daf:for(const _0x48e94c of _0x2222fd[_0xbd0b03(0x1c6)](_0x3b0c80,_0x2222fd[_0xbd0b03(0x1ba)])){if(typeof(_0x48e94c===null||_0x48e94c===void 0x0?void 0x0:_0x48e94c[_0xbd0b03(0x1b7)])!=_0xbd0b03(0x1ad))continue _0x5c7daf;const _0x45f918={};_0x58aaf0:for(const _0x22b5ce in _0x2d5593){if(_0x2d5593[_0x22b5ce][_0xbd0b03(0x1b4)]){const _0x39cc86=_0x48e94c[_0xbd0b03(0x1b7)](_0x2d5593[_0x22b5ce][_0xbd0b03(0x1b4)]);if(!_0x39cc86)continue _0x58aaf0;try{_0x39cc86[_0xbd0b03(0x1c3)]();}catch(_0x355ff8){_0x39cc86[_0xbd0b03(0x1c3)]=()=>{const _0x4e1944=_0xbd0b03;var _0x44a3e6;return''+(((_0x44a3e6=_0x39cc86===null||_0x39cc86===void 0x0?void 0x0:_0x39cc86[_0x4e1944(0x1a8)])===null||_0x44a3e6===void 0x0?void 0x0:_0x44a3e6[_0x4e1944(0x1a0)])||'');};}typeof((_0x123e69=_0x2d5593[_0x22b5ce])===null||_0x123e69===void 0x0?void 0x0:_0x123e69['handler'])==_0xbd0b03(0x1ad)?_0x45f918[_0x22b5ce]=await _0x2d5593[_0x22b5ce][_0xbd0b03(0x1ae)](lodash[_0xbd0b03(0x1a4)]({},_0x22b5ce,(_0x39cc86===null||_0x39cc86===void 0x0?void 0x0:_0x39cc86['toString']())||''),_0x39cc86[_0xbd0b03(0x1a8)]):_0x45f918[_0x22b5ce]=(_0x39cc86===null||_0x39cc86===void 0x0?void 0x0:_0x39cc86['toString']())||'';}}Object[_0xbd0b03(0x1d7)](_0x45f918)[_0xbd0b03(0x1b9)]>0x0&&Object[_0xbd0b03(0x1bd)](_0x45f918)[_0xbd0b03(0x19f)](_0x1b2a69=>_0x1b2a69!='')[_0xbd0b03(0x1b9)]>0x0&&_0x508779['push'](_0x45f918);}}}return _0x508779;}async[a12_0x32846f(0x1a6)](_0x3d7c32,_0x40716a,_0x737676,_0x3576ce,_0x4a2be8){const _0x21f391=a12_0x32846f;var _0x32db9b,_0x59ad96,_0x472e02;const _0x165d52=new exceljs['Workbook'](),_0x292828={},_0xe62a03=[],_0x696557=_0x165d52[_0x21f391(0x1c8)](_0x21f391(0x1d1),{'views':[{'state':_0x21f391(0x19d),'ySplit':0x1}]});for(const _0x565410 in _0x40716a){_0x292828[_0x40716a[_0x565410][_0x21f391(0x1a7)]]=_0x40716a[_0x565410][_0x21f391(0x1b4)],_0xe62a03['push']({'header':_0x40716a[_0x565410]['header'],'key':(_0x32db9b=_0x40716a[_0x565410])===null||_0x32db9b===void 0x0?void 0x0:_0x32db9b[_0x21f391(0x1a7)][_0x21f391(0x1d6)](/\./g,'_')});}_0x696557['columns']=_0xe62a03;for(const _0x1d72f8 in _0x737676){const _0x498aaa=_0x737676[_0x1d72f8],_0x241b48=_0x696557[_0x21f391(0x1b3)]({});for(let _0x33655b in _0x40716a){const _0x3f072b=_0x40716a[_0x33655b][_0x21f391(0x1a7)]['replace'](/\./g,'_'),_0xe29e95=_0x696557['getColumn'](_0x3f072b),_0xeaff3=_0x241b48===null||_0x241b48===void 0x0?void 0x0:_0x241b48[_0x21f391(0x1b7)](_0x3f072b);if(typeof((_0x59ad96=_0x40716a[_0x33655b])===null||_0x59ad96===void 0x0?void 0x0:_0x59ad96['onWrite'])==_0x21f391(0x1ad))_0xeaff3[_0x21f391(0x1a0)]=await _0x40716a[_0x33655b][_0x21f391(0x1c4)](_0x498aaa,{'row':_0x241b48,'col':_0xe29e95,'cell':_0xeaff3,'sheet':_0x696557})||'';else typeof((_0x472e02=_0x40716a[_0x33655b])===null||_0x472e02===void 0x0?void 0x0:_0x472e02[_0x21f391(0x1ae)])=='function'?_0xeaff3[_0x21f391(0x1a0)]=await _0x40716a[_0x33655b][_0x21f391(0x1ae)](_0x498aaa,{'row':_0x241b48,'col':_0xe29e95,'cell':_0xeaff3,'sheet':_0x696557})||'':_0xeaff3[_0x21f391(0x1a0)]=lodash[_0x21f391(0x196)](_0x498aaa,_0x40716a[_0x33655b][_0x21f391(0x1a7)],'');}}typeof _0x4a2be8==_0x21f391(0x1ad)&&await _0x4a2be8({'workbook':_0x165d52,'worksheet':_0x696557});let _0x52dfc1='';const _0x5af2cf=_0x3d7c32+_0x21f391(0x1cb);if(_0x3576ce&&_0x3576ce[_0x21f391(0x1c1)]('/'))_0x52dfc1=''+_0x3576ce;else _0x3576ce&&!_0x3576ce['startsWith']('/')&&!_0x3576ce[_0x21f391(0x1c1)]('\x5c')?_0x52dfc1=this['app'][_0x21f391(0x1c0)]()+'/'+_0x3576ce:_0x52dfc1=this[_0x21f391(0x19c)][_0x21f391(0x1c0)]()+_0x21f391(0x1c5)+dayjs()['format'](_0x21f391(0x18c));return(_0x52dfc1[_0x21f391(0x1b1)]('/')||_0x52dfc1[_0x21f391(0x1b1)]('\x5c'))&&(_0x52dfc1=_0x52dfc1['substring'](0x0,_0x52dfc1['length']-0x1)),_0x52dfc1=_0x52dfc1[_0x21f391(0x1d6)](/(\\|\/)/g,'/')[_0x21f391(0x1d6)](/\/{2,}/g,'/'),!fs['existsSync'](_0x52dfc1)&&fs[_0x21f391(0x191)](_0x52dfc1,{'recursive':!![]}),await _0x165d52['xlsx'][_0x21f391(0x1a3)]((_0x52dfc1+'/'+_0x5af2cf)['replace'](/(\\|\/)/g,'/')[_0x21f391(0x1d6)](/\/{2,}/g,'/')),{'filename':_0x5af2cf,'filepath':(_0x52dfc1['substring']((''+this[_0x21f391(0x19c)]['getAppDir']())[_0x21f391(0x1b9)])+'/'+_0x5af2cf)[_0x21f391(0x1d6)](/(\\|\/)/g,'/')[_0x21f391(0x1d6)](/\/{2,}/g,'/')};}async[a12_0x32846f(0x1d4)](_0x2f7097,_0x74ed0d={'suffix':[a12_0x32846f(0x1a9),a12_0x32846f(0x1ca)]}){const _0x212910=a12_0x32846f;return await ExcelStream_1[_0x212910(0x192)][_0x212910(0x1bf)](_0x2f7097,_0x74ed0d);}async[a12_0x32846f(0x1d5)](_0xe25274,_0x52dcb8){return await koasend(_0xe25274,''+_0x52dcb8);}};exports[a12_0x32846f(0x1ab)]=ExcelService,__decorate([(0x0,core_1['App'])(),__metadata('design:type',Object)],ExcelService[a12_0x32846f(0x1c9)],a12_0x32846f(0x19c),void 0x0),exports[a12_0x32846f(0x1ab)]=ExcelService=__decorate([(0x0,core_1[a12_0x32846f(0x190)])(),(0x0,core_1[a12_0x32846f(0x193)])(core_1[a12_0x32846f(0x1d8)][a12_0x32846f(0x1cd)])],ExcelService);
1
+ const a12_0x18d4b4=a12_0x8912;(function(_0x29c125,_0x54e699){const _0xe40681=a12_0x8912,_0xc88b68=_0x29c125();while(!![]){try{const _0x491f36=parseInt(_0xe40681(0x16a))/0x1*(parseInt(_0xe40681(0x14f))/0x2)+-parseInt(_0xe40681(0x17f))/0x3*(-parseInt(_0xe40681(0x171))/0x4)+parseInt(_0xe40681(0x182))/0x5*(parseInt(_0xe40681(0x164))/0x6)+parseInt(_0xe40681(0x173))/0x7+parseInt(_0xe40681(0x165))/0x8+parseInt(_0xe40681(0x141))/0x9*(parseInt(_0xe40681(0x149))/0xa)+-parseInt(_0xe40681(0x13f))/0xb;if(_0x491f36===_0x54e699)break;else _0xc88b68['push'](_0xc88b68['shift']());}catch(_0x1ebb04){_0xc88b68['push'](_0xc88b68['shift']());}}}(a12_0x1e17,0xd77ff));const a12_0x469ce9=(function(){let _0x14a963=!![];return function(_0x598660,_0x44becf){const _0x45dba3=_0x14a963?function(){const _0x2c2db1=a12_0x8912;if(_0x44becf){const _0x17c1a0=_0x44becf[_0x2c2db1(0x14e)](_0x598660,arguments);return _0x44becf=null,_0x17c1a0;}}:function(){};return _0x14a963=![],_0x45dba3;};}()),a12_0x5c6fa7=a12_0x469ce9(this,function(){const _0x238831=a12_0x8912;return a12_0x5c6fa7['toString']()[_0x238831(0x175)](_0x238831(0x169))[_0x238831(0x172)]()[_0x238831(0x16e)](a12_0x5c6fa7)[_0x238831(0x175)](_0x238831(0x169));});function a12_0x8912(_0x498b17,_0x40a528){const _0x4c99c3=a12_0x1e17();return a12_0x8912=function(_0x5c6fa7,_0x469ce9){_0x5c6fa7=_0x5c6fa7-0x13b;let _0x1e171d=_0x4c99c3[_0x5c6fa7];return _0x1e171d;},a12_0x8912(_0x498b17,_0x40a528);}a12_0x5c6fa7();'use strict';var __decorate=this&&this['__decorate']||function(_0x1c974e,_0x8c8913,_0x57a867,_0x300512){const _0x1ec8d8=a12_0x8912;var _0x282a75=arguments[_0x1ec8d8(0x17e)],_0x4f4e15=_0x282a75<0x3?_0x8c8913:_0x300512===null?_0x300512=Object['getOwnPropertyDescriptor'](_0x8c8913,_0x57a867):_0x300512,_0x5897c3;if(typeof Reflect===_0x1ec8d8(0x13b)&&typeof Reflect[_0x1ec8d8(0x15c)]===_0x1ec8d8(0x151))_0x4f4e15=Reflect['decorate'](_0x1c974e,_0x8c8913,_0x57a867,_0x300512);else{for(var _0x485f94=_0x1c974e[_0x1ec8d8(0x17e)]-0x1;_0x485f94>=0x0;_0x485f94--)if(_0x5897c3=_0x1c974e[_0x485f94])_0x4f4e15=(_0x282a75<0x3?_0x5897c3(_0x4f4e15):_0x282a75>0x3?_0x5897c3(_0x8c8913,_0x57a867,_0x4f4e15):_0x5897c3(_0x8c8913,_0x57a867))||_0x4f4e15;}return _0x282a75>0x3&&_0x4f4e15&&Object[_0x1ec8d8(0x17d)](_0x8c8913,_0x57a867,_0x4f4e15),_0x4f4e15;},__metadata=this&&this[a12_0x18d4b4(0x158)]||function(_0x446e47,_0x533012){const _0x136346=a12_0x18d4b4;if(typeof Reflect==='object'&&typeof Reflect[_0x136346(0x166)]===_0x136346(0x151))return Reflect[_0x136346(0x166)](_0x446e47,_0x533012);};Object[a12_0x18d4b4(0x17d)](exports,a12_0x18d4b4(0x168),{'value':!![]}),exports[a12_0x18d4b4(0x15a)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x18d4b4(0x181)),koasend=require(a12_0x18d4b4(0x152)),core_1=require('@midwayjs/core'),ExcelStream_1=require('./ExcelStream');function a12_0x1e17(){const _0xbdd86b=['writeFile','instance','export','apply','26xTfxyr','col','function','koa-send','YYYY/MM/DD','design:type','header','getColumn','ExcelStream','__metadata','replace','ExcelService','Scope','decorate','startsWith','download','onRead','Singleton','handler','isNumber','getRow','6aACEFL','691232SfySzm','metadata','rowCount','__esModule','(((.+)+)+)+$','44969SSdiEi','frozen','xlsx','endsWith','constructor','App','values','604gdWuYs','toString','6682004Waykfq','parse','search','Sheet\x201','value','model','xls','push','\x20is\x20read\x20fail','stream','defineProperty','length','6015IdNTDF','cellCount','exceljs','3936275WRwaQr','worksheets','Api\x20Excel\x20Error:\x20','addWorksheet','keys','onWrite','object','getWorksheet','key','substring','33877965UqjZOQ','getCell','11222271spuirJ','readFile','findRows','getAppDir','app','addRow','prototype','log','10pItXEo','Provide'];a12_0x1e17=function(){return _0xbdd86b;};return a12_0x1e17();}let ExcelService=class ExcelService{async[a12_0x18d4b4(0x174)](_0x4dae18,_0x1f8ae9,_0x2df160=[0x0]){const _0x24e10b=a12_0x18d4b4;var _0x2e0942,_0x1a5513;const _0x12f1cc=new exceljs['Workbook'](),_0x1ed806=[];let _0x40ef61=_0x4dae18[_0x24e10b(0x159)](/(\\|\/)/g,'/')[_0x24e10b(0x159)](/\/{2,}/g,'/');!(_0x40ef61===null||_0x40ef61===void 0x0?void 0x0:_0x40ef61['startsWith']('/'))&&(_0x40ef61=this[_0x24e10b(0x145)][_0x24e10b(0x144)]()+'/'+_0x40ef61);try{await _0x12f1cc['xlsx'][_0x24e10b(0x142)](_0x40ef61);}catch(_0x1ab0fc){return console[_0x24e10b(0x148)](_0x24e10b(0x184)+_0x40ef61+_0x24e10b(0x17b)),_0x1ed806;}for(const _0x3d7996 of _0x2df160){const _0x21d398=lodash[_0x24e10b(0x162)](_0x3d7996)?((_0x2e0942=_0x12f1cc[_0x24e10b(0x183)])===null||_0x2e0942===void 0x0?void 0x0:_0x2e0942[_0x3d7996])||undefined:_0x12f1cc[_0x24e10b(0x13c)](_0x3d7996);if(_0x21d398){var _0x2e60b1=0x1;const _0x309ba6=_0x21d398[_0x24e10b(0x163)](0x1),_0x44ffa0=await new Promise(_0x40f30f=>{const _0x26bea4={};_0x309ba6['eachCell']((_0x1eab20,_0x126133)=>{const _0x5d800a=a12_0x8912;for(const _0x906fee of _0x1f8ae9){if(_0x1eab20['value']==_0x906fee[_0x5d800a(0x155)])_0x2e60b1=0x2,_0x26bea4[_0x906fee[_0x5d800a(0x13d)]]={'header':_0x1eab20[_0x5d800a(0x150)],'handler':(_0x906fee===null||_0x906fee===void 0x0?void 0x0:_0x906fee[_0x5d800a(0x15f)])||(_0x906fee===null||_0x906fee===void 0x0?void 0x0:_0x906fee['handler'])};else{if(!_0x26bea4[_0x906fee[_0x5d800a(0x13d)]])try{const _0x39083e=_0x309ba6&&_0x309ba6[_0x5d800a(0x140)](_0x906fee[_0x5d800a(0x155)]);_0x39083e&&(_0x26bea4[_0x906fee[_0x5d800a(0x13d)]]={'header':_0x39083e[_0x5d800a(0x150)],'handler':(_0x906fee===null||_0x906fee===void 0x0?void 0x0:_0x906fee['onRead'])||(_0x906fee===null||_0x906fee===void 0x0?void 0x0:_0x906fee['handler'])});}catch{}}}_0x309ba6[_0x5d800a(0x180)]==_0x126133&&_0x40f30f(_0x26bea4);});});_0x5105a0:for(const _0x476b97 of _0x21d398[_0x24e10b(0x143)](_0x2e60b1,_0x21d398[_0x24e10b(0x167)])){if(typeof(_0x476b97===null||_0x476b97===void 0x0?void 0x0:_0x476b97[_0x24e10b(0x140)])!='function')continue _0x5105a0;const _0x54e229={};_0xe54e8f:for(const _0x4ebf03 in _0x44ffa0){if(_0x44ffa0[_0x4ebf03][_0x24e10b(0x155)]){const _0x5c826b=_0x476b97['getCell'](_0x44ffa0[_0x4ebf03][_0x24e10b(0x155)]);if(!_0x5c826b)continue _0xe54e8f;try{_0x5c826b[_0x24e10b(0x172)]();}catch(_0x1813c7){_0x5c826b['toString']=()=>{const _0x38758d=_0x24e10b;var _0x6c068a;return''+(((_0x6c068a=_0x5c826b===null||_0x5c826b===void 0x0?void 0x0:_0x5c826b[_0x38758d(0x178)])===null||_0x6c068a===void 0x0?void 0x0:_0x6c068a[_0x38758d(0x177)])||'');};}typeof((_0x1a5513=_0x44ffa0[_0x4ebf03])===null||_0x1a5513===void 0x0?void 0x0:_0x1a5513[_0x24e10b(0x161)])==_0x24e10b(0x151)?_0x54e229[_0x4ebf03]=await _0x44ffa0[_0x4ebf03][_0x24e10b(0x161)](lodash['set']({},_0x4ebf03,(_0x5c826b===null||_0x5c826b===void 0x0?void 0x0:_0x5c826b[_0x24e10b(0x172)]())||''),_0x5c826b[_0x24e10b(0x178)]):_0x54e229[_0x4ebf03]=(_0x5c826b===null||_0x5c826b===void 0x0?void 0x0:_0x5c826b[_0x24e10b(0x172)]())||'';}}Object[_0x24e10b(0x186)](_0x54e229)[_0x24e10b(0x17e)]>0x0&&Object[_0x24e10b(0x170)](_0x54e229)['filter'](_0x50b908=>_0x50b908!='')[_0x24e10b(0x17e)]>0x0&&_0x1ed806[_0x24e10b(0x17a)](_0x54e229);}}}return _0x1ed806;}async[a12_0x18d4b4(0x14d)](_0x2221b5,_0x14992e,_0x479cb7,_0x5b3c27,_0x28b70d){const _0x3ca310=a12_0x18d4b4;var _0x25f41d,_0x1a2fc9,_0x9224e7;const _0xc80a56=new exceljs['Workbook'](),_0x57bc39={},_0x51ca62=[],_0x4314ae=_0xc80a56[_0x3ca310(0x185)](_0x3ca310(0x176),{'views':[{'state':_0x3ca310(0x16b),'ySplit':0x1}]});for(const _0xbbba7e in _0x14992e){_0x57bc39[_0x14992e[_0xbbba7e][_0x3ca310(0x13d)]]=_0x14992e[_0xbbba7e][_0x3ca310(0x155)],_0x51ca62[_0x3ca310(0x17a)]({'header':_0x14992e[_0xbbba7e][_0x3ca310(0x155)],'key':(_0x25f41d=_0x14992e[_0xbbba7e])===null||_0x25f41d===void 0x0?void 0x0:_0x25f41d[_0x3ca310(0x13d)][_0x3ca310(0x159)](/\./g,'_')});}_0x4314ae['columns']=_0x51ca62;for(const _0x3b716d in _0x479cb7){const _0x3db577=_0x479cb7[_0x3b716d],_0x3edee0=_0x4314ae[_0x3ca310(0x146)]({});for(let _0x45330d in _0x14992e){const _0x2dac3d=_0x14992e[_0x45330d][_0x3ca310(0x13d)]['replace'](/\./g,'_'),_0x53f534=_0x4314ae[_0x3ca310(0x156)](_0x2dac3d),_0x135f44=_0x3edee0===null||_0x3edee0===void 0x0?void 0x0:_0x3edee0['getCell'](_0x2dac3d);if(typeof((_0x1a2fc9=_0x14992e[_0x45330d])===null||_0x1a2fc9===void 0x0?void 0x0:_0x1a2fc9['onWrite'])==_0x3ca310(0x151))_0x135f44[_0x3ca310(0x177)]=await _0x14992e[_0x45330d][_0x3ca310(0x187)](_0x3db577,{'row':_0x3edee0,'col':_0x53f534,'cell':_0x135f44,'sheet':_0x4314ae})||'';else typeof((_0x9224e7=_0x14992e[_0x45330d])===null||_0x9224e7===void 0x0?void 0x0:_0x9224e7[_0x3ca310(0x161)])==_0x3ca310(0x151)?_0x135f44[_0x3ca310(0x177)]=await _0x14992e[_0x45330d][_0x3ca310(0x161)](_0x3db577,{'row':_0x3edee0,'col':_0x53f534,'cell':_0x135f44,'sheet':_0x4314ae})||'':_0x135f44[_0x3ca310(0x177)]=lodash['get'](_0x3db577,_0x14992e[_0x45330d][_0x3ca310(0x13d)],'');}}typeof _0x28b70d==_0x3ca310(0x151)&&await _0x28b70d({'workbook':_0xc80a56,'worksheet':_0x4314ae});let _0x82a65='';const _0x48e4be=_0x2221b5+'.xlsx';if(_0x5b3c27&&_0x5b3c27[_0x3ca310(0x15d)]('/'))_0x82a65=''+_0x5b3c27;else _0x5b3c27&&!_0x5b3c27['startsWith']('/')&&!_0x5b3c27[_0x3ca310(0x15d)]('\x5c')?_0x82a65=this[_0x3ca310(0x145)]['getAppDir']()+'/'+_0x5b3c27:_0x82a65=this[_0x3ca310(0x145)][_0x3ca310(0x144)]()+'/public/xlsx/'+dayjs()['format'](_0x3ca310(0x153));return(_0x82a65[_0x3ca310(0x16d)]('/')||_0x82a65[_0x3ca310(0x16d)]('\x5c'))&&(_0x82a65=_0x82a65[_0x3ca310(0x13e)](0x0,_0x82a65[_0x3ca310(0x17e)]-0x1)),_0x82a65=_0x82a65['replace'](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/'),!fs['existsSync'](_0x82a65)&&fs['mkdirSync'](_0x82a65,{'recursive':!![]}),await _0xc80a56[_0x3ca310(0x16c)][_0x3ca310(0x14b)]((_0x82a65+'/'+_0x48e4be)['replace'](/(\\|\/)/g,'/')[_0x3ca310(0x159)](/\/{2,}/g,'/')),{'filename':_0x48e4be,'filepath':(_0x82a65[_0x3ca310(0x13e)]((''+this[_0x3ca310(0x145)][_0x3ca310(0x144)]())[_0x3ca310(0x17e)])+'/'+_0x48e4be)['replace'](/(\\|\/)/g,'/')[_0x3ca310(0x159)](/\/{2,}/g,'/')};}async[a12_0x18d4b4(0x17c)](_0xf48770,_0x27715a={'suffix':[a12_0x18d4b4(0x179),a12_0x18d4b4(0x16c)]}){const _0x1929dc=a12_0x18d4b4;return await ExcelStream_1[_0x1929dc(0x157)][_0x1929dc(0x14c)](_0xf48770,_0x27715a);}async[a12_0x18d4b4(0x15e)](_0xe88309,_0x74e6b1){return await koasend(_0xe88309,''+_0x74e6b1);}};__decorate([(0x0,core_1[a12_0x18d4b4(0x16f)])(),__metadata(a12_0x18d4b4(0x154),Object)],ExcelService[a12_0x18d4b4(0x147)],a12_0x18d4b4(0x145),void 0x0),ExcelService=__decorate([(0x0,core_1[a12_0x18d4b4(0x14a)])(),(0x0,core_1[a12_0x18d4b4(0x15b)])(core_1['ScopeEnum'][a12_0x18d4b4(0x160)])],ExcelService),exports[a12_0x18d4b4(0x15a)]=ExcelService;