anncic-api 3.0.4 → 3.0.6
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
|
-
|
|
1
|
+
var a0_0x3c51dd=a0_0x5516;(function(_0x241a7c,_0x37026d){var _0x30d8dc=a0_0x5516,_0x518c62=_0x241a7c();while(!![]){try{var _0x7b463e=-parseInt(_0x30d8dc(0xb8))/0x1+parseInt(_0x30d8dc(0xac))/0x2+parseInt(_0x30d8dc(0xbf))/0x3+parseInt(_0x30d8dc(0xbd))/0x4*(parseInt(_0x30d8dc(0xb3))/0x5)+-parseInt(_0x30d8dc(0xba))/0x6+parseInt(_0x30d8dc(0xc0))/0x7*(parseInt(_0x30d8dc(0xb2))/0x8)+-parseInt(_0x30d8dc(0xb0))/0x9;if(_0x7b463e===_0x37026d)break;else _0x518c62['push'](_0x518c62['shift']());}catch(_0x5c5dd8){_0x518c62['push'](_0x518c62['shift']());}}}(a0_0x7950,0x933d9));var a0_0x570282=(function(){var _0x18d15f=!![];return function(_0x117959,_0x209799){var _0x15ca2c=_0x18d15f?function(){var _0x230677=a0_0x5516;if(_0x209799){var _0x4fe500=_0x209799[_0x230677(0xc1)](_0x117959,arguments);return _0x209799=null,_0x4fe500;}}:function(){};return _0x18d15f=![],_0x15ca2c;};}()),a0_0x159006=a0_0x570282(this,function(){var _0x248c0d=a0_0x5516;return a0_0x159006[_0x248c0d(0xb4)]()[_0x248c0d(0xbb)](_0x248c0d(0xb5))['toString']()[_0x248c0d(0xbc)](a0_0x159006)['search']('(((.+)+)+)+$');});function a0_0x7950(){var _0x4dcc61=['defineProperty','dhauo1234420123gg3234901','zhiulanuiy7892387985hnoi','2784159heXzdT','/runtime/.upload','9473832pkchpv','65zzDxGB','toString','(((.+)+)+)+$','xml','json','405459FNkHHT','form','4668954ZDLEPO','search','constructor','118956PXyOSp','text','1289223lGgWdG','7GxvYbL','apply','20mb','appDir','name','190978WnYyqt'];a0_0x7950=function(){return _0x4dcc61;};return a0_0x7950();}a0_0x159006();'use strict';function a0_0x5516(_0x26b028,_0x260114){var _0x172294=a0_0x7950();return a0_0x5516=function(_0x159006,_0x570282){_0x159006=_0x159006-0xa9;var _0x795068=_0x172294[_0x159006];return _0x795068;},a0_0x5516(_0x26b028,_0x260114);}Object[a0_0x3c51dd(0xad)](exports,'__esModule',{'value':!![]}),exports['default']=_0x17c316=>{var _0x4638f0=a0_0x3c51dd;return{'apitest':!![],'keys':_0x17c316[_0x4638f0(0xab)],'anncicapi':{'password':_0x4638f0(0xaf),'devices':{'DEFAULT':{'secret':_0x4638f0(0xae),'checkcode':_0x4638f0(0xae)}}},'bodyParser':{'enableTypes':[_0x4638f0(0xb7),_0x4638f0(0xb9),_0x4638f0(0xbe),_0x4638f0(0xb6)],'formLimit':'20mb','jsonLimit':'20mb','textLimit':_0x4638f0(0xa9),'xmlLimit':'20mb'},'upload':{'tmpdir':_0x17c316[_0x4638f0(0xaa)]+_0x4638f0(0xb1),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var a1_0xa88baf=a1_0x1f9e;function a1_0x1f9e(_0xf6761d,_0x450e3b){var _0x3b62b3=a1_0x47c1();return a1_0x1f9e=function(_0xb74c80,_0xa609d){_0xb74c80=_0xb74c80-0xb9;var _0x47c17c=_0x3b62b3[_0xb74c80];return _0x47c17c;},a1_0x1f9e(_0xf6761d,_0x450e3b);}(function(_0x344e0d,_0x15e2e7){var _0x3e4578=a1_0x1f9e,_0xcdc3ec=_0x344e0d();while(!![]){try{var _0x3d02d6=parseInt(_0x3e4578(0xbb))/0x1+-parseInt(_0x3e4578(0xc7))/0x2*(parseInt(_0x3e4578(0xc4))/0x3)+parseInt(_0x3e4578(0xc3))/0x4+-parseInt(_0x3e4578(0xc2))/0x5*(-parseInt(_0x3e4578(0xca))/0x6)+-parseInt(_0x3e4578(0xc6))/0x7*(parseInt(_0x3e4578(0xc1))/0x8)+-parseInt(_0x3e4578(0xc9))/0x9*(-parseInt(_0x3e4578(0xba))/0xa)+-parseInt(_0x3e4578(0xb9))/0xb;if(_0x3d02d6===_0x15e2e7)break;else _0xcdc3ec['push'](_0xcdc3ec['shift']());}catch(_0x819853){_0xcdc3ec['push'](_0xcdc3ec['shift']());}}}(a1_0x47c1,0x2fb4b));var a1_0xa609d=(function(){var _0x4a8d83=!![];return function(_0x50efa4,_0x56fb21){var _0x102dbc=_0x4a8d83?function(){var _0x21f987=a1_0x1f9e;if(_0x56fb21){var _0xfcd4ce=_0x56fb21[_0x21f987(0xbe)](_0x50efa4,arguments);return _0x56fb21=null,_0xfcd4ce;}}:function(){};return _0x4a8d83=![],_0x102dbc;};}()),a1_0xb74c80=a1_0xa609d(this,function(){var _0x40b2a0=a1_0x1f9e;return a1_0xb74c80[_0x40b2a0(0xbc)]()[_0x40b2a0(0xbf)](_0x40b2a0(0xc0))[_0x40b2a0(0xbc)]()[_0x40b2a0(0xc8)](a1_0xb74c80)[_0x40b2a0(0xbf)](_0x40b2a0(0xc0));});function a1_0x47c1(){var _0x1c5434=['38yrvduQ','constructor','426969aQWdNL','120QLoxSn','2541165rmrGju','40mjKkKk','158514oZYfxw','toString','__esModule','apply','search','(((.+)+)+)+$','44680xTzYdz','81295MbOvPx','1277628ZXvrYm','39174cobzwv','default','399mIFqOG'];a1_0x47c1=function(){return _0x1c5434;};return a1_0x47c1();}a1_0xb74c80();'use strict';Object['defineProperty'](exports,a1_0xa88baf(0xbd),{'value':!![]}),exports[a1_0xa88baf(0xc5)]={'apitest':![],'anncicapi':{}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x2718e8=a2_0x10f6;(function(_0x1045f6,_0x1daf64){const _0x4f64d6=a2_0x10f6,_0x4f20e7=_0x1045f6();while(!![]){try{const _0x8604bc=-parseInt(_0x4f64d6(0x15a))/0x1*(-parseInt(_0x4f64d6(0xe3))/0x2)+parseInt(_0x4f64d6(0x113))/0x3*(-parseInt(_0x4f64d6(0x123))/0x4)+-parseInt(_0x4f64d6(0xe4))/0x5+-parseInt(_0x4f64d6(0xf7))/0x6+parseInt(_0x4f64d6(0x154))/0x7*(parseInt(_0x4f64d6(0xf2))/0x8)+parseInt(_0x4f64d6(0x140))/0x9+parseInt(_0x4f64d6(0x109))/0xa*(parseInt(_0x4f64d6(0x13d))/0xb);if(_0x8604bc===_0x1daf64)break;else _0x4f20e7['push'](_0x4f20e7['shift']());}catch(_0x5f2388){_0x4f20e7['push'](_0x4f20e7['shift']());}}}(a2_0x3f9b,0x224e3));const a2_0x1e87e2=(function(){let _0x3b6b9d=!![];return function(_0x35bca3,_0x51fde7){const _0x46afb5=_0x3b6b9d?function(){const _0x3ad35e=a2_0x10f6;if(_0x51fde7){const _0x1718f7=_0x51fde7[_0x3ad35e(0xfb)](_0x35bca3,arguments);return _0x51fde7=null,_0x1718f7;}}:function(){};return _0x3b6b9d=![],_0x46afb5;};}()),a2_0x20545e=a2_0x1e87e2(this,function(){const _0x11c2e6=a2_0x10f6;return a2_0x20545e[_0x11c2e6(0x120)]()['search'](_0x11c2e6(0x129))[_0x11c2e6(0x120)]()[_0x11c2e6(0x135)](a2_0x20545e)['search'](_0x11c2e6(0x129));});a2_0x20545e();function a2_0x3f9b(){const _0x45b217=['@midwayjs/static-file','request','filterConfig','upload','method','386eoaPTH','getClassMetadata','args','@midwayjs/core','input','232rQugXw','846385TlQqoi','log','isClass','handlerActionRoute','undefined','MidwayApplicationManager','devices','@anncic-api/cache','decorator','object','midwayLogger','koa-send','dir','__esModule','145856dyhykD','@midwayjs/i18n','isDirectory','proceed','defineProperty','904926yqnrEC','./service/ApiService','decorate','registerMethodHandler','apply','defaultsDeep','Types','environment','statSync','checkConfigKeys','.log','/runtime','toLowerCase','@anncic-api/typeorm','./config/config.default','/apps','./types/intercept','design:type','21520XmvpEc','getApplications','HEADERS_SIGNATURE','CustomConfiguration','MidwayDecoratorService','anncic-apihelper','__metadata','isArray','isString','@anncic-api/validator','58755pQaJFZ','MidwayEnvironmentService','string','headers','./types/action','Inject','./config/config.production','@midwayjs/cross-domain','REQUEST_OBJ_CTX_KEY','anncicapi','mkdirSync','forEach','staticFile','toString','DEFAULT','body','52MLwcBf','context','query','ApiService','key','hanlderApplications','(((.+)+)+)+$','@anncic-api/core','@midwayjs/upload','isFunction','koa','getAsync','app','getAppDir','prototype','defineProperties','getConfiguration','_matchedRoute','constructor','config','get','handler','getBaseDir','keys','__decorate','loggerConfig','1727NHFkVP','clients','checksign','2172762jyNxvo','@midwayjs/koa','existsSync','getOwnPropertyDescriptor','tmpdir','length','/apps/','-log','@anncic-api/event','dirs','device','ApiError','match','application','isDevelopmentEnvironment','apimit','isNull','metadata','function','intercept','35vRkfnl'];a2_0x3f9b=function(){return _0x45b217;};return a2_0x3f9b();}'use strict';var __decorate=this&&this[a2_0x2718e8(0x13b)]||function(_0x2f7b8b,_0x57c3db,_0x41a33a,_0x18c55f){const _0x29daec=a2_0x2718e8;var _0x18c23a=arguments[_0x29daec(0x145)],_0xcd6e07=_0x18c23a<0x3?_0x57c3db:_0x18c55f===null?_0x18c55f=Object[_0x29daec(0x143)](_0x57c3db,_0x41a33a):_0x18c55f,_0x46c807;if(typeof Reflect===_0x29daec(0xed)&&typeof Reflect[_0x29daec(0xf9)]===_0x29daec(0x152))_0xcd6e07=Reflect[_0x29daec(0xf9)](_0x2f7b8b,_0x57c3db,_0x41a33a,_0x18c55f);else{for(var _0x3c829c=_0x2f7b8b[_0x29daec(0x145)]-0x1;_0x3c829c>=0x0;_0x3c829c--)if(_0x46c807=_0x2f7b8b[_0x3c829c])_0xcd6e07=(_0x18c23a<0x3?_0x46c807(_0xcd6e07):_0x18c23a>0x3?_0x46c807(_0x57c3db,_0x41a33a,_0xcd6e07):_0x46c807(_0x57c3db,_0x41a33a))||_0xcd6e07;}return _0x18c23a>0x3&&_0xcd6e07&&Object[_0x29daec(0xf6)](_0x57c3db,_0x41a33a,_0xcd6e07),_0xcd6e07;},__metadata=this&&this[a2_0x2718e8(0x10f)]||function(_0x1c5988,_0x52af8a){if(typeof Reflect==='object'&&typeof Reflect['metadata']==='function')return Reflect['metadata'](_0x1c5988,_0x52af8a);};function a2_0x10f6(_0x483a1a,_0x23ce50){const _0x398459=a2_0x3f9b();return a2_0x10f6=function(_0x20545e,_0x1e87e2){_0x20545e=_0x20545e-0xe3;let _0x3f9b3b=_0x398459[_0x20545e];return _0x3f9b3b;},a2_0x10f6(_0x483a1a,_0x23ce50);}Object['defineProperty'](exports,a2_0x2718e8(0xf1),{'value':!![]}),exports['CustomConfiguration']=void 0x0;const core_1=require(a2_0x2718e8(0x15d)),core_2=require(a2_0x2718e8(0x15d)),ApiError_1=require('./exception/ApiError'),ApiService_1=require(a2_0x2718e8(0xf8)),action_1=require(a2_0x2718e8(0x117)),intercept_1=require(a2_0x2718e8(0x107)),fs=require('fs'),koasend=require(a2_0x2718e8(0xef)),koa=require(a2_0x2718e8(0x141)),i18n=require(a2_0x2718e8(0xf3)),upload=require(a2_0x2718e8(0x12b)),staticFile=require(a2_0x2718e8(0x155)),crossDomain=require(a2_0x2718e8(0x11a)),ConfigDefault=require(a2_0x2718e8(0x105)),ConfigProduction=require(a2_0x2718e8(0x119)),anncic=require(a2_0x2718e8(0x12a)),anncicCache=require(a2_0x2718e8(0xeb)),anncicEvent=require(a2_0x2718e8(0x148)),anncicTypeorm=require(a2_0x2718e8(0x104)),anncicValidator=require(a2_0x2718e8(0x112)),anncicHelper=require(a2_0x2718e8(0x10e));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x20ac29=a2_0x2718e8;await this[_0x20ac29(0x157)](),await this[_0x20ac29(0x13c)](),await this[_0x20ac29(0x100)](),await this[_0x20ac29(0xe7)](),await this['hanlderApplications']();}async['checkConfigKeys'](){}async[a2_0x2718e8(0xe7)](){const _0x42b057=a2_0x2718e8,_0x65be13=(0x0,core_1[_0x42b057(0x15b)])(intercept_1['INTERCEPT_KEY'],intercept_1['InterceptTargetTmp'])||{};this[_0x42b057(0xec)][_0x42b057(0xfa)](action_1['ACTION_ROUTE_KEY'],_0x2324c5=>{const _0x1db92f=_0x42b057,_0x28bd8d=_0x2324c5[_0x1db92f(0x151)];return{'before':async _0xe34476=>{const _0x950a80=_0x1db92f;var _0x53161d,_0x4208bb;const _0xe80849=(_0x53161d=_0xe34476===null||_0xe34476===void 0x0?void 0x0:_0xe34476['target'])===null||_0x53161d===void 0x0?void 0x0:_0x53161d[core_2[_0x950a80(0x11b)]];if(_0xe80849&&(_0x28bd8d===null||_0x28bd8d===void 0x0?void 0x0:_0x28bd8d[_0x950a80(0x14f)])){if(!this[_0x950a80(0x126)][_0x950a80(0x13f)]((_0x4208bb=_0xe80849===null||_0xe80849===void 0x0?void 0x0:_0xe80849[_0x950a80(0x156)])===null||_0x4208bb===void 0x0?void 0x0:_0x4208bb[_0x950a80(0x116)]))throw new AnnError(ApiError_1[_0x950a80(0x14b)][_0x950a80(0x10b)]);}},'around':async _0x54e72f=>{const _0xa7ed84=_0x1db92f;var _0x3a7dda,_0x38e7f7,_0x2b39ec;const _0x2e4242=(_0x3a7dda=_0x54e72f===null||_0x54e72f===void 0x0?void 0x0:_0x54e72f['target'])===null||_0x3a7dda===void 0x0?void 0x0:_0x3a7dda[core_2[_0xa7ed84(0x11b)]];if(_0x2e4242&&(_0x28bd8d===null||_0x28bd8d===void 0x0?void 0x0:_0x28bd8d['apimit'])&&((_0x28bd8d===null||_0x28bd8d===void 0x0?void 0x0:_0x28bd8d[_0xa7ed84(0x153)])||typeof(_0x28bd8d===null||_0x28bd8d===void 0x0?void 0x0:_0x28bd8d[_0xa7ed84(0x153)])==_0xa7ed84(0xe8))){if(((_0x38e7f7=_0x2e4242[_0xa7ed84(0x116)])===null||_0x38e7f7===void 0x0?void 0x0:_0x38e7f7['device'])&&((_0x2b39ec=_0x65be13===null||_0x65be13===void 0x0?void 0x0:_0x65be13[_0x2e4242[_0xa7ed84(0x116)][_0xa7ed84(0x14a)]])===null||_0x2b39ec===void 0x0?void 0x0:_0x2b39ec[_0xa7ed84(0x145)])>0x0)for(const _0x2d3493 of _0x65be13[_0x2e4242[_0xa7ed84(0x116)]['device']]||[]){if(core_1[_0xa7ed84(0xfd)][_0xa7ed84(0xe6)](_0x2d3493)){const _0x137ac1=await _0x2e4242['requestContext'][_0xa7ed84(0x12e)](_0x2d3493);typeof(_0x137ac1===null||_0x137ac1===void 0x0?void 0x0:_0x137ac1[_0xa7ed84(0x14c)])=='function'?await _0x137ac1[_0xa7ed84(0x14c)](_0x2e4242,typeof(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242['method'])==_0xa7ed84(0x115)&&(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x134)])?_0x2e4242['method']['toLowerCase']()+'@'+(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x134)]):undefined,_0x28bd8d)&&await _0x137ac1['handler'](_0x2e4242,typeof(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x159)])==_0xa7ed84(0x115)&&(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x134)])?_0x2e4242[_0xa7ed84(0x159)][_0xa7ed84(0x103)]()+'@'+(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242['_matchedRoute']):undefined,_0x28bd8d):await _0x137ac1[_0xa7ed84(0x138)](_0x2e4242,typeof(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x159)])==_0xa7ed84(0x115)&&(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x134)])?_0x2e4242[_0xa7ed84(0x159)]['toLowerCase']()+'@'+(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x134)]):undefined,_0x28bd8d);}else core_1['Types'][_0xa7ed84(0x12c)](_0x2d3493)&&await _0x2d3493(_0x2e4242,typeof(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x159)])==_0xa7ed84(0x115)&&(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242[_0xa7ed84(0x134)])?_0x2e4242[_0xa7ed84(0x159)][_0xa7ed84(0x103)]()+'@'+(_0x2e4242===null||_0x2e4242===void 0x0?void 0x0:_0x2e4242['_matchedRoute']):undefined,_0x28bd8d);}}return await _0x54e72f[_0xa7ed84(0xf5)](..._0x54e72f[_0xa7ed84(0x15c)]);},'afterThrow':(_0x278d0a,_0x49da19)=>{throw _0x49da19;}};});}async[a2_0x2718e8(0x128)](){const _0x3a447c=a2_0x2718e8;this[_0x3a447c(0x14d)][_0x3a447c(0x10a)]([_0x3a447c(0x12d)])[_0x3a447c(0x11e)](_0x517f93=>{const _0x5e010f=_0x3a447c;(_0x517f93===null||_0x517f93===void 0x0?void 0x0:_0x517f93['context'])&&Object[_0x5e010f(0x132)](_0x517f93[_0x5e010f(0x124)],{'ok':{'value':function(_0x18cb20,_0x4d9cb8,_0x2e43a0=0x0){return{'code':_0x2e43a0,'data':_0x18cb20,'extra':_0x4d9cb8};}},'input':{'value':function(_0x3c1e43,_0x34e254){const _0x657e09=_0x5e010f;var _0x2621bf;const _0xae0232=lodash[_0x657e09(0xfc)]({},this[_0x657e09(0x156)][_0x657e09(0x122)]||this[_0x657e09(0x156)][((_0x2621bf=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x2621bf===void 0x0?void 0x0:_0x2621bf[_0x657e09(0x127)])||_0x657e09(0x122)]||{},this[_0x657e09(0x156)][_0x657e09(0x125)]||{});return _0x3c1e43?lodash[_0x657e09(0x137)](_0xae0232,_0x3c1e43,_0x34e254):_0xae0232;}},'when':{'value':async function(_0x5dd5b8,_0x3b0b7c){const _0x342ec7=_0x5e010f,_0x4b6033=this[_0x342ec7(0x15e)](_0x5dd5b8,null);if(!lodash[_0x342ec7(0x150)](_0x4b6033))return await _0x3b0b7c(_0x4b6033);}},'only':{'value':function(_0x561942){const _0x5a018d=_0x5e010f,_0x494a62={};for(let _0x15b39a=0x0;_0x15b39a<_0x561942['length'];_0x15b39a++){lodash[_0x5a018d(0x110)](_0x561942[_0x15b39a])&&_0x561942[_0x15b39a][_0x5a018d(0x145)]>0x0&&lodash[_0x5a018d(0x111)](_0x561942[_0x15b39a][0x0])&&(_0x494a62[_0x561942[_0x15b39a][0x0]]=this[_0x5a018d(0x15e)](_0x561942[_0x15b39a][0x0],_0x561942[_0x15b39a][_0x5a018d(0x145)]>0x1?_0x561942[_0x15b39a][0x1]:null));}return _0x494a62;}},'koasend':{'value':function(_0x1e0fbc,_0x567942){const _0x57eb73=_0x5e010f;if(!fs['existsSync'](this[_0x57eb73(0x12f)][_0x57eb73(0x130)]()+'/'+_0x1e0fbc))return'文件不存在';return this['attachment'](_0x567942||_0x1e0fbc),koasend(this,_0x1e0fbc);}}});});}async[a2_0x2718e8(0x13c)](){const _0x48faf0=a2_0x2718e8;var _0x21e654,_0x3db9c8;if(fs['existsSync'](this['app'][_0x48faf0(0x139)]()+_0x48faf0(0x106))&&fs[_0x48faf0(0xff)](this[_0x48faf0(0x12f)][_0x48faf0(0x139)]()+_0x48faf0(0x106))['isDirectory']()){const _0x5065e1=this[_0x48faf0(0x136)][_0x48faf0(0x133)](),_0x585489=((_0x21e654=_0x5065e1===null||_0x5065e1===void 0x0?void 0x0:_0x5065e1[_0x48faf0(0xee)])===null||_0x21e654===void 0x0?void 0x0:_0x21e654[_0x48faf0(0x13e)])||{};for(const _0x4053e5 of fs['readdirSync'](this[_0x48faf0(0x12f)][_0x48faf0(0x139)]()+_0x48faf0(0x106))){if(!fs[_0x48faf0(0xff)](this[_0x48faf0(0x12f)][_0x48faf0(0x139)]()+_0x48faf0(0x146)+_0x4053e5)[_0x48faf0(0xf4)]())continue;if(_0x585489===null||_0x585489===void 0x0?void 0x0:_0x585489[_0x4053e5])continue;_0x585489[_0x4053e5]=Object['assign']({},((_0x3db9c8=_0x5065e1===null||_0x5065e1===void 0x0?void 0x0:_0x5065e1[_0x48faf0(0xee)])===null||_0x3db9c8===void 0x0?void 0x0:_0x3db9c8['default'])||{'maxSize':'1m','dir':this[_0x48faf0(0x12f)][_0x48faf0(0x130)]()+_0x48faf0(0x102)},{'enableJSON':!![],'enableConsole':this[_0x48faf0(0xfe)][_0x48faf0(0x14e)](),'fileLogName':_0x4053e5+_0x48faf0(0x101),'dir':this[_0x48faf0(0x12f)]['getAppDir']()+'/runtime/apps-'+_0x4053e5+_0x48faf0(0x147)});}Object[_0x48faf0(0x13a)](_0x585489)[_0x48faf0(0x145)]>0x0&&(!_0x5065e1[_0x48faf0(0xee)]&&(_0x5065e1[_0x48faf0(0xee)]={'default':{'maxSize':'1m','dir':this[_0x48faf0(0x12f)][_0x48faf0(0x130)]()+_0x48faf0(0x102)}}),_0x5065e1[_0x48faf0(0xee)]['clients']=_0x585489),this['config']['addObject'](_0x5065e1);}}async[a2_0x2718e8(0x157)](){const _0x3b21b7=a2_0x2718e8;var _0x2aa716,_0x31eea2,_0xf0f6c6,_0x324950,_0x26532b,_0x42766b;const _0x118bda=this[_0x3b21b7(0x136)][_0x3b21b7(0x133)]();((_0x31eea2=(_0x2aa716=_0x118bda===null||_0x118bda===void 0x0?void 0x0:_0x118bda[_0x3b21b7(0x11c)])===null||_0x2aa716===void 0x0?void 0x0:_0x2aa716[_0x3b21b7(0xea)])===null||_0x31eea2===void 0x0?void 0x0:_0x31eea2[_0x3b21b7(0x121)])&&Object[_0x3b21b7(0x13a)](_0x118bda['anncicapi'][_0x3b21b7(0xea)])[_0x3b21b7(0x145)]>0x1&&delete _0x118bda[_0x3b21b7(0x11c)][_0x3b21b7(0xea)][_0x3b21b7(0x121)];if((_0xf0f6c6=_0x118bda===null||_0x118bda===void 0x0?void 0x0:_0x118bda[_0x3b21b7(0x11f)])===null||_0xf0f6c6===void 0x0?void 0x0:_0xf0f6c6[_0x3b21b7(0x149)])for(const _0x3e9786 in _0x118bda[_0x3b21b7(0x11f)][_0x3b21b7(0x149)]){((_0x324950=_0x118bda[_0x3b21b7(0x11f)][_0x3b21b7(0x149)][_0x3e9786])===null||_0x324950===void 0x0?void 0x0:_0x324950[_0x3b21b7(0xf0)])&&typeof((_0x26532b=_0x118bda[_0x3b21b7(0x11f)]['dirs'][_0x3e9786])===null||_0x26532b===void 0x0?void 0x0:_0x26532b['dir'])==_0x3b21b7(0x115)&&!fs[_0x3b21b7(0x142)](_0x118bda[_0x3b21b7(0x11f)][_0x3b21b7(0x149)][_0x3e9786][_0x3b21b7(0xf0)])&&(fs[_0x3b21b7(0x11d)](_0x118bda[_0x3b21b7(0x11f)][_0x3b21b7(0x149)][_0x3e9786][_0x3b21b7(0xf0)],{'recursive':!![]}),console[_0x3b21b7(0xe5)]('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x118bda[_0x3b21b7(0x11f)][_0x3b21b7(0x149)][_0x3e9786][_0x3b21b7(0xf0)]));}((_0x42766b=_0x118bda===null||_0x118bda===void 0x0?void 0x0:_0x118bda['upload'])===null||_0x42766b===void 0x0?void 0x0:_0x42766b['tmpdir'])&&!fs['existsSync'](_0x118bda['upload'][_0x3b21b7(0x144)])&&(fs['mkdirSync'](_0x118bda['upload'][_0x3b21b7(0x144)],{'recursive':!![]}),console[_0x3b21b7(0xe5)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0x118bda[_0x3b21b7(0x158)][_0x3b21b7(0x144)])),this[_0x3b21b7(0x136)]['addObject'](_0x118bda);}};__decorate([(0x0,core_1['App'])(),__metadata(a2_0x2718e8(0x108),Object)],CustomConfiguration[a2_0x2718e8(0x131)],a2_0x2718e8(0x12f),void 0x0),__decorate([(0x0,core_1[a2_0x2718e8(0x118)])(),__metadata(a2_0x2718e8(0x108),core_2['MidwayConfigService'])],CustomConfiguration['prototype'],a2_0x2718e8(0x136),void 0x0),__decorate([(0x0,core_1[a2_0x2718e8(0x118)])(),__metadata('design:type',core_2[a2_0x2718e8(0x10d)])],CustomConfiguration['prototype'],a2_0x2718e8(0xec),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x2718e8(0x108),core_2[a2_0x2718e8(0xe9)])],CustomConfiguration['prototype'],a2_0x2718e8(0x14d),void 0x0),__decorate([(0x0,core_1[a2_0x2718e8(0x118)])(),__metadata(a2_0x2718e8(0x108),core_2[a2_0x2718e8(0x114)])],CustomConfiguration[a2_0x2718e8(0x131)],'environment',void 0x0),__decorate([(0x0,core_1[a2_0x2718e8(0x118)])(),__metadata(a2_0x2718e8(0x108),ApiService_1[a2_0x2718e8(0x126)])],CustomConfiguration['prototype'],a2_0x2718e8(0x126),void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':'anncic-api','conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x2718e8(0x10c)]=CustomConfiguration;
|
|
1
|
+
const a2_0x3fee1b=a2_0x1f88;(function(_0x238e65,_0x29805c){const _0x36e657=a2_0x1f88,_0x5e1ad0=_0x238e65();while(!![]){try{const _0x2e35dd=parseInt(_0x36e657(0x11f))/0x1*(-parseInt(_0x36e657(0x113))/0x2)+parseInt(_0x36e657(0xff))/0x3+parseInt(_0x36e657(0xfd))/0x4*(parseInt(_0x36e657(0xeb))/0x5)+parseInt(_0x36e657(0xc7))/0x6*(-parseInt(_0x36e657(0xe2))/0x7)+-parseInt(_0x36e657(0xd6))/0x8+parseInt(_0x36e657(0xc5))/0x9+-parseInt(_0x36e657(0x128))/0xa*(parseInt(_0x36e657(0xec))/0xb);if(_0x2e35dd===_0x29805c)break;else _0x5e1ad0['push'](_0x5e1ad0['shift']());}catch(_0x46537e){_0x5e1ad0['push'](_0x5e1ad0['shift']());}}}(a2_0x2ac4,0x2e5d7));const a2_0x22aca0=(function(){let _0x61d0ab=!![];return function(_0x472daf,_0x5bffa9){const _0x4f7342=_0x61d0ab?function(){const _0x34b861=a2_0x1f88;if(_0x5bffa9){const _0x33318c=_0x5bffa9[_0x34b861(0x125)](_0x472daf,arguments);return _0x5bffa9=null,_0x33318c;}}:function(){};return _0x61d0ab=![],_0x4f7342;};}()),a2_0x11cbac=a2_0x22aca0(this,function(){const _0x2b83ae=a2_0x1f88;return a2_0x11cbac['toString']()['search'](_0x2b83ae(0x117))[_0x2b83ae(0xcc)]()[_0x2b83ae(0x12f)](a2_0x11cbac)['search'](_0x2b83ae(0x117));});a2_0x11cbac();function a2_0x1f88(_0x310b57,_0x479012){const _0x216987=a2_0x2ac4();return a2_0x1f88=function(_0x11cbac,_0x22aca0){_0x11cbac=_0x11cbac-0xc5;let _0x2ac436=_0x216987[_0x11cbac];return _0x2ac436;},a2_0x1f88(_0x310b57,_0x479012);}'use strict';var __decorate=this&&this[a2_0x3fee1b(0x136)]||function(_0x34cb80,_0x1473ab,_0x3241f5,_0x25571a){const _0xdd3c5e=a2_0x3fee1b;var _0x1783d8=arguments[_0xdd3c5e(0xd2)],_0x501e7b=_0x1783d8<0x3?_0x1473ab:_0x25571a===null?_0x25571a=Object[_0xdd3c5e(0x11b)](_0x1473ab,_0x3241f5):_0x25571a,_0x4a5810;if(typeof Reflect==='object'&&typeof Reflect[_0xdd3c5e(0xde)]===_0xdd3c5e(0x12c))_0x501e7b=Reflect[_0xdd3c5e(0xde)](_0x34cb80,_0x1473ab,_0x3241f5,_0x25571a);else{for(var _0x21ace1=_0x34cb80[_0xdd3c5e(0xd2)]-0x1;_0x21ace1>=0x0;_0x21ace1--)if(_0x4a5810=_0x34cb80[_0x21ace1])_0x501e7b=(_0x1783d8<0x3?_0x4a5810(_0x501e7b):_0x1783d8>0x3?_0x4a5810(_0x1473ab,_0x3241f5,_0x501e7b):_0x4a5810(_0x1473ab,_0x3241f5))||_0x501e7b;}return _0x1783d8>0x3&&_0x501e7b&&Object[_0xdd3c5e(0x101)](_0x1473ab,_0x3241f5,_0x501e7b),_0x501e7b;},__metadata=this&&this[a2_0x3fee1b(0xe9)]||function(_0x58fa34,_0x4a19e7){const _0x217945=a2_0x3fee1b;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x217945(0x12c))return Reflect[_0x217945(0xfb)](_0x58fa34,_0x4a19e7);};Object['defineProperty'](exports,a2_0x3fee1b(0xe6),{'value':!![]}),exports[a2_0x3fee1b(0x139)]=void 0x0;const core_1=require(a2_0x3fee1b(0xf9)),core_2=require(a2_0x3fee1b(0xf9)),ApiError_1=require(a2_0x3fee1b(0x12b)),ApiService_1=require(a2_0x3fee1b(0x10e)),action_1=require(a2_0x3fee1b(0xdb)),intercept_1=require(a2_0x3fee1b(0x112)),fs=require('fs'),koasend=require(a2_0x3fee1b(0xe8)),koa=require(a2_0x3fee1b(0x100)),i18n=require(a2_0x3fee1b(0x107)),upload=require(a2_0x3fee1b(0x110)),staticFile=require(a2_0x3fee1b(0x138)),crossDomain=require(a2_0x3fee1b(0xf3)),ConfigDefault=require(a2_0x3fee1b(0x130)),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x3fee1b(0x11e)),anncicCache=require(a2_0x3fee1b(0xd1)),anncicEvent=require(a2_0x3fee1b(0xd5)),anncicTypeorm=require(a2_0x3fee1b(0xe3)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require(a2_0x3fee1b(0x144));function a2_0x2ac4(){const _0x5283b6=['function','InterceptTargetTmp','anncicapi','constructor','./config/config.default','isClass','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','loggerConfig','Types','getAsync','__decorate','.log','@midwayjs/static-file','CustomConfiguration','koa','existsSync','Inject','_matchedRoute','getConfiguration','environment','getBaseDir','isDirectory','proceed','application','anncic-apihelper','assign','1121724VCNKlY','request','18yZpZWG','key','config','tmpdir','registerMethodHandler','toString','prototype','bodyXml','args','isFunction','@anncic-api/cache','length','handlerActionRoute','MidwayEnvironmentService','@anncic-api/event','579280XffWpe','forEach','getClassMetadata','target','clients','./types/action','文件不存在','toLowerCase','decorate','staticFile','design:type','readdirSync','182826gWfCgk','@anncic-api/typeorm','intercept','method','__esModule','midwayLogger','koa-send','__metadata','attachment','1130VqmpTt','335962NJZZop','dir','getAppDir','checkConfigKeys','keys','DEFAULT','isNull','@midwayjs/cross-domain','devices','headers','filterConfig','upload','defaultsDeep','@midwayjs/core','apimit','metadata','ApiError','3608YpsEpt','default','227511vNugkT','@midwayjs/koa','defineProperty','HEADERS_SIGNATURE','body','ACTION_ROUTE_KEY','/apps','anncic-api','@midwayjs/i18n','match','/apps/','checksign','ApiService','mkdirSync','app','./service/ApiService','onReady','@midwayjs/upload','addObject','./types/intercept','4atYgSu','get','string','INTERCEPT_KEY','(((.+)+)+)+$','defineProperties','undefined','App','getOwnPropertyDescriptor','dirs','MidwayConfigService','@anncic-api/core','1283LRmUlA','Anncic-api\x20static-file\x20:\x20mkdir\x20','log','MidwayApplicationManager','decorator','device','apply','input','handler','20UjznCy','statSync','/runtime','./exception/ApiError'];a2_0x2ac4=function(){return _0x5283b6;};return a2_0x2ac4();}let CustomConfiguration=class CustomConfiguration{async[a2_0x3fee1b(0x10f)](){const _0x49ed60=a2_0x3fee1b;await this[_0x49ed60(0xf6)](),await this[_0x49ed60(0x133)](),await this[_0x49ed60(0xef)](),await this[_0x49ed60(0xd3)](),await this['hanlderApplications']();}async['checkConfigKeys'](){}async[a2_0x3fee1b(0xd3)](){const _0x256093=a2_0x3fee1b,_0xad6705=(0x0,core_1[_0x256093(0xd8)])(intercept_1[_0x256093(0x116)],intercept_1[_0x256093(0x12d)])||{};this['decorator'][_0x256093(0xcb)](action_1[_0x256093(0x104)],_0x175a93=>{const _0xf33f29=_0x256093,_0x227365=_0x175a93[_0xf33f29(0xfb)];return{'before':async _0x306e36=>{const _0x269138=_0xf33f29;var _0x3792e6,_0x485d49;const _0x3daebc=(_0x3792e6=_0x306e36===null||_0x306e36===void 0x0?void 0x0:_0x306e36[_0x269138(0xd9)])===null||_0x3792e6===void 0x0?void 0x0:_0x3792e6[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x3daebc&&(_0x227365===null||_0x227365===void 0x0?void 0x0:_0x227365[_0x269138(0xfa)])){if(!this[_0x269138(0x10b)][_0x269138(0x10a)]((_0x485d49=_0x3daebc===null||_0x3daebc===void 0x0?void 0x0:_0x3daebc[_0x269138(0xc6)])===null||_0x485d49===void 0x0?void 0x0:_0x485d49['headers']))throw new AnnError(ApiError_1[_0x269138(0xfc)][_0x269138(0x102)]);}},'around':async _0x286107=>{const _0x166190=_0xf33f29;var _0x214295,_0x2884e2,_0xdbb70e;const _0x432233=(_0x214295=_0x286107===null||_0x286107===void 0x0?void 0x0:_0x286107[_0x166190(0xd9)])===null||_0x214295===void 0x0?void 0x0:_0x214295[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x432233&&(_0x227365===null||_0x227365===void 0x0?void 0x0:_0x227365['apimit'])&&((_0x227365===null||_0x227365===void 0x0?void 0x0:_0x227365[_0x166190(0xe4)])||typeof(_0x227365===null||_0x227365===void 0x0?void 0x0:_0x227365['intercept'])==_0x166190(0x119))){if(((_0x2884e2=_0x432233[_0x166190(0xf5)])===null||_0x2884e2===void 0x0?void 0x0:_0x2884e2[_0x166190(0x124)])&&((_0xdbb70e=_0xad6705===null||_0xad6705===void 0x0?void 0x0:_0xad6705[_0x432233[_0x166190(0xf5)][_0x166190(0x124)]])===null||_0xdbb70e===void 0x0?void 0x0:_0xdbb70e[_0x166190(0xd2)])>0x0)for(const _0x387b69 of _0xad6705[_0x432233[_0x166190(0xf5)][_0x166190(0x124)]]||[]){if(core_1[_0x166190(0x134)][_0x166190(0x131)](_0x387b69)){const _0x145ab6=await _0x432233['requestContext'][_0x166190(0x135)](_0x387b69);typeof(_0x145ab6===null||_0x145ab6===void 0x0?void 0x0:_0x145ab6[_0x166190(0x108)])==_0x166190(0x12c)?await _0x145ab6[_0x166190(0x108)](_0x432233,typeof(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0xe5)])=='string'&&(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233['_matchedRoute'])?_0x432233[_0x166190(0xe5)][_0x166190(0xdd)]()+'@'+(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0x13d)]):undefined,_0x227365)&&await _0x145ab6['handler'](_0x432233,typeof(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0xe5)])==_0x166190(0x115)&&(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0x13d)])?_0x432233[_0x166190(0xe5)][_0x166190(0xdd)]()+'@'+(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0x13d)]):undefined,_0x227365):await _0x145ab6[_0x166190(0x127)](_0x432233,typeof(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0xe5)])==_0x166190(0x115)&&(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0x13d)])?_0x432233[_0x166190(0xe5)]['toLowerCase']()+'@'+(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233['_matchedRoute']):undefined,_0x227365);}else core_1['Types'][_0x166190(0xd0)](_0x387b69)&&await _0x387b69(_0x432233,typeof(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0xe5)])=='string'&&(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0x13d)])?_0x432233[_0x166190(0xe5)][_0x166190(0xdd)]()+'@'+(_0x432233===null||_0x432233===void 0x0?void 0x0:_0x432233[_0x166190(0x13d)]):undefined,_0x227365);}}return await _0x286107[_0x166190(0x142)](..._0x286107[_0x166190(0xcf)]);},'afterThrow':(_0x185e44,_0x964bd)=>{throw _0x964bd;}};});}async['hanlderApplications'](){const _0x68dac5=a2_0x3fee1b;this['application']['getApplications']([_0x68dac5(0x13a)])[_0x68dac5(0xd7)](_0x39137f=>{const _0x2f5203=_0x68dac5;(_0x39137f===null||_0x39137f===void 0x0?void 0x0:_0x39137f['context'])&&Object[_0x2f5203(0x118)](_0x39137f['context'],{'ok':{'value':function(_0x4c554f,_0x4fe462,_0x5b7db2=0x0){return{'code':_0x5b7db2,'data':_0x4c554f,'extra':_0x4fe462};}},'input':{'value':function(_0x11ede7,_0x1628c8){const _0x25abce=_0x2f5203;var _0x10f131;const _0x36cb80=lodash[_0x25abce(0xf8)]({},this[_0x25abce(0xc6)][_0x25abce(0x103)]||this[_0x25abce(0xc6)][((_0x10f131=config===null||config===void 0x0?void 0x0:config[_0x25abce(0xce)])===null||_0x10f131===void 0x0?void 0x0:_0x10f131[_0x25abce(0xc8)])||_0x25abce(0x103)]||{},this['request']['query']||{});return _0x11ede7?lodash[_0x25abce(0x114)](_0x36cb80,_0x11ede7,_0x1628c8):_0x36cb80;}},'when':{'value':async function(_0x278cb3,_0x2f2652){const _0x1b2d2c=_0x2f5203,_0x4c3e55=this[_0x1b2d2c(0x126)](_0x278cb3,null);if(!lodash[_0x1b2d2c(0xf2)](_0x4c3e55))return await _0x2f2652(_0x4c3e55);}},'only':{'value':function(_0x30a67e){const _0x4ecafc=_0x2f5203,_0x47f23e={};for(let _0xa6c940=0x0;_0xa6c940<_0x30a67e[_0x4ecafc(0xd2)];_0xa6c940++){lodash['isArray'](_0x30a67e[_0xa6c940])&&_0x30a67e[_0xa6c940][_0x4ecafc(0xd2)]>0x0&&lodash['isString'](_0x30a67e[_0xa6c940][0x0])&&(_0x47f23e[_0x30a67e[_0xa6c940][0x0]]=this[_0x4ecafc(0x126)](_0x30a67e[_0xa6c940][0x0],_0x30a67e[_0xa6c940]['length']>0x1?_0x30a67e[_0xa6c940][0x1]:null));}return _0x47f23e;}},'koasend':{'value':function(_0x26dbf8,_0x159dc5){const _0x4105f0=_0x2f5203;if(!fs['existsSync'](this[_0x4105f0(0x10d)]['getAppDir']()+'/'+_0x26dbf8))return _0x4105f0(0xdc);return this[_0x4105f0(0xea)](_0x159dc5||_0x26dbf8),koasend(this,_0x26dbf8);}}});});}async['loggerConfig'](){const _0x506949=a2_0x3fee1b;var _0x389045,_0x1db8ff;if(fs[_0x506949(0x13b)](this['app'][_0x506949(0x140)]()+_0x506949(0x105))&&fs[_0x506949(0x129)](this[_0x506949(0x10d)][_0x506949(0x140)]()+_0x506949(0x105))[_0x506949(0x141)]()){const _0x5b860e=this[_0x506949(0xc9)][_0x506949(0x13e)](),_0x385629=((_0x389045=_0x5b860e===null||_0x5b860e===void 0x0?void 0x0:_0x5b860e[_0x506949(0xe7)])===null||_0x389045===void 0x0?void 0x0:_0x389045[_0x506949(0xda)])||{};for(const _0x2e4ff9 of fs[_0x506949(0xe1)](this['app'][_0x506949(0x140)]()+_0x506949(0x105))){if(!fs[_0x506949(0x129)](this[_0x506949(0x10d)][_0x506949(0x140)]()+_0x506949(0x109)+_0x2e4ff9)[_0x506949(0x141)]())continue;if(_0x385629===null||_0x385629===void 0x0?void 0x0:_0x385629[_0x2e4ff9])continue;_0x385629[_0x2e4ff9]=Object[_0x506949(0x145)]({},((_0x1db8ff=_0x5b860e===null||_0x5b860e===void 0x0?void 0x0:_0x5b860e[_0x506949(0xe7)])===null||_0x1db8ff===void 0x0?void 0x0:_0x1db8ff[_0x506949(0xfe)])||{'maxSize':'1m','dir':this[_0x506949(0x10d)][_0x506949(0xee)]()+_0x506949(0x12a)},{'enableJSON':!![],'enableConsole':this[_0x506949(0x13f)]['isDevelopmentEnvironment'](),'fileLogName':_0x2e4ff9+_0x506949(0x137),'dir':this['app'][_0x506949(0xee)]()+'/runtime/apps-'+_0x2e4ff9+'-log'});}Object[_0x506949(0xf0)](_0x385629)[_0x506949(0xd2)]>0x0&&(!_0x5b860e[_0x506949(0xe7)]&&(_0x5b860e[_0x506949(0xe7)]={'default':{'maxSize':'1m','dir':this[_0x506949(0x10d)][_0x506949(0xee)]()+_0x506949(0x12a)}}),_0x5b860e[_0x506949(0xe7)][_0x506949(0xda)]=_0x385629),this[_0x506949(0xc9)][_0x506949(0x111)](_0x5b860e);}}async[a2_0x3fee1b(0xf6)](){const _0x1bf666=a2_0x3fee1b;var _0x86138e,_0x287971,_0x1314d2,_0x502f79,_0x38a190,_0x34fd13;const _0x57d552=this[_0x1bf666(0xc9)]['getConfiguration']();((_0x287971=(_0x86138e=_0x57d552===null||_0x57d552===void 0x0?void 0x0:_0x57d552[_0x1bf666(0x12e)])===null||_0x86138e===void 0x0?void 0x0:_0x86138e[_0x1bf666(0xf4)])===null||_0x287971===void 0x0?void 0x0:_0x287971[_0x1bf666(0xf1)])&&Object[_0x1bf666(0xf0)](_0x57d552[_0x1bf666(0x12e)][_0x1bf666(0xf4)])[_0x1bf666(0xd2)]>0x1&&delete _0x57d552[_0x1bf666(0x12e)][_0x1bf666(0xf4)][_0x1bf666(0xf1)];if((_0x1314d2=_0x57d552===null||_0x57d552===void 0x0?void 0x0:_0x57d552['staticFile'])===null||_0x1314d2===void 0x0?void 0x0:_0x1314d2[_0x1bf666(0x11c)])for(const _0x5e180f in _0x57d552[_0x1bf666(0xdf)]['dirs']){((_0x502f79=_0x57d552[_0x1bf666(0xdf)][_0x1bf666(0x11c)][_0x5e180f])===null||_0x502f79===void 0x0?void 0x0:_0x502f79[_0x1bf666(0xed)])&&typeof((_0x38a190=_0x57d552[_0x1bf666(0xdf)]['dirs'][_0x5e180f])===null||_0x38a190===void 0x0?void 0x0:_0x38a190[_0x1bf666(0xed)])=='string'&&!fs[_0x1bf666(0x13b)](_0x57d552[_0x1bf666(0xdf)]['dirs'][_0x5e180f][_0x1bf666(0xed)])&&(fs[_0x1bf666(0x10c)](_0x57d552['staticFile'][_0x1bf666(0x11c)][_0x5e180f][_0x1bf666(0xed)],{'recursive':!![]}),console[_0x1bf666(0x121)](_0x1bf666(0x120)+_0x57d552['staticFile'][_0x1bf666(0x11c)][_0x5e180f][_0x1bf666(0xed)]));}((_0x34fd13=_0x57d552===null||_0x57d552===void 0x0?void 0x0:_0x57d552[_0x1bf666(0xf7)])===null||_0x34fd13===void 0x0?void 0x0:_0x34fd13[_0x1bf666(0xca)])&&!fs[_0x1bf666(0x13b)](_0x57d552[_0x1bf666(0xf7)][_0x1bf666(0xca)])&&(fs[_0x1bf666(0x10c)](_0x57d552[_0x1bf666(0xf7)][_0x1bf666(0xca)],{'recursive':!![]}),console[_0x1bf666(0x121)](_0x1bf666(0x132)+_0x57d552[_0x1bf666(0xf7)][_0x1bf666(0xca)])),this[_0x1bf666(0xc9)][_0x1bf666(0x111)](_0x57d552);}};__decorate([(0x0,core_1[a2_0x3fee1b(0x11a)])(),__metadata(a2_0x3fee1b(0xe0),Object)],CustomConfiguration['prototype'],'app',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x3fee1b(0xe0),core_2[a2_0x3fee1b(0x11d)])],CustomConfiguration['prototype'],a2_0x3fee1b(0xc9),void 0x0),__decorate([(0x0,core_1[a2_0x3fee1b(0x13c)])(),__metadata(a2_0x3fee1b(0xe0),core_2['MidwayDecoratorService'])],CustomConfiguration['prototype'],a2_0x3fee1b(0x123),void 0x0),__decorate([(0x0,core_1[a2_0x3fee1b(0x13c)])(),__metadata(a2_0x3fee1b(0xe0),core_2[a2_0x3fee1b(0x122)])],CustomConfiguration['prototype'],a2_0x3fee1b(0x143),void 0x0),__decorate([(0x0,core_1[a2_0x3fee1b(0x13c)])(),__metadata(a2_0x3fee1b(0xe0),core_2[a2_0x3fee1b(0xd4)])],CustomConfiguration[a2_0x3fee1b(0xcd)],a2_0x3fee1b(0x13f),void 0x0),__decorate([(0x0,core_1[a2_0x3fee1b(0x13c)])(),__metadata(a2_0x3fee1b(0xe0),ApiService_1['ApiService'])],CustomConfiguration['prototype'],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x3fee1b(0x106),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x3fee1b(0x139)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x242cab=a3_0x313b;(function(_0x2f48ac,_0x2efdf5){const _0x31683f=a3_0x313b,_0x362e1f=_0x2f48ac();while(!![]){try{const _0x274cf5=parseInt(_0x31683f(0x1c0))/0x1*(-parseInt(_0x31683f(0x192))/0x2)+parseInt(_0x31683f(0x1a7))/0x3+-parseInt(_0x31683f(0x19e))/0x4*(-parseInt(_0x31683f(0x1b9))/0x5)+-parseInt(_0x31683f(0x1d2))/0x6*(-parseInt(_0x31683f(0x1b0))/0x7)+-parseInt(_0x31683f(0x1b6))/0x8*(parseInt(_0x31683f(0x193))/0x9)+parseInt(_0x31683f(0x1d0))/0xa*(-parseInt(_0x31683f(0x1d8))/0xb)+parseInt(_0x31683f(0x1d1))/0xc*(parseInt(_0x31683f(0x1bc))/0xd);if(_0x274cf5===_0x2efdf5)break;else _0x362e1f['push'](_0x362e1f['shift']());}catch(_0x408bf7){_0x362e1f['push'](_0x362e1f['shift']());}}}(a3_0x154e,0x5bd29));const a3_0x3d431f=(function(){let _0x331330=!![];return function(_0x5b949f,_0x5cf00d){const _0x283397=_0x331330?function(){const _0x43837b=a3_0x313b;if(_0x5cf00d){const _0x424ad6=_0x5cf00d[_0x43837b(0x1ce)](_0x5b949f,arguments);return _0x5cf00d=null,_0x424ad6;}}:function(){};return _0x331330=![],_0x283397;};}()),a3_0x591a41=a3_0x3d431f(this,function(){const _0x146ef5=a3_0x313b;return a3_0x591a41[_0x146ef5(0x1a4)]()[_0x146ef5(0x1b7)](_0x146ef5(0x18b))['toString']()[_0x146ef5(0x19f)](a3_0x591a41)[_0x146ef5(0x1b7)](_0x146ef5(0x18b));});a3_0x591a41();'use strict';Object[a3_0x242cab(0x1ac)](exports,a3_0x242cab(0x1ab),{'value':!![]}),exports[a3_0x242cab(0x1d4)]=exports['ActionApi']=exports[a3_0x242cab(0x1ca)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x242cab(0x1d7)),core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),action_1=require(a3_0x242cab(0x1a3));function a3_0x313b(_0x4c226c,_0x5592da){const _0x25fa2c=a3_0x154e();return a3_0x313b=function(_0x591a41,_0x3d431f){_0x591a41=_0x591a41-0x18b;let _0x154e1c=_0x25fa2c[_0x591a41];return _0x154e1c;},a3_0x313b(_0x4c226c,_0x5592da);}function Action(_0x26f98c,_0x597dd8,_0x471bf6={'middleware':[],'sensitive':!![]}){return _0x129381=>{const _0x219949=a3_0x313b;var _0x599132;_0x471bf6[_0x219949(0x1a5)]=_0x597dd8;const _0x1ad791=parseRoute(_0x26f98c);if(_0x1ad791['module']){_0x471bf6['prefix']=_0x471bf6[_0x219949(0x18c)]?'/'+_0x1ad791[_0x219949(0x1c3)]+'/'+_0x471bf6[_0x219949(0x18c)]:'/'+_0x1ad791['route'];_0x1ad791['prefix']&&(_0x471bf6['prefix']='/'+_0x1ad791[_0x219949(0x18c)]+'/'+_0x471bf6[_0x219949(0x18c)]);if(fs['existsSync'](_0x1ad791[_0x219949(0x18e)]+_0x219949(0x190)+_0x1ad791[_0x219949(0x1c3)]+_0x219949(0x195)+(lodash[_0x219949(0x19b)](_0x1ad791[_0x219949(0x1b3)],'ts')?'ts':'js'))){const _0x206ecc=include(_0x1ad791[_0x219949(0x18e)]+'/apps/'+_0x1ad791[_0x219949(0x1c3)]+_0x219949(0x195)+(lodash[_0x219949(0x19b)](_0x1ad791[_0x219949(0x1b3)],'ts')?'ts':'js'));if(_0x206ecc[_0x219949(0x1cc)]&&lodash[_0x219949(0x1c7)](_0x206ecc[_0x219949(0x1cc)])&&_0x206ecc['middleware']['length']>0x0)for(let _0x1a6e3c in _0x206ecc[_0x219949(0x1cc)]){if(((_0x599132=_0x206ecc===null||_0x206ecc===void 0x0?void 0x0:_0x206ecc[_0x219949(0x1cd)])===null||_0x599132===void 0x0?void 0x0:_0x599132[_0x219949(0x1a0)])>0x0&&_0x206ecc[_0x219949(0x1cd)][_0x219949(0x1cb)](_0x206ecc[_0x219949(0x1cc)][_0x1a6e3c])!=-0x1)continue;_0x471bf6[_0x219949(0x1cc)][_0x219949(0x1d6)](_0x206ecc[_0x219949(0x1cc)][_0x1a6e3c]);}const _0x43ef90=(0x0,core_1[_0x219949(0x199)])(action_1[_0x219949(0x19d)],action_1[_0x219949(0x19a)])||{};_0x43ef90[''+_0x1ad791[_0x219949(0x1c3)]]=_0x206ecc,(0x0,core_1[_0x219949(0x1bb)])(action_1[_0x219949(0x19d)],_0x43ef90,action_1['AppsConfigTmp']);}_0x471bf6['prefix']=_0x471bf6[_0x219949(0x18c)][_0x219949(0x18f)]()[_0x219949(0x1c1)](/\/{2,}/g,'/'),(0x0,core_1[_0x219949(0x198)])(action_1[_0x219949(0x1cf)],_0x129381),(0x0,core_1[_0x219949(0x18d)])(_0x471bf6[_0x219949(0x18c)],_0x471bf6)(_0x129381),(0x0,core_1['saveClassMetadata'])(action_1[_0x219949(0x1cf)],{'prefix':_0x471bf6[_0x219949(0x18c)],'pprefix':_0x1ad791[_0x219949(0x18c)],'module':_0x1ad791[_0x219949(0x1c3)],'filepath':_0x1ad791[_0x219949(0x1b3)],'routerOptions':_0x471bf6},_0x129381);}else _0x471bf6['prefix']=_0x471bf6['prefix']?'/'+_0x471bf6[_0x219949(0x18c)]:'/'+_0x1ad791[_0x219949(0x1b1)],_0x1ad791['prefix']&&(_0x471bf6[_0x219949(0x18c)]='/'+_0x1ad791[_0x219949(0x18c)]+'/'+_0x471bf6[_0x219949(0x18c)]),_0x471bf6[_0x219949(0x18c)]=_0x471bf6[_0x219949(0x18c)][_0x219949(0x18f)]()[_0x219949(0x1c1)](/\/{2,}/g,'/'),(0x0,core_1[_0x219949(0x198)])(action_1[_0x219949(0x1cf)],_0x129381),(0x0,core_1[_0x219949(0x18d)])(_0x471bf6['prefix'],_0x471bf6)(_0x129381),(0x0,core_1[_0x219949(0x1bb)])(action_1[_0x219949(0x1cf)],{'prefix':_0x471bf6[_0x219949(0x18c)],'module':_0x1ad791[_0x219949(0x1c3)],'pprefix':_0x1ad791[_0x219949(0x18c)],'filepath':_0x1ad791['filepath'],'routerOptions':_0x471bf6},_0x129381);};}exports[a3_0x242cab(0x1ca)]=Action,Action[a3_0x242cab(0x1d3)]=function(_0x7f5579,_0x51609b='/',_0x1962bd={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x41d670,_0x12520c,_0x57227a)=>{const _0xc86622=a3_0x313b;ActionApi(_0x7f5579,_0xc86622(0x1d3),_0x51609b,_0x1962bd)(_0x41d670,_0x12520c,_0x57227a);};},Action[a3_0x242cab(0x197)]=function(_0x5d6cd7,_0xae7f4b='/',_0x546138={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x4f2013,_0x29d73e,_0x432c69)=>{const _0x1f831c=a3_0x313b;ActionApi(_0x5d6cd7,_0x1f831c(0x197),_0xae7f4b,_0x546138)(_0x4f2013,_0x29d73e,_0x432c69);};};function ActionApi(_0x4d35cd,_0x32a5fe='get',_0x37bd4a='/',_0x4f8e1f={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x5eb925,_0x1687fd,_0x49a3db)=>{const _0x5b0e8a=a3_0x313b;var _0x3ae88a,_0x45f26e,_0x104c0a;!_0x4f8e1f[_0x5b0e8a(0x1cc)]&&(_0x4f8e1f['middleware']=[]);!((_0x3ae88a=_0x4f8e1f===null||_0x4f8e1f===void 0x0?void 0x0:_0x4f8e1f[_0x5b0e8a(0x1af)])===null||_0x3ae88a===void 0x0?void 0x0:_0x3ae88a[_0x5b0e8a(0x191)])&&(_0x4f8e1f['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}});if(!_0x37bd4a)_0x37bd4a='/';else typeof _0x37bd4a=='string'&&!_0x37bd4a[_0x5b0e8a(0x1be)]('/')&&(_0x37bd4a='/'+_0x37bd4a);typeof _0x4f8e1f[_0x5b0e8a(0x1bd)]==_0x5b0e8a(0x1b4)&&(_0x4f8e1f[_0x5b0e8a(0x1bd)]=!![]);if(((_0x45f26e=_0x4f8e1f===null||_0x4f8e1f===void 0x0?void 0x0:_0x4f8e1f[_0x5b0e8a(0x1cc)])===null||_0x45f26e===void 0x0?void 0x0:_0x45f26e[_0x5b0e8a(0x1a0)])>0x0&&((_0x104c0a=_0x4f8e1f===null||_0x4f8e1f===void 0x0?void 0x0:_0x4f8e1f[_0x5b0e8a(0x1cd)])===null||_0x104c0a===void 0x0?void 0x0:_0x104c0a[_0x5b0e8a(0x1a0)])>0x0)for(let _0x45759e in _0x4f8e1f[_0x5b0e8a(0x1cc)]){_0x4f8e1f[_0x5b0e8a(0x1cd)][_0x5b0e8a(0x1cb)](_0x4f8e1f[_0x5b0e8a(0x1cc)][_0x45759e])!==-0x1&&(_0x4f8e1f[_0x5b0e8a(0x1cc)][_0x45759e]=null);}_0x4f8e1f[_0x5b0e8a(0x1bf)]=_0x4d35cd,(0x0,validator_1[_0x5b0e8a(0x1a9)])(_0x4f8e1f['validate'])(_0x5eb925,_0x1687fd,_0x49a3db),(0x0,core_2['RequestMapping'])(Object[_0x5b0e8a(0x196)](_0x4f8e1f,{'path':_0x37bd4a,'requestMethod':(_0x32a5fe||'get')['toLowerCase']()}))(_0x5eb925,_0x1687fd,_0x49a3db),(0x0,core_2['attachClassMetadata'])(action_1[_0x5b0e8a(0x1a8)],{'path':_0x37bd4a,'method':_0x1687fd,'apimit':_0x4f8e1f[_0x5b0e8a(0x1bd)],'intercept':_0x4f8e1f[_0x5b0e8a(0x19c)],'routerName':_0x4f8e1f[_0x5b0e8a(0x1bf)],'description':_0x4f8e1f[_0x5b0e8a(0x1c8)],'middleware':(_0x4f8e1f[_0x5b0e8a(0x1cc)]||[])[_0x5b0e8a(0x1a1)](_0x1a278f=>!!_0x1a278f),'requestMethod':(_0x32a5fe||_0x5b0e8a(0x1d3))[_0x5b0e8a(0x18f)]()},_0x5eb925),(0x0,core_2[_0x5b0e8a(0x1a6)])(action_1[_0x5b0e8a(0x1a8)],{'path':_0x37bd4a,'method':_0x1687fd,'apimit':_0x4f8e1f[_0x5b0e8a(0x1bd)],'intercept':_0x4f8e1f[_0x5b0e8a(0x19c)],'routerName':_0x4f8e1f['routerName'],'description':_0x4f8e1f[_0x5b0e8a(0x1c8)],'middleware':(_0x4f8e1f[_0x5b0e8a(0x1cc)]||[])['filter'](_0x5f41fc=>!!_0x5f41fc),'requestMethod':(_0x32a5fe||_0x5b0e8a(0x1d3))[_0x5b0e8a(0x18f)]()})(_0x5eb925,_0x1687fd,_0x49a3db);};}exports[a3_0x242cab(0x1ba)]=ActionApi;function parseRoute(_0x2cf63d){const _0x1f2e47=a3_0x242cab;_0x2cf63d=_0x2cf63d[_0x1f2e47(0x1c1)](/(\\|\/)/g,'/');const _0x20d36f=process['cwd']()[_0x1f2e47(0x1c1)](/(\\|\/)/g,'/'),_0x40e71f=_0x2cf63d[_0x1f2e47(0x1ad)](0x0,_0x20d36f[_0x1f2e47(0x1a0)]+_0x2cf63d[_0x1f2e47(0x1ad)](_0x20d36f[_0x1f2e47(0x1a0)]+0x1)[_0x1f2e47(0x1cb)]('/')+0x1),_0x571fb6=_0x2cf63d[_0x1f2e47(0x1ad)](_0x40e71f[_0x1f2e47(0x1a0)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x2c9611={'route':'','prefix':![],'module':![],'rootpath':_0x40e71f,'filepath':_0x571fb6};if(_0x571fb6[_0x1f2e47(0x1be)](_0x1f2e47(0x194))||_0x571fb6[_0x1f2e47(0x1be)]('basic/controller/')){const _0x44ac58=_0x571fb6['substring']((_0x571fb6[_0x1f2e47(0x1be)](_0x1f2e47(0x194))?_0x1f2e47(0x194):_0x1f2e47(0x1d5))[_0x1f2e47(0x1a0)])['split']('/')[_0x1f2e47(0x1a1)](_0x45c171=>_0x45c171&&_0x45c171['trim']());return _0x44ac58[_0x1f2e47(0x1a0)]>0x1&&(_0x2c9611[_0x1f2e47(0x18c)]=_0x44ac58[0x0][_0x1f2e47(0x18f)](),_0x44ac58['splice'](0x0,0x1)),_0x2c9611['route']=('/'+_0x44ac58[_0x1f2e47(0x1c2)]('/'))[_0x1f2e47(0x1c1)](/(\.ts|\.js)$/,'')[_0x1f2e47(0x1c1)](/\/{2,}/g,'/')[_0x1f2e47(0x1b5)](/[\/|A-Z]*[^A-Z]+/g)[_0x1f2e47(0x1c2)]('-')['toLowerCase']()[_0x1f2e47(0x1c1)](/\/\-/g,'/'),_0x2c9611['route'][_0x1f2e47(0x19b)]('-action')&&(_0x2c9611[_0x1f2e47(0x1b1)]=_0x2c9611[_0x1f2e47(0x1b1)][_0x1f2e47(0x1ad)](0x0,_0x2c9611[_0x1f2e47(0x1b1)]['length']-0x7)),_0x2c9611[_0x1f2e47(0x1b1)][_0x1f2e47(0x19b)](_0x1f2e47(0x1c4))&&(_0x2c9611[_0x1f2e47(0x1b1)]=_0x2c9611['route'][_0x1f2e47(0x1ad)](0x0,_0x2c9611[_0x1f2e47(0x1b1)][_0x1f2e47(0x1a0)]-0xb)),_0x2c9611;}else{if(_0x571fb6['startsWith'](_0x1f2e47(0x1a2))){const _0x3f3925=_0x571fb6[_0x1f2e47(0x1ad)](0x0,_0x571fb6['indexOf']('/apps/')+0x5),_0x504f5e=_0x571fb6[_0x1f2e47(0x1ad)](_0x3f3925[_0x1f2e47(0x1a0)]+0x1)['replace'](/(\\|\/)/g,'/')[_0x1f2e47(0x1c9)]('/')[0x0];if(_0x571fb6['startsWith']('apps/'+_0x504f5e+_0x1f2e47(0x1c6))){const _0x1a08b6=_0x571fb6[_0x1f2e47(0x1ad)]((_0x3f3925+'/'+_0x504f5e+_0x1f2e47(0x1c6))['length'])[_0x1f2e47(0x1c9)]('/')[_0x1f2e47(0x1a1)](_0x558654=>_0x558654&&_0x558654[_0x1f2e47(0x1ae)]());return _0x1a08b6[_0x1f2e47(0x1a0)]>0x1&&(_0x2c9611['prefix']=_0x1a08b6[0x0][_0x1f2e47(0x18f)](),_0x1a08b6[_0x1f2e47(0x1c5)](0x0,0x1)),_0x2c9611[_0x1f2e47(0x1c3)]=_0x504f5e,_0x2c9611[_0x1f2e47(0x1b1)]=('/'+_0x504f5e+'/'+_0x1a08b6[_0x1f2e47(0x1c2)]('/'))[_0x1f2e47(0x1c1)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0x1f2e47(0x1b5)](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x1f2e47(0x18f)]()['replace'](/\/\-/g,'/'),_0x2c9611[_0x1f2e47(0x1b1)][_0x1f2e47(0x19b)](_0x1f2e47(0x1aa))&&(_0x2c9611[_0x1f2e47(0x1b1)]=_0x2c9611[_0x1f2e47(0x1b1)][_0x1f2e47(0x1ad)](0x0,_0x2c9611[_0x1f2e47(0x1b1)]['length']-0x7)),_0x2c9611['route'][_0x1f2e47(0x19b)](_0x1f2e47(0x1c4))&&(_0x2c9611[_0x1f2e47(0x1b1)]=_0x2c9611[_0x1f2e47(0x1b1)][_0x1f2e47(0x1ad)](0x0,_0x2c9611['route']['length']-0xb)),_0x2c9611;}throw new Error(_0x571fb6+'\x20文件请放在apps/'+_0x504f5e+_0x1f2e47(0x1b2));}}throw new Error(_0x571fb6+_0x1f2e47(0x1b8));}exports[a3_0x242cab(0x1d4)]=parseRoute;function a3_0x154e(){const _0x5f341e=['551649vSrfux','ACTION_ROUTE_KEY','Validator','-action','__esModule','defineProperty','substring','trim','validate','1258278WgKXhn','route','/controller/文件下','filepath','undefined','match','136872NkMmGs','search','\x20文件请放在app/controller/文件下','3588205Iiifou','ActionApi','saveClassMetadata','13vUuBVH','apimit','startsWith','routerName','237UHLMZh','replace','join','module','-controller','splice','/controller/','isArray','description','split','Action','indexOf','middleware','middlewareIgnore','apply','ACTION_KEY','80gkpomK','7252932WYaOnO','6gbgbvR','get','parseRoute','basic/controller/','push','@anncic-api/validator','359865NpnLiG','(((.+)+)+)+$','prefix','Controller','rootpath','toLowerCase','/apps/','validationOptions','5522KthZXj','207bKgHYA','app/controller/','/config.','assign','post','saveModule','getClassMetadata','AppsConfigTmp','endsWith','intercept','APPSCONFIG_KEY','4mzghnw','constructor','length','filter','apps/','../types/action','toString','tagName','createCustomMethodDecorator'];a3_0x154e=function(){return _0x5f341e;};return a3_0x154e();}
|
|
1
|
+
const a3_0x2853fc=a3_0x44f8;(function(_0x2d0c7a,_0x49dc6d){const _0x54f145=a3_0x44f8,_0xcd2737=_0x2d0c7a();while(!![]){try{const _0x7ff5c3=parseInt(_0x54f145(0x1db))/0x1+parseInt(_0x54f145(0x1ea))/0x2+parseInt(_0x54f145(0x20a))/0x3+-parseInt(_0x54f145(0x21a))/0x4+-parseInt(_0x54f145(0x218))/0x5*(parseInt(_0x54f145(0x1fd))/0x6)+parseInt(_0x54f145(0x1ef))/0x7*(parseInt(_0x54f145(0x1fe))/0x8)+parseInt(_0x54f145(0x203))/0x9*(-parseInt(_0x54f145(0x222))/0xa);if(_0x7ff5c3===_0x49dc6d)break;else _0xcd2737['push'](_0xcd2737['shift']());}catch(_0x30e1c4){_0xcd2737['push'](_0xcd2737['shift']());}}}(a3_0xa994,0x9a92e));const a3_0x2a0fee=(function(){let _0x3dd22e=!![];return function(_0x2e4e27,_0x26eb37){const _0x500fe4=_0x3dd22e?function(){const _0x33521d=a3_0x44f8;if(_0x26eb37){const _0x3c1117=_0x26eb37[_0x33521d(0x226)](_0x2e4e27,arguments);return _0x26eb37=null,_0x3c1117;}}:function(){};return _0x3dd22e=![],_0x500fe4;};}()),a3_0x198010=a3_0x2a0fee(this,function(){const _0x1df15e=a3_0x44f8;return a3_0x198010[_0x1df15e(0x219)]()[_0x1df15e(0x212)](_0x1df15e(0x1ee))[_0x1df15e(0x219)]()[_0x1df15e(0x228)](a3_0x198010)[_0x1df15e(0x212)](_0x1df15e(0x1ee));});a3_0x198010();'use strict';Object[a3_0x2853fc(0x21e)](exports,a3_0x2853fc(0x1e6),{'value':!![]}),exports[a3_0x2853fc(0x21c)]=exports[a3_0x2853fc(0x217)]=exports[a3_0x2853fc(0x20c)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x2853fc(0x201)),core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),action_1=require(a3_0x2853fc(0x1f4));function Action(_0x206f26,_0x214219,_0x3e27c9={'middleware':[],'sensitive':!![]}){return _0x354b7d=>{const _0x30af67=a3_0x44f8;var _0x26a289;_0x3e27c9[_0x30af67(0x211)]=_0x214219;const _0x3db627=parseRoute(_0x206f26);if(_0x3db627[_0x30af67(0x223)]){_0x3e27c9['prefix']=_0x3e27c9[_0x30af67(0x1f1)]?'/'+_0x3db627[_0x30af67(0x223)]+'/'+_0x3e27c9['prefix']:'/'+_0x3db627[_0x30af67(0x227)];_0x3db627[_0x30af67(0x1f1)]&&(_0x3e27c9[_0x30af67(0x1f1)]='/'+_0x3db627[_0x30af67(0x1f1)]+'/'+_0x3e27c9[_0x30af67(0x1f1)]);if(fs[_0x30af67(0x1fc)](_0x3db627[_0x30af67(0x1ec)]+_0x30af67(0x210)+_0x3db627[_0x30af67(0x223)]+'/config.'+(lodash[_0x30af67(0x216)](_0x3db627[_0x30af67(0x1fb)],'ts')?'ts':'js'))){const _0x10a910=include(_0x3db627['rootpath']+_0x30af67(0x210)+_0x3db627[_0x30af67(0x223)]+_0x30af67(0x224)+(lodash[_0x30af67(0x216)](_0x3db627[_0x30af67(0x1fb)],'ts')?'ts':'js'));if(_0x10a910['middleware']&&lodash[_0x30af67(0x202)](_0x10a910[_0x30af67(0x1e8)])&&_0x10a910['middleware']['length']>0x0)for(let _0x1f9f84 in _0x10a910[_0x30af67(0x1e8)]){if(((_0x26a289=_0x10a910===null||_0x10a910===void 0x0?void 0x0:_0x10a910[_0x30af67(0x208)])===null||_0x26a289===void 0x0?void 0x0:_0x26a289[_0x30af67(0x1e2)])>0x0&&_0x10a910['middlewareIgnore'][_0x30af67(0x1ed)](_0x10a910[_0x30af67(0x1e8)][_0x1f9f84])!=-0x1)continue;_0x3e27c9[_0x30af67(0x1e8)][_0x30af67(0x1dc)](_0x10a910[_0x30af67(0x1e8)][_0x1f9f84]);}const _0x65160d=(0x0,core_1[_0x30af67(0x213)])(action_1['APPSCONFIG_KEY'],action_1[_0x30af67(0x215)])||{};_0x65160d[''+_0x3db627[_0x30af67(0x223)]]=_0x10a910,(0x0,core_1[_0x30af67(0x220)])(action_1[_0x30af67(0x1f9)],_0x65160d,action_1[_0x30af67(0x215)]);}_0x3e27c9[_0x30af67(0x1f1)]=_0x3e27c9['prefix'][_0x30af67(0x214)]()[_0x30af67(0x1f5)](/\/{2,}/g,'/'),(0x0,core_1[_0x30af67(0x21d)])(action_1[_0x30af67(0x1e9)],_0x354b7d),(0x0,core_1[_0x30af67(0x1df)])(_0x3e27c9[_0x30af67(0x1f1)],_0x3e27c9)(_0x354b7d),(0x0,core_1[_0x30af67(0x220)])(action_1[_0x30af67(0x1e9)],{'prefix':_0x3e27c9[_0x30af67(0x1f1)],'pprefix':_0x3db627[_0x30af67(0x1f1)],'module':_0x3db627[_0x30af67(0x223)],'filepath':_0x3db627[_0x30af67(0x1fb)],'routerOptions':_0x3e27c9},_0x354b7d);}else _0x3e27c9['prefix']=_0x3e27c9[_0x30af67(0x1f1)]?'/'+_0x3e27c9[_0x30af67(0x1f1)]:'/'+_0x3db627[_0x30af67(0x227)],_0x3db627['prefix']&&(_0x3e27c9[_0x30af67(0x1f1)]='/'+_0x3db627[_0x30af67(0x1f1)]+'/'+_0x3e27c9[_0x30af67(0x1f1)]),_0x3e27c9['prefix']=_0x3e27c9[_0x30af67(0x1f1)][_0x30af67(0x214)]()[_0x30af67(0x1f5)](/\/{2,}/g,'/'),(0x0,core_1[_0x30af67(0x21d)])(action_1['ACTION_KEY'],_0x354b7d),(0x0,core_1[_0x30af67(0x1df)])(_0x3e27c9[_0x30af67(0x1f1)],_0x3e27c9)(_0x354b7d),(0x0,core_1[_0x30af67(0x220)])(action_1[_0x30af67(0x1e9)],{'prefix':_0x3e27c9[_0x30af67(0x1f1)],'module':_0x3db627[_0x30af67(0x223)],'pprefix':_0x3db627['prefix'],'filepath':_0x3db627['filepath'],'routerOptions':_0x3e27c9},_0x354b7d);};}function a3_0x44f8(_0x192959,_0x51c3b5){const _0x426c58=a3_0xa994();return a3_0x44f8=function(_0x198010,_0x2a0fee){_0x198010=_0x198010-0x1da;let _0xa9945e=_0x426c58[_0x198010];return _0xa9945e;},a3_0x44f8(_0x192959,_0x51c3b5);}exports[a3_0x2853fc(0x20c)]=Action,Action[a3_0x2853fc(0x1f3)]=function(_0x3de211,_0x4e84c0='/',_0x5cec49={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x12bbc5,_0x5977d6,_0x26e4c2)=>{ActionApi(_0x3de211,'get',_0x4e84c0,_0x5cec49)(_0x12bbc5,_0x5977d6,_0x26e4c2);};},Action['post']=function(_0x4aea91,_0x4a567a='/',_0xb4d9fe={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x4a7498,_0x36b085,_0xd6ad)=>{const _0x45c42b=a3_0x44f8;ActionApi(_0x4aea91,_0x45c42b(0x1f2),_0x4a567a,_0xb4d9fe)(_0x4a7498,_0x36b085,_0xd6ad);};};function a3_0xa994(){const _0x464142=['apimit','middleware','ACTION_KEY','1654812mWMcRO','trim','rootpath','indexOf','(((.+)+)+)+$','7lsUwra','cwd','prefix','post','get','../types/action','replace','RequestMapping','routerName','splice','APPSCONFIG_KEY','\x20文件请放在app/controller/文件下','filepath','existsSync','78rrVOQQ','6863672PFFaWZ','intercept','match','@anncic-api/validator','isArray','72jntpRt','filter','join','/controller/','ACTION_ROUTE_KEY','middlewareIgnore','apps/','1903302cvCQzR','Validator','Action','split','\x20文件请放在apps/','createCustomMethodDecorator','/apps/','tagName','search','getClassMetadata','toLowerCase','AppsConfigTmp','endsWith','ActionApi','451555uZttqZ','toString','1396340gCRhFG','string','parseRoute','saveModule','defineProperty','-controller','saveClassMetadata','attachClassMetadata','843440pEPluH','module','/config.','validationOptions','apply','route','constructor','app/controller/','511215OcIpHA','push','description','/controller/文件下','Controller','validate','assign','length','basic/controller/','substring','startsWith','__esModule'];a3_0xa994=function(){return _0x464142;};return a3_0xa994();}function ActionApi(_0x21fffd,_0xc3508c='get',_0x4204ed='/',_0x3b223e={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x54b939,_0x414129,_0x64923d)=>{const _0x2379a7=a3_0x44f8;var _0x458a9a,_0x3bde9e,_0x38bf05;!_0x3b223e[_0x2379a7(0x1e8)]&&(_0x3b223e['middleware']=[]);!((_0x458a9a=_0x3b223e===null||_0x3b223e===void 0x0?void 0x0:_0x3b223e['validate'])===null||_0x458a9a===void 0x0?void 0x0:_0x458a9a[_0x2379a7(0x225)])&&(_0x3b223e[_0x2379a7(0x1e0)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x2379a7(0x21b)}});if(!_0x4204ed)_0x4204ed='/';else typeof _0x4204ed=='string'&&(!_0x4204ed[_0x2379a7(0x1e5)]('/')&&!_0x4204ed['startsWith']('-')&&(_0x4204ed='/'+_0x4204ed));typeof _0x3b223e['apimit']=='undefined'&&(_0x3b223e[_0x2379a7(0x1e7)]=!![]);if(((_0x3bde9e=_0x3b223e===null||_0x3b223e===void 0x0?void 0x0:_0x3b223e['middleware'])===null||_0x3bde9e===void 0x0?void 0x0:_0x3bde9e[_0x2379a7(0x1e2)])>0x0&&((_0x38bf05=_0x3b223e===null||_0x3b223e===void 0x0?void 0x0:_0x3b223e['middlewareIgnore'])===null||_0x38bf05===void 0x0?void 0x0:_0x38bf05[_0x2379a7(0x1e2)])>0x0)for(let _0x185782 in _0x3b223e[_0x2379a7(0x1e8)]){_0x3b223e[_0x2379a7(0x208)][_0x2379a7(0x1ed)](_0x3b223e['middleware'][_0x185782])!==-0x1&&(_0x3b223e[_0x2379a7(0x1e8)][_0x185782]=null);}_0x3b223e[_0x2379a7(0x1f7)]=_0x21fffd,(0x0,validator_1[_0x2379a7(0x20b)])(_0x3b223e[_0x2379a7(0x1e0)])(_0x54b939,_0x414129,_0x64923d),(0x0,core_2[_0x2379a7(0x1f6)])(Object[_0x2379a7(0x1e1)](_0x3b223e,{'path':_0x4204ed,'requestMethod':(_0xc3508c||_0x2379a7(0x1f3))[_0x2379a7(0x214)]()}))(_0x54b939,_0x414129,_0x64923d),(0x0,core_2[_0x2379a7(0x221)])(action_1[_0x2379a7(0x207)],{'path':_0x4204ed,'method':_0x414129,'apimit':_0x3b223e[_0x2379a7(0x1e7)],'intercept':_0x3b223e[_0x2379a7(0x1ff)],'routerName':_0x3b223e[_0x2379a7(0x1f7)],'description':_0x3b223e[_0x2379a7(0x1dd)],'middleware':(_0x3b223e['middleware']||[])[_0x2379a7(0x204)](_0x10980c=>!!_0x10980c),'requestMethod':(_0xc3508c||_0x2379a7(0x1f3))[_0x2379a7(0x214)]()},_0x54b939),(0x0,core_2[_0x2379a7(0x20f)])(action_1[_0x2379a7(0x207)],{'path':_0x4204ed,'method':_0x414129,'apimit':_0x3b223e[_0x2379a7(0x1e7)],'intercept':_0x3b223e['intercept'],'routerName':_0x3b223e[_0x2379a7(0x1f7)],'description':_0x3b223e[_0x2379a7(0x1dd)],'middleware':(_0x3b223e['middleware']||[])[_0x2379a7(0x204)](_0x230c09=>!!_0x230c09),'requestMethod':(_0xc3508c||'get')[_0x2379a7(0x214)]()})(_0x54b939,_0x414129,_0x64923d);};}exports[a3_0x2853fc(0x217)]=ActionApi;function parseRoute(_0x5bbc81){const _0x4b6817=a3_0x2853fc;_0x5bbc81=_0x5bbc81['replace'](/(\\|\/)/g,'/');const _0x1a3886=process[_0x4b6817(0x1f0)]()[_0x4b6817(0x1f5)](/(\\|\/)/g,'/'),_0x259e66=_0x5bbc81[_0x4b6817(0x1e4)](0x0,_0x1a3886['length']+_0x5bbc81[_0x4b6817(0x1e4)](_0x1a3886[_0x4b6817(0x1e2)]+0x1)['indexOf']('/')+0x1),_0x4608eb=_0x5bbc81[_0x4b6817(0x1e4)](_0x259e66['length']+0x1)['replace'](/(\\|\/)/g,'/'),_0x2bddc5={'route':'','prefix':![],'module':![],'rootpath':_0x259e66,'filepath':_0x4608eb};if(_0x4608eb[_0x4b6817(0x1e5)](_0x4b6817(0x1da))||_0x4608eb[_0x4b6817(0x1e5)](_0x4b6817(0x1e3))){const _0x3ea3dd=_0x4608eb['substring']((_0x4608eb[_0x4b6817(0x1e5)](_0x4b6817(0x1da))?'app/controller/':'basic/controller/')[_0x4b6817(0x1e2)])[_0x4b6817(0x20d)]('/')[_0x4b6817(0x204)](_0xec0fbe=>_0xec0fbe&&_0xec0fbe[_0x4b6817(0x1eb)]());return _0x3ea3dd[_0x4b6817(0x1e2)]>0x1&&(_0x2bddc5[_0x4b6817(0x1f1)]=_0x3ea3dd[0x0][_0x4b6817(0x214)](),_0x3ea3dd['splice'](0x0,0x1)),_0x2bddc5[_0x4b6817(0x227)]=('/'+_0x3ea3dd['join']('/'))[_0x4b6817(0x1f5)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0x4b6817(0x200)](/[\/|A-Z]*[^A-Z]+/g)['join']('-')['toLowerCase']()[_0x4b6817(0x1f5)](/\/\-/g,'/'),_0x2bddc5[_0x4b6817(0x227)][_0x4b6817(0x216)]('-action')&&(_0x2bddc5[_0x4b6817(0x227)]=_0x2bddc5[_0x4b6817(0x227)]['substring'](0x0,_0x2bddc5[_0x4b6817(0x227)][_0x4b6817(0x1e2)]-0x7)),_0x2bddc5[_0x4b6817(0x227)][_0x4b6817(0x216)]('-controller')&&(_0x2bddc5[_0x4b6817(0x227)]=_0x2bddc5['route'][_0x4b6817(0x1e4)](0x0,_0x2bddc5['route'][_0x4b6817(0x1e2)]-0xb)),_0x2bddc5;}else{if(_0x4608eb[_0x4b6817(0x1e5)](_0x4b6817(0x209))){const _0x118cf7=_0x4608eb['substring'](0x0,_0x4608eb[_0x4b6817(0x1ed)](_0x4b6817(0x210))+0x5),_0x5ca55b=_0x4608eb[_0x4b6817(0x1e4)](_0x118cf7[_0x4b6817(0x1e2)]+0x1)[_0x4b6817(0x1f5)](/(\\|\/)/g,'/')[_0x4b6817(0x20d)]('/')[0x0];if(_0x4608eb['startsWith']('apps/'+_0x5ca55b+'/controller/')){const _0x3a448a=_0x4608eb[_0x4b6817(0x1e4)]((_0x118cf7+'/'+_0x5ca55b+_0x4b6817(0x206))[_0x4b6817(0x1e2)])[_0x4b6817(0x20d)]('/')[_0x4b6817(0x204)](_0xeaebd1=>_0xeaebd1&&_0xeaebd1[_0x4b6817(0x1eb)]());return _0x3a448a[_0x4b6817(0x1e2)]>0x1&&(_0x2bddc5[_0x4b6817(0x1f1)]=_0x3a448a[0x0][_0x4b6817(0x214)](),_0x3a448a[_0x4b6817(0x1f8)](0x0,0x1)),_0x2bddc5[_0x4b6817(0x223)]=_0x5ca55b,_0x2bddc5['route']=('/'+_0x5ca55b+'/'+_0x3a448a[_0x4b6817(0x205)]('/'))['replace'](/(\.ts|\.js)$/,'')[_0x4b6817(0x1f5)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x4b6817(0x205)]('-')[_0x4b6817(0x214)]()[_0x4b6817(0x1f5)](/\/\-/g,'/'),_0x2bddc5['route'][_0x4b6817(0x216)]('-action')&&(_0x2bddc5[_0x4b6817(0x227)]=_0x2bddc5[_0x4b6817(0x227)][_0x4b6817(0x1e4)](0x0,_0x2bddc5[_0x4b6817(0x227)][_0x4b6817(0x1e2)]-0x7)),_0x2bddc5[_0x4b6817(0x227)][_0x4b6817(0x216)](_0x4b6817(0x21f))&&(_0x2bddc5[_0x4b6817(0x227)]=_0x2bddc5['route'][_0x4b6817(0x1e4)](0x0,_0x2bddc5[_0x4b6817(0x227)]['length']-0xb)),_0x2bddc5;}throw new Error(_0x4608eb+_0x4b6817(0x20e)+_0x5ca55b+_0x4b6817(0x1de));}}throw new Error(_0x4608eb+_0x4b6817(0x1fa));}exports['parseRoute']=parseRoute;
|