anncic-api 3.4.32 → 3.4.33

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_0x130e09=a8_0x542d;(function(_0x4f7c9e,_0x18d307){const _0x53f284=a8_0x542d,_0x324a82=_0x4f7c9e();while(!![]){try{const _0x1964c9=parseInt(_0x53f284(0x20a))/0x1*(-parseInt(_0x53f284(0x1bc))/0x2)+-parseInt(_0x53f284(0x1fe))/0x3+-parseInt(_0x53f284(0x1d6))/0x4+-parseInt(_0x53f284(0x1bf))/0x5+parseInt(_0x53f284(0x1c6))/0x6*(-parseInt(_0x53f284(0x1b3))/0x7)+-parseInt(_0x53f284(0x1c3))/0x8*(parseInt(_0x53f284(0x204))/0x9)+parseInt(_0x53f284(0x1bb))/0xa*(parseInt(_0x53f284(0x1e5))/0xb);if(_0x1964c9===_0x18d307)break;else _0x324a82['push'](_0x324a82['shift']());}catch(_0x35ced0){_0x324a82['push'](_0x324a82['shift']());}}}(a8_0x87d2,0xc52bb));const a8_0x78a3c2=(function(){let _0x5613dc=!![];return function(_0x169f10,_0x443862){const _0x5925e0=_0x5613dc?function(){const _0x32a6ef=a8_0x542d;if(_0x443862){const _0x306cf6=_0x443862[_0x32a6ef(0x1e7)](_0x169f10,arguments);return _0x443862=null,_0x306cf6;}}:function(){};return _0x5613dc=![],_0x5925e0;};}()),a8_0x3ac34b=a8_0x78a3c2(this,function(){const _0x640ac2=a8_0x542d;return a8_0x3ac34b[_0x640ac2(0x1fa)]()['search'](_0x640ac2(0x1a9))[_0x640ac2(0x1fa)]()[_0x640ac2(0x1b8)](a8_0x3ac34b)[_0x640ac2(0x1f0)](_0x640ac2(0x1a9));});function a8_0x542d(_0x332b08,_0x2c2b8c){const _0x482c24=a8_0x87d2();return a8_0x542d=function(_0x3ac34b,_0x78a3c2){_0x3ac34b=_0x3ac34b-0x1a7;let _0x87d25=_0x482c24[_0x3ac34b];return _0x87d25;},a8_0x542d(_0x332b08,_0x2c2b8c);}a8_0x3ac34b();'use strict';Object[a8_0x130e09(0x201)](exports,a8_0x130e09(0x1f3),{'value':!![]}),exports[a8_0x130e09(0x1de)]=void 0x0;const lodash_1=require(a8_0x130e09(0x1f2)),validator_1=require(a8_0x130e09(0x1ca)),core_1=require(a8_0x130e09(0x1d4)),core_2=require(a8_0x130e09(0x1d4)),core_3=require(a8_0x130e09(0x1d4)),action_1=require(a8_0x130e09(0x1d7));function a8_0x87d2(){const _0x3ea09b=['string','type','listModule','336712gmQjFX','summary','items','486fBcKZu','describe','routerOptions','filepath','@anncic-api/validator','push','indexOf','min','file','requestMethod','boolean','FIELDS','ACTION_ROUTE_KEY','filter','@midwayjs/core','title','1332780pkiJCX','../types/action','route','allow','header','tagName','key','String','getRoutes','rules','startsWith','substring','getClassMetadata','module','isArray','363UqGrQJ','number','apply','default','propertyData','flags.label','method','split','body','concat','replace','search','query','lodash','__esModule','test','limit','WEB_ROUTER_PARAM_KEY','find','name','Object','toString','flags.description','INJECT_CUSTOM_PARAM','RULES_KEY','2384274nbPeYq','/static/apitest','QUERY','defineProperty','routes','keys','342IUxQlA','function','pprefix','get','path','request','694hBrzsX','intercept','children','FILESSTREAM','metadata','PARAM','parameterIndex','(((.+)+)+)+$','args','flags.presence','static/apitest','iterator','Number','Boolean','getMethodParamTypes','length','description','21504agnWFz','只允许:[','RouteParamTypes','max','HEADERS','constructor','array','required','1420190MkAxYF','364WYDJNm','prefix','noreq','3882705fwMEcr'];a8_0x87d2=function(){return _0x3ea09b;};return a8_0x87d2();}function getRoutes(_0x178dfe={'prefix':'/','module':![]}){const _0x193493=a8_0x130e09;var _0x3343db,_0x24abc3;const _0x40fe16=(0x0,core_3[_0x193493(0x1c2)])(action_1['ACTION_KEY']),_0x40d84a={},_0x5d7e0=Array[_0x193493(0x1e4)](_0x178dfe[_0x193493(0x1d3)]||[])?_0x178dfe[_0x193493(0x1d3)]||[]:[_0x178dfe[_0x193493(0x1d3)]];_0x712448:for(const _0x16e14b of _0x40fe16){let _0xaa5c62=(0x0,core_3[_0x193493(0x1e2)])(action_1['ACTION_KEY'],_0x16e14b),_0x55962f=(0x0,core_3[_0x193493(0x1e2)])(action_1[_0x193493(0x1d2)],_0x16e14b);if(_0xaa5c62&&_0x55962f){let _0x49855e=_0xaa5c62['prefix'],_0x5455a0={};if(_0x178dfe[_0x193493(0x1e3)]&&(0x0,lodash_1[_0x193493(0x207)])(_0xaa5c62,_0x193493(0x1e3),![])!=_0x178dfe[_0x193493(0x1e3)])continue _0x712448;else{if(_0x178dfe[_0x193493(0x1e3)]===![]&&!!(0x0,lodash_1[_0x193493(0x207)])(_0xaa5c62,_0x193493(0x1e3),null))continue _0x712448;}if(_0x178dfe[_0x193493(0x1bd)]&&!_0x49855e['startsWith'](_0x178dfe[_0x193493(0x1bd)]))continue _0x712448;_0x49855e!=='/'?(_0x5455a0[_0x193493(0x1c4)]=(_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62[_0x193493(0x1c8)][_0x193493(0x1db)])||(/^\//[_0x193493(0x1f4)](_0x49855e)?_0x49855e[_0x193493(0x1ec)]('/')[0x1]:_0x49855e),_0x5455a0[_0x193493(0x1b2)]=(_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62['routerOptions'][_0x193493(0x1b2)])||_0x5455a0[_0x193493(0x1c4)],_0x5455a0['routes']=[]):(_0x5455a0[_0x193493(0x1c4)]=(_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62[_0x193493(0x1c8)][_0x193493(0x1db)])||_0x193493(0x1e8),_0x5455a0[_0x193493(0x1b2)]=(_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62[_0x193493(0x1c8)][_0x193493(0x1b2)])||'',_0x5455a0[_0x193493(0x202)]=[]);_0x178dfe[_0x193493(0x1c9)]&&(_0x5455a0[_0x193493(0x1c9)]=_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62[_0x193493(0x1c9)]);(_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62[_0x193493(0x206)])&&(_0x5455a0[_0x193493(0x1bd)]=_0xaa5c62[_0x193493(0x206)]);(_0xaa5c62===null||_0xaa5c62===void 0x0?void 0x0:_0xaa5c62[_0x193493(0x1e3)])&&(_0x5455a0[_0x193493(0x1e3)]=_0xaa5c62[_0x193493(0x1e3)]);let _0x202e4e=(0x0,core_3[_0x193493(0x1e2)])(core_2[_0x193493(0x1fc)],_0x16e14b)||{};if(typeof _0x55962f[Symbol[_0x193493(0x1ad)]]===_0x193493(0x205))for(let _0x1e972b of _0x55962f){if((_0x178dfe===null||_0x178dfe===void 0x0?void 0x0:_0x178dfe[_0x193493(0x20b)])&&!(_0x1e972b===null||_0x1e972b===void 0x0?void 0x0:_0x1e972b['intercept']))continue;let _0x18fe19={};_0x18fe19[_0x193493(0x1eb)]=_0x1e972b[_0x193493(0x1cf)],_0x18fe19['route']=(_0x49855e+_0x1e972b[_0x193493(0x208)])[_0x193493(0x1ef)](/\/{2,}/g,'/'),_0x18fe19[_0x193493(0x1c4)]=(_0x1e972b===null||_0x1e972b===void 0x0?void 0x0:_0x1e972b['routerName'])||_0x5455a0['summary']||_0x193493(0x1e8),_0x18fe19[_0x193493(0x1b2)]=(_0x1e972b===null||_0x1e972b===void 0x0?void 0x0:_0x1e972b[_0x193493(0x1b2)])||'',_0x18fe19['request']=[];_0x18fe19[_0x193493(0x1d8)]['endsWith']('/')&&(_0x18fe19[_0x193493(0x1d8)]=_0x18fe19[_0x193493(0x1d8)][_0x193493(0x1e1)](0x0,_0x18fe19[_0x193493(0x1d8)][_0x193493(0x1b1)]-0x1));if(!(0x0,lodash_1[_0x193493(0x1e0)])(_0x18fe19[_0x193493(0x1d8)],_0x193493(0x1ac))&&!(0x0,lodash_1[_0x193493(0x1e0)])(_0x18fe19[_0x193493(0x1d8)],_0x193493(0x1ff))&&_0x5d7e0[_0x193493(0x1cc)](_0x18fe19['route'])===-0x1){if(!(_0x178dfe===null||_0x178dfe===void 0x0?void 0x0:_0x178dfe[_0x193493(0x1be)])){let _0x58a86f=(0x0,core_3[_0x193493(0x1b0)])(new _0x16e14b(),_0x1e972b[_0x193493(0x1eb)]);for(const _0x137e3d in _0x58a86f){let _0x54183a=(_0x3343db=_0x202e4e[_0x1e972b[_0x193493(0x1eb)]])===null||_0x3343db===void 0x0?void 0x0:_0x3343db['find'](_0x343781=>_0x343781[_0x193493(0x1a8)]==_0x137e3d&&_0x343781['key']===core_2[_0x193493(0x1f6)]&&(_0x343781===null||_0x343781===void 0x0?void 0x0:_0x343781[_0x193493(0x20e)]));if(_0x54183a===null||_0x54183a===void 0x0?void 0x0:_0x54183a[_0x193493(0x20e)]){let _0x4d71ec=convertTypeToString(_0x54183a['metadata'][_0x193493(0x1c1)]||0x0);if([_0x193493(0x1f1),'body']['indexOf'](_0x4d71ec)!=-0x1&&_0x54183a[_0x193493(0x20e)][_0x193493(0x1e9)]['indexOf'](':')==-0x1&&!_0x18fe19[_0x193493(0x209)][_0x193493(0x1f7)](_0x5e01b2=>_0x5e01b2[_0x193493(0x1dc)]==_0x54183a[_0x193493(0x20e)]['propertyData']))_0x18fe19[_0x193493(0x209)][_0x193493(0x1cb)]({'key':_0x54183a['metadata'][_0x193493(0x1e9)],'title':_0x54183a[_0x193493(0x20e)]['propertyData'],'type':convertSchemaType(_0x58a86f[_0x54183a['parameterIndex']][_0x193493(0x1f8)]),'required':![],'default':'','desc':''});else{if(_0x4d71ec==_0x193493(0x1ce)){let _0x229b29=((_0x24abc3=_0x54183a===null||_0x54183a===void 0x0?void 0x0:_0x54183a[_0x193493(0x20e)])===null||_0x24abc3===void 0x0?void 0x0:_0x24abc3[_0x193493(0x1e9)])||_0x193493(0x1ce);_0x229b29[_0x193493(0x1cc)](':')==-0x1&&!_0x18fe19[_0x193493(0x209)][_0x193493(0x1f7)](_0x27f3a9=>_0x27f3a9[_0x193493(0x1dc)]==_0x229b29&&_0x27f3a9['type']==_0x193493(0x1ce))&&_0x18fe19[_0x193493(0x209)][_0x193493(0x1cb)]({'key':_0x229b29,'title':'文件上传-'+_0x229b29,'type':_0x193493(0x1ce),'required':!![],'default':'','desc':''});}}}else{const _0x4e9d35=(0x0,core_3['getClassExtendedMetadata'])(validator_1[_0x193493(0x1fd)],_0x58a86f[_0x137e3d]);_0x4e9d35&&_0x18fe19['request'][_0x193493(0x1cb)](...getJoiRequest(_0x4e9d35));}}}_0x5455a0['routes']['push'](_0x18fe19);}}if(_0x5455a0[_0x193493(0x202)]['length']>0x0){let _0x1c75d5=_0x40d84a[_0x49855e];_0x1c75d5?(_0x1c75d5['summary']!=_0x5455a0[_0x193493(0x1c4)]&&(_0x1c75d5[_0x193493(0x1c4)]=_0x1c75d5[_0x193493(0x1c4)]+','+_0x5455a0[_0x193493(0x1c4)]),_0x1c75d5[_0x193493(0x1b2)]!=_0x5455a0['description']&&(_0x1c75d5[_0x193493(0x1b2)]=_0x1c75d5['description']+','+_0x5455a0[_0x193493(0x1b2)]),_0x1c75d5[_0x193493(0x202)]=_0x1c75d5[_0x193493(0x202)][_0x193493(0x1ee)](_0x5455a0['routes']),_0x40d84a[_0x49855e]=_0x1c75d5):_0x40d84a[_0x49855e]=_0x5455a0;}}}return _0x40d84a;}exports[a8_0x130e09(0x1de)]=getRoutes;function getJoiRequest(_0x598234){const _0x20b2ca=a8_0x130e09,_0x16d434=[];for(let _0x33b09b in _0x598234){const _0x55d48f={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x1c62d1=typeof _0x598234[_0x33b09b][_0x20b2ca(0x1c7)]==_0x20b2ca(0x205)?_0x598234[_0x33b09b][_0x20b2ca(0x1c7)]():_0x598234[_0x33b09b];_0x55d48f['key']=_0x33b09b,_0x55d48f[_0x20b2ca(0x1c1)]=_0x1c62d1[_0x20b2ca(0x1c1)],_0x55d48f[_0x20b2ca(0x1d5)]=(0x0,lodash_1[_0x20b2ca(0x207)])(_0x1c62d1,_0x20b2ca(0x1ea),_0x33b09b),_0x55d48f['default']=(0x0,lodash_1['get'])(_0x1c62d1,'flags.default',''),_0x55d48f[_0x20b2ca(0x1ba)]=(0x0,lodash_1[_0x20b2ca(0x207)])(_0x1c62d1,_0x20b2ca(0x1ab),'')==_0x20b2ca(0x1ba),_0x55d48f[_0x20b2ca(0x1b2)]=(0x0,lodash_1[_0x20b2ca(0x207)])(_0x1c62d1,_0x20b2ca(0x1fb),'');if(_0x1c62d1['type']=='object')_0x55d48f[_0x20b2ca(0x20c)]=getJoiRequest(_0x1c62d1[_0x20b2ca(0x203)]);else{if(_0x1c62d1['type']==_0x20b2ca(0x1b9)&&_0x1c62d1[_0x20b2ca(0x1c5)]&&Array[_0x20b2ca(0x1e4)](_0x1c62d1['items'])&&_0x1c62d1[_0x20b2ca(0x1c5)][0x0]){}}_0x1c62d1[_0x20b2ca(0x1d9)]&&Array[_0x20b2ca(0x1e4)](_0x1c62d1['allow'])&&_0x1c62d1[_0x20b2ca(0x1d9)][_0x20b2ca(0x1b1)]>0x0&&(_0x55d48f[_0x20b2ca(0x1b2)]=_0x20b2ca(0x1b4)+_0x1c62d1[_0x20b2ca(0x1d9)]['join'](',')+'];'+_0x55d48f[_0x20b2ca(0x1b2)]);if(_0x55d48f['key']&&_0x55d48f[_0x20b2ca(0x1c1)]){const _0x494d00={};for(const _0x37cf2a of _0x1c62d1[_0x20b2ca(0x1df)]||[]){if(_0x37cf2a[_0x20b2ca(0x1f8)]==='min'&&_0x37cf2a['args'])_0x494d00[_0x20b2ca(0x1cd)]=_0x37cf2a[_0x20b2ca(0x1aa)][_0x20b2ca(0x1f5)];else _0x37cf2a[_0x20b2ca(0x1f8)]===_0x20b2ca(0x1b6)&&(_0x494d00['max']=_0x37cf2a['args'][_0x20b2ca(0x1f5)]);}_0x55d48f[_0x20b2ca(0x1df)]=_0x494d00;}_0x55d48f['key']&&_0x55d48f[_0x20b2ca(0x1d5)]&&_0x16d434[_0x20b2ca(0x1cb)](_0x55d48f);}return _0x16d434;}function convertSchemaType(_0x152e3e){const _0x5d8f74=a8_0x130e09;switch(_0x152e3e){case _0x5d8f74(0x1f9):return'object';case _0x5d8f74(0x1af):return _0x5d8f74(0x1d0);case _0x5d8f74(0x1ae):return _0x5d8f74(0x1e6);case _0x5d8f74(0x1dd):return _0x5d8f74(0x1c0);case'File':return _0x5d8f74(0x1ce);default:return _0x5d8f74(0x1c0);}}function convertTypeToString(_0x25920e){const _0x100638=a8_0x130e09;switch(_0x25920e){case core_1[_0x100638(0x1b5)][_0x100638(0x1b7)]:return _0x100638(0x1da);case core_1[_0x100638(0x1b5)][_0x100638(0x200)]:return _0x100638(0x1f1);case core_1[_0x100638(0x1b5)][_0x100638(0x1a7)]:return _0x100638(0x208);case core_1[_0x100638(0x1b5)]['BODY']:return _0x100638(0x1ed);case core_1[_0x100638(0x1b5)][_0x100638(0x1d1)]:case core_1[_0x100638(0x1b5)][_0x100638(0x20d)]:case core_1[_0x100638(0x1b5)]['FILESTREAM']:return _0x100638(0x1ce);default:return _0x100638(0x1da);}}
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_0x28b034=a9_0x11ae;(function(_0x1b1d93,_0x533616){var _0x308b6f=a9_0x11ae,_0x259c14=_0x1b1d93();while(!![]){try{var _0x399988=-parseInt(_0x308b6f(0x9c))/0x1*(parseInt(_0x308b6f(0xd1))/0x2)+parseInt(_0x308b6f(0x95))/0x3+-parseInt(_0x308b6f(0xcd))/0x4+-parseInt(_0x308b6f(0xc1))/0x5+parseInt(_0x308b6f(0x93))/0x6+-parseInt(_0x308b6f(0xb2))/0x7*(parseInt(_0x308b6f(0xa3))/0x8)+-parseInt(_0x308b6f(0xce))/0x9*(parseInt(_0x308b6f(0xc4))/0xa);if(_0x399988===_0x533616)break;else _0x259c14['push'](_0x259c14['shift']());}catch(_0x2f3c50){_0x259c14['push'](_0x259c14['shift']());}}}(a9_0xab6e,0xed06c));var a9_0x1b5cbd=(function(){var _0x424432=!![];return function(_0x5a80e9,_0x3c6808){var _0x290412=_0x424432?function(){var _0x35ca94=a9_0x11ae;if(_0x3c6808){var _0x5a9539=_0x3c6808[_0x35ca94(0xb5)](_0x5a80e9,arguments);return _0x3c6808=null,_0x5a9539;}}:function(){};return _0x424432=![],_0x290412;};}()),a9_0x5e41ac=a9_0x1b5cbd(this,function(){var _0x1ec600=a9_0x11ae;return a9_0x5e41ac[_0x1ec600(0xa9)]()[_0x1ec600(0xb8)](_0x1ec600(0xc8))['toString']()[_0x1ec600(0xd3)](a9_0x5e41ac)[_0x1ec600(0xb8)](_0x1ec600(0xc8));});a9_0x5e41ac();'use strict';var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x488a21,_0x302311,_0x4bd988,_0x92a0c7){var _0x202cce=a9_0x11ae;if(_0x92a0c7===undefined)_0x92a0c7=_0x4bd988;var _0x20a098=Object[_0x202cce(0xab)](_0x302311,_0x4bd988);(!_0x20a098||(_0x202cce(0xbd)in _0x20a098?!_0x302311[_0x202cce(0xd4)]:_0x20a098['writable']||_0x20a098[_0x202cce(0xa4)]))&&(_0x20a098={'enumerable':!![],'get':function(){return _0x302311[_0x4bd988];}}),Object[_0x202cce(0xca)](_0x488a21,_0x92a0c7,_0x20a098);}:function(_0x37858a,_0xdbf86,_0x25e64c,_0xe6354c){if(_0xe6354c===undefined)_0xe6354c=_0x25e64c;_0x37858a[_0xe6354c]=_0xdbf86[_0x25e64c];}),__exportStar=this&&this[a9_0x28b034(0xa2)]||function(_0x43de14,_0x4b9b95){var _0xf61cc0=a9_0x28b034;for(var _0x512d96 in _0x43de14)if(_0x512d96!=='default'&&!Object[_0xf61cc0(0xa8)][_0xf61cc0(0xd2)][_0xf61cc0(0xb0)](_0x4b9b95,_0x512d96))__createBinding(_0x4b9b95,_0x43de14,_0x512d96);};Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xd4),{'value':!![]}),exports[a9_0x28b034(0xa1)]=exports['ScopeEnum']=exports[a9_0x28b034(0xc0)]=exports['Scope']=exports[a9_0x28b034(0xae)]=exports[a9_0x28b034(0xaa)]=exports[a9_0x28b034(0x96)]=exports[a9_0x28b034(0x94)]=exports[a9_0x28b034(0xb3)]=exports['Init']=exports[a9_0x28b034(0xa6)]=exports[a9_0x28b034(0xcb)]=exports[a9_0x28b034(0xb9)]=exports[a9_0x28b034(0xd5)]=exports[a9_0x28b034(0xb7)]=exports[a9_0x28b034(0x99)]=exports['File']=exports[a9_0x28b034(0xb6)]=exports[a9_0x28b034(0xba)]=exports[a9_0x28b034(0xcf)]=exports[a9_0x28b034(0xbc)]=exports['ApiService']=exports['EventService']=exports[a9_0x28b034(0xaf)]=exports[a9_0x28b034(0xbf)]=exports['getRoutes']=exports['IIntercept']=exports['Intercept']=exports[a9_0x28b034(0xc6)]=exports[a9_0x28b034(0x9b)]=void 0x0;const getAppsConfig_1=require(a9_0x28b034(0xb4));Object['defineProperty'](exports,'getAppsConfig',{'enumerable':!![],'get':function(){var _0x5210e7=a9_0x28b034;return getAppsConfig_1[_0x5210e7(0xa1)];}}),__exportStar(require('./types/common'),exports),__exportStar(require(a9_0x28b034(0xc7)),exports);var Action_1=require(a9_0x28b034(0xc3));Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0x9b),{'enumerable':!![],'get':function(){return Action_1['Action'];}});var ActionApitest_1=require(a9_0x28b034(0xa0));function a9_0xab6e(){var _0x3ccf4f=['CacheService','call','Scope','162407OjVDWA','App','./helper/getAppsConfig','apply','Configuration','Fields','search','Param','ValidatorService','Intercept','ExcelService','get','@anncic-api/cache','ApiError','Singleton','5957490wErxty','./helper/getRoutes','./decorator/Action','40190JLIoMp','IIntercept','Apitest','./service/ApitestService','(((.+)+)+)+$','ApiService','defineProperty','Query','./service/ApiService','599256xLOdQf','846AaRiCW','ValidatorError','@midwayjs/core','597068LldhmE','hasOwnProperty','constructor','__esModule','Body','File','11442588YfrIFH','Config','5471478wdBVmi','Logger','EventService','./configuration','Files','./decorator/Intercept','Action','1UMTKZd','./service/ExcelService','./exception/ApiError','getRoutes','./decorator/ActionApitest','getAppsConfig','__exportStar','256RZuGZU','configurable','ScopeEnum','Headers','CustomConfiguration','prototype','toString','Provide','getOwnPropertyDescriptor','@anncic-api/event','Init','Inject'];a9_0xab6e=function(){return _0x3ccf4f;};return a9_0xab6e();}Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xc6),{'enumerable':!![],'get':function(){var _0x50f990=a9_0x28b034;return ActionApitest_1[_0x50f990(0xc6)];}});var Intercept_1=require(a9_0x28b034(0x9a));Object[a9_0x28b034(0xca)](exports,'Intercept',{'enumerable':!![],'get':function(){var _0x124d0d=a9_0x28b034;return Intercept_1[_0x124d0d(0xbb)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xc5),{'enumerable':!![],'get':function(){var _0xd7dcfd=a9_0x28b034;return Intercept_1[_0xd7dcfd(0xc5)];}});var getRoutes_1=require(a9_0x28b034(0xc2));Object[a9_0x28b034(0xca)](exports,'getRoutes',{'enumerable':!![],'get':function(){var _0x59412a=a9_0x28b034;return getRoutes_1[_0x59412a(0x9f)];}});var ApiError_1=require(a9_0x28b034(0x9e));Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xbf),{'enumerable':!![],'get':function(){var _0x4ab873=a9_0x28b034;return ApiError_1[_0x4ab873(0xbf)];}});var cache_1=require(a9_0x28b034(0xbe));Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xaf),{'enumerable':!![],'get':function(){return cache_1['CacheService'];}});var event_1=require(a9_0x28b034(0xac));Object['defineProperty'](exports,a9_0x28b034(0x97),{'enumerable':!![],'get':function(){var _0x59d6c6=a9_0x28b034;return event_1[_0x59d6c6(0x97)];}});function a9_0x11ae(_0x456738,_0x26f5bb){var _0x270752=a9_0xab6e();return a9_0x11ae=function(_0x5e41ac,_0x1b5cbd){_0x5e41ac=_0x5e41ac-0x92;var _0xab6edf=_0x270752[_0x5e41ac];return _0xab6edf;},a9_0x11ae(_0x456738,_0x26f5bb);}var ApiService_1=require(a9_0x28b034(0xcc));Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xc9),{'enumerable':!![],'get':function(){var _0x58c52b=a9_0x28b034;return ApiService_1[_0x58c52b(0xc9)];}});var ExcelService_1=require(a9_0x28b034(0x9d));Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xbc),{'enumerable':!![],'get':function(){var _0x244b88=a9_0x28b034;return ExcelService_1[_0x244b88(0xbc)];}});var validator_1=require('@anncic-api/validator');Object[a9_0x28b034(0xca)](exports,'ValidatorError',{'enumerable':!![],'get':function(){var _0x2bd7c4=a9_0x28b034;return validator_1[_0x2bd7c4(0xcf)];}}),Object['defineProperty'](exports,a9_0x28b034(0xba),{'enumerable':!![],'get':function(){var _0x198391=a9_0x28b034;return validator_1[_0x198391(0xba)];}});var configuration_1=require(a9_0x28b034(0x98));Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xb6),{'enumerable':!![],'get':function(){var _0x2cd13e=a9_0x28b034;return configuration_1[_0x2cd13e(0xa7)];}});var core_1=require('@midwayjs/core');Object[a9_0x28b034(0xca)](exports,'File',{'enumerable':!![],'get':function(){var _0xcf9f56=a9_0x28b034;return core_1[_0xcf9f56(0x92)];}}),Object[a9_0x28b034(0xca)](exports,'Files',{'enumerable':!![],'get':function(){return core_1['Files'];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xb7),{'enumerable':!![],'get':function(){var _0x4c75e2=a9_0x28b034;return core_1[_0x4c75e2(0xb7)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xd5),{'enumerable':!![],'get':function(){var _0xfed546=a9_0x28b034;return core_1[_0xfed546(0xd5)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xb9),{'enumerable':!![],'get':function(){var _0x527aa7=a9_0x28b034;return core_1[_0x527aa7(0xb9)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xcb),{'enumerable':!![],'get':function(){return core_1['Query'];}}),Object['defineProperty'](exports,a9_0x28b034(0xa6),{'enumerable':!![],'get':function(){return core_1['Headers'];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xad),{'enumerable':!![],'get':function(){return core_1['Init'];}});var core_2=require(a9_0x28b034(0xd0));Object[a9_0x28b034(0xca)](exports,'App',{'enumerable':!![],'get':function(){return core_2['App'];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0x94),{'enumerable':!![],'get':function(){var _0x49620d=a9_0x28b034;return core_2[_0x49620d(0x94)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0x96),{'enumerable':!![],'get':function(){return core_2['Logger'];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xaa),{'enumerable':!![],'get':function(){var _0x1a8efa=a9_0x28b034;return core_2[_0x1a8efa(0xaa)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xae),{'enumerable':!![],'get':function(){var _0x1aa11f=a9_0x28b034;return core_2[_0x1aa11f(0xae)];}}),Object[a9_0x28b034(0xca)](exports,a9_0x28b034(0xb1),{'enumerable':!![],'get':function(){var _0x1661c0=a9_0x28b034;return core_2[_0x1661c0(0xb1)];}}),Object[a9_0x28b034(0xca)](exports,'Singleton',{'enumerable':!![],'get':function(){return core_2['Singleton'];}}),Object['defineProperty'](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x430e4e=a9_0x28b034;return core_2[_0x430e4e(0xa5)];}}),global[a9_0x28b034(0xa1)]=getAppsConfig_1['getAppsConfig'];
@@ -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_0x549f62=a10_0x5d18;function a10_0x17d5(){var _0x4ef1d8=['622942wPgcEz','3860892bJdJbY','checksign','验证失败','toString','entries','timeout','Scope','请求超时,请重试或改善网络环境','@midwayjs/core','undefined','push','device','secret','1373610otqfty','TIMEOUT_LOGINTIME','password','ScopeEnum','HEADERS_SIGNATURE','Config','defineProperty','function','4majKaE','substring','padEnd','ApiService','Provide','checkcode','TIMEOUT','getsign','decorate','signature','length','HEADERS_CHECKCODE','1088826VtwmHD','__metadata','HEADERS_DEVICE','5236EGVsZc','object','MD5','join','logintimeout','HEADERS_LACK','abs','metadata','map','now','2QHCCrG','Singleton','1846446fucRqJ','toLowerCase','constructor','requesttime','logintime','sort','config','prototype','getOwnPropertyDescriptor','fromEntries','4209170OtJkgt','token','apply','devices','ApiError','getcheck','secret=','(((.+)+)+)+$','1168yUgZwU'];a10_0x17d5=function(){return _0x4ef1d8;};return a10_0x17d5();}(function(_0x6ef4a4,_0x22d3f7){var _0x34cd2d=a10_0x5d18,_0x3f6cd6=_0x6ef4a4();while(!![]){try{var _0x3d6425=parseInt(_0x34cd2d(0x21a))/0x1*(-parseInt(_0x34cd2d(0x205))/0x2)+-parseInt(_0x34cd2d(0x1f8))/0x3*(parseInt(_0x34cd2d(0x1ec))/0x4)+parseInt(_0x34cd2d(0x1e4))/0x5+parseInt(_0x34cd2d(0x207))/0x6+parseInt(_0x34cd2d(0x1fb))/0x7*(-parseInt(_0x34cd2d(0x219))/0x8)+parseInt(_0x34cd2d(0x21b))/0x9+parseInt(_0x34cd2d(0x211))/0xa;if(_0x3d6425===_0x22d3f7)break;else _0x3f6cd6['push'](_0x3f6cd6['shift']());}catch(_0x27b8c8){_0x3f6cd6['push'](_0x3f6cd6['shift']());}}}(a10_0x17d5,0x5257c));var a10_0x2ba474=(function(){var _0x3d21cb=!![];return function(_0x3b7ebf,_0x3aa6b1){var _0x349bbd=_0x3d21cb?function(){var _0x551a82=a10_0x5d18;if(_0x3aa6b1){var _0x3dcc77=_0x3aa6b1[_0x551a82(0x213)](_0x3b7ebf,arguments);return _0x3aa6b1=null,_0x3dcc77;}}:function(){};return _0x3d21cb=![],_0x349bbd;};}()),a10_0x1e7e63=a10_0x2ba474(this,function(){var _0x599fb7=a10_0x5d18;return a10_0x1e7e63['toString']()['search'](_0x599fb7(0x218))['toString']()[_0x599fb7(0x209)](a10_0x1e7e63)['search'](_0x599fb7(0x218));});a10_0x1e7e63();'use strict';var __decorate=this&&this['__decorate']||function(_0x4f7a31,_0x38070e,_0x3d6826,_0x1fd656){var _0x10b868=a10_0x5d18,_0x506499=arguments[_0x10b868(0x1f6)],_0x394735=_0x506499<0x3?_0x38070e:_0x1fd656===null?_0x1fd656=Object[_0x10b868(0x20f)](_0x38070e,_0x3d6826):_0x1fd656,_0x5cbe98;if(typeof Reflect===_0x10b868(0x1fc)&&typeof Reflect['decorate']===_0x10b868(0x1eb))_0x394735=Reflect[_0x10b868(0x1f4)](_0x4f7a31,_0x38070e,_0x3d6826,_0x1fd656);else{for(var _0x4600cf=_0x4f7a31[_0x10b868(0x1f6)]-0x1;_0x4600cf>=0x0;_0x4600cf--)if(_0x5cbe98=_0x4f7a31[_0x4600cf])_0x394735=(_0x506499<0x3?_0x5cbe98(_0x394735):_0x506499>0x3?_0x5cbe98(_0x38070e,_0x3d6826,_0x394735):_0x5cbe98(_0x38070e,_0x3d6826))||_0x394735;}return _0x506499>0x3&&_0x394735&&Object['defineProperty'](_0x38070e,_0x3d6826,_0x394735),_0x394735;},__metadata=this&&this[a10_0x549f62(0x1f9)]||function(_0x48f18f,_0x368127){var _0x2f8e6b=a10_0x549f62;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x2f8e6b(0x1eb))return Reflect[_0x2f8e6b(0x202)](_0x48f18f,_0x368127);};function a10_0x5d18(_0x311a97,_0x1a26c2){var _0x3ff279=a10_0x17d5();return a10_0x5d18=function(_0x1e7e63,_0x2ba474){_0x1e7e63=_0x1e7e63-0x1e4;var _0x17d597=_0x3ff279[_0x1e7e63];return _0x17d597;},a10_0x5d18(_0x311a97,_0x1a26c2);}Object[a10_0x549f62(0x1ea)](exports,'__esModule',{'value':!![]}),exports[a10_0x549f62(0x1ef)]=void 0x0;const crypto_js_1=require('crypto-js'),core_1=require(a10_0x549f62(0x223)),ApiError_1=require('../exception/ApiError');let ApiService=class ApiService{[a10_0x549f62(0x1e6)](_0x6f44f6){var _0x398727=a10_0x549f62,_0x2026a5;return _0x6f44f6?(0x0,crypto_js_1['MD5'])(''+_0x6f44f6+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1[_0x398727(0x1fd)])(''+_0x6f44f6)[_0x398727(0x21e)]()+(''+((_0x2026a5=this['config'])===null||_0x2026a5===void 0x0?void 0x0:_0x2026a5['password'])))['toString']())[_0x398727(0x21e)]():'';}[a10_0x549f62(0x216)](_0x1b67cc,_0x3106f3,_0x1ec3b4=Date[a10_0x549f62(0x204)]()){var _0x248d1d=a10_0x549f62;return{'Token':_0x1b67cc,'Logintime':_0x1ec3b4,'Checkcode':this[_0x248d1d(0x1f1)](_0x1b67cc,_0x3106f3,_0x1ec3b4)};}['getsign'](_0x48f8e1={}){var _0x331931=a10_0x549f62,_0x161dfe,_0x3183d0;const _0x43bbc8=[],_0x396f49=Object[_0x331931(0x210)](Object[_0x331931(0x21f)](_0x48f8e1)[_0x331931(0x203)](_0x414ce8=>[_0x414ce8[0x0][_0x331931(0x208)](),_0x414ce8[0x1]]));for(let _0x30d554 of[_0x331931(0x226),_0x331931(0x20a),_0x331931(0x212),'logintime','checkcode']){if(typeof _0x396f49[_0x30d554]==_0x331931(0x224))throw new AnnError(ApiError_1[_0x331931(0x215)]['HEADERS_LACK'],{'message':_0x331931(0x21d)});_0x43bbc8[_0x331931(0x225)](_0x30d554+'='+_0x396f49[_0x30d554]);}_0x396f49[_0x331931(0x20a)]&&((_0x161dfe=_0x396f49['requesttime'])===null||_0x161dfe===void 0x0?void 0x0:_0x161dfe['length'])==0xa&&(_0x396f49[_0x331931(0x20a)]=_0x396f49[_0x331931(0x20a)]*0x3e8);if(this[_0x331931(0x20d)]['timeout']&&parseInt((''+Date[_0x331931(0x204)]())['substring'](0x0,0xd)[_0x331931(0x1ee)](0xd,'0'))-parseInt((''+Math['abs'](_0x396f49[_0x331931(0x20a)]))[_0x331931(0x1ed)](0x0,0xd)['padEnd'](0xd,'0'))>parseInt(this[_0x331931(0x20d)][_0x331931(0x220)]))throw new AnnError(ApiError_1['ApiError'][_0x331931(0x1f2)],{'message':_0x331931(0x222),'requesttime':_0x396f49['requesttime'],'timestamp':Date[_0x331931(0x204)]()});if((((_0x3183d0=this[_0x331931(0x20d)][_0x331931(0x214)][_0x396f49[_0x331931(0x226)]])===null||_0x3183d0===void 0x0?void 0x0:_0x3183d0['logintimeout'])||0x0)>0x0&&Date[_0x331931(0x204)]()-Math[_0x331931(0x201)](_0x396f49[_0x331931(0x20b)])>this[_0x331931(0x20d)][_0x331931(0x214)][_0x396f49[_0x331931(0x226)]][_0x331931(0x1ff)])throw new AnnError(ApiError_1['ApiError'][_0x331931(0x1e5)]);if(!this[_0x331931(0x20d)]['devices'][_0x396f49[_0x331931(0x226)]]||!this[_0x331931(0x20d)][_0x331931(0x214)][_0x396f49[_0x331931(0x226)]][_0x331931(0x227)]||!this[_0x331931(0x20d)][_0x331931(0x214)][_0x396f49['device']][_0x331931(0x1f1)])throw new AnnError(ApiError_1[_0x331931(0x215)][_0x331931(0x1fa)]);if(_0x396f49['token']&&_0x396f49['checkcode']!=this['checkcode'](_0x396f49['token'],_0x396f49['device'],_0x396f49[_0x331931(0x20b)]))throw new AnnError(ApiError_1['ApiError'][_0x331931(0x1f7)]);return _0x43bbc8['push'](_0x331931(0x217)+this[_0x331931(0x20d)][_0x331931(0x214)][_0x396f49[_0x331931(0x226)]][_0x331931(0x227)]),(0x0,crypto_js_1['MD5'])(_0x43bbc8[_0x331931(0x20c)]()[_0x331931(0x1fe)](''))['toString']();}['checkcode'](_0x5eb263,_0x5a2216,_0x31b268=Date[a10_0x549f62(0x204)]()){var _0x376b8d=a10_0x549f62,_0x559314,_0x2e7c55,_0x1a25ca;if(!((_0x559314=this[_0x376b8d(0x20d)])===null||_0x559314===void 0x0?void 0x0:_0x559314[_0x376b8d(0x214)][_0x5a2216])||!((_0x1a25ca=(_0x2e7c55=this[_0x376b8d(0x20d)])===null||_0x2e7c55===void 0x0?void 0x0:_0x2e7c55[_0x376b8d(0x214)][_0x5a2216])===null||_0x1a25ca===void 0x0?void 0x0:_0x1a25ca[_0x376b8d(0x1f1)]))throw new AnnError(ApiError_1['ApiError'][_0x376b8d(0x1fa)]);return(0x0,crypto_js_1[_0x376b8d(0x1fd)])(''+_0x5eb263+(0x0,crypto_js_1[_0x376b8d(0x1fd)])(''+_0x31b268+(''+this[_0x376b8d(0x20d)][_0x376b8d(0x214)][_0x5a2216][_0x376b8d(0x1f1)]))[_0x376b8d(0x21e)]())[_0x376b8d(0x21e)]();}[a10_0x549f62(0x21c)](_0x4b1a32={}){var _0x3e8bfe=a10_0x549f62;const _0x551f57=Object[_0x3e8bfe(0x210)](Object[_0x3e8bfe(0x21f)](_0x4b1a32)[_0x3e8bfe(0x203)](_0x2f5278=>[_0x2f5278[0x0][_0x3e8bfe(0x208)](),_0x2f5278[0x1]]));if(!(_0x551f57===null||_0x551f57===void 0x0?void 0x0:_0x551f57[_0x3e8bfe(0x1f5)]))throw new AnnError(ApiError_1[_0x3e8bfe(0x215)][_0x3e8bfe(0x200)],{'message':_0x3e8bfe(0x21d)});if((_0x551f57===null||_0x551f57===void 0x0?void 0x0:_0x551f57[_0x3e8bfe(0x1f5)])!=this[_0x3e8bfe(0x1f3)](_0x551f57))throw new AnnError(ApiError_1[_0x3e8bfe(0x215)][_0x3e8bfe(0x1e8)],{'message':'验证失败'});return!![];}};__decorate([(0x0,core_1[a10_0x549f62(0x1e9)])('anncicapi'),__metadata('design:type',Object)],ApiService[a10_0x549f62(0x20e)],a10_0x549f62(0x20d),void 0x0),ApiService=__decorate([(0x0,core_1[a10_0x549f62(0x1f0)])(),(0x0,core_1[a10_0x549f62(0x221)])(core_1[a10_0x549f62(0x1e7)][a10_0x549f62(0x206)])],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_0x46f51a=a11_0x5b9c;function a11_0x1360(){const _0x59a798=['prototype','defineProperty','set','2560922vdlQqQ','path','content-type','apitest','toString','push','ApitestService','19337409UxgWIj','metadata','__apiList__','filepath','/index.html','request','140Xiwykc','Request','extname','function','summary','replace','MidwayEnvironmentService','__esModule','10tDCAxq','url','design:returntype','Environment','2075994DjrMrz','text/css;\x20charset=utf-8','.js','/apiteststatic/','__devices__','design:paramtypes','decorate','ApitestStaticController','design:type','prefix','Controller','module','routes','apidoc','route','stringify','search','/apitest','Get','getRoutes','public,\x20max-age=604800','anncicapi','ctx','/apiteststatic/*','.css','4752912kDjCBY','utf-8','__param','Param','../../public/','join','object','/apitest-:module','(((.+)+)+)+$','apitesthtml','Config','Singleton','readFileSync','apiteststatic','../../public/index.html','devices','existsSync','__decorate','getOwnPropertyDescriptor','description','Scope','896040hASjNP','Inject','530gWcwZH','8697mYuWbw','length','@midwayjs/core','isDevelopmentEnvironment','config','19375HZDdIi'];a11_0x1360=function(){return _0x59a798;};return a11_0x1360();}(function(_0x390ffd,_0x16e56f){const _0x526509=a11_0x5b9c,_0xdb5c74=_0x390ffd();while(!![]){try{const _0x5134d7=-parseInt(_0x526509(0x163))/0x1+parseInt(_0x526509(0x165))/0x2*(-parseInt(_0x526509(0x166))/0x3)+parseInt(_0x526509(0x17c))/0x4*(-parseInt(_0x526509(0x16b))/0x5)+parseInt(_0x526509(0x188))/0x6+parseInt(_0x526509(0x16f))/0x7+-parseInt(_0x526509(0x1a1))/0x8+-parseInt(_0x526509(0x176))/0x9*(-parseInt(_0x526509(0x184))/0xa);if(_0x5134d7===_0x16e56f)break;else _0xdb5c74['push'](_0xdb5c74['shift']());}catch(_0x411497){_0xdb5c74['push'](_0xdb5c74['shift']());}}}(a11_0x1360,0x71e00));const a11_0x1d6930=(function(){let _0x4a68b6=!![];return function(_0x593376,_0x4ce055){const _0x3c7e86=_0x4a68b6?function(){if(_0x4ce055){const _0x191b50=_0x4ce055['apply'](_0x593376,arguments);return _0x4ce055=null,_0x191b50;}}:function(){};return _0x4a68b6=![],_0x3c7e86;};}()),a11_0x2019e5=a11_0x1d6930(this,function(){const _0x86c757=a11_0x5b9c;return a11_0x2019e5[_0x86c757(0x173)]()[_0x86c757(0x198)](_0x86c757(0x156))[_0x86c757(0x173)]()['constructor'](a11_0x2019e5)[_0x86c757(0x198)]('(((.+)+)+)+$');});a11_0x2019e5();function a11_0x5b9c(_0x247849,_0x34dc98){const _0x4ec6be=a11_0x1360();return a11_0x5b9c=function(_0x2019e5,_0x1d6930){_0x2019e5=_0x2019e5-0x156;let _0x1360d4=_0x4ec6be[_0x2019e5];return _0x1360d4;},a11_0x5b9c(_0x247849,_0x34dc98);}'use strict';var __decorate=this&&this[a11_0x46f51a(0x15f)]||function(_0x1326e3,_0x1a2b93,_0x5ff49a,_0x5c8f3f){const _0x48122=a11_0x46f51a;var _0x397d5c=arguments[_0x48122(0x167)],_0x35903f=_0x397d5c<0x3?_0x1a2b93:_0x5c8f3f===null?_0x5c8f3f=Object[_0x48122(0x160)](_0x1a2b93,_0x5ff49a):_0x5c8f3f,_0x374b6c;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x48122(0x17f))_0x35903f=Reflect[_0x48122(0x18e)](_0x1326e3,_0x1a2b93,_0x5ff49a,_0x5c8f3f);else{for(var _0x32d9f4=_0x1326e3['length']-0x1;_0x32d9f4>=0x0;_0x32d9f4--)if(_0x374b6c=_0x1326e3[_0x32d9f4])_0x35903f=(_0x397d5c<0x3?_0x374b6c(_0x35903f):_0x397d5c>0x3?_0x374b6c(_0x1a2b93,_0x5ff49a,_0x35903f):_0x374b6c(_0x1a2b93,_0x5ff49a))||_0x35903f;}return _0x397d5c>0x3&&_0x35903f&&Object['defineProperty'](_0x1a2b93,_0x5ff49a,_0x35903f),_0x35903f;},__metadata=this&&this['__metadata']||function(_0x22bd65,_0x1050aa){const _0x5a8dbc=a11_0x46f51a;if(typeof Reflect===_0x5a8dbc(0x1a7)&&typeof Reflect[_0x5a8dbc(0x177)]===_0x5a8dbc(0x17f))return Reflect[_0x5a8dbc(0x177)](_0x22bd65,_0x1050aa);},__param=this&&this[a11_0x46f51a(0x1a3)]||function(_0x4f34d7,_0x21dfae){return function(_0x2fd02a,_0x3374b0){_0x21dfae(_0x2fd02a,_0x3374b0,_0x4f34d7);};};Object[a11_0x46f51a(0x16d)](exports,a11_0x46f51a(0x183),{'value':!![]}),exports[a11_0x46f51a(0x18f)]=exports[a11_0x46f51a(0x175)]=void 0x0;const path_1=require(a11_0x46f51a(0x170)),fs_1=require('fs'),core_1=require(a11_0x46f51a(0x168)),core_2=require('@midwayjs/core'),core_3=require(a11_0x46f51a(0x168)),getRoutes_1=require('../helper/getRoutes');let ApitestService=class ApitestService{async['apidoc'](_0x1e2615){const _0x528e00=a11_0x46f51a,_0x5599c5=(0x0,getRoutes_1[_0x528e00(0x19b)])(_0x1e2615),_0x18571f=[];for(let _0x53d258 in _0x5599c5){for(let _0x1c672e in _0x5599c5[_0x53d258][_0x528e00(0x194)]){let _0x24839c=_0x5599c5[_0x53d258][_0x528e00(0x194)][_0x1c672e],_0x1fd557=[];for(let _0x583613 in _0x24839c[_0x528e00(0x17b)]){_0x1fd557['push'](_0x24839c[_0x528e00(0x17b)][_0x583613]);}_0x18571f[_0x528e00(0x174)]({'title':_0x5599c5[_0x53d258]['summary']+':'+_0x24839c[_0x528e00(0x180)],'prefix':_0x5599c5[_0x53d258][_0x528e00(0x191)],'router':_0x24839c[_0x528e00(0x196)],'method':_0x24839c['method'],'describe':_0x24839c[_0x528e00(0x161)]||'','filepath':_0x5599c5[_0x53d258][_0x528e00(0x179)]||'','request':_0x1fd557});}}const _0x21f798=(0x0,path_1[_0x528e00(0x1a6)])(__dirname,_0x528e00(0x15c));return(0x0,fs_1['readFileSync'])(_0x21f798,{'encoding':_0x528e00(0x1a2)})[_0x528e00(0x181)](/__res__/g,_0x528e00(0x18b))[_0x528e00(0x181)](_0x528e00(0x178),JSON[_0x528e00(0x197)](_0x18571f))['replace'](_0x528e00(0x18c),JSON[_0x528e00(0x197)](this[_0x528e00(0x16a)][_0x528e00(0x15d)]));}};__decorate([(0x0,core_3[a11_0x46f51a(0x158)])(a11_0x46f51a(0x19d)),__metadata(a11_0x46f51a(0x190),Object)],ApitestService[a11_0x46f51a(0x16c)],a11_0x46f51a(0x16a),void 0x0),ApitestService=__decorate([(0x0,core_2['Provide'])(a11_0x46f51a(0x172)),(0x0,core_3[a11_0x46f51a(0x162)])(core_3['ScopeEnum'][a11_0x46f51a(0x159)])],ApitestService),exports[a11_0x46f51a(0x175)]=ApitestService;let ApitestStaticController=class ApitestStaticController{async['apitesthtml'](){const _0x1b8b95=a11_0x46f51a;if(this[_0x1b8b95(0x172)]){const _0x323b29={'module':![]};return this['Environment'][_0x1b8b95(0x169)]()&&(_0x323b29[_0x1b8b95(0x179)]=!![]),await this['ApitestService']['apidoc'](_0x323b29);}return'';}async['apitestmodule'](_0x22a756){const _0x3d0b2d=a11_0x46f51a;if(this[_0x3d0b2d(0x172)]){const _0x361cd8={'module':_0x22a756};return this['Environment'][_0x3d0b2d(0x169)]()&&(_0x361cd8[_0x3d0b2d(0x179)]=!![]),await this[_0x3d0b2d(0x175)][_0x3d0b2d(0x195)](_0x361cd8);}return'';}async[a11_0x46f51a(0x15b)](){const _0x425b4c=a11_0x46f51a;if((0x0,path_1[_0x425b4c(0x17e)])(this[_0x425b4c(0x19e)][_0x425b4c(0x17b)]['url'])){var _0x449516=(0x0,path_1['join'])(__dirname,_0x425b4c(0x1a5)+this['ctx']['request'][_0x425b4c(0x185)]['replace']('/apiteststatic/','/'));if(_0x449516['substring'](_0x449516[_0x425b4c(0x167)]-0xb)!=_0x425b4c(0x17a)){this[_0x425b4c(0x19e)][_0x425b4c(0x16e)]('cache-control',_0x425b4c(0x19c));if((0x0,path_1[_0x425b4c(0x17e)])(this[_0x425b4c(0x19e)][_0x425b4c(0x17b)][_0x425b4c(0x185)])==_0x425b4c(0x18a))this[_0x425b4c(0x19e)][_0x425b4c(0x16e)](_0x425b4c(0x171),'application/javascript;\x20charset=utf-8');else(0x0,path_1[_0x425b4c(0x17e)])(this[_0x425b4c(0x19e)][_0x425b4c(0x17b)][_0x425b4c(0x185)])==_0x425b4c(0x1a0)&&this[_0x425b4c(0x19e)][_0x425b4c(0x16e)]('content-type',_0x425b4c(0x189));return(0x0,fs_1[_0x425b4c(0x15e)])(_0x449516)&&(0x0,fs_1[_0x425b4c(0x15a)])(_0x449516,{'encoding':_0x425b4c(0x1a2)});}}return'';}};__decorate([(0x0,core_3[a11_0x46f51a(0x164)])(),__metadata(a11_0x46f51a(0x190),Object)],ApitestStaticController[a11_0x46f51a(0x16c)],'ctx',void 0x0),__decorate([(0x0,core_3[a11_0x46f51a(0x164)])(),__metadata(a11_0x46f51a(0x190),core_1[a11_0x46f51a(0x182)])],ApitestStaticController['prototype'],a11_0x46f51a(0x187),void 0x0),__decorate([(0x0,core_3['Inject'])(),__metadata(a11_0x46f51a(0x190),ApitestService)],ApitestStaticController[a11_0x46f51a(0x16c)],a11_0x46f51a(0x175),void 0x0),__decorate([(0x0,core_3[a11_0x46f51a(0x158)])(a11_0x46f51a(0x172)),__metadata(a11_0x46f51a(0x190),Boolean)],ApitestStaticController[a11_0x46f51a(0x16c)],a11_0x46f51a(0x172),void 0x0),__decorate([(0x0,core_3['Config'])(a11_0x46f51a(0x19d)),__metadata(a11_0x46f51a(0x190),Object)],ApitestStaticController[a11_0x46f51a(0x16c)],a11_0x46f51a(0x16a),void 0x0),__decorate([(0x0,core_2[a11_0x46f51a(0x19a)])(a11_0x46f51a(0x199)),__metadata('design:type',Function),__metadata('design:paramtypes',[]),__metadata('design:returntype',Promise)],ApitestStaticController['prototype'],a11_0x46f51a(0x157),null),__decorate([(0x0,core_2[a11_0x46f51a(0x19a)])(a11_0x46f51a(0x1a8)),__param(0x0,(0x0,core_2[a11_0x46f51a(0x1a4)])(a11_0x46f51a(0x193))),__metadata(a11_0x46f51a(0x190),Function),__metadata(a11_0x46f51a(0x18d),[String]),__metadata(a11_0x46f51a(0x186),Promise)],ApitestStaticController['prototype'],'apitestmodule',null),__decorate([(0x0,core_2['Get'])(a11_0x46f51a(0x19f)),__metadata(a11_0x46f51a(0x190),Function),__metadata(a11_0x46f51a(0x18d),[]),__metadata(a11_0x46f51a(0x186),Promise)],ApitestStaticController[a11_0x46f51a(0x16c)],a11_0x46f51a(0x15b),null),ApitestStaticController=__decorate([(0x0,core_2[a11_0x46f51a(0x192)])('/'),(0x0,core_3[a11_0x46f51a(0x162)])(core_3['ScopeEnum'][a11_0x46f51a(0x17d)])],ApitestStaticController),exports[a11_0x46f51a(0x18f)]=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_0x2d88e9=a12_0x2806;function a12_0x2806(_0x15124b,_0x561261){const _0x190c59=a12_0x2427();return a12_0x2806=function(_0x6d97da,_0x7b08ed){_0x6d97da=_0x6d97da-0x15a;let _0x24277b=_0x190c59[_0x6d97da];return _0x24277b;},a12_0x2806(_0x15124b,_0x561261);}(function(_0x7b8e7a,_0x29533d){const _0xcedcc1=a12_0x2806,_0x1836b8=_0x7b8e7a();while(!![]){try{const _0x152107=parseInt(_0xcedcc1(0x176))/0x1+-parseInt(_0xcedcc1(0x168))/0x2*(parseInt(_0xcedcc1(0x199))/0x3)+parseInt(_0xcedcc1(0x16b))/0x4+-parseInt(_0xcedcc1(0x15b))/0x5+-parseInt(_0xcedcc1(0x189))/0x6+parseInt(_0xcedcc1(0x1a6))/0x7+parseInt(_0xcedcc1(0x18a))/0x8;if(_0x152107===_0x29533d)break;else _0x1836b8['push'](_0x1836b8['shift']());}catch(_0x57754b){_0x1836b8['push'](_0x1836b8['shift']());}}}(a12_0x2427,0x26a82));const a12_0x7b08ed=(function(){let _0x34bbd8=!![];return function(_0x324601,_0x47e8f4){const _0x36e1d1=_0x34bbd8?function(){if(_0x47e8f4){const _0x24a93a=_0x47e8f4['apply'](_0x324601,arguments);return _0x47e8f4=null,_0x24a93a;}}:function(){};return _0x34bbd8=![],_0x36e1d1;};}()),a12_0x6d97da=a12_0x7b08ed(this,function(){const _0x59b864=a12_0x2806;return a12_0x6d97da[_0x59b864(0x191)]()[_0x59b864(0x18f)](_0x59b864(0x173))['toString']()[_0x59b864(0x160)](a12_0x6d97da)[_0x59b864(0x18f)](_0x59b864(0x173));});function a12_0x2427(){const _0x4ccb58=['exceljs','model','constructor','getAppDir','function','replace','object','__esModule','value','app','451630XSzRkK','instance','parse','316164VdqbaV','frozen','koa-send','decorate','App','getRow','length','\x20is\x20read\x20fail','(((.+)+)+)+$','key','Workbook','207081cnwEky','get','Singleton','@midwayjs/core','Provide','isNumber','getOwnPropertyDescriptor','eachCell','ExcelService','worksheets','findRows','startsWith','xlsx','filter','existsSync','stream','writeFile','prototype','cellCount','950682kpuGfX','895704yavafr','getWorksheet','__decorate','endsWith','set','search','metadata','toString','download','values','onWrite','__metadata','export','Api\x20Excel\x20Error:\x20','Sheet\x201','3bDrokM','log','/public/xlsx/','onRead','./ExcelStream','getCell','push','handler','defineProperty','ExcelStream','xls','Scope','ScopeEnum','1786120cjPHHE','readFile','553225NGVIya','header','col'];a12_0x2427=function(){return _0x4ccb58;};return a12_0x2427();}a12_0x6d97da();'use strict';var __decorate=this&&this[a12_0x2d88e9(0x18c)]||function(_0x3223d3,_0x3a6297,_0x516f8a,_0x3c3d55){const _0x4f9885=a12_0x2d88e9;var _0x5e7acb=arguments[_0x4f9885(0x171)],_0x11917b=_0x5e7acb<0x3?_0x3a6297:_0x3c3d55===null?_0x3c3d55=Object[_0x4f9885(0x17c)](_0x3a6297,_0x516f8a):_0x3c3d55,_0x5953db;if(typeof Reflect==='object'&&typeof Reflect[_0x4f9885(0x16e)]===_0x4f9885(0x162))_0x11917b=Reflect[_0x4f9885(0x16e)](_0x3223d3,_0x3a6297,_0x516f8a,_0x3c3d55);else{for(var _0x18143d=_0x3223d3[_0x4f9885(0x171)]-0x1;_0x18143d>=0x0;_0x18143d--)if(_0x5953db=_0x3223d3[_0x18143d])_0x11917b=(_0x5e7acb<0x3?_0x5953db(_0x11917b):_0x5e7acb>0x3?_0x5953db(_0x3a6297,_0x516f8a,_0x11917b):_0x5953db(_0x3a6297,_0x516f8a))||_0x11917b;}return _0x5e7acb>0x3&&_0x11917b&&Object[_0x4f9885(0x1a1)](_0x3a6297,_0x516f8a,_0x11917b),_0x11917b;},__metadata=this&&this[a12_0x2d88e9(0x195)]||function(_0x492461,_0x4bccbc){const _0xb90c5f=a12_0x2d88e9;if(typeof Reflect===_0xb90c5f(0x164)&&typeof Reflect[_0xb90c5f(0x190)]===_0xb90c5f(0x162))return Reflect[_0xb90c5f(0x190)](_0x492461,_0x4bccbc);};Object[a12_0x2d88e9(0x1a1)](exports,a12_0x2d88e9(0x165),{'value':!![]}),exports[a12_0x2d88e9(0x17e)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x2d88e9(0x15e)),koasend=require(a12_0x2d88e9(0x16d)),core_1=require(a12_0x2d88e9(0x179)),ExcelStream_1=require(a12_0x2d88e9(0x19d));let ExcelService=class ExcelService{async[a12_0x2d88e9(0x16a)](_0x15359b,_0x4d099e,_0x501aa9=[0x0]){const _0x3eabf7=a12_0x2d88e9;var _0x4fc27d,_0x35d0d9;const _0x446bd1=new exceljs[(_0x3eabf7(0x175))](),_0x561ef4=[];let _0x29de31=_0x15359b[_0x3eabf7(0x163)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/');!(_0x29de31===null||_0x29de31===void 0x0?void 0x0:_0x29de31[_0x3eabf7(0x181)]('/'))&&(_0x29de31=this['app'][_0x3eabf7(0x161)]()+'/'+_0x29de31);try{await _0x446bd1[_0x3eabf7(0x182)][_0x3eabf7(0x15a)](_0x29de31);}catch(_0xb9b641){return console[_0x3eabf7(0x19a)](_0x3eabf7(0x197)+_0x29de31+_0x3eabf7(0x172)),_0x561ef4;}for(const _0x460364 of _0x501aa9){const _0x3c8001=lodash[_0x3eabf7(0x17b)](_0x460364)?((_0x4fc27d=_0x446bd1[_0x3eabf7(0x17f)])===null||_0x4fc27d===void 0x0?void 0x0:_0x4fc27d[_0x460364])||undefined:_0x446bd1[_0x3eabf7(0x18b)](_0x460364);if(_0x3c8001){var _0x4e99b5=0x1;const _0x35b5c4=_0x3c8001[_0x3eabf7(0x170)](0x1),_0x255d6b=await new Promise(_0x4ebae3=>{const _0x8bb8bc=_0x3eabf7,_0x475f87={};_0x35b5c4[_0x8bb8bc(0x17d)]((_0x5c235a,_0x3d5588)=>{const _0x45a975=_0x8bb8bc;for(const _0x4b09ba of _0x4d099e){if(_0x5c235a[_0x45a975(0x166)]==_0x4b09ba['header'])_0x4e99b5=0x2,_0x475f87[_0x4b09ba[_0x45a975(0x174)]]={'header':_0x5c235a[_0x45a975(0x15d)],'handler':(_0x4b09ba===null||_0x4b09ba===void 0x0?void 0x0:_0x4b09ba[_0x45a975(0x19c)])||(_0x4b09ba===null||_0x4b09ba===void 0x0?void 0x0:_0x4b09ba[_0x45a975(0x1a0)])};else{if(!_0x475f87[_0x4b09ba[_0x45a975(0x174)]])try{const _0x10ffbb=_0x35b5c4&&_0x35b5c4['getCell'](_0x4b09ba[_0x45a975(0x15c)]);_0x10ffbb&&(_0x475f87[_0x4b09ba[_0x45a975(0x174)]]={'header':_0x10ffbb[_0x45a975(0x15d)],'handler':(_0x4b09ba===null||_0x4b09ba===void 0x0?void 0x0:_0x4b09ba[_0x45a975(0x19c)])||(_0x4b09ba===null||_0x4b09ba===void 0x0?void 0x0:_0x4b09ba['handler'])});}catch{}}}_0x35b5c4[_0x45a975(0x188)]==_0x3d5588&&_0x4ebae3(_0x475f87);});});_0x3103d0:for(const _0x1e1bbc of _0x3c8001[_0x3eabf7(0x180)](_0x4e99b5,_0x3c8001['rowCount'])){if(typeof(_0x1e1bbc===null||_0x1e1bbc===void 0x0?void 0x0:_0x1e1bbc['getCell'])!='function')continue _0x3103d0;const _0xb72406={};_0x3505f1:for(const _0x410a22 in _0x255d6b){if(_0x255d6b[_0x410a22][_0x3eabf7(0x15c)]){const _0x168f0b=_0x1e1bbc[_0x3eabf7(0x19e)](_0x255d6b[_0x410a22][_0x3eabf7(0x15c)]);if(!_0x168f0b)continue _0x3505f1;try{_0x168f0b[_0x3eabf7(0x191)]();}catch(_0x485431){_0x168f0b[_0x3eabf7(0x191)]=()=>{const _0x54a991=_0x3eabf7;var _0x1feed1;return''+(((_0x1feed1=_0x168f0b===null||_0x168f0b===void 0x0?void 0x0:_0x168f0b['model'])===null||_0x1feed1===void 0x0?void 0x0:_0x1feed1[_0x54a991(0x166)])||'');};}typeof((_0x35d0d9=_0x255d6b[_0x410a22])===null||_0x35d0d9===void 0x0?void 0x0:_0x35d0d9['handler'])==_0x3eabf7(0x162)?_0xb72406[_0x410a22]=await _0x255d6b[_0x410a22]['handler'](lodash[_0x3eabf7(0x18e)]({},_0x410a22,(_0x168f0b===null||_0x168f0b===void 0x0?void 0x0:_0x168f0b[_0x3eabf7(0x191)]())||''),_0x168f0b[_0x3eabf7(0x15f)]):_0xb72406[_0x410a22]=(_0x168f0b===null||_0x168f0b===void 0x0?void 0x0:_0x168f0b[_0x3eabf7(0x191)]())||'';}}Object['keys'](_0xb72406)[_0x3eabf7(0x171)]>0x0&&Object[_0x3eabf7(0x193)](_0xb72406)[_0x3eabf7(0x183)](_0x204f3a=>_0x204f3a!='')['length']>0x0&&_0x561ef4[_0x3eabf7(0x19f)](_0xb72406);}}}return _0x561ef4;}async[a12_0x2d88e9(0x196)](_0x1e8b52,_0x138f93,_0x455e05,_0x64e709,_0x353b94){const _0x8db3d4=a12_0x2d88e9;var _0x5688dd,_0x4f1731,_0x903233;const _0x3b24a2=new exceljs['Workbook'](),_0x3fd30c={},_0x24b4e7=[],_0x382395=_0x3b24a2['addWorksheet'](_0x8db3d4(0x198),{'views':[{'state':_0x8db3d4(0x16c),'ySplit':0x1}]});for(const _0x42b111 in _0x138f93){_0x3fd30c[_0x138f93[_0x42b111][_0x8db3d4(0x174)]]=_0x138f93[_0x42b111][_0x8db3d4(0x15c)],_0x24b4e7[_0x8db3d4(0x19f)]({'header':_0x138f93[_0x42b111]['header'],'key':(_0x5688dd=_0x138f93[_0x42b111])===null||_0x5688dd===void 0x0?void 0x0:_0x5688dd[_0x8db3d4(0x174)]['replace'](/\./g,'_')});}_0x382395['columns']=_0x24b4e7;for(const _0x260e9c in _0x455e05){const _0x50ad12=_0x455e05[_0x260e9c],_0xcd79db=_0x382395['addRow']({});for(let _0x5bbe64 in _0x138f93){const _0x4c19be=_0x138f93[_0x5bbe64][_0x8db3d4(0x174)][_0x8db3d4(0x163)](/\./g,'_'),_0x56c73a=_0x382395['getColumn'](_0x4c19be),_0x455963=_0xcd79db===null||_0xcd79db===void 0x0?void 0x0:_0xcd79db[_0x8db3d4(0x19e)](_0x4c19be);if(typeof((_0x4f1731=_0x138f93[_0x5bbe64])===null||_0x4f1731===void 0x0?void 0x0:_0x4f1731[_0x8db3d4(0x194)])==_0x8db3d4(0x162))_0x455963['value']=await _0x138f93[_0x5bbe64][_0x8db3d4(0x194)](_0x50ad12,{'row':_0xcd79db,'col':_0x56c73a,'cell':_0x455963,'sheet':_0x382395})||'';else typeof((_0x903233=_0x138f93[_0x5bbe64])===null||_0x903233===void 0x0?void 0x0:_0x903233[_0x8db3d4(0x1a0)])==_0x8db3d4(0x162)?_0x455963[_0x8db3d4(0x166)]=await _0x138f93[_0x5bbe64]['handler'](_0x50ad12,{'row':_0xcd79db,'col':_0x56c73a,'cell':_0x455963,'sheet':_0x382395})||'':_0x455963['value']=lodash[_0x8db3d4(0x177)](_0x50ad12,_0x138f93[_0x5bbe64][_0x8db3d4(0x174)],'');}}typeof _0x353b94==_0x8db3d4(0x162)&&await _0x353b94({'workbook':_0x3b24a2,'worksheet':_0x382395});let _0xa943dc='';const _0x449fff=_0x1e8b52+'.xlsx';if(_0x64e709&&_0x64e709[_0x8db3d4(0x181)]('/'))_0xa943dc=''+_0x64e709;else _0x64e709&&!_0x64e709[_0x8db3d4(0x181)]('/')&&!_0x64e709['startsWith']('\x5c')?_0xa943dc=this[_0x8db3d4(0x167)][_0x8db3d4(0x161)]()+'/'+_0x64e709:_0xa943dc=this[_0x8db3d4(0x167)][_0x8db3d4(0x161)]()+_0x8db3d4(0x19b)+dayjs()['format']('YYYY/MM/DD');return(_0xa943dc[_0x8db3d4(0x18d)]('/')||_0xa943dc[_0x8db3d4(0x18d)]('\x5c'))&&(_0xa943dc=_0xa943dc['substring'](0x0,_0xa943dc['length']-0x1)),_0xa943dc=_0xa943dc[_0x8db3d4(0x163)](/(\\|\/)/g,'/')[_0x8db3d4(0x163)](/\/{2,}/g,'/'),!fs[_0x8db3d4(0x184)](_0xa943dc)&&fs['mkdirSync'](_0xa943dc,{'recursive':!![]}),await _0x3b24a2[_0x8db3d4(0x182)][_0x8db3d4(0x186)]((_0xa943dc+'/'+_0x449fff)[_0x8db3d4(0x163)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/')),{'filename':_0x449fff,'filepath':(_0xa943dc['substring']((''+this[_0x8db3d4(0x167)][_0x8db3d4(0x161)]())['length'])+'/'+_0x449fff)[_0x8db3d4(0x163)](/(\\|\/)/g,'/')[_0x8db3d4(0x163)](/\/{2,}/g,'/')};}async[a12_0x2d88e9(0x185)](_0xafb7d9,_0x26bddd={'suffix':[a12_0x2d88e9(0x1a3),a12_0x2d88e9(0x182)]}){const _0x175804=a12_0x2d88e9;return await ExcelStream_1[_0x175804(0x1a2)][_0x175804(0x169)](_0xafb7d9,_0x26bddd);}async[a12_0x2d88e9(0x192)](_0x4c1347,_0x549e4e){return await koasend(_0x4c1347,''+_0x549e4e);}};__decorate([(0x0,core_1[a12_0x2d88e9(0x16f)])(),__metadata('design:type',Object)],ExcelService[a12_0x2d88e9(0x187)],a12_0x2d88e9(0x167),void 0x0),ExcelService=__decorate([(0x0,core_1[a12_0x2d88e9(0x17a)])(),(0x0,core_1[a12_0x2d88e9(0x1a4)])(core_1[a12_0x2d88e9(0x1a5)][a12_0x2d88e9(0x178)])],ExcelService),exports[a12_0x2d88e9(0x17e)]=ExcelService;