anncic-api 1.0.7 → 1.0.12
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.
- package/dist/config/config.default.js +1 -1
- package/dist/config/config.production.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Action.js +1 -1
- package/dist/decorator/ActionApi.js +1 -1
- package/dist/decorator/ActionApitest.js +1 -1
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getRoutes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.d.ts +4 -2
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.d.ts +2 -2
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';var a0_0x43578a=a0_0x5e55;function a0_0x1727(){var _0x11b68c=['zhiulanuiy7892387985hnoi','35230WCUiEw','42507cuYLkg','dhauo1234420123gg3234901','defineProperty','default','316064PsUwOO','150BDIsgz','5308436sesgMb','20555fEHDjG','appDir','6600ffoUjb','2SaSgZA','2690008qdZQsr','408XLlWpN','3991629gCABPc','/runtime/.upload','name'];a0_0x1727=function(){return _0x11b68c;};return a0_0x1727();}(function(_0x5f218c,_0x5d266b){var _0x423b08=a0_0x5e55,_0x3e0914=_0x5f218c();while(!![]){try{var _0x4ff83c=-parseInt(_0x423b08(0x131))/0x1+parseInt(_0x423b08(0x137))/0x2*(parseInt(_0x423b08(0x13a))/0x3)+parseInt(_0x423b08(0x138))/0x4+parseInt(_0x423b08(0x134))/0x5*(parseInt(_0x423b08(0x132))/0x6)+parseInt(_0x423b08(0x133))/0x7+parseInt(_0x423b08(0x139))/0x8*(parseInt(_0x423b08(0x12d))/0x9)+-parseInt(_0x423b08(0x12c))/0xa*(parseInt(_0x423b08(0x136))/0xb);if(_0x4ff83c===_0x5d266b)break;else _0x3e0914['push'](_0x3e0914['shift']());}catch(_0x1d3e7f){_0x3e0914['push'](_0x3e0914['shift']());}}}(a0_0x1727,0xa4d69));function a0_0x5e55(_0x8b06f,_0x37350f){var _0x172725=a0_0x1727();return a0_0x5e55=function(_0x5e55dc,_0x5943ed){_0x5e55dc=_0x5e55dc-0x12a;var _0x28e3cb=_0x172725[_0x5e55dc];return _0x28e3cb;},a0_0x5e55(_0x8b06f,_0x37350f);}Object[a0_0x43578a(0x12f)](exports,'__esModule',{'value':!![]}),exports[a0_0x43578a(0x130)]=_0x4aab9f=>{var _0x388419=a0_0x43578a;return{'apitest':!![],'keys':_0x4aab9f[_0x388419(0x12a)],'anncicapi':{'timeout':0x1388,'password':_0x388419(0x12b),'devices':{'DEFAULT':{'secret':'dhauo1234420123gg3234901','checkcode':_0x388419(0x12e)}}},'upload':{'tmpdir':_0x4aab9f[_0x388419(0x135)]+_0x388419(0x13b),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a1_0xb6b2f2=a1_0x1480;function a1_0x1480(_0x57efb4,_0xf4c4d4){var _0x3b503c=a1_0x3b50();return a1_0x1480=function(_0x1480d6,_0x4f1751){_0x1480d6=_0x1480d6-0xf8;var _0x4d95c8=_0x3b503c[_0x1480d6];return _0x4d95c8;},a1_0x1480(_0x57efb4,_0xf4c4d4);}(function(_0x4d58e5,_0x5a1150){var _0x113af0=a1_0x1480,_0xc7640b=_0x4d58e5();while(!![]){try{var _0xd3179c=-parseInt(_0x113af0(0x106))/0x1*(-parseInt(_0x113af0(0x105))/0x2)+parseInt(_0x113af0(0xfd))/0x3*(parseInt(_0x113af0(0xf8))/0x4)+parseInt(_0x113af0(0xf9))/0x5*(parseInt(_0x113af0(0x100))/0x6)+parseInt(_0x113af0(0xfb))/0x7*(-parseInt(_0x113af0(0x101))/0x8)+-parseInt(_0x113af0(0x107))/0x9*(parseInt(_0x113af0(0x104))/0xa)+-parseInt(_0x113af0(0xfe))/0xb*(parseInt(_0x113af0(0xff))/0xc)+parseInt(_0x113af0(0x102))/0xd;if(_0xd3179c===_0x5a1150)break;else _0xc7640b['push'](_0xc7640b['shift']());}catch(_0x517491){_0xc7640b['push'](_0xc7640b['shift']());}}}(a1_0x3b50,0x1c84e));Object[a1_0xb6b2f2(0x103)](exports,a1_0xb6b2f2(0xfa),{'value':!![]}),exports[a1_0xb6b2f2(0xfc)]={'apitest':![],'anncicapi':{'timeout':0x1388}};function a1_0x3b50(){var _0x9aaf92=['154JBYlgr','1051tqNgFb','63IfSnNX','312796uPjDBY','70GakBng','__esModule','28sKzHdH','default','3XtXqAt','22QgrVKF','886308LkdxgA','71484tYmJZH','247992kQBjNW','1722149EnMNSv','defineProperty','99810BfFcUd'];a1_0x3b50=function(){return _0x9aaf92;};return a1_0x3b50();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x13282d=a2_0x84b7;(function(_0x46ee59,_0x47dc05){const _0x5665eb=a2_0x84b7,_0x4dea75=_0x46ee59();while(!![]){try{const _0x4fcd5e=-parseInt(_0x5665eb(0x1a4))/0x1+parseInt(_0x5665eb(0x150))/0x2+parseInt(_0x5665eb(0x187))/0x3*(parseInt(_0x5665eb(0x17d))/0x4)+-parseInt(_0x5665eb(0x1a6))/0x5+-parseInt(_0x5665eb(0x169))/0x6*(-parseInt(_0x5665eb(0x192))/0x7)+-parseInt(_0x5665eb(0x15c))/0x8*(parseInt(_0x5665eb(0x166))/0x9)+-parseInt(_0x5665eb(0x199))/0xa;if(_0x4fcd5e===_0x47dc05)break;else _0x4dea75['push'](_0x4dea75['shift']());}catch(_0x4933df){_0x4dea75['push'](_0x4dea75['shift']());}}}(a2_0x5433,0x5c64c));function a2_0x5433(){const _0x2737f8=['function','metadata','object','MidwayConfigService','CustomConfiguration','koa-bodyparser','koa','upload','@midwayjs/core','defaultsDeep','@midwayjs/static-file','anncic-apihelper','length','868SDZEdH','./types/action','Configuration','__metadata','log','decorator','ACTION_ROUTE_KEY','@anncic-api/validator','environment','headers','6747UcrCcg','hanlderApplications','checkConfigKeys','devices','checksign','useMiddleware','getConfiguration','get','dirs','target','ApiError','44513vTLZld','@midwayjs/i18n','onReady','REQUEST_OBJ_CTX_KEY','input','./service/ApiService','isArray','2244640aTUeFV','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','filterConfig','@anncic-api/event','mkdirSync','prototype','key','MidwayDecoratorService','HEADERS_SIGNATURE','defineProperty','design:type','152091tQFwIv','device','328350zHQJWe','@midwayjs/decorator','beforeRoute','tmpdir','./exception/ApiError','DEFAULT','533390QnbmJV','bodyParser','handlerActionRoute','__esModule','request','@anncic-api/core','anncicapi','getOwnPropertyDescriptor','dir','query','staticFile','_matchedRoute','40gamlUf','Inject','isString','decorate','string','application','@anncic-api/typeorm','bodyXml','forEach','koa-xml-body','270477mAUqVQ','body','context','204uWDoiE','existsSync','@midwayjs/koa','config','__decorate','anncic-api','./config/config.default'];a2_0x5433=function(){return _0x2737f8;};return a2_0x5433();}function a2_0x84b7(_0x57c314,_0x1bce1f){const _0x5433d5=a2_0x5433();return a2_0x84b7=function(_0x84b78c,_0x3a8422){_0x84b78c=_0x84b78c-0x14c;let _0x141ba9=_0x5433d5[_0x84b78c];return _0x141ba9;},a2_0x84b7(_0x57c314,_0x1bce1f);}var __decorate=this&&this[a2_0x13282d(0x16d)]||function(_0x40c525,_0x850e4f,_0x1846b7,_0x153cbe){const _0x5cf57c=a2_0x13282d;var _0x35acc5=arguments[_0x5cf57c(0x17c)],_0x4abd58=_0x35acc5<0x3?_0x850e4f:_0x153cbe===null?_0x153cbe=Object[_0x5cf57c(0x157)](_0x850e4f,_0x1846b7):_0x153cbe,_0x1483bc;if(typeof Reflect===_0x5cf57c(0x172)&&typeof Reflect[_0x5cf57c(0x15f)]===_0x5cf57c(0x170))_0x4abd58=Reflect[_0x5cf57c(0x15f)](_0x40c525,_0x850e4f,_0x1846b7,_0x153cbe);else{for(var _0x5090c4=_0x40c525['length']-0x1;_0x5090c4>=0x0;_0x5090c4--)if(_0x1483bc=_0x40c525[_0x5090c4])_0x4abd58=(_0x35acc5<0x3?_0x1483bc(_0x4abd58):_0x35acc5>0x3?_0x1483bc(_0x850e4f,_0x1846b7,_0x4abd58):_0x1483bc(_0x850e4f,_0x1846b7))||_0x4abd58;}return _0x35acc5>0x3&&_0x4abd58&&Object[_0x5cf57c(0x1a2)](_0x850e4f,_0x1846b7,_0x4abd58),_0x4abd58;},__metadata=this&&this[a2_0x13282d(0x180)]||function(_0x1abcbe,_0xb30cb1){const _0x295089=a2_0x13282d;if(typeof Reflect===_0x295089(0x172)&&typeof Reflect[_0x295089(0x171)]===_0x295089(0x170))return Reflect[_0x295089(0x171)](_0x1abcbe,_0xb30cb1);};Object[a2_0x13282d(0x1a2)](exports,a2_0x13282d(0x153),{'value':!![]}),exports[a2_0x13282d(0x174)]=void 0x0;const decorator_1=require(a2_0x13282d(0x1a7)),core_1=require(a2_0x13282d(0x178)),ApiError_1=require(a2_0x13282d(0x14e)),ApiService_1=require(a2_0x13282d(0x197)),action_1=require(a2_0x13282d(0x17e)),fs=require('fs'),koa=require(a2_0x13282d(0x16b)),i18n=require(a2_0x13282d(0x193)),task=require('@midwayjs/task'),upload=require('@midwayjs/upload'),staticFile=require(a2_0x13282d(0x17a)),crossDomain=require('@midwayjs/cross-domain'),bodyXml=require(a2_0x13282d(0x165)),bodyParser=require(a2_0x13282d(0x175)),ConfigDefault=require(a2_0x13282d(0x16f)),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x13282d(0x155)),anncicEvent=require(a2_0x13282d(0x19c)),anncicTypeorm=require(a2_0x13282d(0x162)),anncicValidator=require(a2_0x13282d(0x184)),anncicHelper=require(a2_0x13282d(0x17b));let CustomConfiguration=class CustomConfiguration{async[a2_0x13282d(0x194)](){const _0x45c646=a2_0x13282d;await this['filterConfig'](),await this[_0x45c646(0x189)](),await this['handlerActionRoute'](),await this[_0x45c646(0x188)]();}async['checkConfigKeys'](){}async[a2_0x13282d(0x152)](){const _0x2f1e6c=a2_0x13282d,_0x18e65c=this[_0x2f1e6c(0x16c)][_0x2f1e6c(0x18d)]();this[_0x2f1e6c(0x182)]['registerMethodHandler'](action_1[_0x2f1e6c(0x183)],_0xd2a90b=>{const _0x55557a=_0xd2a90b['metadata'];return{'before':async _0x34b2c3=>{const _0x581f58=a2_0x84b7;var _0x2ed2b3,_0x3d1766,_0x72796d,_0x541caf,_0x514693;const _0x3beaf5=(_0x2ed2b3=_0x34b2c3===null||_0x34b2c3===void 0x0?void 0x0:_0x34b2c3[_0x581f58(0x190)])===null||_0x2ed2b3===void 0x0?void 0x0:_0x2ed2b3[core_1[_0x581f58(0x195)]];if(_0x3beaf5){if((_0x55557a===null||_0x55557a===void 0x0?void 0x0:_0x55557a['apimit'])&&!this['ApiService'][_0x581f58(0x18b)]((_0x3d1766=_0x3beaf5===null||_0x3beaf5===void 0x0?void 0x0:_0x3beaf5[_0x581f58(0x154)])===null||_0x3d1766===void 0x0?void 0x0:_0x3d1766[_0x581f58(0x186)]))throw new AnnError(ApiError_1[_0x581f58(0x191)][_0x581f58(0x1a1)]);((_0x72796d=_0x3beaf5[_0x581f58(0x186)])===null||_0x72796d===void 0x0?void 0x0:_0x72796d[_0x581f58(0x1a5)])&&((_0x514693=(_0x541caf=_0x18e65c===null||_0x18e65c===void 0x0?void 0x0:_0x18e65c[_0x581f58(0x156)])===null||_0x541caf===void 0x0?void 0x0:_0x541caf['devices'])===null||_0x514693===void 0x0?void 0x0:_0x514693[_0x3beaf5[_0x581f58(0x186)][_0x581f58(0x1a5)]])&&(typeof _0x18e65c[_0x581f58(0x156)]['devices'][_0x3beaf5[_0x581f58(0x186)]['device']][_0x581f58(0x14c)]=='function'&&await _0x18e65c[_0x581f58(0x156)][_0x581f58(0x18a)][_0x3beaf5[_0x581f58(0x186)][_0x581f58(0x1a5)]][_0x581f58(0x14c)]((_0x3beaf5===null||_0x3beaf5===void 0x0?void 0x0:_0x3beaf5[_0x581f58(0x15b)])||undefined,_0x55557a,_0x3beaf5));}},'afterThrow':(_0x105fcf,_0x161d31)=>{throw _0x161d31;}};});}async[a2_0x13282d(0x188)](){const _0x39b9b7=a2_0x13282d;this[_0x39b9b7(0x161)]['getApplications']([_0x39b9b7(0x176)])[_0x39b9b7(0x164)](_0x525aad=>{const _0x546735=_0x39b9b7;_0x525aad[_0x546735(0x18c)](bodyXml(this['config']['getConfiguration'](_0x546735(0x163)))),_0x525aad[_0x546735(0x18c)](bodyParser(this[_0x546735(0x16c)][_0x546735(0x18d)](_0x546735(0x151)))),(_0x525aad===null||_0x525aad===void 0x0?void 0x0:_0x525aad[_0x546735(0x168)])&&Object['defineProperties'](_0x525aad[_0x546735(0x168)],{'ok':{'value':function(_0x3fa486,_0x4dacbb,_0x49fd25=0x0){return{'code':_0x49fd25,'data':_0x3fa486,'extra':_0x4dacbb};}},'err':{'value':function(_0x424aec,_0x3a6e47,_0xd30926=0x1){return{'code':_0xd30926,'extra':_0x3a6e47,'msg':_0x424aec};}},'input':{'value':function(_0x4a1a3e,_0x15a072){const _0x6ed172=_0x546735;var _0x5a3f56;const _0x782f0d=lodash[_0x6ed172(0x179)]({},this['request']['body']||this['request'][((_0x5a3f56=config===null||config===void 0x0?void 0x0:config[_0x6ed172(0x163)])===null||_0x5a3f56===void 0x0?void 0x0:_0x5a3f56[_0x6ed172(0x19f)])||_0x6ed172(0x167)]||{},this['request'][_0x6ed172(0x159)]||{});return _0x4a1a3e?lodash[_0x6ed172(0x18e)](_0x782f0d,_0x4a1a3e,_0x15a072):_0x782f0d;}},'when':{'value':async function(_0x27daca,_0x57e4fd){const _0x619e20=this['input'](_0x27daca,null);if(!lodash['isNull'](_0x619e20))return await _0x57e4fd(_0x619e20);}},'only':{'value':function(_0x52c475){const _0x1f380f=_0x546735,_0x5df58f={};for(let _0x5c8e3f=0x0;_0x5c8e3f<_0x52c475[_0x1f380f(0x17c)];_0x5c8e3f++){lodash[_0x1f380f(0x198)](_0x52c475[_0x5c8e3f])&&_0x52c475[_0x5c8e3f][_0x1f380f(0x17c)]>0x0&&lodash[_0x1f380f(0x15e)](_0x52c475[_0x5c8e3f][0x0])&&(_0x5df58f[_0x52c475[_0x5c8e3f][0x0]]=this[_0x1f380f(0x196)](_0x52c475[_0x5c8e3f][0x0],_0x52c475[_0x5c8e3f][_0x1f380f(0x17c)]>0x1?_0x52c475[_0x5c8e3f][0x1]:null));}return _0x5df58f;}}});});}async[a2_0x13282d(0x19b)](){const _0x4eb5c8=a2_0x13282d;var _0xb76701,_0x1d20f1,_0x32da7b,_0x46bd3b,_0x2bc374,_0xf1ab64;const _0x477711=this[_0x4eb5c8(0x16c)]['getConfiguration']();((_0x1d20f1=(_0xb76701=_0x477711===null||_0x477711===void 0x0?void 0x0:_0x477711[_0x4eb5c8(0x156)])===null||_0xb76701===void 0x0?void 0x0:_0xb76701[_0x4eb5c8(0x18a)])===null||_0x1d20f1===void 0x0?void 0x0:_0x1d20f1[_0x4eb5c8(0x14f)])&&Object['keys'](_0x477711[_0x4eb5c8(0x156)][_0x4eb5c8(0x18a)])[_0x4eb5c8(0x17c)]>0x1&&delete _0x477711[_0x4eb5c8(0x156)][_0x4eb5c8(0x18a)][_0x4eb5c8(0x14f)];if((_0x32da7b=_0x477711===null||_0x477711===void 0x0?void 0x0:_0x477711[_0x4eb5c8(0x15a)])===null||_0x32da7b===void 0x0?void 0x0:_0x32da7b[_0x4eb5c8(0x18f)])for(const _0x1c3a88 in _0x477711[_0x4eb5c8(0x15a)][_0x4eb5c8(0x18f)]){((_0x46bd3b=_0x477711[_0x4eb5c8(0x15a)][_0x4eb5c8(0x18f)][_0x1c3a88])===null||_0x46bd3b===void 0x0?void 0x0:_0x46bd3b['dir'])&&typeof((_0x2bc374=_0x477711[_0x4eb5c8(0x15a)][_0x4eb5c8(0x18f)][_0x1c3a88])===null||_0x2bc374===void 0x0?void 0x0:_0x2bc374[_0x4eb5c8(0x158)])==_0x4eb5c8(0x160)&&!fs[_0x4eb5c8(0x16a)](_0x477711['staticFile'][_0x4eb5c8(0x18f)][_0x1c3a88]['dir'])&&(fs[_0x4eb5c8(0x19d)](_0x477711[_0x4eb5c8(0x15a)]['dirs'][_0x1c3a88]['dir'],{'recursive':!![]}),console[_0x4eb5c8(0x181)]('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x477711[_0x4eb5c8(0x15a)][_0x4eb5c8(0x18f)][_0x1c3a88][_0x4eb5c8(0x158)]));}((_0xf1ab64=_0x477711===null||_0x477711===void 0x0?void 0x0:_0x477711[_0x4eb5c8(0x177)])===null||_0xf1ab64===void 0x0?void 0x0:_0xf1ab64[_0x4eb5c8(0x14d)])&&!fs['existsSync'](_0x477711['upload'][_0x4eb5c8(0x14d)])&&(fs[_0x4eb5c8(0x19d)](_0x477711[_0x4eb5c8(0x177)][_0x4eb5c8(0x14d)],{'recursive':!![]}),console[_0x4eb5c8(0x181)](_0x4eb5c8(0x19a)+_0x477711[_0x4eb5c8(0x177)][_0x4eb5c8(0x14d)])),this['config']['addObject'](_0x477711);}};__decorate([(0x0,decorator_1[a2_0x13282d(0x15d)])(),__metadata(a2_0x13282d(0x1a3),core_1[a2_0x13282d(0x173)])],CustomConfiguration[a2_0x13282d(0x19e)],a2_0x13282d(0x16c),void 0x0),__decorate([(0x0,decorator_1[a2_0x13282d(0x15d)])(),__metadata(a2_0x13282d(0x1a3),core_1[a2_0x13282d(0x1a0)])],CustomConfiguration[a2_0x13282d(0x19e)],a2_0x13282d(0x182),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata('design:type',core_1['MidwayApplicationManager'])],CustomConfiguration[a2_0x13282d(0x19e)],a2_0x13282d(0x161),void 0x0),__decorate([(0x0,decorator_1[a2_0x13282d(0x15d)])(),__metadata(a2_0x13282d(0x1a3),core_1['MidwayEnvironmentService'])],CustomConfiguration['prototype'],a2_0x13282d(0x185),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x13282d(0x1a3),ApiService_1['ApiService'])],CustomConfiguration[a2_0x13282d(0x19e)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x13282d(0x17f)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x13282d(0x16e),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x13282d(0x174)]=CustomConfiguration;
|
|
1
|
+
'use strict';const a2_0x57441f=a2_0x58a5;(function(_0x1ff280,_0x1b9ccf){const _0x4fccb9=a2_0x58a5,_0x4503ec=_0x1ff280();while(!![]){try{const _0x23c414=parseInt(_0x4fccb9(0x21a))/0x1*(-parseInt(_0x4fccb9(0x1e0))/0x2)+-parseInt(_0x4fccb9(0x20b))/0x3+parseInt(_0x4fccb9(0x1f0))/0x4*(parseInt(_0x4fccb9(0x204))/0x5)+parseInt(_0x4fccb9(0x21b))/0x6+-parseInt(_0x4fccb9(0x218))/0x7+parseInt(_0x4fccb9(0x1fa))/0x8+parseInt(_0x4fccb9(0x1e7))/0x9*(-parseInt(_0x4fccb9(0x223))/0xa);if(_0x23c414===_0x1b9ccf)break;else _0x4503ec['push'](_0x4503ec['shift']());}catch(_0x325d83){_0x4503ec['push'](_0x4503ec['shift']());}}}(a2_0x3165,0x51ecd));function a2_0x3165(){const _0x4459fe=['3997860hNErcT','DEFAULT','config','object','Inject','headers','ApiService','@midwayjs/koa','2250vaIzwj','isArray','bodyParser','prototype','application','device','getApplications','bodyXml','keys','query','isNull','existsSync','HEADERS_SIGNATURE','Configuration','__esModule','upload','decorate','staticFile','./exception/ApiError','checkConfigKeys','@midwayjs/decorator','28fqUJcM','anncicapi','devices','getConfiguration','dir','@midwayjs/upload','design:type','27198VECsWl','@midwayjs/core','@midwayjs/static-file','beforeRoute','function','filterConfig','defineProperties','tmpdir','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','207972TJtQcO','input','@midwayjs/task','@anncic-api/core','registerMethodHandler','apimit','dirs','handlerActionRoute','context','request','4540752zGRJvy','anncic-apihelper','koa-xml-body','koa-bodyparser','addObject','@anncic-api/validator','ACTION_ROUTE_KEY','environment','hanlderApplications','koa','45wfhPSt','log','CustomConfiguration','target','anncic-api','./types/action','__decorate','839250PiCFwu','length','defineProperty','isString','_matchedRoute','@midwayjs/cross-domain','@anncic-api/typeorm','mkdirSync','decorator','getOwnPropertyDescriptor','string','metadata','body','49308deoglo','useMiddleware','28538JxWuHI'];a2_0x3165=function(){return _0x4459fe;};return a2_0x3165();}function a2_0x58a5(_0x4a36ba,_0x3336b0){const _0x316599=a2_0x3165();return a2_0x58a5=function(_0x58a5dc,_0x4d6565){_0x58a5dc=_0x58a5dc-0x1e0;let _0xdff3d6=_0x316599[_0x58a5dc];return _0xdff3d6;},a2_0x58a5(_0x4a36ba,_0x3336b0);}var __decorate=this&&this[a2_0x57441f(0x20a)]||function(_0x32de1a,_0x2e621e,_0x115630,_0x16b3b4){const _0xc3dd2c=a2_0x57441f;var _0x432702=arguments[_0xc3dd2c(0x20c)],_0x281e50=_0x432702<0x3?_0x2e621e:_0x16b3b4===null?_0x16b3b4=Object[_0xc3dd2c(0x214)](_0x2e621e,_0x115630):_0x16b3b4,_0x175d4a;if(typeof Reflect===_0xc3dd2c(0x21e)&&typeof Reflect['decorate']===_0xc3dd2c(0x1eb))_0x281e50=Reflect[_0xc3dd2c(0x233)](_0x32de1a,_0x2e621e,_0x115630,_0x16b3b4);else{for(var _0x5ee745=_0x32de1a[_0xc3dd2c(0x20c)]-0x1;_0x5ee745>=0x0;_0x5ee745--)if(_0x175d4a=_0x32de1a[_0x5ee745])_0x281e50=(_0x432702<0x3?_0x175d4a(_0x281e50):_0x432702>0x3?_0x175d4a(_0x2e621e,_0x115630,_0x281e50):_0x175d4a(_0x2e621e,_0x115630))||_0x281e50;}return _0x432702>0x3&&_0x281e50&&Object[_0xc3dd2c(0x20d)](_0x2e621e,_0x115630,_0x281e50),_0x281e50;},__metadata=this&&this['__metadata']||function(_0x384845,_0x38ed32){const _0x5490c4=a2_0x57441f;if(typeof Reflect==='object'&&typeof Reflect[_0x5490c4(0x216)]===_0x5490c4(0x1eb))return Reflect[_0x5490c4(0x216)](_0x384845,_0x38ed32);};Object['defineProperty'](exports,a2_0x57441f(0x231),{'value':!![]}),exports[a2_0x57441f(0x206)]=void 0x0;const decorator_1=require(a2_0x57441f(0x237)),core_1=require(a2_0x57441f(0x1e8)),ApiError_1=require(a2_0x57441f(0x235)),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x57441f(0x209)),fs=require('fs'),koa=require(a2_0x57441f(0x222)),i18n=require('@midwayjs/i18n'),task=require(a2_0x57441f(0x1f2)),upload=require(a2_0x57441f(0x1e5)),staticFile=require(a2_0x57441f(0x1e9)),crossDomain=require(a2_0x57441f(0x210)),bodyXml=require(a2_0x57441f(0x1fc)),bodyParser=require(a2_0x57441f(0x1fd)),ConfigDefault=require('./config/config.default'),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x57441f(0x1f3)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x57441f(0x211)),anncicValidator=require(a2_0x57441f(0x1ff)),anncicHelper=require(a2_0x57441f(0x1fb));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x21f70c=a2_0x57441f;await this[_0x21f70c(0x1ec)](),await this[_0x21f70c(0x236)](),await this[_0x21f70c(0x1f7)](),await this[_0x21f70c(0x202)]();}async['checkConfigKeys'](){}async['handlerActionRoute'](){const _0x1045f2=a2_0x57441f,_0xc444db=this[_0x1045f2(0x21d)][_0x1045f2(0x1e3)]();this[_0x1045f2(0x213)][_0x1045f2(0x1f4)](action_1[_0x1045f2(0x200)],_0x567e4b=>{const _0x466d61=_0x1045f2,_0x386482=_0x567e4b[_0x466d61(0x216)];return{'before':async _0x1770fc=>{const _0x16bf52=_0x466d61;var _0x240d82,_0x173d21,_0x2a6727,_0x39a620,_0x1b903e;const _0x247d74=(_0x240d82=_0x1770fc===null||_0x1770fc===void 0x0?void 0x0:_0x1770fc[_0x16bf52(0x207)])===null||_0x240d82===void 0x0?void 0x0:_0x240d82[core_1['REQUEST_OBJ_CTX_KEY']];if(_0x247d74){if((_0x386482===null||_0x386482===void 0x0?void 0x0:_0x386482[_0x16bf52(0x1f5)])&&!this[_0x16bf52(0x221)]['checksign']((_0x173d21=_0x247d74===null||_0x247d74===void 0x0?void 0x0:_0x247d74[_0x16bf52(0x1f9)])===null||_0x173d21===void 0x0?void 0x0:_0x173d21[_0x16bf52(0x220)]))throw new AnnError(ApiError_1['ApiError'][_0x16bf52(0x22f)]);((_0x2a6727=_0x247d74[_0x16bf52(0x220)])===null||_0x2a6727===void 0x0?void 0x0:_0x2a6727['device'])&&((_0x1b903e=(_0x39a620=_0xc444db===null||_0xc444db===void 0x0?void 0x0:_0xc444db['anncicapi'])===null||_0x39a620===void 0x0?void 0x0:_0x39a620[_0x16bf52(0x1e2)])===null||_0x1b903e===void 0x0?void 0x0:_0x1b903e[_0x247d74[_0x16bf52(0x220)]['device']])&&(typeof _0xc444db['anncicapi'][_0x16bf52(0x1e2)][_0x247d74['headers'][_0x16bf52(0x228)]][_0x16bf52(0x1ea)]==_0x16bf52(0x1eb)&&await _0xc444db[_0x16bf52(0x1e1)][_0x16bf52(0x1e2)][_0x247d74[_0x16bf52(0x220)][_0x16bf52(0x228)]][_0x16bf52(0x1ea)]((_0x247d74===null||_0x247d74===void 0x0?void 0x0:_0x247d74[_0x16bf52(0x20f)])||undefined,_0x386482,_0x247d74));}},'afterThrow':(_0x1beb73,_0x163385)=>{throw _0x163385;}};});}async[a2_0x57441f(0x202)](){const _0x2d16d9=a2_0x57441f;this[_0x2d16d9(0x227)][_0x2d16d9(0x229)]([_0x2d16d9(0x203)])['forEach'](_0xd761c8=>{const _0x16f4f2=_0x2d16d9;_0xd761c8['useMiddleware'](bodyXml(this[_0x16f4f2(0x21d)][_0x16f4f2(0x1e3)](_0x16f4f2(0x22a)))),_0xd761c8[_0x16f4f2(0x219)](bodyParser(this[_0x16f4f2(0x21d)][_0x16f4f2(0x1e3)](_0x16f4f2(0x225)))),(_0xd761c8===null||_0xd761c8===void 0x0?void 0x0:_0xd761c8['context'])&&Object[_0x16f4f2(0x1ed)](_0xd761c8[_0x16f4f2(0x1f8)],{'ok':{'value':function(_0x48c4b2,_0x3e64d8,_0x51dbac=0x0){return{'code':_0x51dbac,'data':_0x48c4b2,'extra':_0x3e64d8};}},'err':{'value':function(_0x4fdd84,_0x2f0466,_0x5ba6f5=0x1){return{'code':_0x5ba6f5,'extra':_0x2f0466,'msg':_0x4fdd84};}},'input':{'value':function(_0x2d0f3a,_0x11c930){const _0x1617a1=_0x16f4f2;var _0x44c7e8;const _0x550f57=lodash['defaultsDeep']({},this[_0x1617a1(0x1f9)][_0x1617a1(0x217)]||this[_0x1617a1(0x1f9)][((_0x44c7e8=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x44c7e8===void 0x0?void 0x0:_0x44c7e8['key'])||_0x1617a1(0x217)]||{},this[_0x1617a1(0x1f9)][_0x1617a1(0x22c)]||{});return _0x2d0f3a?lodash['get'](_0x550f57,_0x2d0f3a,_0x11c930):_0x550f57;}},'when':{'value':async function(_0x2485e9,_0x3c1ad9){const _0x3e8a95=_0x16f4f2,_0x114f51=this[_0x3e8a95(0x1f1)](_0x2485e9,null);if(!lodash[_0x3e8a95(0x22d)](_0x114f51))return await _0x3c1ad9(_0x114f51);}},'only':{'value':function(_0x205414){const _0x4b03bd=_0x16f4f2,_0x198d93={};for(let _0x433b68=0x0;_0x433b68<_0x205414[_0x4b03bd(0x20c)];_0x433b68++){lodash[_0x4b03bd(0x224)](_0x205414[_0x433b68])&&_0x205414[_0x433b68][_0x4b03bd(0x20c)]>0x0&&lodash[_0x4b03bd(0x20e)](_0x205414[_0x433b68][0x0])&&(_0x198d93[_0x205414[_0x433b68][0x0]]=this[_0x4b03bd(0x1f1)](_0x205414[_0x433b68][0x0],_0x205414[_0x433b68][_0x4b03bd(0x20c)]>0x1?_0x205414[_0x433b68][0x1]:null));}return _0x198d93;}}});});}async['filterConfig'](){const _0x15f0b1=a2_0x57441f;var _0x1ea829,_0x53d2d1,_0x5fd638,_0x14c4fb,_0x38e164,_0x594a0e;const _0x4f7525=this[_0x15f0b1(0x21d)][_0x15f0b1(0x1e3)]();((_0x53d2d1=(_0x1ea829=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['anncicapi'])===null||_0x1ea829===void 0x0?void 0x0:_0x1ea829[_0x15f0b1(0x1e2)])===null||_0x53d2d1===void 0x0?void 0x0:_0x53d2d1[_0x15f0b1(0x21c)])&&Object[_0x15f0b1(0x22b)](_0x4f7525[_0x15f0b1(0x1e1)][_0x15f0b1(0x1e2)])[_0x15f0b1(0x20c)]>0x1&&delete _0x4f7525[_0x15f0b1(0x1e1)][_0x15f0b1(0x1e2)][_0x15f0b1(0x21c)];if((_0x5fd638=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['staticFile'])===null||_0x5fd638===void 0x0?void 0x0:_0x5fd638[_0x15f0b1(0x1f6)])for(const _0x4290c3 in _0x4f7525[_0x15f0b1(0x234)][_0x15f0b1(0x1f6)]){((_0x14c4fb=_0x4f7525['staticFile']['dirs'][_0x4290c3])===null||_0x14c4fb===void 0x0?void 0x0:_0x14c4fb[_0x15f0b1(0x1e4)])&&typeof((_0x38e164=_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3])===null||_0x38e164===void 0x0?void 0x0:_0x38e164['dir'])==_0x15f0b1(0x215)&&!fs['existsSync'](_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3][_0x15f0b1(0x1e4)])&&(fs[_0x15f0b1(0x212)](_0x4f7525[_0x15f0b1(0x234)][_0x15f0b1(0x1f6)][_0x4290c3]['dir'],{'recursive':!![]}),console['log']('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3][_0x15f0b1(0x1e4)]));}((_0x594a0e=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['upload'])===null||_0x594a0e===void 0x0?void 0x0:_0x594a0e[_0x15f0b1(0x1ee)])&&!fs[_0x15f0b1(0x22e)](_0x4f7525[_0x15f0b1(0x232)]['tmpdir'])&&(fs['mkdirSync'](_0x4f7525[_0x15f0b1(0x232)]['tmpdir'],{'recursive':!![]}),console[_0x15f0b1(0x205)](_0x15f0b1(0x1ef)+_0x4f7525[_0x15f0b1(0x232)][_0x15f0b1(0x1ee)])),this[_0x15f0b1(0x21d)][_0x15f0b1(0x1fe)](_0x4f7525);}};__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata('design:type',core_1['MidwayConfigService'])],CustomConfiguration[a2_0x57441f(0x226)],'config',void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayDecoratorService'])],CustomConfiguration['prototype'],a2_0x57441f(0x213),void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayApplicationManager'])],CustomConfiguration[a2_0x57441f(0x226)],'application',void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayEnvironmentService'])],CustomConfiguration[a2_0x57441f(0x226)],a2_0x57441f(0x201),void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),ApiService_1[a2_0x57441f(0x221)])],CustomConfiguration[a2_0x57441f(0x226)],a2_0x57441f(0x221),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x57441f(0x230)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x57441f(0x208),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x57441f(0x206)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x1f4e4f=a3_0x559d;function a3_0x559d(_0x49e52e,_0x422ca0){const _0xed51b9=a3_0xed51();return a3_0x559d=function(_0x559d3c,_0x5bc6e0){_0x559d3c=_0x559d3c-0x139;let _0x34096b=_0xed51b9[_0x559d3c];return _0x34096b;},a3_0x559d(_0x49e52e,_0x422ca0);}(function(_0x477b88,_0x1a3e3a){const _0x1724a6=a3_0x559d,_0x40425b=_0x477b88();while(!![]){try{const _0x44d4e5=parseInt(_0x1724a6(0x15e))/0x1*(parseInt(_0x1724a6(0x13a))/0x2)+parseInt(_0x1724a6(0x15d))/0x3*(-parseInt(_0x1724a6(0x162))/0x4)+-parseInt(_0x1724a6(0x139))/0x5*(parseInt(_0x1724a6(0x16c))/0x6)+-parseInt(_0x1724a6(0x149))/0x7+-parseInt(_0x1724a6(0x169))/0x8+-parseInt(_0x1724a6(0x16d))/0x9+parseInt(_0x1724a6(0x13b))/0xa;if(_0x44d4e5===_0x1a3e3a)break;else _0x40425b['push'](_0x40425b['shift']());}catch(_0x557c26){_0x40425b['push'](_0x40425b['shift']());}}}(a3_0xed51,0xd50f9));Object[a3_0x1f4e4f(0x155)](exports,'__esModule',{'value':!![]}),exports[a3_0x1f4e4f(0x14a)]=exports[a3_0x1f4e4f(0x140)]=void 0x0;const fs=require('fs'),decorator_1=require(a3_0x1f4e4f(0x15a)),action_1=require(a3_0x1f4e4f(0x14f));function Action(_0x50b153,_0x39d8c9,_0x3a179a={'middleware':[],'sensitive':!![]}){return _0x1923de=>{const _0x562531=a3_0x559d;_0x3a179a[_0x562531(0x16a)]=_0x39d8c9;const _0x20ba2c=parseRoute(_0x50b153);if(_0x20ba2c[_0x562531(0x164)]){_0x3a179a[_0x562531(0x157)]=_0x3a179a[_0x562531(0x157)]?'/'+_0x20ba2c[_0x562531(0x164)]+'/'+_0x3a179a[_0x562531(0x157)]:'/'+_0x20ba2c[_0x562531(0x150)];_0x20ba2c[_0x562531(0x157)]&&(_0x3a179a[_0x562531(0x157)]='/'+_0x20ba2c[_0x562531(0x157)]+'/'+_0x3a179a['prefix']);if(fs[_0x562531(0x159)](_0x20ba2c[_0x562531(0x153)]+_0x562531(0x142)+_0x20ba2c['module']+_0x562531(0x147)+(lodash['endsWith'](_0x20ba2c[_0x562531(0x15c)],'ts')?'ts':'js'))){const _0x14e09b=include(_0x20ba2c[_0x562531(0x153)]+_0x562531(0x142)+_0x20ba2c[_0x562531(0x164)]+'/config.'+(lodash['endsWith'](_0x20ba2c['filepath'],'ts')?'ts':'js'));if(_0x14e09b[_0x562531(0x15b)]&&lodash[_0x562531(0x160)](_0x14e09b[_0x562531(0x15b)])&&_0x14e09b[_0x562531(0x15b)][_0x562531(0x151)]>0x0)for(let _0x4bd456 in _0x14e09b[_0x562531(0x15b)]){_0x14e09b[_0x562531(0x13f)][_0x562531(0x14d)](_0x14e09b[_0x562531(0x15b)][_0x4bd456])==-0x1&&_0x3a179a[_0x562531(0x15b)][_0x562531(0x16b)](_0x14e09b[_0x562531(0x15b)][_0x4bd456]);}}_0x3a179a['prefix']=_0x3a179a['prefix'][_0x562531(0x161)]()[_0x562531(0x154)](/\/{2,}/g,'/'),(0x0,decorator_1['saveModule'])(action_1['ACTION_KEY'],_0x1923de),(0x0,decorator_1[_0x562531(0x13e)])(_0x3a179a[_0x562531(0x157)],_0x3a179a)(_0x1923de),(0x0,decorator_1[_0x562531(0x14b)])(action_1['ACTION_KEY'],{'prefix':_0x3a179a[_0x562531(0x157)],'pprefix':_0x20ba2c[_0x562531(0x157)],'module':_0x20ba2c[_0x562531(0x164)],'filepath':_0x20ba2c[_0x562531(0x15c)],'routerOptions':_0x3a179a},_0x1923de);}else _0x3a179a[_0x562531(0x157)]=_0x3a179a[_0x562531(0x157)]?'/'+_0x3a179a[_0x562531(0x157)]:'/'+_0x20ba2c[_0x562531(0x150)],_0x20ba2c[_0x562531(0x157)]&&(_0x3a179a[_0x562531(0x157)]='/'+_0x20ba2c[_0x562531(0x157)]+'/'+_0x3a179a[_0x562531(0x157)]),_0x3a179a[_0x562531(0x157)]=_0x3a179a[_0x562531(0x157)][_0x562531(0x161)]()[_0x562531(0x154)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x562531(0x166)])(action_1[_0x562531(0x158)],_0x1923de),(0x0,decorator_1['Controller'])(_0x3a179a[_0x562531(0x157)],_0x3a179a)(_0x1923de),(0x0,decorator_1['saveClassMetadata'])(action_1[_0x562531(0x158)],{'prefix':_0x3a179a['prefix'],'module':_0x20ba2c[_0x562531(0x164)],'pprefix':_0x20ba2c[_0x562531(0x157)],'filepath':_0x20ba2c['filepath'],'routerOptions':_0x3a179a},_0x1923de);};}exports[a3_0x1f4e4f(0x140)]=Action;function parseRoute(_0x353520){const _0x318a7f=a3_0x1f4e4f;_0x353520=_0x353520['replace'](/(\\|\/)/g,'/');const _0x5f3ba2=process[_0x318a7f(0x143)]()[_0x318a7f(0x154)](/(\\|\/)/g,'/'),_0xb14eb9=_0x353520[_0x318a7f(0x13d)](0x0,_0x5f3ba2[_0x318a7f(0x151)]+_0x353520['substring'](_0x5f3ba2[_0x318a7f(0x151)]+0x1)[_0x318a7f(0x14d)]('/')+0x1),_0x223f8f=_0x353520['substring'](_0xb14eb9[_0x318a7f(0x151)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x4cd1bd={'route':'','prefix':![],'module':![],'rootpath':_0xb14eb9,'filepath':_0x223f8f};if(_0x223f8f[_0x318a7f(0x15f)](_0x318a7f(0x165))){const _0x21ee75=_0x223f8f[_0x318a7f(0x13d)](_0x318a7f(0x165)[_0x318a7f(0x151)])[_0x318a7f(0x163)]('/')[_0x318a7f(0x167)](_0x8002d6=>_0x8002d6&&_0x8002d6[_0x318a7f(0x145)]());return _0x21ee75[_0x318a7f(0x151)]>0x1&&(_0x4cd1bd[_0x318a7f(0x157)]=_0x21ee75[0x0][_0x318a7f(0x161)](),_0x21ee75[_0x318a7f(0x156)](0x0,0x1)),_0x4cd1bd['route']=('/'+_0x21ee75['join']('/'))[_0x318a7f(0x154)](/(\.ts|\.js)$/,'')[_0x318a7f(0x154)](/\/{2,}/g,'/')[_0x318a7f(0x148)](/[\/|A-Z]*[^A-Z]+/g)[_0x318a7f(0x144)]('-')[_0x318a7f(0x161)]()[_0x318a7f(0x154)](/\/\-/g,'/'),_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x152)](_0x318a7f(0x16e))&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)]['length']-0x7)),_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x152)](_0x318a7f(0x13c))&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x151)]-0xb)),_0x4cd1bd;}else{if(_0x223f8f[_0x318a7f(0x15f)](_0x318a7f(0x141))){const _0xaa042a=_0x223f8f[_0x318a7f(0x13d)](0x0,_0x223f8f[_0x318a7f(0x14d)](_0x318a7f(0x142))+0x5),_0x448dd2=_0x223f8f[_0x318a7f(0x13d)](_0xaa042a[_0x318a7f(0x151)]+0x1)[_0x318a7f(0x154)](/(\\|\/)/g,'/')['split']('/')[0x0];if(_0x223f8f[_0x318a7f(0x15f)](_0x318a7f(0x141)+_0x448dd2+_0x318a7f(0x14e))){const _0x55e04c=_0x223f8f[_0x318a7f(0x13d)]((_0xaa042a+'/'+_0x448dd2+_0x318a7f(0x14e))['length'])[_0x318a7f(0x163)]('/')['filter'](_0x164e5a=>_0x164e5a&&_0x164e5a[_0x318a7f(0x145)]());return _0x55e04c[_0x318a7f(0x151)]>0x1&&(_0x4cd1bd['prefix']=_0x55e04c[0x0][_0x318a7f(0x161)](),_0x55e04c[_0x318a7f(0x156)](0x0,0x1)),_0x4cd1bd[_0x318a7f(0x164)]=_0x448dd2,_0x4cd1bd['route']=('/'+_0x448dd2+'/'+_0x55e04c[_0x318a7f(0x144)]('/'))[_0x318a7f(0x154)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x318a7f(0x161)]()[_0x318a7f(0x154)](/\/\-/g,'/'),_0x4cd1bd[_0x318a7f(0x150)]['endsWith'](_0x318a7f(0x16e))&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x151)]-0x7)),_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x152)]('-controller')&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x151)]-0xb)),_0x4cd1bd;}throw new Error(_0x223f8f+_0x318a7f(0x146)+_0x448dd2+_0x318a7f(0x14c));}}throw new Error(_0x223f8f+_0x318a7f(0x168));}exports[a3_0x1f4e4f(0x14a)]=parseRoute;function a3_0xed51(){const _0x157a44=['\x20文件请放在apps/','/config.','match','3020675GOuSHb','parseRoute','saveClassMetadata','/controller/文件下','indexOf','/controller/','../types/action','route','length','endsWith','rootpath','replace','defineProperty','splice','prefix','ACTION_KEY','existsSync','@midwayjs/decorator','middleware','filepath','3wnHmzp','11mDdbpT','startsWith','isArray','toLowerCase','3357416tKuHaR','split','module','app/controller/','saveModule','filter','\x20文件请放在app/controller/文件下','559384Oksope','tagName','push','6QRSXGZ','12370923qgvXfI','-action','3010495aKoCVQ','44280ZLynMm','39466050UbLwPA','-controller','substring','Controller','middlewareIgnore','Action','apps/','/apps/','cwd','join','trim'];a3_0xed51=function(){return _0x157a44;};return a3_0xed51();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x4b838c=a4_0x5450;(function(_0xbc5cb,_0x78c050){const _0x3f86d1=a4_0x5450,_0x1f0ed6=_0xbc5cb();while(!![]){try{const _0x59d845=-parseInt(_0x3f86d1(0xb2))/0x1*(parseInt(_0x3f86d1(0xa8))/0x2)+-parseInt(_0x3f86d1(0xa5))/0x3*(parseInt(_0x3f86d1(0xbb))/0x4)+parseInt(_0x3f86d1(0xb7))/0x5+parseInt(_0x3f86d1(0xae))/0x6+-parseInt(_0x3f86d1(0xa7))/0x7+parseInt(_0x3f86d1(0xac))/0x8*(parseInt(_0x3f86d1(0xa1))/0x9)+-parseInt(_0x3f86d1(0xa4))/0xa*(-parseInt(_0x3f86d1(0xb1))/0xb);if(_0x59d845===_0x78c050)break;else _0x1f0ed6['push'](_0x1f0ed6['shift']());}catch(_0x9d1b25){_0x1f0ed6['push'](_0x1f0ed6['shift']());}}}(a4_0x2a08,0x6003e));function a4_0x5450(_0x53a6a6,_0x401bae){const _0x2a08fe=a4_0x2a08();return a4_0x5450=function(_0x545017,_0x2d3b8f){_0x545017=_0x545017-0x9f;let _0x324fd9=_0x2a08fe[_0x545017];return _0x324fd9;},a4_0x5450(_0x53a6a6,_0x401bae);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a4_0x4b838c(0xb9)]=void 0x0;function a4_0x2a08(){const _0x2d76de=['attachClassMetadata','5287247IkgyWM','28624GDFiJP','length','description','createCustomMethodDecorator','8GoLMMe','indexOf','3365766bJJhoG','middlewareIgnore','validate','2066702vWbVZv','4WAYWvO','Validator','toLowerCase','routerName','middleware','1025490vvZgvv','del','Api','utc','5156sCzGPC','apimit','ACTION_ROUTE_KEY','delete','5228217zmKpsz','../types/action','@midwayjs/decorator','20ZAQHMR','1203qQDVAB'];a4_0x2a08=function(){return _0x2d76de;};return a4_0x2a08();}const validator_1=require('@anncic-api/validator'),decorator_1=require(a4_0x4b838c(0xa3)),action_1=require(a4_0x4b838c(0xa2));function Api(_0x21e1e7,_0x1fd4ce='get',_0x253492='/',_0x83da44={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x259359,_0x1138cf,_0x6081b0)=>{const _0x5f364f=a4_0x5450;var _0x1a3a0d,_0x2784ee,_0x2d3710;!_0x83da44['middleware']&&(_0x83da44[_0x5f364f(0xb6)]=[]);!((_0x1a3a0d=_0x83da44===null||_0x83da44===void 0x0?void 0x0:_0x83da44['validate'])===null||_0x1a3a0d===void 0x0?void 0x0:_0x1a3a0d['validationOptions'])&&(_0x83da44[_0x5f364f(0xb0)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x5f364f(0xba)}});if(((_0x2784ee=_0x83da44===null||_0x83da44===void 0x0?void 0x0:_0x83da44['middleware'])===null||_0x2784ee===void 0x0?void 0x0:_0x2784ee[_0x5f364f(0xa9)])>0x0&&((_0x2d3710=_0x83da44===null||_0x83da44===void 0x0?void 0x0:_0x83da44[_0x5f364f(0xaf)])===null||_0x2d3710===void 0x0?void 0x0:_0x2d3710['length'])>0x0)for(let _0x26cf8f in _0x83da44[_0x5f364f(0xb6)]){_0x83da44[_0x5f364f(0xaf)][_0x5f364f(0xad)](_0x83da44[_0x5f364f(0xb6)][_0x26cf8f])!==-0x1&&(_0x83da44[_0x5f364f(0xb6)][_0x26cf8f]=null);}_0x83da44[_0x5f364f(0xb5)]=_0x21e1e7,(0x0,validator_1[_0x5f364f(0xb3)])(_0x83da44[_0x5f364f(0xb0)])(_0x259359,_0x1138cf,_0x6081b0),(0x0,decorator_1['RequestMapping'])(Object['assign'](_0x83da44,{'path':_0x253492,'requestMethod':(_0x1fd4ce==_0x5f364f(0xb8)?_0x5f364f(0xa0):_0x1fd4ce)[_0x5f364f(0xb4)]()}))(_0x259359,_0x1138cf,_0x6081b0),(0x0,decorator_1[_0x5f364f(0xa6)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x253492,'method':_0x1138cf,'apimit':_0x83da44['apimit'],'routerName':_0x83da44[_0x5f364f(0xb5)],'description':_0x83da44[_0x5f364f(0xaa)],'middleware':(_0x83da44['middleware']||[])['filter'](_0x5c9824=>!!_0x5c9824),'requestMethod':(_0x1fd4ce==_0x5f364f(0xb8)?'delete':_0x1fd4ce)[_0x5f364f(0xb4)]()},_0x259359),(0x0,decorator_1[_0x5f364f(0xab)])(action_1[_0x5f364f(0x9f)],{'path':_0x253492,'method':_0x1138cf,'apimit':_0x83da44[_0x5f364f(0xbc)],'routerName':_0x83da44[_0x5f364f(0xb5)],'description':_0x83da44['description'],'middleware':(_0x83da44[_0x5f364f(0xb6)]||[])['filter'](_0x228543=>!!_0x228543),'requestMethod':(_0x1fd4ce=='del'?_0x5f364f(0xa0):_0x1fd4ce)[_0x5f364f(0xb4)]()})(_0x259359,_0x1138cf,_0x6081b0);};}exports[a4_0x4b838c(0xb9)]=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5_0x170acb=a5_0x69e1;function a5_0x69e1(_0x279e76,_0x484a28){const _0x4b5827=a5_0x4b58();return a5_0x69e1=function(_0x69e160,_0x1ded44){_0x69e160=_0x69e160-0x1d6;let _0x3d7452=_0x4b5827[_0x69e160];return _0x3d7452;},a5_0x69e1(_0x279e76,_0x484a28);}(function(_0x5214bb,_0x1adf60){const _0x5c800c=a5_0x69e1,_0x7da145=_0x5214bb();while(!![]){try{const _0x457626=-parseInt(_0x5c800c(0x1db))/0x1+parseInt(_0x5c800c(0x1d7))/0x2*(-parseInt(_0x5c800c(0x1e3))/0x3)+-parseInt(_0x5c800c(0x1ea))/0x4*(-parseInt(_0x5c800c(0x1e1))/0x5)+parseInt(_0x5c800c(0x1ef))/0x6+parseInt(_0x5c800c(0x1da))/0x7+parseInt(_0x5c800c(0x1f0))/0x8+-parseInt(_0x5c800c(0x1d8))/0x9*(parseInt(_0x5c800c(0x1dd))/0xa);if(_0x457626===_0x1adf60)break;else _0x7da145['push'](_0x7da145['shift']());}catch(_0x3c85c4){_0x7da145['push'](_0x7da145['shift']());}}}(a5_0x4b58,0xc9eb6));Object[a5_0x170acb(0x1de)](exports,'__esModule',{'value':!![]}),exports['Apitest']=void 0x0;const decorator_1=require('@midwayjs/decorator'),core_1=require('@midwayjs/core'),ApitestService_1=require(a5_0x170acb(0x1dc));function a5_0x4b58(){const _0x2a5560=['6483372JjQgMV','888403qlekaW','../service/ApitestService','10PGUMfO','defineProperty','apitest','app','5NkpFUm','get','647847AUpzXF','apidoc','RequestMapping','MidwayEnvironmentService','getApplicationContext','filepath','/apitest','5288236gEEuqc','ApitestService','isDevelopmentEnvironment','getConfig','value','6961818mWlIgi','5957880RwQHNC','getAsync','10YZkBYs','12222747hLmKby','REQUEST_OBJ_CTX_KEY'];a5_0x4b58=function(){return _0x2a5560;};return a5_0x4b58();}function Apitest(_0x27a640=a5_0x170acb(0x1e9),_0x160b45){return(_0x32c780,_0x471385,_0x266525)=>{const _0x27c248=a5_0x69e1;return(0x0,decorator_1[_0x27c248(0x1e5)])({'path':_0x27a640,'requestMethod':_0x27c248(0x1e2)})(_0x32c780,_0x471385,_0x266525),_0x266525[_0x27c248(0x1ee)]=async function(..._0x3d8c3b){const _0x8434d5=_0x27c248;var _0x333a1c;const _0xa1b0bb=(_0x333a1c=this[core_1[_0x8434d5(0x1d9)]])===null||_0x333a1c===void 0x0?void 0x0:_0x333a1c[_0x8434d5(0x1e0)];if(_0xa1b0bb&&_0xa1b0bb[_0x8434d5(0x1ed)](_0x8434d5(0x1df))){const _0x3d140d=await _0xa1b0bb[_0x8434d5(0x1e7)]()[_0x8434d5(0x1d6)](ApitestService_1[_0x8434d5(0x1eb)]),_0x43b9f3=await _0xa1b0bb[_0x8434d5(0x1e7)]()[_0x8434d5(0x1d6)](core_1[_0x8434d5(0x1e6)]);return _0x43b9f3[_0x8434d5(0x1ec)]()&&(_0x160b45[_0x8434d5(0x1e8)]=!![]),await _0x3d140d[_0x8434d5(0x1e4)](_0x160b45);}return'';},_0x266525;};}exports['Apitest']=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';var a7_0x3da15a=a7_0x540e;function a7_0xac98(){var _0x175293=['1260300jUiMPW','function','9032nKmHfe','1060234RqZQCL','decorate','HEADERS_LACK','HEADERS_CHECKCODE','2178396AQYpeq','36eHGbyC','TIMEOUT','__metadata','83708tAQkxh','ApiError','584280fOYCwE','156iUXVOW','请求头信息不完整','HEADERS_DEVICE','HEADERS_SIGNATURE','defineProperty','9620030kFdCui','object','metadata','7SPeNkw','design:type','length','__decorate'];a7_0xac98=function(){return _0x175293;};return a7_0xac98();}(function(_0x35d581,_0x1ed13d){var _0xc7f58e=a7_0x540e,_0x50e5bc=_0x35d581();while(!![]){try{var _0x438e29=-parseInt(_0xc7f58e(0x176))/0x1*(parseInt(_0xc7f58e(0x185))/0x2)+-parseInt(_0xc7f58e(0x188))/0x3*(parseInt(_0xc7f58e(0x17c))/0x4)+-parseInt(_0xc7f58e(0x17a))/0x5+parseInt(_0xc7f58e(0x181))/0x6+parseInt(_0xc7f58e(0x17d))/0x7+-parseInt(_0xc7f58e(0x187))/0x8*(parseInt(_0xc7f58e(0x182))/0x9)+parseInt(_0xc7f58e(0x173))/0xa;if(_0x438e29===_0x1ed13d)break;else _0x50e5bc['push'](_0x50e5bc['shift']());}catch(_0x276f74){_0x50e5bc['push'](_0x50e5bc['shift']());}}}(a7_0xac98,0x7f6d1));function a7_0x540e(_0x8aae57,_0x318575){var _0xac9876=a7_0xac98();return a7_0x540e=function(_0x540ee5,_0x33a19d){_0x540ee5=_0x540ee5-0x172;var _0x2dc990=_0xac9876[_0x540ee5];return _0x2dc990;},a7_0x540e(_0x8aae57,_0x318575);}var __decorate=this&&this[a7_0x3da15a(0x179)]||function(_0x32ab1b,_0x394b8e,_0x177b53,_0x302bb4){var _0x322777=a7_0x3da15a,_0x425faa=arguments[_0x322777(0x178)],_0x3e897b=_0x425faa<0x3?_0x394b8e:_0x302bb4===null?_0x302bb4=Object['getOwnPropertyDescriptor'](_0x394b8e,_0x177b53):_0x302bb4,_0x45ab0c;if(typeof Reflect===_0x322777(0x174)&&typeof Reflect[_0x322777(0x17e)]===_0x322777(0x17b))_0x3e897b=Reflect['decorate'](_0x32ab1b,_0x394b8e,_0x177b53,_0x302bb4);else{for(var _0x526f62=_0x32ab1b[_0x322777(0x178)]-0x1;_0x526f62>=0x0;_0x526f62--)if(_0x45ab0c=_0x32ab1b[_0x526f62])_0x3e897b=(_0x425faa<0x3?_0x45ab0c(_0x3e897b):_0x425faa>0x3?_0x45ab0c(_0x394b8e,_0x177b53,_0x3e897b):_0x45ab0c(_0x394b8e,_0x177b53))||_0x3e897b;}return _0x425faa>0x3&&_0x3e897b&&Object['defineProperty'](_0x394b8e,_0x177b53,_0x3e897b),_0x3e897b;},__metadata=this&&this[a7_0x3da15a(0x184)]||function(_0x678acc,_0x5e571c){var _0x5e7ac0=a7_0x3da15a;if(typeof Reflect==='object'&&typeof Reflect[_0x5e7ac0(0x175)]===_0x5e7ac0(0x17b))return Reflect['metadata'](_0x678acc,_0x5e571c);};Object[a7_0x3da15a(0x172)](exports,'__esModule',{'value':!![]}),exports[a7_0x3da15a(0x186)]=void 0x0;class ApiError{}ApiError['TIMEOUT']=0x18a89,ApiError[a7_0x3da15a(0x17f)]=0x18a8a,ApiError[a7_0x3da15a(0x18a)]=0x18a8b,ApiError[a7_0x3da15a(0x180)]=0x18a8c,ApiError[a7_0x3da15a(0x18b)]=0x18a8d,__decorate([AnnErrorMsg('网络繁忙,请稍后重试'),__metadata('design:type',Object)],ApiError,a7_0x3da15a(0x183),void 0x0),__decorate([AnnErrorMsg(a7_0x3da15a(0x189)),__metadata(a7_0x3da15a(0x177),Object)],ApiError,a7_0x3da15a(0x17f),void 0x0),__decorate([AnnErrorMsg('请使用正确的设备'),__metadata(a7_0x3da15a(0x177),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg('checkcode验证失败'),__metadata(a7_0x3da15a(0x177),Object)],ApiError,'HEADERS_CHECKCODE',void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a7_0x3da15a(0x177),Object)],ApiError,a7_0x3da15a(0x18b),void 0x0),exports['ApiError']=ApiError;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8_0x4ae659=a8_0x57a1;(function(_0x312ad3,_0x17691b){const _0x2c6a7d=a8_0x57a1,_0x4d3b33=_0x312ad3();while(!![]){try{const _0x341698=-parseInt(_0x2c6a7d(0x1e7))/0x1+parseInt(_0x2c6a7d(0x202))/0x2*(-parseInt(_0x2c6a7d(0x1e9))/0x3)+-parseInt(_0x2c6a7d(0x1b1))/0x4*(parseInt(_0x2c6a7d(0x1f5))/0x5)+-parseInt(_0x2c6a7d(0x1bd))/0x6+parseInt(_0x2c6a7d(0x1b6))/0x7+-parseInt(_0x2c6a7d(0x1f3))/0x8*(-parseInt(_0x2c6a7d(0x1fd))/0x9)+parseInt(_0x2c6a7d(0x1fe))/0xa;if(_0x341698===_0x17691b)break;else _0x4d3b33['push'](_0x4d3b33['shift']());}catch(_0x2b4323){_0x4d3b33['push'](_0x4d3b33['shift']());}}}(a8_0x2ec2,0x7b876));function a8_0x2ec2(){const _0x31126e=['boolean','56IQHCMS','BODY','230kLnVcG','body','tagName','allow','startsWith','concat','object','metadata','479970LMPkKK','15667030rbgHxt','RULES_KEY','log','只允许:[','2762ouncmS','length','prefix','join','default','indexOf','QUERY','routes','filter','PARAM','routerName','47140hVqGTV','rules','RouteParamTypes','lodash','route','4750123HUDnnA','propertyData','static/apitest','min','getClassMetadata','array','flags.presence','3162672GFDhMm','string','flags.default','args','iterator','file','replace','-array','INJECT_CUSTOM_PARAM','split','type','Number','header','FIELDS','module','describe','ACTION_KEY','function','flags.description','find','@midwayjs/decorator','name','FILESTREAM','@anncic-api/validator','max','method','routerOptions','isArray','items','limit','description','getRoutes','required','HEADERS','FILESSTREAM','requestMethod','push','summary','String','test','title','listModule','810017JqJFfn','/static/apitest','507NMeUsi','get','getMethodParamTypes','File','key','filepath','request','query','pprefix'];a8_0x2ec2=function(){return _0x31126e;};return a8_0x2ec2();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['getRoutes']=void 0x0;const lodash_1=require(a8_0x4ae659(0x1b4)),validator_1=require(a8_0x4ae659(0x1d4)),decorator_1=require(a8_0x4ae659(0x1d1)),decorator_2=require(a8_0x4ae659(0x1d1)),decorator_3=require(a8_0x4ae659(0x1d1)),action_1=require('../types/action');function getRoutes(_0x4aea72={'prefix':'/','module':![]}){const _0x59627b=a8_0x4ae659;var _0x45a9b6,_0x34b308;const _0x299bc1=(0x0,decorator_3[_0x59627b(0x1e6)])(action_1[_0x59627b(0x1cd)]),_0x57d9bd={},_0x1b8f7f=Array[_0x59627b(0x1d8)](_0x4aea72['filter']||[])?_0x4aea72[_0x59627b(0x1ae)]||[]:[_0x4aea72[_0x59627b(0x1ae)]];_0x219f68:for(const _0x17c4a2 of _0x299bc1){let _0x59cb17=(0x0,decorator_3[_0x59627b(0x1ba)])(action_1[_0x59627b(0x1cd)],_0x17c4a2),_0x1de09f=(0x0,decorator_3[_0x59627b(0x1ba)])(action_1['ACTION_ROUTE_KEY'],_0x17c4a2);if(_0x59cb17&&_0x1de09f){let _0x3abc11=_0x59cb17['prefix'],_0x22d9db={};if(_0x4aea72['module']&&(0x0,lodash_1[_0x59627b(0x1ea)])(_0x59cb17,_0x59627b(0x1cb),![])!=_0x4aea72[_0x59627b(0x1cb)])continue _0x219f68;else{if(_0x4aea72[_0x59627b(0x1cb)]===![]&&!!(0x0,lodash_1[_0x59627b(0x1ea)])(_0x59cb17,_0x59627b(0x1cb),null))continue _0x219f68;}if(_0x4aea72[_0x59627b(0x204)]&&!_0x3abc11[_0x59627b(0x1f9)](_0x4aea72[_0x59627b(0x204)]))continue _0x219f68;_0x3abc11!=='/'?(_0x22d9db['summary']=(_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1d7)][_0x59627b(0x1f7)])||(/^\//[_0x59627b(0x1e4)](_0x3abc11)?_0x3abc11[_0x59627b(0x1c6)]('/')[0x1]:_0x3abc11),_0x22d9db[_0x59627b(0x1db)]=(_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1d7)]['description'])||_0x22d9db[_0x59627b(0x1e2)],_0x22d9db[_0x59627b(0x1ad)]=[]):(_0x22d9db[_0x59627b(0x1e2)]=(_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1d7)]['tagName'])||'default',_0x22d9db['description']=(_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1d7)]['description'])||'',_0x22d9db[_0x59627b(0x1ad)]=[]);_0x4aea72['filepath']&&(_0x22d9db[_0x59627b(0x1ee)]=_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1ee)]);(_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1f1)])&&(_0x22d9db['prefix']=_0x59cb17[_0x59627b(0x1f1)]);(_0x59cb17===null||_0x59cb17===void 0x0?void 0x0:_0x59cb17[_0x59627b(0x1cb)])&&(_0x22d9db[_0x59627b(0x1cb)]=_0x59cb17['module']);let _0x4d4683=(0x0,decorator_3['getClassMetadata'])(decorator_2[_0x59627b(0x1c5)],_0x17c4a2)||{};if(typeof _0x1de09f[Symbol[_0x59627b(0x1c1)]]===_0x59627b(0x1ce))for(let _0x153967 of _0x1de09f){let _0x240698={};_0x240698[_0x59627b(0x1d6)]=_0x153967[_0x59627b(0x1e0)],_0x240698['route']=(_0x3abc11+_0x153967['path'])[_0x59627b(0x1c3)](/\/{1,}/,'/'),_0x240698[_0x59627b(0x1e2)]=(_0x153967===null||_0x153967===void 0x0?void 0x0:_0x153967[_0x59627b(0x1b0)])||_0x22d9db['summary']||_0x59627b(0x1aa),_0x240698[_0x59627b(0x1db)]=(_0x153967===null||_0x153967===void 0x0?void 0x0:_0x153967['description'])||'',_0x240698['request']=[];if(!(0x0,lodash_1[_0x59627b(0x1f9)])(_0x240698['route'],_0x59627b(0x1b8))&&!(0x0,lodash_1[_0x59627b(0x1f9)])(_0x240698[_0x59627b(0x1b5)],_0x59627b(0x1e8))&&_0x1b8f7f['indexOf'](_0x240698[_0x59627b(0x1b5)])===-0x1){if(!(_0x4aea72===null||_0x4aea72===void 0x0?void 0x0:_0x4aea72['noreq'])){let _0x16c82a=(0x0,decorator_3[_0x59627b(0x1eb)])(new _0x17c4a2(),_0x153967[_0x59627b(0x1d6)]);for(const _0x2cc36e in _0x16c82a){let _0xdb97f=(_0x45a9b6=_0x4d4683[_0x153967[_0x59627b(0x1d6)]])===null||_0x45a9b6===void 0x0?void 0x0:_0x45a9b6[_0x59627b(0x1d0)](_0x346a6d=>_0x346a6d['parameterIndex']==_0x2cc36e&&_0x346a6d['key']===decorator_2['WEB_ROUTER_PARAM_KEY']&&(_0x346a6d===null||_0x346a6d===void 0x0?void 0x0:_0x346a6d[_0x59627b(0x1fc)]));if(_0xdb97f===null||_0xdb97f===void 0x0?void 0x0:_0xdb97f[_0x59627b(0x1fc)]){let _0x1e4b03=convertTypeToString(_0xdb97f[_0x59627b(0x1fc)][_0x59627b(0x1c7)]||0x0);if([_0x59627b(0x1f0),'body'][_0x59627b(0x1ab)](_0x1e4b03)!=-0x1&&_0xdb97f[_0x59627b(0x1fc)]['propertyData']['indexOf'](':')==-0x1&&!_0x240698['request']['find'](_0x3253f8=>_0x3253f8[_0x59627b(0x1ed)]==_0xdb97f[_0x59627b(0x1fc)]['propertyData']))_0x240698[_0x59627b(0x1ef)]['push']({'key':_0xdb97f[_0x59627b(0x1fc)][_0x59627b(0x1b7)],'title':_0xdb97f[_0x59627b(0x1fc)][_0x59627b(0x1b7)],'type':convertSchemaType(_0x16c82a[_0xdb97f['parameterIndex']]['name']),'required':![],'default':'','desc':''});else{if(_0x1e4b03=='file'){let _0xe1681b=((_0x34b308=_0xdb97f===null||_0xdb97f===void 0x0?void 0x0:_0xdb97f[_0x59627b(0x1fc)])===null||_0x34b308===void 0x0?void 0x0:_0x34b308[_0x59627b(0x1b7)])||'file';_0xe1681b[_0x59627b(0x1ab)](':')==-0x1&&!_0x240698['request'][_0x59627b(0x1d0)](_0xd9cb33=>_0xd9cb33[_0x59627b(0x1ed)]==_0xe1681b&&_0xd9cb33[_0x59627b(0x1c7)]==_0x59627b(0x1c2))&&_0x240698[_0x59627b(0x1ef)]['push']({'key':_0xe1681b,'title':'文件上传-'+_0xe1681b,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x5f3ad0=(0x0,decorator_3['getClassExtendedMetadata'])(validator_1[_0x59627b(0x1ff)],_0x16c82a[_0x2cc36e]);_0x5f3ad0&&_0x240698[_0x59627b(0x1ef)]['push'](...getJoiRequest(_0x5f3ad0));}}}_0x22d9db[_0x59627b(0x1ad)]['push'](_0x240698);}}if(_0x22d9db[_0x59627b(0x1ad)][_0x59627b(0x203)]>0x0){let _0x4e11fb=_0x57d9bd[_0x3abc11];_0x4e11fb?(_0x4e11fb[_0x59627b(0x1e2)]!=_0x22d9db['summary']&&(_0x4e11fb['summary']=_0x4e11fb['summary']+','+_0x22d9db[_0x59627b(0x1e2)]),_0x4e11fb[_0x59627b(0x1db)]!=_0x22d9db[_0x59627b(0x1db)]&&(_0x4e11fb[_0x59627b(0x1db)]=_0x4e11fb[_0x59627b(0x1db)]+','+_0x22d9db[_0x59627b(0x1db)]),_0x4e11fb[_0x59627b(0x1ad)]=_0x4e11fb['routes'][_0x59627b(0x1fa)](_0x22d9db[_0x59627b(0x1ad)]),_0x57d9bd[_0x3abc11]=_0x4e11fb):_0x57d9bd[_0x3abc11]=_0x22d9db;}}}return _0x57d9bd;}exports[a8_0x4ae659(0x1dc)]=getRoutes;function getJoiRequest(_0x2fe2a6){const _0x1e03b6=a8_0x4ae659,_0x2e5e9e=[];for(let _0x189065 in _0x2fe2a6){const _0x1595da={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x3e988d=typeof _0x2fe2a6[_0x189065][_0x1e03b6(0x1cc)]==_0x1e03b6(0x1ce)?_0x2fe2a6[_0x189065][_0x1e03b6(0x1cc)]():_0x2fe2a6[_0x189065];_0x1595da[_0x1e03b6(0x1ed)]=_0x189065,_0x1595da[_0x1e03b6(0x1c7)]=_0x3e988d[_0x1e03b6(0x1c7)],_0x1595da['title']=(0x0,lodash_1[_0x1e03b6(0x1ea)])(_0x3e988d,'flags.label',_0x189065),_0x1595da[_0x1e03b6(0x1aa)]=(0x0,lodash_1[_0x1e03b6(0x1ea)])(_0x3e988d,_0x1e03b6(0x1bf),''),_0x1595da[_0x1e03b6(0x1dd)]=(0x0,lodash_1[_0x1e03b6(0x1ea)])(_0x3e988d,_0x1e03b6(0x1bc),'')=='required',_0x1595da[_0x1e03b6(0x1db)]=(0x0,lodash_1[_0x1e03b6(0x1ea)])(_0x3e988d,_0x1e03b6(0x1cf),'');if(_0x3e988d[_0x1e03b6(0x1c7)]==_0x1e03b6(0x1fb))_0x1595da['children']=getJoiRequest(_0x3e988d['keys']);else _0x3e988d[_0x1e03b6(0x1c7)]==_0x1e03b6(0x1bb)&&_0x3e988d[_0x1e03b6(0x1d9)]&&Array[_0x1e03b6(0x1d8)](_0x3e988d[_0x1e03b6(0x1d9)])&&_0x3e988d[_0x1e03b6(0x1d9)][0x0]&&console[_0x1e03b6(0x200)](_0x189065+_0x1e03b6(0x1c4),_0x3e988d);_0x3e988d['allow']&&Array['isArray'](_0x3e988d[_0x1e03b6(0x1f8)])&&_0x3e988d['allow'][_0x1e03b6(0x203)]>0x0&&(_0x1595da['description']=_0x1e03b6(0x201)+_0x3e988d[_0x1e03b6(0x1f8)][_0x1e03b6(0x205)](',')+'];'+_0x1595da['description']);if(_0x1595da[_0x1e03b6(0x1ed)]&&_0x1595da[_0x1e03b6(0x1c7)]){const _0x26c1ea={};for(const _0x7066b3 of _0x3e988d[_0x1e03b6(0x1b2)]||[]){if(_0x7066b3[_0x1e03b6(0x1d2)]==='min'&&_0x7066b3[_0x1e03b6(0x1c0)])_0x26c1ea[_0x1e03b6(0x1b9)]=_0x7066b3[_0x1e03b6(0x1c0)][_0x1e03b6(0x1da)];else _0x7066b3['name']===_0x1e03b6(0x1d5)&&(_0x26c1ea[_0x1e03b6(0x1d5)]=_0x7066b3[_0x1e03b6(0x1c0)]['limit']);}_0x1595da['rules']=_0x26c1ea;}_0x1595da[_0x1e03b6(0x1ed)]&&_0x1595da[_0x1e03b6(0x1e5)]&&_0x2e5e9e[_0x1e03b6(0x1e1)](_0x1595da);}return _0x2e5e9e;}function convertSchemaType(_0x4d4359){const _0x1f0b10=a8_0x4ae659;switch(_0x4d4359){case'Object':return _0x1f0b10(0x1fb);case'Boolean':return _0x1f0b10(0x1f2);case _0x1f0b10(0x1c8):return'number';case _0x1f0b10(0x1e3):return _0x1f0b10(0x1be);case _0x1f0b10(0x1ec):return _0x1f0b10(0x1c2);default:return _0x1f0b10(0x1be);}}function a8_0x57a1(_0x3d9fef,_0x14021a){const _0x2ec2ae=a8_0x2ec2();return a8_0x57a1=function(_0x57a132,_0x55218d){_0x57a132=_0x57a132-0x1aa;let _0x4f00c5=_0x2ec2ae[_0x57a132];return _0x4f00c5;},a8_0x57a1(_0x3d9fef,_0x14021a);}function convertTypeToString(_0x369661){const _0x1d827e=a8_0x4ae659;switch(_0x369661){case decorator_1['RouteParamTypes'][_0x1d827e(0x1de)]:return _0x1d827e(0x1c9);case decorator_1[_0x1d827e(0x1b3)][_0x1d827e(0x1ac)]:return _0x1d827e(0x1f0);case decorator_1[_0x1d827e(0x1b3)][_0x1d827e(0x1af)]:return'path';case decorator_1[_0x1d827e(0x1b3)][_0x1d827e(0x1f4)]:return _0x1d827e(0x1f6);case decorator_1['RouteParamTypes'][_0x1d827e(0x1ca)]:case decorator_1[_0x1d827e(0x1b3)][_0x1d827e(0x1df)]:case decorator_1[_0x1d827e(0x1b3)][_0x1d827e(0x1d3)]:return _0x1d827e(0x1c2);default:return _0x1d827e(0x1c9);}}
|
|
1
|
+
'use strict';const a8_0xf3b986=a8_0x12f9;function a8_0x12f9(_0x3ac628,_0x4d798c){const _0xff10f1=a8_0xff10();return a8_0x12f9=function(_0x12f965,_0x28562f){_0x12f965=_0x12f965-0x173;let _0x20e7c9=_0xff10f1[_0x12f965];return _0x20e7c9;},a8_0x12f9(_0x3ac628,_0x4d798c);}(function(_0x1388d3,_0x2e5b26){const _0xdef9ff=a8_0x12f9,_0x383f18=_0x1388d3();while(!![]){try{const _0x130d2f=parseInt(_0xdef9ff(0x18c))/0x1*(parseInt(_0xdef9ff(0x1ac))/0x2)+parseInt(_0xdef9ff(0x1bf))/0x3*(parseInt(_0xdef9ff(0x184))/0x4)+parseInt(_0xdef9ff(0x1c5))/0x5*(-parseInt(_0xdef9ff(0x1b3))/0x6)+-parseInt(_0xdef9ff(0x1b6))/0x7+-parseInt(_0xdef9ff(0x194))/0x8*(parseInt(_0xdef9ff(0x1bd))/0x9)+parseInt(_0xdef9ff(0x1b8))/0xa*(-parseInt(_0xdef9ff(0x190))/0xb)+parseInt(_0xdef9ff(0x1cf))/0xc;if(_0x130d2f===_0x2e5b26)break;else _0x383f18['push'](_0x383f18['shift']());}catch(_0x36f731){_0x383f18['push'](_0x383f18['shift']());}}}(a8_0xff10,0x59ec1));Object['defineProperty'](exports,a8_0xf3b986(0x1d3),{'value':!![]}),exports[a8_0xf3b986(0x176)]=void 0x0;const lodash_1=require(a8_0xf3b986(0x1ab)),validator_1=require('@anncic-api/validator'),decorator_1=require(a8_0xf3b986(0x19e)),decorator_2=require(a8_0xf3b986(0x19e)),decorator_3=require(a8_0xf3b986(0x19e)),action_1=require('../types/action');function getRoutes(_0x2ded97={'prefix':'/','module':![]}){const _0x8bfa95=a8_0xf3b986;var _0x541775,_0x4eb886;const _0x4b6d33=(0x0,decorator_3[_0x8bfa95(0x175)])(action_1['ACTION_KEY']),_0x20c255={},_0x1bee3a=Array[_0x8bfa95(0x18f)](_0x2ded97['filter']||[])?_0x2ded97[_0x8bfa95(0x182)]||[]:[_0x2ded97['filter']];_0x38fcfb:for(const _0x58e466 of _0x4b6d33){let _0x1a78e7=(0x0,decorator_3[_0x8bfa95(0x1c1)])(action_1[_0x8bfa95(0x1cc)],_0x58e466),_0x287ef8=(0x0,decorator_3['getClassMetadata'])(action_1[_0x8bfa95(0x19d)],_0x58e466);if(_0x1a78e7&&_0x287ef8){let _0x4a3103=_0x1a78e7['prefix'],_0x28c74c={};if(_0x2ded97[_0x8bfa95(0x192)]&&(0x0,lodash_1[_0x8bfa95(0x196)])(_0x1a78e7,'module',![])!=_0x2ded97[_0x8bfa95(0x192)])continue _0x38fcfb;else{if(_0x2ded97[_0x8bfa95(0x192)]===![]&&!!(0x0,lodash_1[_0x8bfa95(0x196)])(_0x1a78e7,'module',null))continue _0x38fcfb;}if(_0x2ded97['prefix']&&!_0x4a3103[_0x8bfa95(0x19c)](_0x2ded97[_0x8bfa95(0x1aa)]))continue _0x38fcfb;_0x4a3103!=='/'?(_0x28c74c[_0x8bfa95(0x187)]=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)][_0x8bfa95(0x1af)])||(/^\//[_0x8bfa95(0x1cb)](_0x4a3103)?_0x4a3103[_0x8bfa95(0x1b7)]('/')[0x1]:_0x4a3103),_0x28c74c['description']=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)][_0x8bfa95(0x1a6)])||_0x28c74c[_0x8bfa95(0x187)],_0x28c74c[_0x8bfa95(0x1a8)]=[]):(_0x28c74c['summary']=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7['routerOptions'][_0x8bfa95(0x1af)])||_0x8bfa95(0x1bb),_0x28c74c[_0x8bfa95(0x1a6)]=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)]['description'])||'',_0x28c74c['routes']=[]);_0x2ded97[_0x8bfa95(0x1cd)]&&(_0x28c74c['filepath']=_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x1cd)]);(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7['pprefix'])&&(_0x28c74c[_0x8bfa95(0x1aa)]=_0x1a78e7[_0x8bfa95(0x188)]);(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x192)])&&(_0x28c74c[_0x8bfa95(0x192)]=_0x1a78e7['module']);let _0x5685b4=(0x0,decorator_3[_0x8bfa95(0x1c1)])(decorator_2['INJECT_CUSTOM_PARAM'],_0x58e466)||{};if(typeof _0x287ef8[Symbol[_0x8bfa95(0x197)]]===_0x8bfa95(0x1ba))for(let _0x2f3c8f of _0x287ef8){let _0x14fba4={};_0x14fba4[_0x8bfa95(0x1a2)]=_0x2f3c8f['requestMethod'],_0x14fba4['route']=(_0x4a3103+_0x2f3c8f['path'])[_0x8bfa95(0x18a)](/\/{1,}/,'/'),_0x14fba4[_0x8bfa95(0x187)]=(_0x2f3c8f===null||_0x2f3c8f===void 0x0?void 0x0:_0x2f3c8f[_0x8bfa95(0x1b4)])||_0x28c74c[_0x8bfa95(0x187)]||_0x8bfa95(0x1bb),_0x14fba4[_0x8bfa95(0x1a6)]=(_0x2f3c8f===null||_0x2f3c8f===void 0x0?void 0x0:_0x2f3c8f[_0x8bfa95(0x1a6)])||'',_0x14fba4['request']=[];if(!(0x0,lodash_1[_0x8bfa95(0x19c)])(_0x14fba4['route'],_0x8bfa95(0x1c6))&&!(0x0,lodash_1[_0x8bfa95(0x19c)])(_0x14fba4[_0x8bfa95(0x198)],'/static/apitest')&&_0x1bee3a[_0x8bfa95(0x1bc)](_0x14fba4[_0x8bfa95(0x198)])===-0x1){if(!(_0x2ded97===null||_0x2ded97===void 0x0?void 0x0:_0x2ded97['noreq'])){let _0x2898af=(0x0,decorator_3[_0x8bfa95(0x189)])(new _0x58e466(),_0x2f3c8f[_0x8bfa95(0x1a2)]);for(const _0x34bba5 in _0x2898af){let _0x407470=(_0x541775=_0x5685b4[_0x2f3c8f['method']])===null||_0x541775===void 0x0?void 0x0:_0x541775[_0x8bfa95(0x186)](_0x5d9914=>_0x5d9914[_0x8bfa95(0x1c3)]==_0x34bba5&&_0x5d9914['key']===decorator_2[_0x8bfa95(0x183)]&&(_0x5d9914===null||_0x5d9914===void 0x0?void 0x0:_0x5d9914[_0x8bfa95(0x18e)]));if(_0x407470===null||_0x407470===void 0x0?void 0x0:_0x407470[_0x8bfa95(0x18e)]){let _0x4c3ab4=convertTypeToString(_0x407470[_0x8bfa95(0x18e)]['type']||0x0);if([_0x8bfa95(0x177),_0x8bfa95(0x1c0)][_0x8bfa95(0x1bc)](_0x4c3ab4)!=-0x1&&_0x407470['metadata'][_0x8bfa95(0x17d)][_0x8bfa95(0x1bc)](':')==-0x1&&!_0x14fba4[_0x8bfa95(0x1ce)][_0x8bfa95(0x186)](_0x31d5fb=>_0x31d5fb[_0x8bfa95(0x181)]==_0x407470[_0x8bfa95(0x18e)][_0x8bfa95(0x17d)]))_0x14fba4['request']['push']({'key':_0x407470['metadata']['propertyData'],'title':_0x407470[_0x8bfa95(0x18e)][_0x8bfa95(0x17d)],'type':convertSchemaType(_0x2898af[_0x407470[_0x8bfa95(0x1c3)]][_0x8bfa95(0x17e)]),'required':![],'default':'','desc':''});else{if(_0x4c3ab4==_0x8bfa95(0x17c)){let _0xa2bcce=((_0x4eb886=_0x407470===null||_0x407470===void 0x0?void 0x0:_0x407470[_0x8bfa95(0x18e)])===null||_0x4eb886===void 0x0?void 0x0:_0x4eb886[_0x8bfa95(0x17d)])||_0x8bfa95(0x17c);_0xa2bcce[_0x8bfa95(0x1bc)](':')==-0x1&&!_0x14fba4['request'][_0x8bfa95(0x186)](_0x4616c9=>_0x4616c9[_0x8bfa95(0x181)]==_0xa2bcce&&_0x4616c9['type']==_0x8bfa95(0x17c))&&_0x14fba4[_0x8bfa95(0x1ce)]['push']({'key':_0xa2bcce,'title':_0x8bfa95(0x18b)+_0xa2bcce,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x39eb79=(0x0,decorator_3[_0x8bfa95(0x1a4)])(validator_1[_0x8bfa95(0x1a7)],_0x2898af[_0x34bba5]);_0x39eb79&&_0x14fba4['request'][_0x8bfa95(0x18d)](...getJoiRequest(_0x39eb79));}}}_0x28c74c[_0x8bfa95(0x1a8)]['push'](_0x14fba4);}}if(_0x28c74c[_0x8bfa95(0x1a8)][_0x8bfa95(0x19b)]>0x0){let _0x32b31f=_0x20c255[_0x4a3103];_0x32b31f?(_0x32b31f[_0x8bfa95(0x187)]!=_0x28c74c[_0x8bfa95(0x187)]&&(_0x32b31f[_0x8bfa95(0x187)]=_0x32b31f[_0x8bfa95(0x187)]+','+_0x28c74c[_0x8bfa95(0x187)]),_0x32b31f[_0x8bfa95(0x1a6)]!=_0x28c74c['description']&&(_0x32b31f['description']=_0x32b31f[_0x8bfa95(0x1a6)]+','+_0x28c74c['description']),_0x32b31f[_0x8bfa95(0x1a8)]=_0x32b31f[_0x8bfa95(0x1a8)][_0x8bfa95(0x1d2)](_0x28c74c['routes']),_0x20c255[_0x4a3103]=_0x32b31f):_0x20c255[_0x4a3103]=_0x28c74c;}}}return _0x20c255;}function a8_0xff10(){const _0x4394cf=['flags.description','file','propertyData','name','header','min','key','filter','WEB_ROUTER_PARAM_KEY','1684xWAwNm','QUERY','find','summary','pprefix','getMethodParamTypes','replace','文件上传-','79wJVTpp','push','metadata','isArray','11YnWaVT','Boolean','module','string','54096eGYxyr','Object','get','iterator','route','rules','log','length','startsWith','ACTION_ROUTE_KEY','@midwayjs/decorator','RouteParamTypes','required','allow','method','FIELDS','getClassExtendedMetadata','boolean','description','RULES_KEY','routes','HEADERS','prefix','lodash','10178DNOlQH','limit','Number','tagName','join','FILESTREAM','File','60zuFBBI','routerName','title','2637271yKGWzC','split','4377210GUjCNi','flags.default','function','default','indexOf','189DryTVg','object','1257RPfkly','body','getClassMetadata','args','parameterIndex','path','216305AoMYIt','static/apitest','keys','describe','type','FILESSTREAM','test','ACTION_KEY','filepath','request','14147724umaAnv','BODY','-array','concat','__esModule','routerOptions','max','listModule','getRoutes','query','只允许:[','flags.presence','items'];a8_0xff10=function(){return _0x4394cf;};return a8_0xff10();}exports[a8_0xf3b986(0x176)]=getRoutes;function getJoiRequest(_0x215576){const _0x38aca9=a8_0xf3b986,_0x47d43e=[];for(let _0x2cd126 in _0x215576){const _0x498f0c={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x5bb99a=typeof _0x215576[_0x2cd126][_0x38aca9(0x1c8)]=='function'?_0x215576[_0x2cd126][_0x38aca9(0x1c8)]():_0x215576[_0x2cd126];_0x498f0c[_0x38aca9(0x181)]=_0x2cd126,_0x498f0c['type']=_0x5bb99a['type'],_0x498f0c['title']=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,'flags.label',_0x2cd126),_0x498f0c[_0x38aca9(0x1bb)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x1b9),''),_0x498f0c[_0x38aca9(0x1a0)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x179),'')==_0x38aca9(0x1a0),_0x498f0c[_0x38aca9(0x1a6)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x17b),'');if(_0x5bb99a[_0x38aca9(0x1c9)]=='object')_0x498f0c['children']=getJoiRequest(_0x5bb99a[_0x38aca9(0x1c7)]);else _0x5bb99a['type']=='array'&&_0x5bb99a['items']&&Array[_0x38aca9(0x18f)](_0x5bb99a[_0x38aca9(0x17a)])&&_0x5bb99a[_0x38aca9(0x17a)][0x0]&&console[_0x38aca9(0x19a)](_0x2cd126+_0x38aca9(0x1d1),_0x5bb99a);_0x5bb99a['allow']&&Array[_0x38aca9(0x18f)](_0x5bb99a[_0x38aca9(0x1a1)])&&_0x5bb99a[_0x38aca9(0x1a1)][_0x38aca9(0x19b)]>0x0&&(_0x498f0c[_0x38aca9(0x1a6)]=_0x38aca9(0x178)+_0x5bb99a[_0x38aca9(0x1a1)][_0x38aca9(0x1b0)](',')+'];'+_0x498f0c[_0x38aca9(0x1a6)]);if(_0x498f0c[_0x38aca9(0x181)]&&_0x498f0c[_0x38aca9(0x1c9)]){const _0x5d57be={};for(const _0x29498f of _0x5bb99a[_0x38aca9(0x199)]||[]){if(_0x29498f['name']===_0x38aca9(0x180)&&_0x29498f[_0x38aca9(0x1c2)])_0x5d57be['min']=_0x29498f[_0x38aca9(0x1c2)][_0x38aca9(0x1ad)];else _0x29498f[_0x38aca9(0x17e)]===_0x38aca9(0x174)&&(_0x5d57be[_0x38aca9(0x174)]=_0x29498f[_0x38aca9(0x1c2)][_0x38aca9(0x1ad)]);}_0x498f0c['rules']=_0x5d57be;}_0x498f0c['key']&&_0x498f0c[_0x38aca9(0x1b5)]&&_0x47d43e[_0x38aca9(0x18d)](_0x498f0c);}return _0x47d43e;}function convertSchemaType(_0x5d78a7){const _0x3c0c7d=a8_0xf3b986;switch(_0x5d78a7){case _0x3c0c7d(0x195):return _0x3c0c7d(0x1be);case _0x3c0c7d(0x191):return _0x3c0c7d(0x1a5);case _0x3c0c7d(0x1ae):return'number';case'String':return _0x3c0c7d(0x193);case _0x3c0c7d(0x1b2):return'file';default:return _0x3c0c7d(0x193);}}function convertTypeToString(_0x5c7506){const _0x3f363a=a8_0xf3b986;switch(_0x5c7506){case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1a9)]:return _0x3f363a(0x17f);case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x185)]:return _0x3f363a(0x177);case decorator_1['RouteParamTypes']['PARAM']:return _0x3f363a(0x1c4);case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1d0)]:return'body';case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1a3)]:case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1ca)]:case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1b1)]:return _0x3f363a(0x17c);default:return'header';}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a9_0xfd43cd=a9_0x1837;(function(_0x23d97f,_0xfc97d2){var _0x44ef8b=a9_0x1837,_0x4cfe52=_0x23d97f();while(!![]){try{var _0x4ab847=-parseInt(_0x44ef8b(0x1a4))/0x1*(parseInt(_0x44ef8b(0x1d8))/0x2)+-parseInt(_0x44ef8b(0x1d1))/0x3+-parseInt(_0x44ef8b(0x1d6))/0x4+parseInt(_0x44ef8b(0x1c3))/0x5*(parseInt(_0x44ef8b(0x1cc))/0x6)+parseInt(_0x44ef8b(0x1aa))/0x7+-parseInt(_0x44ef8b(0x1b0))/0x8+parseInt(_0x44ef8b(0x1d9))/0x9*(parseInt(_0x44ef8b(0x1c8))/0xa);if(_0x4ab847===_0xfc97d2)break;else _0x4cfe52['push'](_0x4cfe52['shift']());}catch(_0x5ae71b){_0x4cfe52['push'](_0x4cfe52['shift']());}}}(a9_0x5866,0xae2bc));function a9_0x1837(_0x6a8f80,_0x1c257a){var _0x586693=a9_0x5866();return a9_0x1837=function(_0x1837b4,_0x568e1c){_0x1837b4=_0x1837b4-0x1a2;var _0x490599=_0x586693[_0x1837b4];return _0x490599;},a9_0x1837(_0x6a8f80,_0x1c257a);}var __createBinding=this&&this[a9_0xfd43cd(0x1b4)]||(Object[a9_0xfd43cd(0x1ce)]?function(_0x45740d,_0x34850a,_0x4e3e57,_0x294640){var _0x4fa853=a9_0xfd43cd;if(_0x294640===undefined)_0x294640=_0x4e3e57;var _0x19f08a=Object[_0x4fa853(0x1b5)](_0x34850a,_0x4e3e57);(!_0x19f08a||('get'in _0x19f08a?!_0x34850a['__esModule']:_0x19f08a[_0x4fa853(0x1c6)]||_0x19f08a[_0x4fa853(0x1b3)]))&&(_0x19f08a={'enumerable':!![],'get':function(){return _0x34850a[_0x4e3e57];}}),Object[_0x4fa853(0x1a5)](_0x45740d,_0x294640,_0x19f08a);}:function(_0xbcae38,_0x1baaba,_0x2cc7af,_0x5ded20){if(_0x5ded20===undefined)_0x5ded20=_0x2cc7af;_0xbcae38[_0x5ded20]=_0x1baaba[_0x2cc7af];}),__exportStar=this&&this['__exportStar']||function(_0xa33689,_0x43fa11){var _0x491613=a9_0xfd43cd;for(var _0x5b68c8 in _0xa33689)if(_0x5b68c8!==_0x491613(0x1bf)&&!Object[_0x491613(0x1b8)]['hasOwnProperty'][_0x491613(0x1b7)](_0x43fa11,_0x5b68c8))__createBinding(_0x43fa11,_0xa33689,_0x5b68c8);};Object['defineProperty'](exports,a9_0xfd43cd(0x1cb),{'value':!![]}),exports['ScopeEnum']=exports[a9_0xfd43cd(0x1c2)]=exports[a9_0xfd43cd(0x1c4)]=exports['Provide']=exports[a9_0xfd43cd(0x1ae)]=exports[a9_0xfd43cd(0x1c9)]=exports['App']=exports['Init']=exports['Headers']=exports[a9_0xfd43cd(0x1c5)]=exports['Param']=exports[a9_0xfd43cd(0x1b1)]=exports[a9_0xfd43cd(0x1b2)]=exports['Files']=exports[a9_0xfd43cd(0x1d2)]=exports['Configuration']=exports[a9_0xfd43cd(0x1a6)]=exports[a9_0xfd43cd(0x1cd)]=exports[a9_0xfd43cd(0x1a7)]=exports[a9_0xfd43cd(0x1dd)]=exports[a9_0xfd43cd(0x1a3)]=exports['CacheService']=exports[a9_0xfd43cd(0x1db)]=exports['ApiError']=exports['Apitest']=exports['Action']=exports[a9_0xfd43cd(0x1a2)]=exports['getRoutes']=void 0x0,__exportStar(require(a9_0xfd43cd(0x1bc)),exports),__exportStar(require(a9_0xfd43cd(0x1b9)),exports);var getRoutes_1=require('./helper/getRoutes');Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1b6),{'enumerable':!![],'get':function(){var _0x5dc52e=a9_0xfd43cd;return getRoutes_1[_0x5dc52e(0x1b6)];}});var ActionApi_1=require(a9_0xfd43cd(0x1c1));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1a2),{'enumerable':!![],'get':function(){return ActionApi_1['Api'];}});var Action_1=require(a9_0xfd43cd(0x1d7));Object['defineProperty'](exports,a9_0xfd43cd(0x1bb),{'enumerable':!![],'get':function(){var _0x506d3f=a9_0xfd43cd;return Action_1[_0x506d3f(0x1bb)];}});var ActionApitest_1=require(a9_0xfd43cd(0x1be));Object[a9_0xfd43cd(0x1a5)](exports,'Apitest',{'enumerable':!![],'get':function(){return ActionApitest_1['Apitest'];}});var ApiError_1=require(a9_0xfd43cd(0x1af));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c7),{'enumerable':!![],'get':function(){var _0x3026de=a9_0xfd43cd;return ApiError_1[_0x3026de(0x1c7)];}});var task_1=require('@midwayjs/task');Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1db),{'enumerable':!![],'get':function(){return task_1['QueueService'];}});var cache_1=require(a9_0xfd43cd(0x1a8));Object['defineProperty'](exports,a9_0xfd43cd(0x1ac),{'enumerable':!![],'get':function(){return cache_1['CacheService'];}});var event_1=require(a9_0xfd43cd(0x1da));Object[a9_0xfd43cd(0x1a5)](exports,'EventService',{'enumerable':!![],'get':function(){var _0x556dc1=a9_0xfd43cd;return event_1[_0x556dc1(0x1a3)];}});var ApiService_1=require(a9_0xfd43cd(0x1d5));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1dd),{'enumerable':!![],'get':function(){return ApiService_1['ApiService'];}});var ExcelService_1=require(a9_0xfd43cd(0x1ab));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1a7),{'enumerable':!![],'get':function(){var _0x4f9522=a9_0xfd43cd;return ExcelService_1[_0x4f9522(0x1a7)];}});var validator_1=require('@anncic-api/validator');Object[a9_0xfd43cd(0x1a5)](exports,'ValidatorError',{'enumerable':!![],'get':function(){return validator_1['ValidatorError'];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1a6),{'enumerable':!![],'get':function(){return validator_1['ValidatorService'];}});var configuration_1=require(a9_0xfd43cd(0x1ba));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1ca),{'enumerable':!![],'get':function(){var _0x2bec80=a9_0xfd43cd;return configuration_1[_0x2bec80(0x1bd)];}});function a9_0x5866(){var _0x3f3c8b=['ValidatorError','create','Param','Provide','2291976FxHRXH','File','Files','Headers','./service/ApiService','1310676QxyRSY','./decorator/Action','32EShRAb','531eYETnJ','@anncic-api/event','QueueService','@midwayjs/decorator','ApiService','Api','EventService','68217siEDMK','defineProperty','ValidatorService','ExcelService','@anncic-api/cache','Init','9730119hHsBpH','./service/ExcelService','CacheService','App','Logger','./exception/ApiError','150712RZyrSc','Body','Fields','configurable','__createBinding','getOwnPropertyDescriptor','getRoutes','call','prototype','./service/ApitestService','./configuration','Action','./types/common','CustomConfiguration','./decorator/ActionApitest','default','ScopeEnum','./decorator/ActionApi','Scope','770285UeznTP','Inject','Query','writable','ApiError','154090hGdfDM','Config','Configuration','__esModule','24rPfHan'];a9_0x5866=function(){return _0x3f3c8b;};return a9_0x5866();}var decorator_1=require(a9_0xfd43cd(0x1dc));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1d2),{'enumerable':!![],'get':function(){var _0x36f97e=a9_0xfd43cd;return decorator_1[_0x36f97e(0x1d2)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1d3),{'enumerable':!![],'get':function(){return decorator_1['Files'];}}),Object[a9_0xfd43cd(0x1a5)](exports,'Fields',{'enumerable':!![],'get':function(){var _0xaa3df5=a9_0xfd43cd;return decorator_1[_0xaa3df5(0x1b2)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1b1),{'enumerable':!![],'get':function(){var _0x174267=a9_0xfd43cd;return decorator_1[_0x174267(0x1b1)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1cf),{'enumerable':!![],'get':function(){var _0xe8cea3=a9_0xfd43cd;return decorator_1[_0xe8cea3(0x1cf)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1c5),{'enumerable':!![],'get':function(){var _0xe0a7ce=a9_0xfd43cd;return decorator_1[_0xe0a7ce(0x1c5)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1d4),{'enumerable':!![],'get':function(){return decorator_1['Headers'];}}),Object[a9_0xfd43cd(0x1a5)](exports,'Init',{'enumerable':!![],'get':function(){var _0x2dba2d=a9_0xfd43cd;return decorator_1[_0x2dba2d(0x1a9)];}});var decorator_2=require(a9_0xfd43cd(0x1dc));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1ad),{'enumerable':!![],'get':function(){var _0x231ff3=a9_0xfd43cd;return decorator_2[_0x231ff3(0x1ad)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c9),{'enumerable':!![],'get':function(){var _0x4a2b1c=a9_0xfd43cd;return decorator_2[_0x4a2b1c(0x1c9)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1ae),{'enumerable':!![],'get':function(){var _0x30641b=a9_0xfd43cd;return decorator_2[_0x30641b(0x1ae)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1d0),{'enumerable':!![],'get':function(){var _0x4c0742=a9_0xfd43cd;return decorator_2[_0x4c0742(0x1d0)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c4),{'enumerable':!![],'get':function(){var _0x327997=a9_0xfd43cd;return decorator_2[_0x327997(0x1c4)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1c2),{'enumerable':!![],'get':function(){var _0x7cc147=a9_0xfd43cd;return decorator_2[_0x7cc147(0x1c2)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c0),{'enumerable':!![],'get':function(){var _0x5c079e=a9_0xfd43cd;return decorator_2[_0x5c079e(0x1c0)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a10_0x19e652=a10_0x34eb;(function(_0x108c48,_0x45ae3a){var _0x32fdc8=a10_0x34eb,_0x6602ff=_0x108c48();while(!![]){try{var _0x2ff977=-parseInt(_0x32fdc8(0x92))/0x1*(parseInt(_0x32fdc8(0xa7))/0x2)+parseInt(_0x32fdc8(0x8d))/0x3*(-parseInt(_0x32fdc8(0x87))/0x4)+-parseInt(_0x32fdc8(0x97))/0x5+parseInt(_0x32fdc8(0xb3))/0x6+parseInt(_0x32fdc8(0x86))/0x7+parseInt(_0x32fdc8(0xb1))/0x8+parseInt(_0x32fdc8(0x91))/0x9;if(_0x2ff977===_0x45ae3a)break;else _0x6602ff['push'](_0x6602ff['shift']());}catch(_0x17eab0){_0x6602ff['push'](_0x6602ff['shift']());}}}(a10_0x2294,0x4b6df));var __decorate=this&&this[a10_0x19e652(0x8b)]||function(_0xafbfae,_0x489c84,_0x36aa33,_0x3d3477){var _0xc8c169=a10_0x19e652,_0x8d83f7=arguments[_0xc8c169(0xa0)],_0x443e5e=_0x8d83f7<0x3?_0x489c84:_0x3d3477===null?_0x3d3477=Object[_0xc8c169(0xad)](_0x489c84,_0x36aa33):_0x3d3477,_0x44762b;if(typeof Reflect===_0xc8c169(0xb8)&&typeof Reflect[_0xc8c169(0xac)]===_0xc8c169(0xa2))_0x443e5e=Reflect['decorate'](_0xafbfae,_0x489c84,_0x36aa33,_0x3d3477);else{for(var _0x17d5ed=_0xafbfae[_0xc8c169(0xa0)]-0x1;_0x17d5ed>=0x0;_0x17d5ed--)if(_0x44762b=_0xafbfae[_0x17d5ed])_0x443e5e=(_0x8d83f7<0x3?_0x44762b(_0x443e5e):_0x8d83f7>0x3?_0x44762b(_0x489c84,_0x36aa33,_0x443e5e):_0x44762b(_0x489c84,_0x36aa33))||_0x443e5e;}return _0x8d83f7>0x3&&_0x443e5e&&Object[_0xc8c169(0x9a)](_0x489c84,_0x36aa33,_0x443e5e),_0x443e5e;},__metadata=this&&this[a10_0x19e652(0x99)]||function(_0xc5b331,_0x4f1a51){var _0x39e8fc=a10_0x19e652;if(typeof Reflect===_0x39e8fc(0xb8)&&typeof Reflect[_0x39e8fc(0x9d)]===_0x39e8fc(0xa2))return Reflect['metadata'](_0xc5b331,_0x4f1a51);};Object[a10_0x19e652(0x9a)](exports,a10_0x19e652(0xb5),{'value':!![]}),exports[a10_0x19e652(0x90)]=void 0x0;function a10_0x34eb(_0x47e7fb,_0x41f2fb){var _0x22945c=a10_0x2294();return a10_0x34eb=function(_0x34eb53,_0x5d1ed8){_0x34eb53=_0x34eb53-0x82;var _0x268168=_0x22945c[_0x34eb53];return _0x268168;},a10_0x34eb(_0x47e7fb,_0x41f2fb);}const crypto_js_1=require(a10_0x19e652(0xaa)),decorator_1=require('@midwayjs/decorator'),ApiError_1=require(a10_0x19e652(0xb4));function a10_0x2294(){var _0x5ebee1=['push','password','object','Scope','entries','TIMEOUT','Singleton','sort','Provide','timeout','728539XCglJs','574532QXFFuF','config','signature','getcheck','__decorate','缺少头信息:signature','12nBwrkJ','map','ApiError','ApiService','11331558kzjUMc','3VPHmXp','toString','HEADERS_DEVICE','HEADERS_SIGNATURE','now','2262740rlyqYa','checksign','__metadata','defineProperty','HEADERS_LACK','getsign','metadata','checkcode','Config','length','devices','function','toLowerCase','token','join','design:type','106662kOKDuL','logintime','prototype','crypto-js','MD5','decorate','getOwnPropertyDescriptor','fromEntries','device','缺少头信息:','796376PtSoqP','undefined','200076oVYMfG','../exception/ApiError','__esModule'];a10_0x2294=function(){return _0x5ebee1;};return a10_0x2294();}let ApiService=class ApiService{[a10_0x19e652(0xb7)](_0x19393f){var _0x3b94ee=a10_0x19e652,_0x48d247;return _0x19393f?(0x0,crypto_js_1[_0x3b94ee(0xab)])(_0x19393f+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1[_0x3b94ee(0xab)])(_0x19393f)[_0x3b94ee(0x93)]()+((_0x48d247=this[_0x3b94ee(0x88)])===null||_0x48d247===void 0x0?void 0x0:_0x48d247[_0x3b94ee(0xb7)]))[_0x3b94ee(0x93)]())[_0x3b94ee(0x93)]():'';}[a10_0x19e652(0x8a)](_0x3fcd2c,_0x339493,_0x561669=Date[a10_0x19e652(0x96)]()){var _0x2d49e8=a10_0x19e652;return{'Token':_0x3fcd2c,'Logintime':_0x561669,'Checkcode':this[_0x2d49e8(0x9e)](_0x3fcd2c,_0x339493,_0x561669)};}[a10_0x19e652(0x9c)](_0x38c5e6={}){var _0x447e0b=a10_0x19e652;const _0x3c942f=[],_0x2042e1=Object[_0x447e0b(0xae)](Object[_0x447e0b(0xba)](_0x38c5e6)['map'](_0x1be6c0=>[_0x1be6c0[0x0]['toLowerCase'](),_0x1be6c0[0x1]]));for(let _0x4f3b3b of[_0x447e0b(0xaf),'requesttime',_0x447e0b(0xa4),_0x447e0b(0xa8),_0x447e0b(0x9e)]){if(typeof _0x2042e1[_0x4f3b3b]==_0x447e0b(0xb2))throw new AnnError(ApiError_1[_0x447e0b(0x8f)][_0x447e0b(0x9b)],{'message':_0x447e0b(0xb0)+_0x4f3b3b});_0x3c942f[_0x447e0b(0xb6)](_0x4f3b3b+'='+_0x2042e1[_0x4f3b3b]);}if(Math['abs'](_0x2042e1['requesttime'])-Date['now']()>this[_0x447e0b(0x88)][_0x447e0b(0x85)])throw new AnnError(ApiError_1[_0x447e0b(0x8f)][_0x447e0b(0xbb)]);if(!this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]]||!this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]]['secret']||!this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]][_0x447e0b(0x9e)])throw new AnnError(ApiError_1[_0x447e0b(0x8f)][_0x447e0b(0x94)]);if(_0x2042e1[_0x447e0b(0xa4)]&&_0x2042e1[_0x447e0b(0x9e)]!=this[_0x447e0b(0x9e)](_0x2042e1[_0x447e0b(0xa4)],_0x2042e1[_0x447e0b(0xaf)],_0x2042e1[_0x447e0b(0xa8)]))throw new AnnError(ApiError_1[_0x447e0b(0x8f)]['HEADERS_CHECKCODE']);return _0x3c942f['push']('secret='+this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]]['secret']),(0x0,crypto_js_1[_0x447e0b(0xab)])(_0x3c942f[_0x447e0b(0x83)]()[_0x447e0b(0xa5)](''))[_0x447e0b(0x93)]();}[a10_0x19e652(0x9e)](_0x12d222,_0x315d1c,_0x4f685f=Date[a10_0x19e652(0x96)]()){var _0xddfbb2=a10_0x19e652,_0x3e055e,_0x398cff,_0xc7c875;if(!((_0x3e055e=this[_0xddfbb2(0x88)])===null||_0x3e055e===void 0x0?void 0x0:_0x3e055e[_0xddfbb2(0xa1)][_0x315d1c])||!((_0xc7c875=(_0x398cff=this[_0xddfbb2(0x88)])===null||_0x398cff===void 0x0?void 0x0:_0x398cff[_0xddfbb2(0xa1)][_0x315d1c])===null||_0xc7c875===void 0x0?void 0x0:_0xc7c875[_0xddfbb2(0x9e)]))throw new AnnError(ApiError_1[_0xddfbb2(0x8f)][_0xddfbb2(0x94)]);return(0x0,crypto_js_1[_0xddfbb2(0xab)])(_0x12d222+(0x0,crypto_js_1[_0xddfbb2(0xab)])(_0x4f685f+this[_0xddfbb2(0x88)][_0xddfbb2(0xa1)][_0x315d1c][_0xddfbb2(0x9e)])['toString']())['toString']();}[a10_0x19e652(0x98)](_0x4e3203={}){var _0x59dd9b=a10_0x19e652;const _0x36634a=Object['fromEntries'](Object['entries'](_0x4e3203)[_0x59dd9b(0x8e)](_0x4d41e1=>[_0x4d41e1[0x0][_0x59dd9b(0xa3)](),_0x4d41e1[0x1]]));if(!(_0x36634a===null||_0x36634a===void 0x0?void 0x0:_0x36634a[_0x59dd9b(0x89)]))throw new AnnError(ApiError_1['ApiError'][_0x59dd9b(0x9b)],{'message':_0x59dd9b(0x8c)});if((_0x36634a===null||_0x36634a===void 0x0?void 0x0:_0x36634a[_0x59dd9b(0x89)])!=this[_0x59dd9b(0x9c)](_0x36634a))throw new AnnError(ApiError_1[_0x59dd9b(0x8f)][_0x59dd9b(0x95)]);return!![];}};__decorate([(0x0,decorator_1[a10_0x19e652(0x9f)])('anncicapi'),__metadata(a10_0x19e652(0xa6),Object)],ApiService[a10_0x19e652(0xa9)],a10_0x19e652(0x88),void 0x0),ApiService=__decorate([(0x0,decorator_1[a10_0x19e652(0x84)])(),(0x0,decorator_1[a10_0x19e652(0xb9)])(decorator_1['ScopeEnum'][a10_0x19e652(0x82)])],ApiService),exports['ApiService']=ApiService;
|
|
@@ -9,8 +9,10 @@ export declare class ApitestStaticController {
|
|
|
9
9
|
protected ctx: Context;
|
|
10
10
|
protected Environment: MidwayEnvironmentService;
|
|
11
11
|
protected ApitestService: ApitestService;
|
|
12
|
-
protected apitest:
|
|
13
|
-
protected config:
|
|
12
|
+
protected apitest: boolean;
|
|
13
|
+
protected config: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
14
16
|
apitesthtml(): Promise<string>;
|
|
15
17
|
apitestmodule(module: string): Promise<string>;
|
|
16
18
|
apiteststatic(): Promise<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a11_0x42dc7b=a11_0x5341;function a11_0x5341(_0x5e35f8,_0x213a0d){const _0x5ce237=a11_0x5ce2();return a11_0x5341=function(_0x5341d1,_0x94c58c){_0x5341d1=_0x5341d1-0x142;let _0x3691f2=_0x5ce237[_0x5341d1];return _0x3691f2;},a11_0x5341(_0x5e35f8,_0x213a0d);}(function(_0x2d69bb,_0x1e1576){const _0x329667=a11_0x5341,_0x33dea6=_0x2d69bb();while(!![]){try{const _0x465db4=parseInt(_0x329667(0x15e))/0x1*(parseInt(_0x329667(0x154))/0x2)+-parseInt(_0x329667(0x18c))/0x3*(parseInt(_0x329667(0x184))/0x4)+-parseInt(_0x329667(0x148))/0x5+-parseInt(_0x329667(0x183))/0x6+parseInt(_0x329667(0x14e))/0x7*(-parseInt(_0x329667(0x159))/0x8)+-parseInt(_0x329667(0x168))/0x9+parseInt(_0x329667(0x15f))/0xa;if(_0x465db4===_0x1e1576)break;else _0x33dea6['push'](_0x33dea6['shift']());}catch(_0x291460){_0x33dea6['push'](_0x33dea6['shift']());}}}(a11_0x5ce2,0x856cc));var __decorate=this&&this[a11_0x42dc7b(0x145)]||function(_0x2ae53e,_0xb28340,_0x17f2ae,_0x520461){const _0x5c5f8c=a11_0x42dc7b;var _0x5a4a2e=arguments[_0x5c5f8c(0x170)],_0x14a9da=_0x5a4a2e<0x3?_0xb28340:_0x520461===null?_0x520461=Object[_0x5c5f8c(0x14b)](_0xb28340,_0x17f2ae):_0x520461,_0xb9f040;if(typeof Reflect===_0x5c5f8c(0x17c)&&typeof Reflect[_0x5c5f8c(0x143)]===_0x5c5f8c(0x18f))_0x14a9da=Reflect[_0x5c5f8c(0x143)](_0x2ae53e,_0xb28340,_0x17f2ae,_0x520461);else{for(var _0x4d6829=_0x2ae53e['length']-0x1;_0x4d6829>=0x0;_0x4d6829--)if(_0xb9f040=_0x2ae53e[_0x4d6829])_0x14a9da=(_0x5a4a2e<0x3?_0xb9f040(_0x14a9da):_0x5a4a2e>0x3?_0xb9f040(_0xb28340,_0x17f2ae,_0x14a9da):_0xb9f040(_0xb28340,_0x17f2ae))||_0x14a9da;}return _0x5a4a2e>0x3&&_0x14a9da&&Object[_0x5c5f8c(0x15c)](_0xb28340,_0x17f2ae,_0x14a9da),_0x14a9da;},__metadata=this&&this[a11_0x42dc7b(0x17d)]||function(_0x3ed288,_0x315b03){const _0x5abadc=a11_0x42dc7b;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x5abadc(0x18f))return Reflect['metadata'](_0x3ed288,_0x315b03);},__param=this&&this[a11_0x42dc7b(0x17e)]||function(_0x453eb1,_0x26ad04){return function(_0x5017b3,_0x2c9e64){_0x26ad04(_0x5017b3,_0x2c9e64,_0x453eb1);};};Object[a11_0x42dc7b(0x15c)](exports,'__esModule',{'value':!![]}),exports[a11_0x42dc7b(0x142)]=exports[a11_0x42dc7b(0x18b)]=void 0x0;const path_1=require('path'),fs_1=require('fs'),core_1=require(a11_0x42dc7b(0x16e)),decorator_1=require('@midwayjs/decorator'),decorator_2=require(a11_0x42dc7b(0x14c)),getRoutes_1=require(a11_0x42dc7b(0x17f));let ApitestService=class ApitestService{async['apidoc'](_0x7ccf9f){const _0x1e26a6=a11_0x42dc7b,_0x8458d3=(0x0,getRoutes_1[_0x1e26a6(0x165)])(_0x7ccf9f),_0x3a2cb7=[];for(let _0x431463 in _0x8458d3){for(let _0x388585 in _0x8458d3[_0x431463][_0x1e26a6(0x181)]){let _0x418a70=_0x8458d3[_0x431463][_0x1e26a6(0x181)][_0x388585],_0x34e82e=[];for(let _0x277d7d in _0x418a70['request']){_0x34e82e[_0x1e26a6(0x16f)](_0x418a70[_0x1e26a6(0x15a)][_0x277d7d]);}_0x3a2cb7[_0x1e26a6(0x16f)]({'title':_0x8458d3[_0x431463]['summary']+':'+_0x418a70['summary'],'prefix':_0x8458d3[_0x431463][_0x1e26a6(0x164)],'router':_0x418a70['route'],'method':_0x418a70[_0x1e26a6(0x16b)],'describe':_0x418a70[_0x1e26a6(0x14a)]||'','filepath':_0x8458d3[_0x431463]['filepath']||'','request':_0x34e82e});}}const _0x502aff=(0x0,path_1['join'])(__dirname,_0x1e26a6(0x146));return(0x0,fs_1[_0x1e26a6(0x18e)])(_0x502aff,{'encoding':_0x1e26a6(0x161)})[_0x1e26a6(0x14d)](/__res__/g,_0x1e26a6(0x158))[_0x1e26a6(0x14d)](_0x1e26a6(0x15d),JSON['stringify'](_0x3a2cb7))[_0x1e26a6(0x14d)](_0x1e26a6(0x150),JSON[_0x1e26a6(0x175)](this[_0x1e26a6(0x174)]['devices']));}};__decorate([(0x0,decorator_2[a11_0x42dc7b(0x176)])('anncicapi'),__metadata('design:type',Object)],ApitestService[a11_0x42dc7b(0x153)],'config',void 0x0),ApitestService=__decorate([(0x0,decorator_1[a11_0x42dc7b(0x160)])(a11_0x42dc7b(0x16c)),(0x0,decorator_2['Scope'])(decorator_2[a11_0x42dc7b(0x155)][a11_0x42dc7b(0x177)])],ApitestService),exports[a11_0x42dc7b(0x18b)]=ApitestService;function a11_0x5ce2(){const _0xf57ba0=['@midwayjs/core','push','length','/index.html','/apitest-:module','Environment','config','stringify','Config','Singleton','design:paramtypes','cache-control','module','apidoc','object','__metadata','__param','../helper/getRoutes','anncicapi','routes','public,\x20max-age=604800','3244086iBWPmU','4AwIgsE','design:type','design:returntype','.js','extname','apitesthtml','existsSync','ApitestService','2281746DWGqXk','Inject','readFileSync','function','ApitestStaticController','decorate','apitestmodule','__decorate','../../public/index.html','content-type','942510tucnmq','../../public/','description','getOwnPropertyDescriptor','@midwayjs/decorator','replace','133OCPIah','substring','__devices__','ctx','Get','prototype','8948yJfdKI','ScopeEnum','Param','filepath','/apiteststatic/','155352Jnfqfm','request','MidwayEnvironmentService','defineProperty','__apiList__','21YziCDW','30420040RwTvmC','Provide','utf-8','url','set','prefix','getRoutes','/apitest','text/css;\x20charset=utf-8','6576516OgiDXD','.css','isDevelopmentEnvironment','method','apitest','Controller'];a11_0x5ce2=function(){return _0xf57ba0;};return a11_0x5ce2();}let ApitestStaticController=class ApitestStaticController{async[a11_0x42dc7b(0x189)](){const _0x121779=a11_0x42dc7b;if(this['apitest']){const _0x40b4ef={'module':![]};return this[_0x121779(0x173)][_0x121779(0x16a)]()&&(_0x40b4ef[_0x121779(0x157)]=!![]),await this[_0x121779(0x18b)][_0x121779(0x17b)](_0x40b4ef);}return'';}async[a11_0x42dc7b(0x144)](_0x29a705){const _0x16075b=a11_0x42dc7b;if(this['apitest']){const _0x5ad1f4={'module':_0x29a705};return this[_0x16075b(0x173)]['isDevelopmentEnvironment']()&&(_0x5ad1f4[_0x16075b(0x157)]=!![]),await this[_0x16075b(0x18b)]['apidoc'](_0x5ad1f4);}return'';}async['apiteststatic'](){const _0x4d2487=a11_0x42dc7b;if((0x0,path_1['extname'])(this[_0x4d2487(0x151)][_0x4d2487(0x15a)]['url'])){var _0x108a80=(0x0,path_1['join'])(__dirname,_0x4d2487(0x149)+this['ctx'][_0x4d2487(0x15a)][_0x4d2487(0x162)][_0x4d2487(0x14d)]('/apiteststatic/','/'));if(_0x108a80[_0x4d2487(0x14f)](_0x108a80['length']-0xb)!=_0x4d2487(0x171)){this['ctx'][_0x4d2487(0x163)](_0x4d2487(0x179),_0x4d2487(0x182));if((0x0,path_1[_0x4d2487(0x188)])(this[_0x4d2487(0x151)][_0x4d2487(0x15a)][_0x4d2487(0x162)])==_0x4d2487(0x187))this[_0x4d2487(0x151)]['set']('content-type','application/javascript;\x20charset=utf-8');else(0x0,path_1['extname'])(this[_0x4d2487(0x151)][_0x4d2487(0x15a)][_0x4d2487(0x162)])==_0x4d2487(0x169)&&this['ctx'][_0x4d2487(0x163)](_0x4d2487(0x147),_0x4d2487(0x167));return(0x0,fs_1[_0x4d2487(0x18a)])(_0x108a80)&&(0x0,fs_1[_0x4d2487(0x18e)])(_0x108a80,{'encoding':_0x4d2487(0x161)});}}return'';}};__decorate([(0x0,decorator_2[a11_0x42dc7b(0x18d)])(),__metadata(a11_0x42dc7b(0x185),Object)],ApitestStaticController['prototype'],a11_0x42dc7b(0x151),void 0x0),__decorate([(0x0,decorator_2[a11_0x42dc7b(0x18d)])(),__metadata('design:type',core_1[a11_0x42dc7b(0x15b)])],ApitestStaticController[a11_0x42dc7b(0x153)],a11_0x42dc7b(0x173),void 0x0),__decorate([(0x0,decorator_2[a11_0x42dc7b(0x18d)])(),__metadata(a11_0x42dc7b(0x185),ApitestService)],ApitestStaticController[a11_0x42dc7b(0x153)],'ApitestService',void 0x0),__decorate([(0x0,decorator_2['Config'])('apitest'),__metadata(a11_0x42dc7b(0x185),Boolean)],ApitestStaticController['prototype'],a11_0x42dc7b(0x16c),void 0x0),__decorate([(0x0,decorator_2[a11_0x42dc7b(0x176)])(a11_0x42dc7b(0x180)),__metadata(a11_0x42dc7b(0x185),Object)],ApitestStaticController[a11_0x42dc7b(0x153)],a11_0x42dc7b(0x174),void 0x0),__decorate([(0x0,decorator_1[a11_0x42dc7b(0x152)])(a11_0x42dc7b(0x166)),__metadata(a11_0x42dc7b(0x185),Function),__metadata(a11_0x42dc7b(0x178),[]),__metadata(a11_0x42dc7b(0x186),Promise)],ApitestStaticController[a11_0x42dc7b(0x153)],'apitesthtml',null),__decorate([(0x0,decorator_1['Get'])(a11_0x42dc7b(0x172)),__param(0x0,(0x0,decorator_1[a11_0x42dc7b(0x156)])(a11_0x42dc7b(0x17a))),__metadata(a11_0x42dc7b(0x185),Function),__metadata(a11_0x42dc7b(0x178),[String]),__metadata(a11_0x42dc7b(0x186),Promise)],ApitestStaticController[a11_0x42dc7b(0x153)],'apitestmodule',null),__decorate([(0x0,decorator_1[a11_0x42dc7b(0x152)])('/apiteststatic/*'),__metadata('design:type',Function),__metadata(a11_0x42dc7b(0x178),[]),__metadata(a11_0x42dc7b(0x186),Promise)],ApitestStaticController[a11_0x42dc7b(0x153)],'apiteststatic',null),ApitestStaticController=__decorate([(0x0,decorator_1[a11_0x42dc7b(0x16d)])('/'),(0x0,decorator_2['Scope'])(decorator_2[a11_0x42dc7b(0x155)]['Request'])],ApitestStaticController),exports['ApitestStaticController']=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12_0x12321f=a12_0xb473;(function(_0x2c8449,_0x2de30d){const _0xc8b8cb=a12_0xb473,_0x1a9dc0=_0x2c8449();while(!![]){try{const _0x52fd1f=parseInt(_0xc8b8cb(0x18f))/0x1+parseInt(_0xc8b8cb(0x19b))/0x2+parseInt(_0xc8b8cb(0x167))/0x3+parseInt(_0xc8b8cb(0x161))/0x4*(-parseInt(_0xc8b8cb(0x181))/0x5)+-parseInt(_0xc8b8cb(0x17c))/0x6*(-parseInt(_0xc8b8cb(0x171))/0x7)+parseInt(_0xc8b8cb(0x168))/0x8+-parseInt(_0xc8b8cb(0x197))/0x9;if(_0x52fd1f===_0x2de30d)break;else _0x1a9dc0['push'](_0x1a9dc0['shift']());}catch(_0x50e905){_0x1a9dc0['push'](_0x1a9dc0['shift']());}}}(a12_0xd126,0xc4015));function a12_0xb473(_0x3549c9,_0x3c3eb8){const _0xd126b7=a12_0xd126();return a12_0xb473=function(_0xb4735e,_0xc4ff40){_0xb4735e=_0xb4735e-0x15e;let _0x5f3803=_0xd126b7[_0xb4735e];return _0x5f3803;},a12_0xb473(_0x3549c9,_0x3c3eb8);}var __decorate=this&&this[a12_0x12321f(0x174)]||function(_0x24d4ae,_0x232fc2,_0x179f9b,_0x2d71b8){const _0x585abb=a12_0x12321f;var _0x424645=arguments[_0x585abb(0x16f)],_0x5e2fc8=_0x424645<0x3?_0x232fc2:_0x2d71b8===null?_0x2d71b8=Object['getOwnPropertyDescriptor'](_0x232fc2,_0x179f9b):_0x2d71b8,_0x2ce3df;if(typeof Reflect===_0x585abb(0x18b)&&typeof Reflect['decorate']===_0x585abb(0x182))_0x5e2fc8=Reflect[_0x585abb(0x16a)](_0x24d4ae,_0x232fc2,_0x179f9b,_0x2d71b8);else{for(var _0x3c2ed0=_0x24d4ae['length']-0x1;_0x3c2ed0>=0x0;_0x3c2ed0--)if(_0x2ce3df=_0x24d4ae[_0x3c2ed0])_0x5e2fc8=(_0x424645<0x3?_0x2ce3df(_0x5e2fc8):_0x424645>0x3?_0x2ce3df(_0x232fc2,_0x179f9b,_0x5e2fc8):_0x2ce3df(_0x232fc2,_0x179f9b))||_0x5e2fc8;}return _0x424645>0x3&&_0x5e2fc8&&Object[_0x585abb(0x169)](_0x232fc2,_0x179f9b,_0x5e2fc8),_0x5e2fc8;},__metadata=this&&this[a12_0x12321f(0x18e)]||function(_0x3431fd,_0x336dc4){const _0xe0a68d=a12_0x12321f;if(typeof Reflect===_0xe0a68d(0x18b)&&typeof Reflect[_0xe0a68d(0x175)]===_0xe0a68d(0x182))return Reflect['metadata'](_0x3431fd,_0x336dc4);};Object[a12_0x12321f(0x169)](exports,a12_0x12321f(0x177),{'value':!![]}),exports[a12_0x12321f(0x193)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x12321f(0x188)),koasend=require(a12_0x12321f(0x198)),decorator_1=require(a12_0x12321f(0x19c));function a12_0xd126(){const _0x292bbd=['14943780pbUVpF','koa-send','log','app','1297394cvNvlO','@midwayjs/decorator','getRow','eachCell','header','132toIIFl','existsSync','random','toString','worksheets','handler','2114922VTkEyW','4126960aWOkxQ','defineProperty','decorate','Sheet\x201','getCell','frozen','columns','length','Scope','172802ilSZNT','Singleton','findRows','__decorate','metadata','\x20is\x20read\x20fail','__esModule','Api\x20Excel\x20Error:\x20','get','Workbook','col','234AIzqjJ','isNumber','replace','public/xlsx','startsWith','210505ejSEOJ','function','readFile','/public/xlsx/','prototype','App','substring','exceljs','getAppDir','endsWith','object','design:type','push','__metadata','1020295zaOYTd','ScopeEnum','value','xlsx','ExcelService','key','writeFile','mkdirSync'];a12_0xd126=function(){return _0x292bbd;};return a12_0xd126();}let ExcelService=class ExcelService{async['parse'](_0x38fc9d,_0x1a3b05,_0x704594=[0x0]){const _0x193408=a12_0x12321f;var _0x43332,_0x423da8;const _0x58d089=new exceljs[(_0x193408(0x17a))](),_0x2f92a1=[];let _0x2a53e7=_0x38fc9d[_0x193408(0x17e)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/');!(_0x2a53e7===null||_0x2a53e7===void 0x0?void 0x0:_0x2a53e7['startsWith']('/'))&&(_0x2a53e7=this[_0x193408(0x19a)][_0x193408(0x189)]()+'/'+_0x2a53e7);try{await _0x58d089[_0x193408(0x192)][_0x193408(0x183)](_0x2a53e7);}catch(_0x45391a){return console[_0x193408(0x199)](_0x193408(0x178)+_0x2a53e7+_0x193408(0x176)),_0x2f92a1;}for(const _0x1e4aec of _0x704594){const _0x1318ad=lodash[_0x193408(0x17d)](_0x1e4aec)?((_0x43332=_0x58d089[_0x193408(0x165)])===null||_0x43332===void 0x0?void 0x0:_0x43332[_0x1e4aec])||undefined:_0x58d089['getWorksheet'](_0x1e4aec);if(_0x1318ad){var _0x23124f=0x1;const _0x4fed4b=_0x1318ad[_0x193408(0x15e)](0x1),_0x4a5023=await new Promise(_0x5aa6a1=>{const _0x16850c=_0x193408,_0x4350a2={};_0x4fed4b[_0x16850c(0x15f)]((_0x472651,_0x36c357)=>{const _0x11dcad=_0x16850c;for(const _0x340b48 of _0x1a3b05){if(_0x472651[_0x11dcad(0x191)]==_0x340b48[_0x11dcad(0x160)])_0x23124f=0x2,_0x4350a2[_0x340b48[_0x11dcad(0x194)]]={'header':_0x472651[_0x11dcad(0x17b)],'handler':_0x340b48['handler']};else{if(!_0x4350a2[_0x340b48[_0x11dcad(0x194)]])try{const _0x17ddff=_0x4fed4b[_0x11dcad(0x16c)](_0x340b48[_0x11dcad(0x160)]);_0x17ddff&&(_0x4350a2[_0x340b48[_0x11dcad(0x194)]]={'header':_0x17ddff[_0x11dcad(0x17b)],'handler':_0x340b48[_0x11dcad(0x166)]});}catch{}}}_0x4fed4b['cellCount']==_0x36c357&&_0x5aa6a1(_0x4350a2);});});for(const _0x35e200 of _0x1318ad[_0x193408(0x173)](_0x23124f,_0x1318ad['rowCount'])){const _0x25145a={};for(const _0x540132 in _0x4a5023){_0x4a5023[_0x540132][_0x193408(0x160)]&&(typeof((_0x423da8=_0x4a5023[_0x540132])===null||_0x423da8===void 0x0?void 0x0:_0x423da8['handler'])==_0x193408(0x182)?_0x25145a[_0x540132]=_0x4a5023[_0x540132]['handler'](_0x35e200[_0x193408(0x16c)](lodash['trim'](''+_0x4a5023[_0x540132][_0x193408(0x160)],'\x20'))[_0x193408(0x164)]()):_0x25145a[_0x540132]=_0x35e200['getCell'](_0x4a5023[_0x540132][_0x193408(0x160)])['toString']());}Object['keys'](_0x25145a)['length']>0x0&&_0x2f92a1[_0x193408(0x18d)](_0x25145a);}}}return _0x2f92a1;}async['export'](_0x291969,_0x289614,_0x42b9d8,_0x3c52cc=a12_0x12321f(0x17f)){const _0x503e1c=a12_0x12321f;var _0x593592,_0x4b44a3;const _0x3e37ff=new exceljs['Workbook'](),_0x27d4ea={},_0x25e727=[],_0x5d624f=_0x3e37ff['addWorksheet'](_0x503e1c(0x16b),{'views':[{'state':_0x503e1c(0x16d),'xSplit':0x1}]});for(const _0x250041 in _0x289614){_0x27d4ea[_0x289614[_0x250041]['key']]=_0x289614[_0x250041][_0x503e1c(0x160)],_0x25e727[_0x503e1c(0x18d)]({'header':_0x289614[_0x250041][_0x503e1c(0x160)],'key':(_0x593592=_0x289614[_0x250041])===null||_0x593592===void 0x0?void 0x0:_0x593592[_0x503e1c(0x194)][_0x503e1c(0x17e)](/\./g,'_')});}_0x5d624f[_0x503e1c(0x16e)]=_0x25e727;for(const _0xb5462f of _0x42b9d8){const _0xc3c4fa={};for(const _0x354fb1 in _0x289614){typeof((_0x4b44a3=_0x289614[_0x354fb1])===null||_0x4b44a3===void 0x0?void 0x0:_0x4b44a3[_0x503e1c(0x166)])==_0x503e1c(0x182)?_0xc3c4fa[_0x289614[_0x354fb1][_0x503e1c(0x194)]['replace'](/\./g,'_')]=await _0x289614[_0x354fb1][_0x503e1c(0x166)](_0xb5462f):_0xc3c4fa[_0x289614[_0x354fb1]['key'][_0x503e1c(0x17e)](/\./g,'_')]=lodash[_0x503e1c(0x179)](_0xb5462f,_0x289614[_0x354fb1][_0x503e1c(0x194)],'');}_0x5d624f['addRow'](_0xc3c4fa);}let _0x3c981e='';const _0x3ad650=_0x291969+'-'+lodash[_0x503e1c(0x163)](0x2710,0x1869f)+'.xlsx';if(_0x3c52cc&&_0x3c52cc[_0x503e1c(0x180)]('/'))_0x3c981e=_0x3c52cc+'/'+_0x3ad650;else _0x3c52cc&&!_0x3c52cc[_0x503e1c(0x180)]('/')&&!_0x3c52cc[_0x503e1c(0x180)]('\x5c')?_0x3c981e=this[_0x503e1c(0x19a)][_0x503e1c(0x189)]()+'/'+_0x3c52cc+'/'+_0x3ad650:_0x3c981e=this['app'][_0x503e1c(0x189)]()+'/public/xlsx';return(_0x3c981e[_0x503e1c(0x18a)]('/')||_0x3c981e[_0x503e1c(0x18a)]('\x5c'))&&(_0x3c981e=_0x3c981e[_0x503e1c(0x187)](0x0,_0x3c981e[_0x503e1c(0x16f)]-0x1)),_0x3c981e=_0x3c981e[_0x503e1c(0x17e)](/(\\|\/)/g,'/')[_0x503e1c(0x17e)](/\/{2,}/g,'/'),!fs[_0x503e1c(0x162)](_0x3c981e)&&fs[_0x503e1c(0x196)](_0x3c981e,{'recursive':!![]}),await _0x3e37ff[_0x503e1c(0x192)][_0x503e1c(0x195)]((_0x3c981e+'/'+_0x3ad650)[_0x503e1c(0x17e)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/')),{'filename':_0x3ad650,'filepath':_0x3c981e};}async['download'](_0x23bdab,_0x4cf988){const _0x3ea669=a12_0x12321f;await koasend(_0x23bdab,_0x3ea669(0x184)+_0x4cf988);}};__decorate([(0x0,decorator_1[a12_0x12321f(0x186)])(),__metadata(a12_0x12321f(0x18c),Object)],ExcelService[a12_0x12321f(0x185)],a12_0x12321f(0x19a),void 0x0),ExcelService=__decorate([(0x0,decorator_1['Provide'])(),(0x0,decorator_1[a12_0x12321f(0x170)])(decorator_1[a12_0x12321f(0x190)][a12_0x12321f(0x172)])],ExcelService),exports['ExcelService']=ExcelService;
|
package/dist/types/action.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ValidatorOptions } from "@anncic-api/validator";
|
|
2
2
|
import { MiddlewareParamArray } from '@midwayjs/decorator';
|
|
3
3
|
export declare const ACTION_KEY = "anncic-api:action";
|
|
4
4
|
export declare const ACTION_ROUTE_KEY = "anncic-api:action:route";
|
|
@@ -16,7 +16,7 @@ export interface ActionApiOption {
|
|
|
16
16
|
apimit?: boolean;
|
|
17
17
|
routerName?: string;
|
|
18
18
|
description?: string;
|
|
19
|
-
validate?:
|
|
19
|
+
validate?: ValidatorOptions;
|
|
20
20
|
middleware?: MiddlewareParamArray;
|
|
21
21
|
middlewareIgnore?: MiddlewareParamArray;
|
|
22
22
|
ignoreGlobalPrefix?: boolean;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a13_0x3083ba=a13_0x5f10;(function(_0x42a463,_0x2ce480){var _0x314c2c=a13_0x5f10,_0x2d1ff2=_0x42a463();while(!![]){try{var _0x20b6d3=parseInt(_0x314c2c(0x1ab))/0x1*(parseInt(_0x314c2c(0x1aa))/0x2)+-parseInt(_0x314c2c(0x1b2))/0x3+-parseInt(_0x314c2c(0x1ac))/0x4+parseInt(_0x314c2c(0x1a6))/0x5+parseInt(_0x314c2c(0x1ae))/0x6+parseInt(_0x314c2c(0x1a4))/0x7*(-parseInt(_0x314c2c(0x1a7))/0x8)+-parseInt(_0x314c2c(0x1a5))/0x9*(-parseInt(_0x314c2c(0x1a9))/0xa);if(_0x20b6d3===_0x2ce480)break;else _0x2d1ff2['push'](_0x2d1ff2['shift']());}catch(_0x1a0994){_0x2d1ff2['push'](_0x2d1ff2['shift']());}}}(a13_0x41ae,0xc7c46));Object[a13_0x3083ba(0x1b0)](exports,a13_0x3083ba(0x1a8),{'value':!![]}),exports[a13_0x3083ba(0x1af)]=exports[a13_0x3083ba(0x1b1)]=void 0x0,exports['ACTION_KEY']='anncic-api:action',exports[a13_0x3083ba(0x1af)]=a13_0x3083ba(0x1ad);function a13_0x5f10(_0x1024bc,_0x4f39ab){var _0x41aec4=a13_0x41ae();return a13_0x5f10=function(_0x5f10c5,_0x474e89){_0x5f10c5=_0x5f10c5-0x1a4;var _0x324937=_0x41aec4[_0x5f10c5];return _0x324937;},a13_0x5f10(_0x1024bc,_0x4f39ab);}function a13_0x41ae(){var _0x36c4b5=['7dotkfm','9JhLuhF','4545060BRnpIe','5495704pdXTwv','__esModule','26048860ZfJDsI','6baLllG','31391oPEbEr','6234536Wowdrv','anncic-api:action:route','5877732uNrpcB','ACTION_ROUTE_KEY','defineProperty','ACTION_KEY','4571550OaVFkm'];a13_0x41ae=function(){return _0x36c4b5;};return a13_0x41ae();}
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a14_0x4ecbbc=a14_0x306e;(function(_0x2c0f43,_0x455ac2){var _0xba52=a14_0x306e,_0x1cef4f=_0x2c0f43();while(!![]){try{var _0x50f7d5=parseInt(_0xba52(0xb8))/0x1*(parseInt(_0xba52(0xc9))/0x2)+parseInt(_0xba52(0xc1))/0x3*(-parseInt(_0xba52(0xbf))/0x4)+parseInt(_0xba52(0xcd))/0x5*(-parseInt(_0xba52(0xb7))/0x6)+-parseInt(_0xba52(0xb6))/0x7+-parseInt(_0xba52(0xaf))/0x8+parseInt(_0xba52(0xc0))/0x9*(-parseInt(_0xba52(0xbe))/0xa)+parseInt(_0xba52(0xc7))/0xb;if(_0x50f7d5===_0x455ac2)break;else _0x1cef4f['push'](_0x1cef4f['shift']());}catch(_0x344682){_0x1cef4f['push'](_0x1cef4f['shift']());}}}(a14_0x1981,0x29d24));function a14_0x1981(){var _0x47b768=['6265391IrdHcF','trim','2SKXsWM','分页数量','_size','__decorate','4240jHeuEs','min','integer','是否倒序','_isreverse','@anncic-api/validator','_page','1776136oQmkfq','number','排序方式','object','length','design:type','RuleType','522473gzDcku','948QoJtJj','299213praOzT','function','Rule','defineProperty','getOwnPropertyDescriptor','string','2583790CxsajH','100mqqTcd','9rVqEoA','1017FjdKtK','PageDTO','metadata','valid','prototype','decorate'];a14_0x1981=function(){return _0x47b768;};return a14_0x1981();}function a14_0x306e(_0x5b9749,_0xb1b051){var _0x198179=a14_0x1981();return a14_0x306e=function(_0x306ef1,_0x104b10){_0x306ef1=_0x306ef1-0xa9;var _0x55a778=_0x198179[_0x306ef1];return _0x55a778;},a14_0x306e(_0x5b9749,_0xb1b051);}var __decorate=this&&this[a14_0x4ecbbc(0xcc)]||function(_0x414e56,_0x233fe0,_0x13f4cc,_0x3b27da){var _0x30cf9a=a14_0x4ecbbc,_0x1aa107=arguments[_0x30cf9a(0xb3)],_0x5076e4=_0x1aa107<0x3?_0x233fe0:_0x3b27da===null?_0x3b27da=Object[_0x30cf9a(0xbc)](_0x233fe0,_0x13f4cc):_0x3b27da,_0x3d5769;if(typeof Reflect===_0x30cf9a(0xb2)&&typeof Reflect[_0x30cf9a(0xc6)]===_0x30cf9a(0xb9))_0x5076e4=Reflect['decorate'](_0x414e56,_0x233fe0,_0x13f4cc,_0x3b27da);else{for(var _0x7c19e=_0x414e56[_0x30cf9a(0xb3)]-0x1;_0x7c19e>=0x0;_0x7c19e--)if(_0x3d5769=_0x414e56[_0x7c19e])_0x5076e4=(_0x1aa107<0x3?_0x3d5769(_0x5076e4):_0x1aa107>0x3?_0x3d5769(_0x233fe0,_0x13f4cc,_0x5076e4):_0x3d5769(_0x233fe0,_0x13f4cc))||_0x5076e4;}return _0x1aa107>0x3&&_0x5076e4&&Object[_0x30cf9a(0xbb)](_0x233fe0,_0x13f4cc,_0x5076e4),_0x5076e4;},__metadata=this&&this['__metadata']||function(_0x526fdb,_0x90e6fe){var _0x5a093c=a14_0x4ecbbc;if(typeof Reflect===_0x5a093c(0xb2)&&typeof Reflect[_0x5a093c(0xc3)]==='function')return Reflect[_0x5a093c(0xc3)](_0x526fdb,_0x90e6fe);};Object[a14_0x4ecbbc(0xbb)](exports,'__esModule',{'value':!![]}),exports[a14_0x4ecbbc(0xc2)]=void 0x0;const validator_1=require(a14_0x4ecbbc(0xad));class PageDTO{}__decorate([(0x0,validator_1[a14_0x4ecbbc(0xba)])('分页',validator_1['RuleType']['number']()[a14_0x4ecbbc(0xaa)]()[a14_0x4ecbbc(0xa9)](0x1),'第一页为1,第二页为2'),__metadata(a14_0x4ecbbc(0xb4),Number)],PageDTO[a14_0x4ecbbc(0xc5)],a14_0x4ecbbc(0xae),void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x4ecbbc(0xca),validator_1[a14_0x4ecbbc(0xb5)][a14_0x4ecbbc(0xb0)]()[a14_0x4ecbbc(0xaa)]()[a14_0x4ecbbc(0xa9)](0x1)),__metadata(a14_0x4ecbbc(0xb4),Number)],PageDTO[a14_0x4ecbbc(0xc5)],a14_0x4ecbbc(0xcb),void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x4ecbbc(0xb1),validator_1[a14_0x4ecbbc(0xb5)][a14_0x4ecbbc(0xbd)]()[a14_0x4ecbbc(0xc8)]()),__metadata(a14_0x4ecbbc(0xb4),String)],PageDTO[a14_0x4ecbbc(0xc5)],'_order',void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x4ecbbc(0xab),validator_1[a14_0x4ecbbc(0xb5)][a14_0x4ecbbc(0xb0)]()[a14_0x4ecbbc(0xaa)]()[a14_0x4ecbbc(0xc4)](0x0,0x1),'1:是;0:否'),__metadata(a14_0x4ecbbc(0xb4),Number)],PageDTO[a14_0x4ecbbc(0xc5)],a14_0x4ecbbc(0xac),void 0x0),exports[a14_0x4ecbbc(0xc2)]=PageDTO;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/cache": "^1.0.
|
|
21
|
-
"@anncic-api/core": "^1.0.
|
|
22
|
-
"@anncic-api/event": "^1.0.
|
|
23
|
-
"@anncic-api/typeorm": "^1.0.
|
|
24
|
-
"@anncic-api/validator": "^1.0.
|
|
20
|
+
"@anncic-api/cache": "^1.0.12",
|
|
21
|
+
"@anncic-api/core": "^1.0.12",
|
|
22
|
+
"@anncic-api/event": "^1.0.12",
|
|
23
|
+
"@anncic-api/typeorm": "^1.0.12",
|
|
24
|
+
"@anncic-api/validator": "^1.0.12",
|
|
25
25
|
"@midwayjs/cross-domain": "^3.4.9",
|
|
26
26
|
"@midwayjs/i18n": "^3.4.9",
|
|
27
27
|
"@midwayjs/koa": "^3.4.9",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@midwayjs/task": "^3.4.9",
|
|
30
30
|
"@midwayjs/upload": "^3.4.9",
|
|
31
31
|
"@types/bull": "^3.15.9",
|
|
32
|
-
"anncic-apihelper": "^1.0.
|
|
32
|
+
"anncic-apihelper": "^1.0.12",
|
|
33
33
|
"exceljs": "^4.3.0",
|
|
34
34
|
"koa-bodyparser": "^4.3.0",
|
|
35
35
|
"koa-send": "^5.0.1",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"javascript-obfuscator": "2.19.0",
|
|
42
42
|
"typescript": "^4.7.4"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "5a1add10415cd9a465caa2a1f8fb4d1ea36ce6f2"
|
|
45
45
|
}
|