anncic-api 3.0.1 → 3.0.2
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/decorator/Intercept.js +1 -1
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getAppsConfig.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.js +1 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/dist/types/intercept.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x57030d=a0_0x5e40;(function(_0x4bf7f9,_0x3146f4){var _0x17c349=a0_0x5e40,_0x158c7b=_0x4bf7f9();while(!![]){try{var _0x13ed53=parseInt(_0x17c349(0x1aa))/0x1+-parseInt(_0x17c349(0x19b))/0x2+parseInt(_0x17c349(0x199))/0x3+parseInt(_0x17c349(0x1ad))/0x4+-parseInt(_0x17c349(0x1a5))/0x5+parseInt(_0x17c349(0x1a2))/0x6*(parseInt(_0x17c349(0x1a4))/0x7)+-parseInt(_0x17c349(0x1a8))/0x8;if(_0x13ed53===_0x3146f4)break;else _0x158c7b['push'](_0x158c7b['shift']());}catch(_0x2292fb){_0x158c7b['push'](_0x158c7b['shift']());}}}(a0_0x572b,0x428d0));function a0_0x572b(){var _0x28f45b=['1060456puWhFe','dhauo1234420123gg3234901','form','search','toString','constructor','apply','5136GOeMdy','zhiulanuiy7892387985hnoi','2702hpofrp','906060ISVNQk','json','__esModule','2332104MXsWMr','appDir','446356eCikDS','(((.+)+)+)+$','xml','585884HqQzfs','text','defineProperty','1056906yOUPIU','20mb'];a0_0x572b=function(){return _0x28f45b;};return a0_0x572b();}var a0_0x3bc812=(function(){var _0x3bb7f7=!![];return function(_0x2eb766,_0x3c6211){var _0x52e5ea=_0x3bb7f7?function(){var _0x2fbe02=a0_0x5e40;if(_0x3c6211){var _0x56ec78=_0x3c6211[_0x2fbe02(0x1a1)](_0x2eb766,arguments);return _0x3c6211=null,_0x56ec78;}}:function(){};return _0x3bb7f7=![],_0x52e5ea;};}()),a0_0x366408=a0_0x3bc812(this,function(){var _0x287d1c=a0_0x5e40;return a0_0x366408['toString']()[_0x287d1c(0x19e)](_0x287d1c(0x1ab))[_0x287d1c(0x19f)]()[_0x287d1c(0x1a0)](a0_0x366408)['search'](_0x287d1c(0x1ab));});a0_0x366408();function a0_0x5e40(_0x168f30,_0x49706c){var _0x517c87=a0_0x572b();return a0_0x5e40=function(_0x366408,_0x3bc812){_0x366408=_0x366408-0x197;var _0x572b06=_0x517c87[_0x366408];return _0x572b06;},a0_0x5e40(_0x168f30,_0x49706c);}'use strict';Object[a0_0x57030d(0x198)](exports,a0_0x57030d(0x1a7),{'value':!![]}),exports['default']=_0xafbc1e=>{var _0x5bf728=a0_0x57030d;return{'apitest':!![],'keys':_0xafbc1e['name'],'anncicapi':{'password':_0x5bf728(0x1a3),'devices':{'DEFAULT':{'secret':_0x5bf728(0x19c),'checkcode':_0x5bf728(0x19c)}}},'bodyParser':{'enableTypes':[_0x5bf728(0x1a6),_0x5bf728(0x19d),_0x5bf728(0x197),_0x5bf728(0x1ac)],'formLimit':_0x5bf728(0x19a),'jsonLimit':_0x5bf728(0x19a),'textLimit':_0x5bf728(0x19a),'xmlLimit':_0x5bf728(0x19a)},'upload':{'tmpdir':_0xafbc1e[_0x5bf728(0x1a9)]+'/runtime/.upload','cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x5e7cf3=a1_0x254f;function a1_0x2ec1(){var _0x49a89c=['324815aHAvLH','673075eqBkBO','4YOIunq','1690759euqvqf','6byQUXH','defineProperty','(((.+)+)+)+$','29144kNOCuD','default','603rwPkSZ','423741ADyzwZ','6tFKnOI','__esModule','4936459pCBARU','apply','1533690daBwAc','search'];a1_0x2ec1=function(){return _0x49a89c;};return a1_0x2ec1();}(function(_0x14c2f6,_0x6af037){var _0x36b282=a1_0x254f,_0x1ceef2=_0x14c2f6();while(!![]){try{var _0x468d5b=-parseInt(_0x36b282(0x11b))/0x1+parseInt(_0x36b282(0x126))/0x2*(parseInt(_0x36b282(0x125))/0x3)+parseInt(_0x36b282(0x11d))/0x4*(-parseInt(_0x36b282(0x11c))/0x5)+parseInt(_0x36b282(0x11f))/0x6*(-parseInt(_0x36b282(0x11e))/0x7)+parseInt(_0x36b282(0x122))/0x8*(parseInt(_0x36b282(0x124))/0x9)+-parseInt(_0x36b282(0x12a))/0xa+parseInt(_0x36b282(0x128))/0xb;if(_0x468d5b===_0x6af037)break;else _0x1ceef2['push'](_0x1ceef2['shift']());}catch(_0x36ae73){_0x1ceef2['push'](_0x1ceef2['shift']());}}}(a1_0x2ec1,0x4006f));function a1_0x254f(_0x38a9d1,_0x1e8a6e){var _0x3affd9=a1_0x2ec1();return a1_0x254f=function(_0x13235a,_0xe5ca29){_0x13235a=_0x13235a-0x11a;var _0x2ec13f=_0x3affd9[_0x13235a];return _0x2ec13f;},a1_0x254f(_0x38a9d1,_0x1e8a6e);}var a1_0xe5ca29=(function(){var _0xaf3d87=!![];return function(_0x4b55d5,_0x3e10fc){var _0x22fc12=_0xaf3d87?function(){var _0x558e32=a1_0x254f;if(_0x3e10fc){var _0x4b1dc8=_0x3e10fc[_0x558e32(0x129)](_0x4b55d5,arguments);return _0x3e10fc=null,_0x4b1dc8;}}:function(){};return _0xaf3d87=![],_0x22fc12;};}()),a1_0x13235a=a1_0xe5ca29(this,function(){var _0x26d375=a1_0x254f;return a1_0x13235a['toString']()[_0x26d375(0x11a)](_0x26d375(0x121))['toString']()['constructor'](a1_0x13235a)[_0x26d375(0x11a)]('(((.+)+)+)+$');});a1_0x13235a();'use strict';Object[a1_0x5e7cf3(0x120)](exports,a1_0x5e7cf3(0x127),{'value':!![]}),exports[a1_0x5e7cf3(0x123)]={'apitest':![],'anncicapi':{}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0xd432a3=a2_0x5077;(function(_0xbfdae1,_0x3f0fbe){const _0x3201d5=a2_0x5077,_0x18381d=_0xbfdae1();while(!![]){try{const _0x2c1784=parseInt(_0x3201d5(0x102))/0x1+parseInt(_0x3201d5(0xbc))/0x2*(-parseInt(_0x3201d5(0xaf))/0x3)+-parseInt(_0x3201d5(0x10e))/0x4+-parseInt(_0x3201d5(0xbe))/0x5*(parseInt(_0x3201d5(0xdf))/0x6)+-parseInt(_0x3201d5(0xeb))/0x7+parseInt(_0x3201d5(0x10b))/0x8+parseInt(_0x3201d5(0x10f))/0x9;if(_0x2c1784===_0x3f0fbe)break;else _0x18381d['push'](_0x18381d['shift']());}catch(_0xac6ec2){_0x18381d['push'](_0x18381d['shift']());}}}(a2_0x23b1,0x3a518));const a2_0x4ab16d=(function(){let _0x2bc4f3=!![];return function(_0x207055,_0x5465a6){const _0x2c9640=_0x2bc4f3?function(){const _0x14dee2=a2_0x5077;if(_0x5465a6){const _0x2bdc0d=_0x5465a6[_0x14dee2(0xf9)](_0x207055,arguments);return _0x5465a6=null,_0x2bdc0d;}}:function(){};return _0x2bc4f3=![],_0x2c9640;};}()),a2_0x4a8968=a2_0x4ab16d(this,function(){const _0x378d1c=a2_0x5077;return a2_0x4a8968[_0x378d1c(0xec)]()['search'](_0x378d1c(0x110))[_0x378d1c(0xec)]()['constructor'](a2_0x4a8968)[_0x378d1c(0xa1)]('(((.+)+)+)+$');});a2_0x4a8968();'use strict';function a2_0x23b1(){const _0x36d439=['body','Inject','MidwayDecoratorService','length','@midwayjs/upload','readdirSync','apply','device','MidwayApplicationManager','__decorate','CustomConfiguration','upload','getClassMetadata','HEADERS_SIGNATURE','statSync','235102UgqOFs','function','@anncic-api/typeorm','./config/config.production','dir','_matchedRoute','./service/ApiService','key','./config/config.default','2165760uCvOKX','requestContext','/apps','1410108qQMiSi','10015839xpHBtv','(((.+)+)+)+$','mkdirSync','string','config','decorator','-log','@anncic-api/cache','@midwayjs/i18n','keys','handlerActionRoute','defineProperty','ApiError','文件不存在','search','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','log','./exception/ApiError','@anncic-api/validator','./types/action','@midwayjs/cross-domain','object','request','intercept','registerMethodHandler','MidwayConfigService','isDirectory','undefined','3OHhqcl','handler','koa-send','.log','app','toLowerCase','@midwayjs/core','checksign','method','ApiService','bodyXml','get','ACTION_ROUTE_KEY','948378ZwmSml','getBaseDir','20bQiIyH','@anncic-api/event','target','getOwnPropertyDescriptor','loggerConfig','query','tmpdir','getConfiguration','getApplications','getAsync','apimit','args','anncicapi','midwayLogger','REQUEST_OBJ_CTX_KEY','/runtime/apps-','InterceptTargetTmp','match','isNull','environment','Anncic-api\x20static-file\x20:\x20mkdir\x20','isDevelopmentEnvironment','getAppDir','hanlderApplications','dirs','koa','@anncic-api/core','@midwayjs/koa','proceed','prototype','Types','staticFile','filterConfig','136146eNgTqp','context','design:type','addObject','metadata','headers','isArray','isString','DEFAULT','decorate','__metadata','existsSync','3236387PPQtvl','toString','default','Configuration','assign','App','devices','attachment'];a2_0x23b1=function(){return _0x36d439;};return a2_0x23b1();}var __decorate=this&&this[a2_0xd432a3(0xfc)]||function(_0x3a4821,_0x23023b,_0x2f7af5,_0xfd9026){const _0x3fe2ee=a2_0xd432a3;var _0x442ac2=arguments[_0x3fe2ee(0xf6)],_0x2f99f5=_0x442ac2<0x3?_0x23023b:_0xfd9026===null?_0xfd9026=Object[_0x3fe2ee(0xc1)](_0x23023b,_0x2f7af5):_0xfd9026,_0x9eb28b;if(typeof Reflect===_0x3fe2ee(0xa8)&&typeof Reflect['decorate']===_0x3fe2ee(0x103))_0x2f99f5=Reflect[_0x3fe2ee(0xe8)](_0x3a4821,_0x23023b,_0x2f7af5,_0xfd9026);else{for(var _0x5222ec=_0x3a4821[_0x3fe2ee(0xf6)]-0x1;_0x5222ec>=0x0;_0x5222ec--)if(_0x9eb28b=_0x3a4821[_0x5222ec])_0x2f99f5=(_0x442ac2<0x3?_0x9eb28b(_0x2f99f5):_0x442ac2>0x3?_0x9eb28b(_0x23023b,_0x2f7af5,_0x2f99f5):_0x9eb28b(_0x23023b,_0x2f7af5))||_0x2f99f5;}return _0x442ac2>0x3&&_0x2f99f5&&Object[_0x3fe2ee(0x9e)](_0x23023b,_0x2f7af5,_0x2f99f5),_0x2f99f5;},__metadata=this&&this[a2_0xd432a3(0xe9)]||function(_0x2f55ab,_0x47773e){const _0x5ef625=a2_0xd432a3;if(typeof Reflect===_0x5ef625(0xa8)&&typeof Reflect[_0x5ef625(0xe3)]==='function')return Reflect[_0x5ef625(0xe3)](_0x2f55ab,_0x47773e);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a2_0xd432a3(0xfd)]=void 0x0;const core_1=require(a2_0xd432a3(0xb5)),core_2=require(a2_0xd432a3(0xb5)),ApiError_1=require(a2_0xd432a3(0xa4)),ApiService_1=require(a2_0xd432a3(0x108)),action_1=require(a2_0xd432a3(0xa6)),intercept_1=require('./types/intercept'),fs=require('fs'),koasend=require(a2_0xd432a3(0xb1)),koa=require(a2_0xd432a3(0xd9)),i18n=require(a2_0xd432a3(0x9b)),upload=require(a2_0xd432a3(0xf7)),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0xd432a3(0xa7)),ConfigDefault=require(a2_0xd432a3(0x10a)),ConfigProduction=require(a2_0xd432a3(0x105)),anncic=require(a2_0xd432a3(0xd8)),anncicCache=require(a2_0xd432a3(0x9a)),anncicEvent=require(a2_0xd432a3(0xbf)),anncicTypeorm=require(a2_0xd432a3(0x104)),anncicValidator=require(a2_0xd432a3(0xa5)),anncicHelper=require('anncic-apihelper');function a2_0x5077(_0x58397b,_0x71d484){const _0x5d33fb=a2_0x23b1();return a2_0x5077=function(_0x4a8968,_0x4ab16d){_0x4a8968=_0x4a8968-0x9a;let _0x23b1a3=_0x5d33fb[_0x4a8968];return _0x23b1a3;},a2_0x5077(_0x58397b,_0x71d484);}let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x1df06b=a2_0xd432a3;await this[_0x1df06b(0xde)](),await this[_0x1df06b(0xc2)](),await this['checkConfigKeys'](),await this['handlerActionRoute'](),await this[_0x1df06b(0xd5)]();}async['checkConfigKeys'](){}async[a2_0xd432a3(0x9d)](){const _0xcd7261=a2_0xd432a3,_0x40bbb1=(0x0,core_1[_0xcd7261(0xff)])(intercept_1['INTERCEPT_KEY'],intercept_1[_0xcd7261(0xce)])||{};this[_0xcd7261(0x114)][_0xcd7261(0xab)](action_1[_0xcd7261(0xbb)],_0x373e1a=>{const _0x34d5ad=_0xcd7261,_0xb41114=_0x373e1a[_0x34d5ad(0xe3)];return{'before':async _0x3c0ddb=>{const _0x31fa35=_0x34d5ad;var _0x284a68,_0x3433f7;const _0x1ef4b3=(_0x284a68=_0x3c0ddb===null||_0x3c0ddb===void 0x0?void 0x0:_0x3c0ddb[_0x31fa35(0xc0)])===null||_0x284a68===void 0x0?void 0x0:_0x284a68[core_2[_0x31fa35(0xcc)]];if(_0x1ef4b3&&(_0xb41114===null||_0xb41114===void 0x0?void 0x0:_0xb41114[_0x31fa35(0xc8)])){if(!this[_0x31fa35(0xb8)][_0x31fa35(0xb6)]((_0x3433f7=_0x1ef4b3===null||_0x1ef4b3===void 0x0?void 0x0:_0x1ef4b3['request'])===null||_0x3433f7===void 0x0?void 0x0:_0x3433f7['headers']))throw new AnnError(ApiError_1[_0x31fa35(0x9f)][_0x31fa35(0x100)]);}},'around':async _0x139e79=>{const _0x6452e1=_0x34d5ad;var _0x446cf4,_0x4d5f49,_0x503f77;const _0x3ed9e8=(_0x446cf4=_0x139e79===null||_0x139e79===void 0x0?void 0x0:_0x139e79[_0x6452e1(0xc0)])===null||_0x446cf4===void 0x0?void 0x0:_0x446cf4[core_2[_0x6452e1(0xcc)]];if(_0x3ed9e8&&(_0xb41114===null||_0xb41114===void 0x0?void 0x0:_0xb41114['apimit'])&&((_0xb41114===null||_0xb41114===void 0x0?void 0x0:_0xb41114['intercept'])||typeof(_0xb41114===null||_0xb41114===void 0x0?void 0x0:_0xb41114[_0x6452e1(0xaa)])==_0x6452e1(0xae))){if(((_0x4d5f49=_0x3ed9e8[_0x6452e1(0xe4)])===null||_0x4d5f49===void 0x0?void 0x0:_0x4d5f49['device'])&&((_0x503f77=_0x40bbb1===null||_0x40bbb1===void 0x0?void 0x0:_0x40bbb1[_0x3ed9e8[_0x6452e1(0xe4)][_0x6452e1(0xfa)]])===null||_0x503f77===void 0x0?void 0x0:_0x503f77[_0x6452e1(0xf6)])>0x0)for(const _0x5dee35 of _0x40bbb1[_0x3ed9e8[_0x6452e1(0xe4)][_0x6452e1(0xfa)]]||[]){if(core_1[_0x6452e1(0xdc)]['isClass'](_0x5dee35)){const _0x2afcbc=await _0x3ed9e8[_0x6452e1(0x10c)][_0x6452e1(0xc7)](_0x5dee35);typeof(_0x2afcbc===null||_0x2afcbc===void 0x0?void 0x0:_0x2afcbc[_0x6452e1(0xcf)])==_0x6452e1(0x103)?await _0x2afcbc[_0x6452e1(0xcf)](_0x3ed9e8,typeof(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8['method'])=='string'&&(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8[_0x6452e1(0x107)])?_0x3ed9e8[_0x6452e1(0xb7)][_0x6452e1(0xb4)]()+'@'+(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8[_0x6452e1(0x107)]):undefined,_0xb41114)&&await _0x2afcbc[_0x6452e1(0xb0)](_0x3ed9e8,typeof(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8[_0x6452e1(0xb7)])==_0x6452e1(0x112)&&(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8['_matchedRoute'])?_0x3ed9e8['method'][_0x6452e1(0xb4)]()+'@'+(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8['_matchedRoute']):undefined,_0xb41114):await _0x2afcbc[_0x6452e1(0xb0)](_0x3ed9e8,typeof(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8['method'])==_0x6452e1(0x112)&&(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8[_0x6452e1(0x107)])?_0x3ed9e8[_0x6452e1(0xb7)][_0x6452e1(0xb4)]()+'@'+(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8[_0x6452e1(0x107)]):undefined,_0xb41114);}else core_1['Types']['isFunction'](_0x5dee35)&&await _0x5dee35(_0x3ed9e8,typeof(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8[_0x6452e1(0xb7)])==_0x6452e1(0x112)&&(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8['_matchedRoute'])?_0x3ed9e8[_0x6452e1(0xb7)][_0x6452e1(0xb4)]()+'@'+(_0x3ed9e8===null||_0x3ed9e8===void 0x0?void 0x0:_0x3ed9e8['_matchedRoute']):undefined,_0xb41114);}}return await _0x139e79[_0x6452e1(0xda)](..._0x139e79[_0x6452e1(0xc9)]);},'afterThrow':(_0x34c867,_0x548aa5)=>{throw _0x548aa5;}};});}async[a2_0xd432a3(0xd5)](){const _0x153f3a=a2_0xd432a3;this['application'][_0x153f3a(0xc6)]([_0x153f3a(0xd7)])['forEach'](_0x23e85a=>{const _0x5c7436=_0x153f3a;(_0x23e85a===null||_0x23e85a===void 0x0?void 0x0:_0x23e85a[_0x5c7436(0xe0)])&&Object['defineProperties'](_0x23e85a['context'],{'ok':{'value':function(_0x5ebf19,_0x20b42e,_0x566c11=0x0){return{'code':_0x566c11,'data':_0x5ebf19,'extra':_0x20b42e};}},'input':{'value':function(_0x144c6c,_0x55127a){const _0x44816c=_0x5c7436;var _0xa94f2b;const _0x4feca1=lodash['defaultsDeep']({},this['request']['body']||this[_0x44816c(0xa9)][((_0xa94f2b=config===null||config===void 0x0?void 0x0:config[_0x44816c(0xb9)])===null||_0xa94f2b===void 0x0?void 0x0:_0xa94f2b[_0x44816c(0x109)])||_0x44816c(0xf3)]||{},this[_0x44816c(0xa9)][_0x44816c(0xc3)]||{});return _0x144c6c?lodash[_0x44816c(0xba)](_0x4feca1,_0x144c6c,_0x55127a):_0x4feca1;}},'when':{'value':async function(_0x27cd73,_0x1d0ce2){const _0x994f35=_0x5c7436,_0x5d89b8=this['input'](_0x27cd73,null);if(!lodash[_0x994f35(0xd0)](_0x5d89b8))return await _0x1d0ce2(_0x5d89b8);}},'only':{'value':function(_0x1a3676){const _0x477235=_0x5c7436,_0x14859c={};for(let _0x234cac=0x0;_0x234cac<_0x1a3676[_0x477235(0xf6)];_0x234cac++){lodash[_0x477235(0xe5)](_0x1a3676[_0x234cac])&&_0x1a3676[_0x234cac][_0x477235(0xf6)]>0x0&&lodash[_0x477235(0xe6)](_0x1a3676[_0x234cac][0x0])&&(_0x14859c[_0x1a3676[_0x234cac][0x0]]=this['input'](_0x1a3676[_0x234cac][0x0],_0x1a3676[_0x234cac][_0x477235(0xf6)]>0x1?_0x1a3676[_0x234cac][0x1]:null));}return _0x14859c;}},'koasend':{'value':function(_0x168d25,_0x35b925){const _0x164319=_0x5c7436;if(!fs[_0x164319(0xea)](this[_0x164319(0xb3)][_0x164319(0xd4)]()+'/'+_0x168d25))return _0x164319(0xa0);return this[_0x164319(0xf2)](_0x35b925||_0x168d25),koasend(this,_0x168d25);}}});});}async[a2_0xd432a3(0xc2)](){const _0x515ac6=a2_0xd432a3;var _0x714a1,_0x2c5cc9;if(fs[_0x515ac6(0xea)](this[_0x515ac6(0xb3)][_0x515ac6(0xbd)]()+_0x515ac6(0x10d))&&fs[_0x515ac6(0x101)](this['app'][_0x515ac6(0xbd)]()+_0x515ac6(0x10d))[_0x515ac6(0xad)]()){const _0x239f73=this[_0x515ac6(0x113)][_0x515ac6(0xc5)](),_0x203ecc=((_0x714a1=_0x239f73===null||_0x239f73===void 0x0?void 0x0:_0x239f73[_0x515ac6(0xcb)])===null||_0x714a1===void 0x0?void 0x0:_0x714a1['clients'])||{};for(const _0xae786f of fs[_0x515ac6(0xf8)](this['app'][_0x515ac6(0xbd)]()+'/apps')){if(!fs[_0x515ac6(0x101)](this[_0x515ac6(0xb3)][_0x515ac6(0xbd)]()+'/apps/'+_0xae786f)[_0x515ac6(0xad)]())continue;if(_0x203ecc===null||_0x203ecc===void 0x0?void 0x0:_0x203ecc[_0xae786f])continue;_0x203ecc[_0xae786f]=Object[_0x515ac6(0xef)]({},((_0x2c5cc9=_0x239f73===null||_0x239f73===void 0x0?void 0x0:_0x239f73[_0x515ac6(0xcb)])===null||_0x2c5cc9===void 0x0?void 0x0:_0x2c5cc9[_0x515ac6(0xed)])||{'maxSize':'1m','dir':this[_0x515ac6(0xb3)][_0x515ac6(0xd4)]()+'/runtime'},{'enableJSON':!![],'enableConsole':this['environment'][_0x515ac6(0xd3)](),'fileLogName':_0xae786f+_0x515ac6(0xb2),'dir':this['app'][_0x515ac6(0xd4)]()+_0x515ac6(0xcd)+_0xae786f+_0x515ac6(0x115)});}Object['keys'](_0x203ecc)['length']>0x0&&(!_0x239f73['midwayLogger']&&(_0x239f73[_0x515ac6(0xcb)]={'default':{'maxSize':'1m','dir':this[_0x515ac6(0xb3)][_0x515ac6(0xd4)]()+'/runtime'}}),_0x239f73[_0x515ac6(0xcb)]['clients']=_0x203ecc),this[_0x515ac6(0x113)][_0x515ac6(0xe2)](_0x239f73);}}async[a2_0xd432a3(0xde)](){const _0x162b9b=a2_0xd432a3;var _0x1dcb73,_0x23a0a1,_0x3b3e48,_0x48be32,_0x13a252,_0x4acd43;const _0x109106=this[_0x162b9b(0x113)][_0x162b9b(0xc5)]();((_0x23a0a1=(_0x1dcb73=_0x109106===null||_0x109106===void 0x0?void 0x0:_0x109106[_0x162b9b(0xca)])===null||_0x1dcb73===void 0x0?void 0x0:_0x1dcb73[_0x162b9b(0xf1)])===null||_0x23a0a1===void 0x0?void 0x0:_0x23a0a1[_0x162b9b(0xe7)])&&Object[_0x162b9b(0x9c)](_0x109106[_0x162b9b(0xca)][_0x162b9b(0xf1)])[_0x162b9b(0xf6)]>0x1&&delete _0x109106[_0x162b9b(0xca)][_0x162b9b(0xf1)]['DEFAULT'];if((_0x3b3e48=_0x109106===null||_0x109106===void 0x0?void 0x0:_0x109106['staticFile'])===null||_0x3b3e48===void 0x0?void 0x0:_0x3b3e48[_0x162b9b(0xd6)])for(const _0x5c22dd in _0x109106[_0x162b9b(0xdd)][_0x162b9b(0xd6)]){((_0x48be32=_0x109106['staticFile']['dirs'][_0x5c22dd])===null||_0x48be32===void 0x0?void 0x0:_0x48be32[_0x162b9b(0x106)])&&typeof((_0x13a252=_0x109106[_0x162b9b(0xdd)]['dirs'][_0x5c22dd])===null||_0x13a252===void 0x0?void 0x0:_0x13a252[_0x162b9b(0x106)])==_0x162b9b(0x112)&&!fs[_0x162b9b(0xea)](_0x109106[_0x162b9b(0xdd)]['dirs'][_0x5c22dd][_0x162b9b(0x106)])&&(fs[_0x162b9b(0x111)](_0x109106[_0x162b9b(0xdd)][_0x162b9b(0xd6)][_0x5c22dd][_0x162b9b(0x106)],{'recursive':!![]}),console[_0x162b9b(0xa3)](_0x162b9b(0xd2)+_0x109106[_0x162b9b(0xdd)][_0x162b9b(0xd6)][_0x5c22dd]['dir']));}((_0x4acd43=_0x109106===null||_0x109106===void 0x0?void 0x0:_0x109106[_0x162b9b(0xfe)])===null||_0x4acd43===void 0x0?void 0x0:_0x4acd43[_0x162b9b(0xc4)])&&!fs[_0x162b9b(0xea)](_0x109106[_0x162b9b(0xfe)][_0x162b9b(0xc4)])&&(fs[_0x162b9b(0x111)](_0x109106['upload']['tmpdir'],{'recursive':!![]}),console[_0x162b9b(0xa3)](_0x162b9b(0xa2)+_0x109106[_0x162b9b(0xfe)][_0x162b9b(0xc4)])),this[_0x162b9b(0x113)][_0x162b9b(0xe2)](_0x109106);}};__decorate([(0x0,core_1[a2_0xd432a3(0xf0)])(),__metadata(a2_0xd432a3(0xe1),Object)],CustomConfiguration[a2_0xd432a3(0xdb)],a2_0xd432a3(0xb3),void 0x0),__decorate([(0x0,core_1[a2_0xd432a3(0xf4)])(),__metadata(a2_0xd432a3(0xe1),core_2[a2_0xd432a3(0xac)])],CustomConfiguration['prototype'],a2_0xd432a3(0x113),void 0x0),__decorate([(0x0,core_1[a2_0xd432a3(0xf4)])(),__metadata(a2_0xd432a3(0xe1),core_2[a2_0xd432a3(0xf5)])],CustomConfiguration['prototype'],'decorator',void 0x0),__decorate([(0x0,core_1[a2_0xd432a3(0xf4)])(),__metadata('design:type',core_2[a2_0xd432a3(0xfb)])],CustomConfiguration[a2_0xd432a3(0xdb)],'application',void 0x0),__decorate([(0x0,core_1[a2_0xd432a3(0xf4)])(),__metadata(a2_0xd432a3(0xe1),core_2['MidwayEnvironmentService'])],CustomConfiguration[a2_0xd432a3(0xdb)],a2_0xd432a3(0xd1),void 0x0),__decorate([(0x0,core_1[a2_0xd432a3(0xf4)])(),__metadata('design:type',ApiService_1[a2_0xd432a3(0xb8)])],CustomConfiguration[a2_0xd432a3(0xdb)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0xd432a3(0xee)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':'anncic-api','conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0xd432a3(0xfd)]=CustomConfiguration;
|
|
1
|
+
const a2_0x62a8c6=a2_0x8a39;(function(_0x3dcc12,_0x5abbbb){const _0xe192b8=a2_0x8a39,_0x242a85=_0x3dcc12();while(!![]){try{const _0x26494f=-parseInt(_0xe192b8(0xc3))/0x1*(-parseInt(_0xe192b8(0xb1))/0x2)+-parseInt(_0xe192b8(0x9f))/0x3*(parseInt(_0xe192b8(0xae))/0x4)+parseInt(_0xe192b8(0xd8))/0x5*(-parseInt(_0xe192b8(0x95))/0x6)+parseInt(_0xe192b8(0x100))/0x7+parseInt(_0xe192b8(0x105))/0x8+-parseInt(_0xe192b8(0xa3))/0x9+parseInt(_0xe192b8(0xd7))/0xa;if(_0x26494f===_0x5abbbb)break;else _0x242a85['push'](_0x242a85['shift']());}catch(_0x5150d2){_0x242a85['push'](_0x242a85['shift']());}}}(a2_0x33a9,0xe136b));const a2_0x2754c4=(function(){let _0x202619=!![];return function(_0x37fd92,_0x25813f){const _0x2ae86a=_0x202619?function(){const _0x420527=a2_0x8a39;if(_0x25813f){const _0x226b7e=_0x25813f[_0x420527(0xc0)](_0x37fd92,arguments);return _0x25813f=null,_0x226b7e;}}:function(){};return _0x202619=![],_0x2ae86a;};}()),a2_0x242efe=a2_0x2754c4(this,function(){const _0x38a7dc=a2_0x8a39;return a2_0x242efe[_0x38a7dc(0xdf)]()[_0x38a7dc(0xf1)](_0x38a7dc(0xa5))[_0x38a7dc(0xdf)]()[_0x38a7dc(0x109)](a2_0x242efe)[_0x38a7dc(0xf1)]('(((.+)+)+)+$');});a2_0x242efe();'use strict';var __decorate=this&&this[a2_0x62a8c6(0xcd)]||function(_0x2dc9c4,_0x546e65,_0x3ac514,_0x25ae42){const _0x43cd09=a2_0x62a8c6;var _0x2a5148=arguments[_0x43cd09(0xfe)],_0x11f0b6=_0x2a5148<0x3?_0x546e65:_0x25ae42===null?_0x25ae42=Object['getOwnPropertyDescriptor'](_0x546e65,_0x3ac514):_0x25ae42,_0x4e647d;if(typeof Reflect===_0x43cd09(0x8f)&&typeof Reflect[_0x43cd09(0xba)]===_0x43cd09(0x94))_0x11f0b6=Reflect['decorate'](_0x2dc9c4,_0x546e65,_0x3ac514,_0x25ae42);else{for(var _0x5706cc=_0x2dc9c4[_0x43cd09(0xfe)]-0x1;_0x5706cc>=0x0;_0x5706cc--)if(_0x4e647d=_0x2dc9c4[_0x5706cc])_0x11f0b6=(_0x2a5148<0x3?_0x4e647d(_0x11f0b6):_0x2a5148>0x3?_0x4e647d(_0x546e65,_0x3ac514,_0x11f0b6):_0x4e647d(_0x546e65,_0x3ac514))||_0x11f0b6;}return _0x2a5148>0x3&&_0x11f0b6&&Object[_0x43cd09(0xd3)](_0x546e65,_0x3ac514,_0x11f0b6),_0x11f0b6;},__metadata=this&&this['__metadata']||function(_0x3948ba,_0xf42186){const _0x51f1f0=a2_0x62a8c6;if(typeof Reflect===_0x51f1f0(0x8f)&&typeof Reflect['metadata']===_0x51f1f0(0x94))return Reflect[_0x51f1f0(0x8e)](_0x3948ba,_0xf42186);};Object['defineProperty'](exports,a2_0x62a8c6(0xd5),{'value':!![]}),exports[a2_0x62a8c6(0xf8)]=void 0x0;const core_1=require('@midwayjs/core'),core_2=require(a2_0x62a8c6(0xa1)),ApiError_1=require(a2_0x62a8c6(0x9d)),ApiService_1=require(a2_0x62a8c6(0xcf)),action_1=require(a2_0x62a8c6(0xfc)),intercept_1=require(a2_0x62a8c6(0xc4)),fs=require('fs'),koasend=require(a2_0x62a8c6(0xc5)),koa=require(a2_0x62a8c6(0xb7)),i18n=require(a2_0x62a8c6(0xc8)),upload=require(a2_0x62a8c6(0xa0)),staticFile=require(a2_0x62a8c6(0x93)),crossDomain=require('@midwayjs/cross-domain'),ConfigDefault=require(a2_0x62a8c6(0xd1)),ConfigProduction=require(a2_0x62a8c6(0xc1)),anncic=require(a2_0x62a8c6(0xe6)),anncicCache=require(a2_0x62a8c6(0x107)),anncicEvent=require(a2_0x62a8c6(0xf9)),anncicTypeorm=require(a2_0x62a8c6(0x104)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require(a2_0x62a8c6(0x91));function a2_0x8a39(_0x25d1f9,_0x4fc3e1){const _0x7785ea=a2_0x33a9();return a2_0x8a39=function(_0x242efe,_0x2754c4){_0x242efe=_0x242efe-0x8a;let _0x33a9e3=_0x7785ea[_0x242efe];return _0x33a9e3;},a2_0x8a39(_0x25d1f9,_0x4fc3e1);}let CustomConfiguration=class CustomConfiguration{async[a2_0x62a8c6(0xe3)](){const _0x9eb807=a2_0x62a8c6;await this[_0x9eb807(0xfa)](),await this[_0x9eb807(0x97)](),await this[_0x9eb807(0xd6)](),await this[_0x9eb807(0x9b)](),await this[_0x9eb807(0xc2)]();}async['checkConfigKeys'](){}async[a2_0x62a8c6(0x9b)](){const _0x18e93b=a2_0x62a8c6,_0x458e32=(0x0,core_1[_0x18e93b(0xea)])(intercept_1[_0x18e93b(0xab)],intercept_1[_0x18e93b(0xcb)])||{};this[_0x18e93b(0xfd)][_0x18e93b(0x9e)](action_1['ACTION_ROUTE_KEY'],_0x2cc4a9=>{const _0x219c75=_0x18e93b,_0x1ae185=_0x2cc4a9[_0x219c75(0x8e)];return{'before':async _0x448f50=>{const _0x24e4dd=_0x219c75;var _0x134451,_0x459ddd;const _0x811639=(_0x134451=_0x448f50===null||_0x448f50===void 0x0?void 0x0:_0x448f50[_0x24e4dd(0xad)])===null||_0x134451===void 0x0?void 0x0:_0x134451[core_2[_0x24e4dd(0xb5)]];if(_0x811639&&(_0x1ae185===null||_0x1ae185===void 0x0?void 0x0:_0x1ae185[_0x24e4dd(0x102)])){if(!this[_0x24e4dd(0x8a)][_0x24e4dd(0xaf)]((_0x459ddd=_0x811639===null||_0x811639===void 0x0?void 0x0:_0x811639[_0x24e4dd(0xeb)])===null||_0x459ddd===void 0x0?void 0x0:_0x459ddd[_0x24e4dd(0xbb)]))throw new AnnError(ApiError_1['ApiError'][_0x24e4dd(0x90)]);}},'around':async _0xce6d2c=>{const _0x56399a=_0x219c75;var _0x273fbc,_0x2b89d5,_0xadf127;const _0x8c366d=(_0x273fbc=_0xce6d2c===null||_0xce6d2c===void 0x0?void 0x0:_0xce6d2c['target'])===null||_0x273fbc===void 0x0?void 0x0:_0x273fbc[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x8c366d&&(_0x1ae185===null||_0x1ae185===void 0x0?void 0x0:_0x1ae185[_0x56399a(0x102)])&&((_0x1ae185===null||_0x1ae185===void 0x0?void 0x0:_0x1ae185[_0x56399a(0xaa)])||typeof(_0x1ae185===null||_0x1ae185===void 0x0?void 0x0:_0x1ae185[_0x56399a(0xaa)])==_0x56399a(0xd4))){if(((_0x2b89d5=_0x8c366d[_0x56399a(0xbb)])===null||_0x2b89d5===void 0x0?void 0x0:_0x2b89d5[_0x56399a(0x9c)])&&((_0xadf127=_0x458e32===null||_0x458e32===void 0x0?void 0x0:_0x458e32[_0x8c366d[_0x56399a(0xbb)][_0x56399a(0x9c)]])===null||_0xadf127===void 0x0?void 0x0:_0xadf127[_0x56399a(0xfe)])>0x0)for(const _0x364d5c of _0x458e32[_0x8c366d[_0x56399a(0xbb)][_0x56399a(0x9c)]]||[]){if(core_1[_0x56399a(0xb2)]['isClass'](_0x364d5c)){const _0x2c6414=await _0x8c366d[_0x56399a(0xca)][_0x56399a(0xb3)](_0x364d5c);typeof(_0x2c6414===null||_0x2c6414===void 0x0?void 0x0:_0x2c6414[_0x56399a(0xc6)])==_0x56399a(0x94)?await _0x2c6414[_0x56399a(0xc6)](_0x8c366d,typeof(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf4)])==_0x56399a(0xf5)&&(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)])?_0x8c366d[_0x56399a(0xf4)][_0x56399a(0xa7)]()+'@'+(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)]):undefined,_0x1ae185)&&await _0x2c6414[_0x56399a(0xff)](_0x8c366d,typeof(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf4)])==_0x56399a(0xf5)&&(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)])?_0x8c366d['method'][_0x56399a(0xa7)]()+'@'+(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d['_matchedRoute']):undefined,_0x1ae185):await _0x2c6414['handler'](_0x8c366d,typeof(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d['method'])==_0x56399a(0xf5)&&(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)])?_0x8c366d[_0x56399a(0xf4)][_0x56399a(0xa7)]()+'@'+(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)]):undefined,_0x1ae185);}else core_1[_0x56399a(0xb2)][_0x56399a(0xbc)](_0x364d5c)&&await _0x364d5c(_0x8c366d,typeof(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf4)])==_0x56399a(0xf5)&&(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)])?_0x8c366d['method'][_0x56399a(0xa7)]()+'@'+(_0x8c366d===null||_0x8c366d===void 0x0?void 0x0:_0x8c366d[_0x56399a(0xf0)]):undefined,_0x1ae185);}}return await _0xce6d2c['proceed'](..._0xce6d2c['args']);},'afterThrow':(_0x2ab4f1,_0x4f270b)=>{throw _0x4f270b;}};});}async['hanlderApplications'](){const _0x1767f0=a2_0x62a8c6;this[_0x1767f0(0xde)][_0x1767f0(0x8c)]([_0x1767f0(0xe9)])[_0x1767f0(0xa6)](_0x433737=>{const _0x49a460=_0x1767f0;(_0x433737===null||_0x433737===void 0x0?void 0x0:_0x433737[_0x49a460(0xb6)])&&Object[_0x49a460(0xf3)](_0x433737['context'],{'ok':{'value':function(_0x3cfdb8,_0x4b2dae,_0x4a2bfa=0x0){return{'code':_0x4a2bfa,'data':_0x3cfdb8,'extra':_0x4b2dae};}},'input':{'value':function(_0x50a0c1,_0x5a2b00){const _0x4de83d=_0x49a460;var _0x43b052;const _0x15f283=lodash[_0x4de83d(0xe7)]({},this[_0x4de83d(0xeb)][_0x4de83d(0xa4)]||this[_0x4de83d(0xeb)][((_0x43b052=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x43b052===void 0x0?void 0x0:_0x43b052['key'])||_0x4de83d(0xa4)]||{},this[_0x4de83d(0xeb)]['query']||{});return _0x50a0c1?lodash[_0x4de83d(0xe5)](_0x15f283,_0x50a0c1,_0x5a2b00):_0x15f283;}},'when':{'value':async function(_0x41682d,_0x215b42){const _0x1574a1=_0x49a460,_0x1a1993=this['input'](_0x41682d,null);if(!lodash[_0x1574a1(0xbe)](_0x1a1993))return await _0x215b42(_0x1a1993);}},'only':{'value':function(_0x24b017){const _0x2bb398=_0x49a460,_0x1ad069={};for(let _0xedcf29=0x0;_0xedcf29<_0x24b017[_0x2bb398(0xfe)];_0xedcf29++){lodash[_0x2bb398(0xfb)](_0x24b017[_0xedcf29])&&_0x24b017[_0xedcf29][_0x2bb398(0xfe)]>0x0&&lodash['isString'](_0x24b017[_0xedcf29][0x0])&&(_0x1ad069[_0x24b017[_0xedcf29][0x0]]=this[_0x2bb398(0xe4)](_0x24b017[_0xedcf29][0x0],_0x24b017[_0xedcf29][_0x2bb398(0xfe)]>0x1?_0x24b017[_0xedcf29][0x1]:null));}return _0x1ad069;}},'koasend':{'value':function(_0x2e8916,_0x256a65){const _0xe4dae4=_0x49a460;if(!fs['existsSync'](this[_0xe4dae4(0x92)][_0xe4dae4(0xed)]()+'/'+_0x2e8916))return _0xe4dae4(0xb8);return this[_0xe4dae4(0xb4)](_0x256a65||_0x2e8916),koasend(this,_0x2e8916);}}});});}async[a2_0x62a8c6(0x97)](){const _0x9c8341=a2_0x62a8c6;var _0x2d8fe9,_0x1db505;if(fs[_0x9c8341(0xbd)](this[_0x9c8341(0x92)][_0x9c8341(0x108)]()+_0x9c8341(0xd9))&&fs[_0x9c8341(0xdc)](this[_0x9c8341(0x92)][_0x9c8341(0x108)]()+'/apps')[_0x9c8341(0xf6)]()){const _0x53dc93=this[_0x9c8341(0x9a)]['getConfiguration'](),_0x3c614c=((_0x2d8fe9=_0x53dc93===null||_0x53dc93===void 0x0?void 0x0:_0x53dc93[_0x9c8341(0xd0)])===null||_0x2d8fe9===void 0x0?void 0x0:_0x2d8fe9[_0x9c8341(0xec)])||{};for(const _0x2f6731 of fs[_0x9c8341(0x8d)](this['app']['getBaseDir']()+_0x9c8341(0xd9))){if(!fs[_0x9c8341(0xdc)](this[_0x9c8341(0x92)][_0x9c8341(0x108)]()+_0x9c8341(0xd2)+_0x2f6731)['isDirectory']())continue;if(_0x3c614c===null||_0x3c614c===void 0x0?void 0x0:_0x3c614c[_0x2f6731])continue;_0x3c614c[_0x2f6731]=Object[_0x9c8341(0xef)]({},((_0x1db505=_0x53dc93===null||_0x53dc93===void 0x0?void 0x0:_0x53dc93['midwayLogger'])===null||_0x1db505===void 0x0?void 0x0:_0x1db505[_0x9c8341(0xa9)])||{'maxSize':'1m','dir':this[_0x9c8341(0x92)][_0x9c8341(0xed)]()+_0x9c8341(0xce)},{'enableJSON':!![],'enableConsole':this[_0x9c8341(0xb9)][_0x9c8341(0x98)](),'fileLogName':_0x2f6731+_0x9c8341(0xda),'dir':this[_0x9c8341(0x92)][_0x9c8341(0xed)]()+_0x9c8341(0x106)+_0x2f6731+_0x9c8341(0xac)});}Object[_0x9c8341(0xe1)](_0x3c614c)[_0x9c8341(0xfe)]>0x0&&(!_0x53dc93[_0x9c8341(0xd0)]&&(_0x53dc93[_0x9c8341(0xd0)]={'default':{'maxSize':'1m','dir':this['app'][_0x9c8341(0xed)]()+'/runtime'}}),_0x53dc93[_0x9c8341(0xd0)][_0x9c8341(0xec)]=_0x3c614c),this[_0x9c8341(0x9a)][_0x9c8341(0xc9)](_0x53dc93);}}async['filterConfig'](){const _0x38ae8c=a2_0x62a8c6;var _0x133268,_0x2f5b00,_0x4070e4,_0x461d88,_0x4f49bb,_0x106112;const _0x4e691a=this[_0x38ae8c(0x9a)]['getConfiguration']();((_0x2f5b00=(_0x133268=_0x4e691a===null||_0x4e691a===void 0x0?void 0x0:_0x4e691a[_0x38ae8c(0xa2)])===null||_0x133268===void 0x0?void 0x0:_0x133268['devices'])===null||_0x2f5b00===void 0x0?void 0x0:_0x2f5b00[_0x38ae8c(0xf7)])&&Object[_0x38ae8c(0xe1)](_0x4e691a[_0x38ae8c(0xa2)][_0x38ae8c(0xb0)])[_0x38ae8c(0xfe)]>0x1&&delete _0x4e691a[_0x38ae8c(0xa2)][_0x38ae8c(0xb0)][_0x38ae8c(0xf7)];if((_0x4070e4=_0x4e691a===null||_0x4e691a===void 0x0?void 0x0:_0x4e691a[_0x38ae8c(0x101)])===null||_0x4070e4===void 0x0?void 0x0:_0x4070e4[_0x38ae8c(0xdb)])for(const _0x27394f in _0x4e691a[_0x38ae8c(0x101)][_0x38ae8c(0xdb)]){((_0x461d88=_0x4e691a[_0x38ae8c(0x101)][_0x38ae8c(0xdb)][_0x27394f])===null||_0x461d88===void 0x0?void 0x0:_0x461d88[_0x38ae8c(0x96)])&&typeof((_0x4f49bb=_0x4e691a[_0x38ae8c(0x101)][_0x38ae8c(0xdb)][_0x27394f])===null||_0x4f49bb===void 0x0?void 0x0:_0x4f49bb[_0x38ae8c(0x96)])==_0x38ae8c(0xf5)&&!fs[_0x38ae8c(0xbd)](_0x4e691a['staticFile'][_0x38ae8c(0xdb)][_0x27394f]['dir'])&&(fs[_0x38ae8c(0x8b)](_0x4e691a['staticFile'][_0x38ae8c(0xdb)][_0x27394f][_0x38ae8c(0x96)],{'recursive':!![]}),console[_0x38ae8c(0xf2)](_0x38ae8c(0x10a)+_0x4e691a[_0x38ae8c(0x101)][_0x38ae8c(0xdb)][_0x27394f][_0x38ae8c(0x96)]));}((_0x106112=_0x4e691a===null||_0x4e691a===void 0x0?void 0x0:_0x4e691a[_0x38ae8c(0xc7)])===null||_0x106112===void 0x0?void 0x0:_0x106112['tmpdir'])&&!fs[_0x38ae8c(0xbd)](_0x4e691a[_0x38ae8c(0xc7)][_0x38ae8c(0xe8)])&&(fs[_0x38ae8c(0x8b)](_0x4e691a['upload'][_0x38ae8c(0xe8)],{'recursive':!![]}),console[_0x38ae8c(0xf2)](_0x38ae8c(0xe0)+_0x4e691a['upload'][_0x38ae8c(0xe8)])),this[_0x38ae8c(0x9a)][_0x38ae8c(0xc9)](_0x4e691a);}};__decorate([(0x0,core_1[a2_0x62a8c6(0xee)])(),__metadata(a2_0x62a8c6(0x103),Object)],CustomConfiguration[a2_0x62a8c6(0xdd)],a2_0x62a8c6(0x92),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x62a8c6(0x103),core_2[a2_0x62a8c6(0xcc)])],CustomConfiguration[a2_0x62a8c6(0xdd)],a2_0x62a8c6(0x9a),void 0x0),__decorate([(0x0,core_1[a2_0x62a8c6(0x10b)])(),__metadata('design:type',core_2[a2_0x62a8c6(0x99)])],CustomConfiguration[a2_0x62a8c6(0xdd)],'decorator',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata('design:type',core_2['MidwayApplicationManager'])],CustomConfiguration[a2_0x62a8c6(0xdd)],'application',void 0x0),__decorate([(0x0,core_1[a2_0x62a8c6(0x10b)])(),__metadata(a2_0x62a8c6(0x103),core_2[a2_0x62a8c6(0xa8)])],CustomConfiguration[a2_0x62a8c6(0xdd)],a2_0x62a8c6(0xb9),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x62a8c6(0x103),ApiService_1[a2_0x62a8c6(0x8a)])],CustomConfiguration[a2_0x62a8c6(0xdd)],a2_0x62a8c6(0x8a),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x62a8c6(0xe2)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x62a8c6(0xbf),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;function a2_0x33a9(){const _0x361b5d=['./types/action','decorator','length','handler','11169683TZdZgU','staticFile','apimit','design:type','@anncic-api/typeorm','9452824MUcsDn','/runtime/apps-','@anncic-api/cache','getBaseDir','constructor','Anncic-api\x20static-file\x20:\x20mkdir\x20','Inject','ApiService','mkdirSync','getApplications','readdirSync','metadata','object','HEADERS_SIGNATURE','anncic-apihelper','app','@midwayjs/static-file','function','8286ydhURu','dir','loggerConfig','isDevelopmentEnvironment','MidwayDecoratorService','config','handlerActionRoute','device','./exception/ApiError','registerMethodHandler','545799vgkSXi','@midwayjs/upload','@midwayjs/core','anncicapi','16100352daNxdL','body','(((.+)+)+)+$','forEach','toLowerCase','MidwayEnvironmentService','default','intercept','INTERCEPT_KEY','-log','target','8KxjOac','checksign','devices','58346EVNTaO','Types','getAsync','attachment','REQUEST_OBJ_CTX_KEY','context','@midwayjs/koa','文件不存在','environment','decorate','headers','isFunction','existsSync','isNull','anncic-api','apply','./config/config.production','hanlderApplications','17SgFkSi','./types/intercept','koa-send','match','upload','@midwayjs/i18n','addObject','requestContext','InterceptTargetTmp','MidwayConfigService','__decorate','/runtime','./service/ApiService','midwayLogger','./config/config.default','/apps/','defineProperty','undefined','__esModule','checkConfigKeys','14910190mXyvpp','6115FCJhwc','/apps','.log','dirs','statSync','prototype','application','toString','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','keys','Configuration','onReady','input','get','@anncic-api/core','defaultsDeep','tmpdir','koa','getClassMetadata','request','clients','getAppDir','App','assign','_matchedRoute','search','log','defineProperties','method','string','isDirectory','DEFAULT','CustomConfiguration','@anncic-api/event','filterConfig','isArray'];a2_0x33a9=function(){return _0x361b5d;};return a2_0x33a9();}
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x1785aa=a3_0x54c3;(function(_0x5da5c2,_0xcc3efc){const _0x1ebd5d=a3_0x54c3,_0x39ee6b=_0x5da5c2();while(!![]){try{const _0x2af469=-parseInt(_0x1ebd5d(0x169))/0x1+parseInt(_0x1ebd5d(0x15b))/0x2*(parseInt(_0x1ebd5d(0x13d))/0x3)+-parseInt(_0x1ebd5d(0x139))/0x4+parseInt(_0x1ebd5d(0x147))/0x5+-parseInt(_0x1ebd5d(0x148))/0x6*(parseInt(_0x1ebd5d(0x130))/0x7)+parseInt(_0x1ebd5d(0x12f))/0x8*(-parseInt(_0x1ebd5d(0x15a))/0x9)+-parseInt(_0x1ebd5d(0x149))/0xa*(-parseInt(_0x1ebd5d(0x156))/0xb);if(_0x2af469===_0xcc3efc)break;else _0x39ee6b['push'](_0x39ee6b['shift']());}catch(_0x167a07){_0x39ee6b['push'](_0x39ee6b['shift']());}}}(a3_0x3510,0xa6949));const a3_0x21ac8b=(function(){let _0xdcd72d=!![];return function(_0x4e6d8a,_0xe88345){const _0x55c3d9=_0xdcd72d?function(){const _0x21bdef=a3_0x54c3;if(_0xe88345){const _0x4376db=_0xe88345[_0x21bdef(0x164)](_0x4e6d8a,arguments);return _0xe88345=null,_0x4376db;}}:function(){};return _0xdcd72d=![],_0x55c3d9;};}()),a3_0x155535=a3_0x21ac8b(this,function(){const _0x7a9f88=a3_0x54c3;return a3_0x155535[_0x7a9f88(0x155)]()['search'](_0x7a9f88(0x163))[_0x7a9f88(0x155)]()['constructor'](a3_0x155535)[_0x7a9f88(0x140)]('(((.+)+)+)+$');});a3_0x155535();'use strict';function a3_0x54c3(_0x50988d,_0x574e54){const _0x495c65=a3_0x3510();return a3_0x54c3=function(_0x155535,_0x21ac8b){_0x155535=_0x155535-0x12e;let _0x351063=_0x495c65[_0x155535];return _0x351063;},a3_0x54c3(_0x50988d,_0x574e54);}Object[a3_0x1785aa(0x141)](exports,a3_0x1785aa(0x166),{'value':!![]}),exports['parseRoute']=exports[a3_0x1785aa(0x13c)]=exports[a3_0x1785aa(0x153)]=void 0x0;const fs=require('fs'),validator_1=require('@anncic-api/validator'),core_1=require(a3_0x1785aa(0x14e)),core_2=require(a3_0x1785aa(0x14e)),action_1=require(a3_0x1785aa(0x131));function Action(_0x405c72,_0x4f1dae,_0x446f29={'middleware':[],'sensitive':!![]}){return _0x39606f=>{const _0x579623=a3_0x54c3;var _0xc50e58;_0x446f29[_0x579623(0x17a)]=_0x4f1dae;const _0x17ad24=parseRoute(_0x405c72);if(_0x17ad24[_0x579623(0x179)]){_0x446f29['prefix']=_0x446f29['prefix']?'/'+_0x17ad24[_0x579623(0x179)]+'/'+_0x446f29[_0x579623(0x13b)]:'/'+_0x17ad24[_0x579623(0x143)];_0x17ad24['prefix']&&(_0x446f29[_0x579623(0x13b)]='/'+_0x17ad24[_0x579623(0x13b)]+'/'+_0x446f29[_0x579623(0x13b)]);if(fs[_0x579623(0x138)](_0x17ad24[_0x579623(0x161)]+_0x579623(0x168)+_0x17ad24[_0x579623(0x179)]+_0x579623(0x15c)+(lodash[_0x579623(0x14f)](_0x17ad24[_0x579623(0x134)],'ts')?'ts':'js'))){const _0x512d2b=include(_0x17ad24['rootpath']+'/apps/'+_0x17ad24['module']+_0x579623(0x15c)+(lodash[_0x579623(0x14f)](_0x17ad24['filepath'],'ts')?'ts':'js'));if(_0x512d2b[_0x579623(0x167)]&&lodash['isArray'](_0x512d2b[_0x579623(0x167)])&&_0x512d2b[_0x579623(0x167)][_0x579623(0x14d)]>0x0)for(let _0x1b540e in _0x512d2b[_0x579623(0x167)]){if(((_0xc50e58=_0x512d2b===null||_0x512d2b===void 0x0?void 0x0:_0x512d2b[_0x579623(0x160)])===null||_0xc50e58===void 0x0?void 0x0:_0xc50e58[_0x579623(0x14d)])>0x0&&_0x512d2b[_0x579623(0x160)]['indexOf'](_0x512d2b['middleware'][_0x1b540e])!=-0x1)continue;_0x446f29[_0x579623(0x167)][_0x579623(0x13a)](_0x512d2b['middleware'][_0x1b540e]);}const _0x542db7=(0x0,core_1[_0x579623(0x157)])(action_1[_0x579623(0x165)],action_1[_0x579623(0x159)])||{};_0x542db7[''+_0x17ad24[_0x579623(0x179)]]=_0x512d2b,(0x0,core_1[_0x579623(0x172)])(action_1['APPSCONFIG_KEY'],_0x542db7,action_1[_0x579623(0x159)]);}_0x446f29[_0x579623(0x13b)]=_0x446f29[_0x579623(0x13b)][_0x579623(0x16c)]()[_0x579623(0x137)](/\/{2,}/g,'/'),(0x0,core_1['saveModule'])(action_1[_0x579623(0x144)],_0x39606f),(0x0,core_1['Controller'])(_0x446f29[_0x579623(0x13b)],_0x446f29)(_0x39606f),(0x0,core_1[_0x579623(0x172)])(action_1[_0x579623(0x144)],{'prefix':_0x446f29['prefix'],'pprefix':_0x17ad24[_0x579623(0x13b)],'module':_0x17ad24[_0x579623(0x179)],'filepath':_0x17ad24[_0x579623(0x134)],'routerOptions':_0x446f29},_0x39606f);}else _0x446f29[_0x579623(0x13b)]=_0x446f29['prefix']?'/'+_0x446f29[_0x579623(0x13b)]:'/'+_0x17ad24[_0x579623(0x143)],_0x17ad24[_0x579623(0x13b)]&&(_0x446f29['prefix']='/'+_0x17ad24[_0x579623(0x13b)]+'/'+_0x446f29[_0x579623(0x13b)]),_0x446f29['prefix']=_0x446f29[_0x579623(0x13b)][_0x579623(0x16c)]()[_0x579623(0x137)](/\/{2,}/g,'/'),(0x0,core_1[_0x579623(0x152)])(action_1[_0x579623(0x144)],_0x39606f),(0x0,core_1[_0x579623(0x136)])(_0x446f29[_0x579623(0x13b)],_0x446f29)(_0x39606f),(0x0,core_1[_0x579623(0x172)])(action_1[_0x579623(0x144)],{'prefix':_0x446f29[_0x579623(0x13b)],'module':_0x17ad24[_0x579623(0x179)],'pprefix':_0x17ad24[_0x579623(0x13b)],'filepath':_0x17ad24[_0x579623(0x134)],'routerOptions':_0x446f29},_0x39606f);};}exports[a3_0x1785aa(0x153)]=Action,Action[a3_0x1785aa(0x174)]=function(_0x2fe200,_0x5acb22='/',_0x52c4d7={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0xf8ab23,_0x1ff03f,_0x232699)=>{const _0xab0331=a3_0x54c3;ActionApi(_0x2fe200,_0xab0331(0x174),_0x5acb22,_0x52c4d7)(_0xf8ab23,_0x1ff03f,_0x232699);};},Action['post']=function(_0x27f0d4,_0x34603f='/',_0x50dd93={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x3ee09c,_0x26257f,_0x4b8e67)=>{const _0x58d0cc=a3_0x54c3;ActionApi(_0x27f0d4,_0x58d0cc(0x170),_0x34603f,_0x50dd93)(_0x3ee09c,_0x26257f,_0x4b8e67);};};function ActionApi(_0x54f408,_0x5388bf=a3_0x1785aa(0x174),_0x317107='/',_0x14aa87={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x3c4fe3,_0x18d580,_0xa8c6b4)=>{const _0x1a3261=a3_0x54c3;var _0xe59198,_0x41b1a9,_0x33d38e;!_0x14aa87[_0x1a3261(0x167)]&&(_0x14aa87[_0x1a3261(0x167)]=[]);!((_0xe59198=_0x14aa87===null||_0x14aa87===void 0x0?void 0x0:_0x14aa87['validate'])===null||_0xe59198===void 0x0?void 0x0:_0xe59198[_0x1a3261(0x145)])&&(_0x14aa87[_0x1a3261(0x13e)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}});if(!_0x317107)_0x317107='/';else typeof _0x317107==_0x1a3261(0x178)&&!_0x317107[_0x1a3261(0x14b)]('/')&&(_0x317107='/'+_0x317107);typeof _0x14aa87[_0x1a3261(0x133)]==_0x1a3261(0x16a)&&(_0x14aa87[_0x1a3261(0x133)]=!![]);if(((_0x41b1a9=_0x14aa87===null||_0x14aa87===void 0x0?void 0x0:_0x14aa87[_0x1a3261(0x167)])===null||_0x41b1a9===void 0x0?void 0x0:_0x41b1a9[_0x1a3261(0x14d)])>0x0&&((_0x33d38e=_0x14aa87===null||_0x14aa87===void 0x0?void 0x0:_0x14aa87[_0x1a3261(0x160)])===null||_0x33d38e===void 0x0?void 0x0:_0x33d38e[_0x1a3261(0x14d)])>0x0)for(let _0x5705a7 in _0x14aa87[_0x1a3261(0x167)]){_0x14aa87['middlewareIgnore'][_0x1a3261(0x171)](_0x14aa87[_0x1a3261(0x167)][_0x5705a7])!==-0x1&&(_0x14aa87['middleware'][_0x5705a7]=null);}_0x14aa87['routerName']=_0x54f408,(0x0,validator_1['Validator'])(_0x14aa87['validate'])(_0x3c4fe3,_0x18d580,_0xa8c6b4),(0x0,core_2[_0x1a3261(0x15e)])(Object[_0x1a3261(0x135)](_0x14aa87,{'path':_0x317107,'requestMethod':(_0x5388bf||_0x1a3261(0x174))[_0x1a3261(0x16c)]()}))(_0x3c4fe3,_0x18d580,_0xa8c6b4),(0x0,core_2[_0x1a3261(0x151)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x317107,'method':_0x18d580,'apimit':_0x14aa87[_0x1a3261(0x133)],'intercept':_0x14aa87[_0x1a3261(0x15f)],'routerName':_0x14aa87[_0x1a3261(0x146)],'description':_0x14aa87[_0x1a3261(0x173)],'middleware':(_0x14aa87[_0x1a3261(0x167)]||[])[_0x1a3261(0x15d)](_0x169cbd=>!!_0x169cbd),'requestMethod':(_0x5388bf||_0x1a3261(0x174))['toLowerCase']()},_0x3c4fe3),(0x0,core_2[_0x1a3261(0x132)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x317107,'method':_0x18d580,'apimit':_0x14aa87['apimit'],'intercept':_0x14aa87[_0x1a3261(0x15f)],'routerName':_0x14aa87[_0x1a3261(0x146)],'description':_0x14aa87[_0x1a3261(0x173)],'middleware':(_0x14aa87[_0x1a3261(0x167)]||[])['filter'](_0x472a39=>!!_0x472a39),'requestMethod':(_0x5388bf||_0x1a3261(0x174))[_0x1a3261(0x16c)]()})(_0x3c4fe3,_0x18d580,_0xa8c6b4);};}function a3_0x3510(){const _0x30ee7b=['(((.+)+)+)+$','apply','APPSCONFIG_KEY','__esModule','middleware','/apps/','300239bKUBTW','undefined','/controller/文件下','toLowerCase','apps/','\x20文件请放在app/controller/文件下','trim','post','indexOf','saveClassMetadata','description','get','parseRoute','-controller','/controller/','string','module','tagName','basic/controller/','14008LAxtCM','7WILJlq','../types/action','createCustomMethodDecorator','apimit','filepath','assign','Controller','replace','existsSync','702320VxDzpJ','push','prefix','ActionApi','3KpitkD','validate','cwd','search','defineProperty','splice','route','ACTION_KEY','validationOptions','routerName','2180240OSruJO','646902gURrut','7290530aIxRAK','join','startsWith','-action','length','@midwayjs/core','endsWith','app/controller/','attachClassMetadata','saveModule','Action','substring','toString','11qtwZAu','getClassMetadata','split','AppsConfigTmp','1341uXZYgK','723494ISukpS','/config.','filter','RequestMapping','intercept','middlewareIgnore','rootpath','match'];a3_0x3510=function(){return _0x30ee7b;};return a3_0x3510();}exports[a3_0x1785aa(0x13c)]=ActionApi;function parseRoute(_0x2c8042){const _0x4dc35c=a3_0x1785aa;_0x2c8042=_0x2c8042['replace'](/(\\|\/)/g,'/');const _0x7773c4=process[_0x4dc35c(0x13f)]()[_0x4dc35c(0x137)](/(\\|\/)/g,'/'),_0x2a42c=_0x2c8042[_0x4dc35c(0x154)](0x0,_0x7773c4[_0x4dc35c(0x14d)]+_0x2c8042[_0x4dc35c(0x154)](_0x7773c4['length']+0x1)[_0x4dc35c(0x171)]('/')+0x1),_0x423765=_0x2c8042[_0x4dc35c(0x154)](_0x2a42c[_0x4dc35c(0x14d)]+0x1)[_0x4dc35c(0x137)](/(\\|\/)/g,'/'),_0x3562ae={'route':'','prefix':![],'module':![],'rootpath':_0x2a42c,'filepath':_0x423765};if(_0x423765[_0x4dc35c(0x14b)]('app/controller/')||_0x423765['startsWith'](_0x4dc35c(0x12e))){const _0x2fd32b=_0x423765[_0x4dc35c(0x154)]((_0x423765[_0x4dc35c(0x14b)](_0x4dc35c(0x150))?_0x4dc35c(0x150):'basic/controller/')[_0x4dc35c(0x14d)])[_0x4dc35c(0x158)]('/')['filter'](_0x387ed6=>_0x387ed6&&_0x387ed6['trim']());return _0x2fd32b[_0x4dc35c(0x14d)]>0x1&&(_0x3562ae[_0x4dc35c(0x13b)]=_0x2fd32b[0x0]['toLowerCase'](),_0x2fd32b[_0x4dc35c(0x142)](0x0,0x1)),_0x3562ae[_0x4dc35c(0x143)]=('/'+_0x2fd32b['join']('/'))[_0x4dc35c(0x137)](/(\.ts|\.js)$/,'')[_0x4dc35c(0x137)](/\/{2,}/g,'/')[_0x4dc35c(0x162)](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x4dc35c(0x16c)]()[_0x4dc35c(0x137)](/\/\-/g,'/'),_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x14f)](_0x4dc35c(0x14c))&&(_0x3562ae[_0x4dc35c(0x143)]=_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x154)](0x0,_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x14d)]-0x7)),_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x14f)](_0x4dc35c(0x176))&&(_0x3562ae['route']=_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x154)](0x0,_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x14d)]-0xb)),_0x3562ae;}else{if(_0x423765[_0x4dc35c(0x14b)]('apps/')){const _0x471f20=_0x423765['substring'](0x0,_0x423765[_0x4dc35c(0x171)](_0x4dc35c(0x168))+0x5),_0x2246fa=_0x423765['substring'](_0x471f20[_0x4dc35c(0x14d)]+0x1)[_0x4dc35c(0x137)](/(\\|\/)/g,'/')[_0x4dc35c(0x158)]('/')[0x0];if(_0x423765[_0x4dc35c(0x14b)](_0x4dc35c(0x16d)+_0x2246fa+_0x4dc35c(0x177))){const _0x1f7173=_0x423765[_0x4dc35c(0x154)]((_0x471f20+'/'+_0x2246fa+_0x4dc35c(0x177))[_0x4dc35c(0x14d)])[_0x4dc35c(0x158)]('/')['filter'](_0xaff64a=>_0xaff64a&&_0xaff64a[_0x4dc35c(0x16f)]());return _0x1f7173[_0x4dc35c(0x14d)]>0x1&&(_0x3562ae[_0x4dc35c(0x13b)]=_0x1f7173[0x0]['toLowerCase'](),_0x1f7173['splice'](0x0,0x1)),_0x3562ae['module']=_0x2246fa,_0x3562ae[_0x4dc35c(0x143)]=('/'+_0x2246fa+'/'+_0x1f7173['join']('/'))['replace'](/(\.ts|\.js)$/,'')[_0x4dc35c(0x137)](/\/{2,}/g,'/')[_0x4dc35c(0x162)](/[\/|A-Z]*[^A-Z]+/g)[_0x4dc35c(0x14a)]('-')[_0x4dc35c(0x16c)]()['replace'](/\/\-/g,'/'),_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x14f)](_0x4dc35c(0x14c))&&(_0x3562ae[_0x4dc35c(0x143)]=_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x154)](0x0,_0x3562ae[_0x4dc35c(0x143)]['length']-0x7)),_0x3562ae['route'][_0x4dc35c(0x14f)]('-controller')&&(_0x3562ae[_0x4dc35c(0x143)]=_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x154)](0x0,_0x3562ae[_0x4dc35c(0x143)][_0x4dc35c(0x14d)]-0xb)),_0x3562ae;}throw new Error(_0x423765+'\x20文件请放在apps/'+_0x2246fa+_0x4dc35c(0x16b));}}throw new Error(_0x423765+_0x4dc35c(0x16e));}exports[a3_0x1785aa(0x175)]=parseRoute;
|
|
1
|
+
function a3_0x17d6(){const _0x56641f=['assign','rootpath','4WOxNNd','middleware','\x20文件请放在apps/','\x20文件请放在app/controller/文件下','saveModule','161lDLeYn','indexOf','-action','ACTION_KEY','attachClassMetadata','middlewareIgnore','APPSCONFIG_KEY','route','match','/controller/','split','createCustomMethodDecorator','@anncic-api/validator','-controller','splice','@midwayjs/core','prefix','../types/action','intercept','10216620awYzJK','getClassMetadata','RequestMapping','/apps/','string','existsSync','toString','basic/controller/','post','filepath','919761TFmtVT','parseRoute','ACTION_ROUTE_KEY','undefined','push','Controller','filter','(((.+)+)+)+$','app/controller/','substring','length','apimit','3649788vApUab','isArray','routerName','endsWith','get','module','replace','891212ROovYg','trim','saveClassMetadata','search','/controller/文件下','apply','Action','/config.','apps/','585085vnEgJO','238888oiZQwk','validationOptions','join','1874436lPQmhV','AppsConfigTmp','startsWith','validate','__esModule','toLowerCase','description'];a3_0x17d6=function(){return _0x56641f;};return a3_0x17d6();}const a3_0x4724f5=a3_0x2b03;(function(_0x477a92,_0x5c53eb){const _0x53a0f6=a3_0x2b03,_0x23fdaf=_0x477a92();while(!![]){try{const _0x4ffe82=parseInt(_0x53a0f6(0x1a4))/0x1+-parseInt(_0x53a0f6(0x1b7))/0x2+parseInt(_0x53a0f6(0x1b0))/0x3+-parseInt(_0x53a0f6(0x1cd))/0x4*(parseInt(_0x53a0f6(0x1c0))/0x5)+-parseInt(_0x53a0f6(0x1c4))/0x6+-parseInt(_0x53a0f6(0x1d2))/0x7*(-parseInt(_0x53a0f6(0x1c1))/0x8)+-parseInt(_0x53a0f6(0x19a))/0x9;if(_0x4ffe82===_0x5c53eb)break;else _0x23fdaf['push'](_0x23fdaf['shift']());}catch(_0x4f1e7e){_0x23fdaf['push'](_0x23fdaf['shift']());}}}(a3_0x17d6,0xc6797));const a3_0x53bb15=(function(){let _0x4bfddf=!![];return function(_0x14de34,_0x5935b7){const _0x108826=_0x4bfddf?function(){const _0x3b92d8=a3_0x2b03;if(_0x5935b7){const _0x45fc28=_0x5935b7[_0x3b92d8(0x1bc)](_0x14de34,arguments);return _0x5935b7=null,_0x45fc28;}}:function(){};return _0x4bfddf=![],_0x108826;};}()),a3_0x18d5be=a3_0x53bb15(this,function(){const _0x20d81a=a3_0x2b03;return a3_0x18d5be['toString']()[_0x20d81a(0x1ba)]('(((.+)+)+)+$')[_0x20d81a(0x1a0)]()['constructor'](a3_0x18d5be)[_0x20d81a(0x1ba)](_0x20d81a(0x1ab));});a3_0x18d5be();'use strict';function a3_0x2b03(_0x231ff2,_0x1c2f5c){const _0x5bf30e=a3_0x17d6();return a3_0x2b03=function(_0x18d5be,_0x53bb15){_0x18d5be=_0x18d5be-0x199;let _0x17d63c=_0x5bf30e[_0x18d5be];return _0x17d63c;},a3_0x2b03(_0x231ff2,_0x1c2f5c);}Object['defineProperty'](exports,a3_0x4724f5(0x1c8),{'value':!![]}),exports[a3_0x4724f5(0x1a5)]=exports['ActionApi']=exports[a3_0x4724f5(0x1bd)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x4724f5(0x1de)),core_1=require(a3_0x4724f5(0x1e1)),core_2=require('@midwayjs/core'),action_1=require(a3_0x4724f5(0x1e3));function Action(_0x4ab62d,_0x13a823,_0x2075b8={'middleware':[],'sensitive':!![]}){return _0x10a703=>{const _0x310873=a3_0x2b03;var _0x47559f;_0x2075b8['tagName']=_0x13a823;const _0x488d94=parseRoute(_0x4ab62d);if(_0x488d94[_0x310873(0x1b5)]){_0x2075b8['prefix']=_0x2075b8[_0x310873(0x1e2)]?'/'+_0x488d94['module']+'/'+_0x2075b8[_0x310873(0x1e2)]:'/'+_0x488d94['route'];_0x488d94[_0x310873(0x1e2)]&&(_0x2075b8['prefix']='/'+_0x488d94[_0x310873(0x1e2)]+'/'+_0x2075b8[_0x310873(0x1e2)]);if(fs[_0x310873(0x19f)](_0x488d94[_0x310873(0x1cc)]+_0x310873(0x19d)+_0x488d94['module']+_0x310873(0x1be)+(lodash[_0x310873(0x1b3)](_0x488d94[_0x310873(0x1a3)],'ts')?'ts':'js'))){const _0x546b3d=include(_0x488d94[_0x310873(0x1cc)]+_0x310873(0x19d)+_0x488d94[_0x310873(0x1b5)]+_0x310873(0x1be)+(lodash[_0x310873(0x1b3)](_0x488d94[_0x310873(0x1a3)],'ts')?'ts':'js'));if(_0x546b3d[_0x310873(0x1ce)]&&lodash[_0x310873(0x1b1)](_0x546b3d[_0x310873(0x1ce)])&&_0x546b3d[_0x310873(0x1ce)][_0x310873(0x1ae)]>0x0)for(let _0x3e5b8e in _0x546b3d[_0x310873(0x1ce)]){if(((_0x47559f=_0x546b3d===null||_0x546b3d===void 0x0?void 0x0:_0x546b3d[_0x310873(0x1d7)])===null||_0x47559f===void 0x0?void 0x0:_0x47559f[_0x310873(0x1ae)])>0x0&&_0x546b3d[_0x310873(0x1d7)][_0x310873(0x1d3)](_0x546b3d['middleware'][_0x3e5b8e])!=-0x1)continue;_0x2075b8[_0x310873(0x1ce)][_0x310873(0x1a8)](_0x546b3d[_0x310873(0x1ce)][_0x3e5b8e]);}const _0x13f187=(0x0,core_1[_0x310873(0x19b)])(action_1[_0x310873(0x1d8)],action_1[_0x310873(0x1c5)])||{};_0x13f187[''+_0x488d94[_0x310873(0x1b5)]]=_0x546b3d,(0x0,core_1[_0x310873(0x1b9)])(action_1['APPSCONFIG_KEY'],_0x13f187,action_1[_0x310873(0x1c5)]);}_0x2075b8[_0x310873(0x1e2)]=_0x2075b8[_0x310873(0x1e2)][_0x310873(0x1c9)]()[_0x310873(0x1b6)](/\/{2,}/g,'/'),(0x0,core_1[_0x310873(0x1d1)])(action_1[_0x310873(0x1d5)],_0x10a703),(0x0,core_1[_0x310873(0x1a9)])(_0x2075b8[_0x310873(0x1e2)],_0x2075b8)(_0x10a703),(0x0,core_1[_0x310873(0x1b9)])(action_1[_0x310873(0x1d5)],{'prefix':_0x2075b8[_0x310873(0x1e2)],'pprefix':_0x488d94[_0x310873(0x1e2)],'module':_0x488d94[_0x310873(0x1b5)],'filepath':_0x488d94['filepath'],'routerOptions':_0x2075b8},_0x10a703);}else _0x2075b8[_0x310873(0x1e2)]=_0x2075b8['prefix']?'/'+_0x2075b8[_0x310873(0x1e2)]:'/'+_0x488d94[_0x310873(0x1d9)],_0x488d94[_0x310873(0x1e2)]&&(_0x2075b8[_0x310873(0x1e2)]='/'+_0x488d94[_0x310873(0x1e2)]+'/'+_0x2075b8[_0x310873(0x1e2)]),_0x2075b8[_0x310873(0x1e2)]=_0x2075b8[_0x310873(0x1e2)][_0x310873(0x1c9)]()['replace'](/\/{2,}/g,'/'),(0x0,core_1[_0x310873(0x1d1)])(action_1['ACTION_KEY'],_0x10a703),(0x0,core_1['Controller'])(_0x2075b8['prefix'],_0x2075b8)(_0x10a703),(0x0,core_1[_0x310873(0x1b9)])(action_1['ACTION_KEY'],{'prefix':_0x2075b8[_0x310873(0x1e2)],'module':_0x488d94['module'],'pprefix':_0x488d94[_0x310873(0x1e2)],'filepath':_0x488d94[_0x310873(0x1a3)],'routerOptions':_0x2075b8},_0x10a703);};}exports[a3_0x4724f5(0x1bd)]=Action,Action[a3_0x4724f5(0x1b4)]=function(_0x1bd91f,_0x51e088='/',_0x3aa9b2={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x41c6ce,_0x196bc7,_0x51f22a)=>{const _0x493aa7=a3_0x2b03;ActionApi(_0x1bd91f,_0x493aa7(0x1b4),_0x51e088,_0x3aa9b2)(_0x41c6ce,_0x196bc7,_0x51f22a);};},Action[a3_0x4724f5(0x1a2)]=function(_0x52c11c,_0x3d210c='/',_0x50c157={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x238fa1,_0x1c6df3,_0x3c8e4e)=>{ActionApi(_0x52c11c,'post',_0x3d210c,_0x50c157)(_0x238fa1,_0x1c6df3,_0x3c8e4e);};};function ActionApi(_0x115606,_0x13f3c3=a3_0x4724f5(0x1b4),_0x1d355e='/',_0x41ec3a={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2f0e0c,_0x444361,_0x2b1050)=>{const _0x3c422a=a3_0x2b03;var _0x459aa5,_0x384ba7,_0x1de6e7;!_0x41ec3a[_0x3c422a(0x1ce)]&&(_0x41ec3a['middleware']=[]);!((_0x459aa5=_0x41ec3a===null||_0x41ec3a===void 0x0?void 0x0:_0x41ec3a[_0x3c422a(0x1c7)])===null||_0x459aa5===void 0x0?void 0x0:_0x459aa5[_0x3c422a(0x1c2)])&&(_0x41ec3a[_0x3c422a(0x1c7)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x3c422a(0x19e)}});if(!_0x1d355e)_0x1d355e='/';else typeof _0x1d355e=='string'&&!_0x1d355e[_0x3c422a(0x1c6)]('/')&&(_0x1d355e='/'+_0x1d355e);typeof _0x41ec3a['apimit']==_0x3c422a(0x1a7)&&(_0x41ec3a[_0x3c422a(0x1af)]=!![]);if(((_0x384ba7=_0x41ec3a===null||_0x41ec3a===void 0x0?void 0x0:_0x41ec3a[_0x3c422a(0x1ce)])===null||_0x384ba7===void 0x0?void 0x0:_0x384ba7['length'])>0x0&&((_0x1de6e7=_0x41ec3a===null||_0x41ec3a===void 0x0?void 0x0:_0x41ec3a[_0x3c422a(0x1d7)])===null||_0x1de6e7===void 0x0?void 0x0:_0x1de6e7['length'])>0x0)for(let _0x40ed3f in _0x41ec3a[_0x3c422a(0x1ce)]){_0x41ec3a[_0x3c422a(0x1d7)][_0x3c422a(0x1d3)](_0x41ec3a[_0x3c422a(0x1ce)][_0x40ed3f])!==-0x1&&(_0x41ec3a[_0x3c422a(0x1ce)][_0x40ed3f]=null);}_0x41ec3a['routerName']=_0x115606,(0x0,validator_1['Validator'])(_0x41ec3a[_0x3c422a(0x1c7)])(_0x2f0e0c,_0x444361,_0x2b1050),(0x0,core_2[_0x3c422a(0x19c)])(Object[_0x3c422a(0x1cb)](_0x41ec3a,{'path':_0x1d355e,'requestMethod':(_0x13f3c3||_0x3c422a(0x1b4))[_0x3c422a(0x1c9)]()}))(_0x2f0e0c,_0x444361,_0x2b1050),(0x0,core_2[_0x3c422a(0x1d6)])(action_1[_0x3c422a(0x1a6)],{'path':_0x1d355e,'method':_0x444361,'apimit':_0x41ec3a[_0x3c422a(0x1af)],'intercept':_0x41ec3a[_0x3c422a(0x199)],'routerName':_0x41ec3a['routerName'],'description':_0x41ec3a['description'],'middleware':(_0x41ec3a[_0x3c422a(0x1ce)]||[])['filter'](_0x36a5a7=>!!_0x36a5a7),'requestMethod':(_0x13f3c3||'get')['toLowerCase']()},_0x2f0e0c),(0x0,core_2[_0x3c422a(0x1dd)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x1d355e,'method':_0x444361,'apimit':_0x41ec3a[_0x3c422a(0x1af)],'intercept':_0x41ec3a[_0x3c422a(0x199)],'routerName':_0x41ec3a[_0x3c422a(0x1b2)],'description':_0x41ec3a[_0x3c422a(0x1ca)],'middleware':(_0x41ec3a['middleware']||[])[_0x3c422a(0x1aa)](_0x17e667=>!!_0x17e667),'requestMethod':(_0x13f3c3||_0x3c422a(0x1b4))['toLowerCase']()})(_0x2f0e0c,_0x444361,_0x2b1050);};}exports['ActionApi']=ActionApi;function parseRoute(_0x21b0a1){const _0xef59e5=a3_0x4724f5;_0x21b0a1=_0x21b0a1['replace'](/(\\|\/)/g,'/');const _0x43b609=process['cwd']()[_0xef59e5(0x1b6)](/(\\|\/)/g,'/'),_0x18c9dd=_0x21b0a1[_0xef59e5(0x1ad)](0x0,_0x43b609['length']+_0x21b0a1['substring'](_0x43b609['length']+0x1)[_0xef59e5(0x1d3)]('/')+0x1),_0x14e817=_0x21b0a1[_0xef59e5(0x1ad)](_0x18c9dd[_0xef59e5(0x1ae)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x217200={'route':'','prefix':![],'module':![],'rootpath':_0x18c9dd,'filepath':_0x14e817};if(_0x14e817['startsWith'](_0xef59e5(0x1ac))||_0x14e817[_0xef59e5(0x1c6)](_0xef59e5(0x1a1))){const _0x2f33c7=_0x14e817[_0xef59e5(0x1ad)]((_0x14e817['startsWith']('app/controller/')?_0xef59e5(0x1ac):_0xef59e5(0x1a1))['length'])[_0xef59e5(0x1dc)]('/')['filter'](_0x4b8956=>_0x4b8956&&_0x4b8956[_0xef59e5(0x1b8)]());return _0x2f33c7[_0xef59e5(0x1ae)]>0x1&&(_0x217200[_0xef59e5(0x1e2)]=_0x2f33c7[0x0][_0xef59e5(0x1c9)](),_0x2f33c7[_0xef59e5(0x1e0)](0x0,0x1)),_0x217200['route']=('/'+_0x2f33c7[_0xef59e5(0x1c3)]('/'))[_0xef59e5(0x1b6)](/(\.ts|\.js)$/,'')[_0xef59e5(0x1b6)](/\/{2,}/g,'/')[_0xef59e5(0x1da)](/[\/|A-Z]*[^A-Z]+/g)[_0xef59e5(0x1c3)]('-')[_0xef59e5(0x1c9)]()[_0xef59e5(0x1b6)](/\/\-/g,'/'),_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1b3)](_0xef59e5(0x1d4))&&(_0x217200['route']=_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1ad)](0x0,_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1ae)]-0x7)),_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1b3)]('-controller')&&(_0x217200['route']=_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1ad)](0x0,_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1ae)]-0xb)),_0x217200;}else{if(_0x14e817[_0xef59e5(0x1c6)](_0xef59e5(0x1bf))){const _0x5d00b7=_0x14e817['substring'](0x0,_0x14e817[_0xef59e5(0x1d3)](_0xef59e5(0x19d))+0x5),_0x5f4e31=_0x14e817[_0xef59e5(0x1ad)](_0x5d00b7['length']+0x1)[_0xef59e5(0x1b6)](/(\\|\/)/g,'/')[_0xef59e5(0x1dc)]('/')[0x0];if(_0x14e817[_0xef59e5(0x1c6)](_0xef59e5(0x1bf)+_0x5f4e31+'/controller/')){const _0x19d561=_0x14e817['substring']((_0x5d00b7+'/'+_0x5f4e31+_0xef59e5(0x1db))[_0xef59e5(0x1ae)])['split']('/')['filter'](_0x48046a=>_0x48046a&&_0x48046a['trim']());return _0x19d561[_0xef59e5(0x1ae)]>0x1&&(_0x217200[_0xef59e5(0x1e2)]=_0x19d561[0x0][_0xef59e5(0x1c9)](),_0x19d561[_0xef59e5(0x1e0)](0x0,0x1)),_0x217200['module']=_0x5f4e31,_0x217200['route']=('/'+_0x5f4e31+'/'+_0x19d561[_0xef59e5(0x1c3)]('/'))[_0xef59e5(0x1b6)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0xef59e5(0x1da)](/[\/|A-Z]*[^A-Z]+/g)[_0xef59e5(0x1c3)]('-')['toLowerCase']()['replace'](/\/\-/g,'/'),_0x217200['route']['endsWith'](_0xef59e5(0x1d4))&&(_0x217200[_0xef59e5(0x1d9)]=_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1ad)](0x0,_0x217200[_0xef59e5(0x1d9)][_0xef59e5(0x1ae)]-0x7)),_0x217200[_0xef59e5(0x1d9)]['endsWith'](_0xef59e5(0x1df))&&(_0x217200[_0xef59e5(0x1d9)]=_0x217200[_0xef59e5(0x1d9)]['substring'](0x0,_0x217200['route'][_0xef59e5(0x1ae)]-0xb)),_0x217200;}throw new Error(_0x14e817+_0xef59e5(0x1cf)+_0x5f4e31+_0xef59e5(0x1bb));}}throw new Error(_0x14e817+_0xef59e5(0x1d0));}exports['parseRoute']=parseRoute;
|