anncic-api 3.0.5 → 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
|
-
var
|
|
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
|
-
var
|
|
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_0x4fd92f=a2_0x45ef;function a2_0x45ef(_0x22e08f,_0x2429a6){const _0x284144=a2_0x4f4e();return a2_0x45ef=function(_0x2be2d0,_0x59cbbf){_0x2be2d0=_0x2be2d0-0x1c2;let _0x4f4e68=_0x284144[_0x2be2d0];return _0x4f4e68;},a2_0x45ef(_0x22e08f,_0x2429a6);}function a2_0x4f4e(){const _0x165ccd=['koa-send','handler','anncic-api','length','./config/config.production','registerMethodHandler','文件不存在','758720dKQmus','toLowerCase','log','(((.+)+)+)+$','DEFAULT','filterConfig','requestContext','statSync','getClassMetadata','./exception/ApiError','@midwayjs/cross-domain','isClass','isString','1379975JPeUWk','onReady','koa','__decorate','App','INTERCEPT_KEY','get','checksign','search','input','application','955734vdiGUy','prototype','14snAgPE','Inject','defaultsDeep','keys','assign','-log','proceed','.log','query','design:type','@midwayjs/core','MidwayApplicationManager','getOwnPropertyDescriptor','decorator','getBaseDir','@anncic-api/event','__esModule','@anncic-api/typeorm','MidwayEnvironmentService','request','@midwayjs/i18n','@anncic-api/core','handlerActionRoute','./types/action','dirs','@midwayjs/static-file','checkConfigKeys','decorate','object','headers','CustomConfiguration','app','defineProperty','apimit','1585998oMgNWZ','function','intercept','Configuration','isDevelopmentEnvironment','devices','body','__metadata','upload','278184oCsCYG','isDirectory','hanlderApplications','environment','match','Anncic-api\x20static-file\x20:\x20mkdir\x20','string','anncic-apihelper','40HsOlKr','ACTION_ROUTE_KEY','target','bodyXml','addObject','/runtime','tmpdir','MidwayConfigService','isNull','@midwayjs/koa','getAsync','dir','clients','metadata','@midwayjs/upload','ApiService','1507792olStvA','getAppDir','existsSync','loggerConfig','getConfiguration','/apps','Types','midwayLogger','REQUEST_OBJ_CTX_KEY','constructor','_matchedRoute','31824120RHHTNf','./service/ApiService','MidwayDecoratorService','undefined','toString','staticFile','isFunction','method','./types/intercept','/runtime/apps-','config','ApiError','context','36aoGRxZ'];a2_0x4f4e=function(){return _0x165ccd;};return a2_0x4f4e();}(function(_0x2fd91d,_0x24df4d){const _0x2c3bf8=a2_0x45ef,_0x2087cb=_0x2fd91d();while(!![]){try{const _0x5f4d10=parseInt(_0x2c3bf8(0x1ea))/0x1+parseInt(_0x2c3bf8(0x22f))/0x2*(-parseInt(_0x2c3bf8(0x1e2))/0x3)+-parseInt(_0x2c3bf8(0x1ca))/0x4+parseInt(_0x2c3bf8(0x1f7))/0x5+parseInt(_0x2c3bf8(0x202))/0x6*(-parseInt(_0x2c3bf8(0x204))/0x7)+-parseInt(_0x2c3bf8(0x237))/0x8*(parseInt(_0x2c3bf8(0x226))/0x9)+parseInt(_0x2c3bf8(0x1d5))/0xa;if(_0x5f4d10===_0x24df4d)break;else _0x2087cb['push'](_0x2087cb['shift']());}catch(_0x329244){_0x2087cb['push'](_0x2087cb['shift']());}}}(a2_0x4f4e,0xed27b));const a2_0x59cbbf=(function(){let _0x4f1be4=!![];return function(_0x539b6b,_0x47f807){const _0x2ea9e1=_0x4f1be4?function(){if(_0x47f807){const _0x4a3130=_0x47f807['apply'](_0x539b6b,arguments);return _0x47f807=null,_0x4a3130;}}:function(){};return _0x4f1be4=![],_0x2ea9e1;};}()),a2_0x2be2d0=a2_0x59cbbf(this,function(){const _0x216005=a2_0x45ef;return a2_0x2be2d0[_0x216005(0x1d9)]()[_0x216005(0x1ff)](_0x216005(0x1ed))[_0x216005(0x1d9)]()[_0x216005(0x1d3)](a2_0x2be2d0)['search'](_0x216005(0x1ed));});a2_0x2be2d0();'use strict';var __decorate=this&&this[a2_0x4fd92f(0x1fa)]||function(_0x3e55b6,_0x330d30,_0x133750,_0x93e78a){const _0x4268fb=a2_0x4fd92f;var _0x4bbd07=arguments[_0x4268fb(0x1e6)],_0x444349=_0x4bbd07<0x3?_0x330d30:_0x93e78a===null?_0x93e78a=Object[_0x4268fb(0x210)](_0x330d30,_0x133750):_0x93e78a,_0x167393;if(typeof Reflect===_0x4268fb(0x220)&&typeof Reflect['decorate']===_0x4268fb(0x227))_0x444349=Reflect[_0x4268fb(0x21f)](_0x3e55b6,_0x330d30,_0x133750,_0x93e78a);else{for(var _0x4948c9=_0x3e55b6[_0x4268fb(0x1e6)]-0x1;_0x4948c9>=0x0;_0x4948c9--)if(_0x167393=_0x3e55b6[_0x4948c9])_0x444349=(_0x4bbd07<0x3?_0x167393(_0x444349):_0x4bbd07>0x3?_0x167393(_0x330d30,_0x133750,_0x444349):_0x167393(_0x330d30,_0x133750))||_0x444349;}return _0x4bbd07>0x3&&_0x444349&&Object['defineProperty'](_0x330d30,_0x133750,_0x444349),_0x444349;},__metadata=this&&this[a2_0x4fd92f(0x22d)]||function(_0x217ab4,_0xddbdb4){const _0x1804cf=a2_0x4fd92f;if(typeof Reflect===_0x1804cf(0x220)&&typeof Reflect['metadata']===_0x1804cf(0x227))return Reflect[_0x1804cf(0x1c7)](_0x217ab4,_0xddbdb4);};Object[a2_0x4fd92f(0x224)](exports,a2_0x4fd92f(0x214),{'value':!![]}),exports[a2_0x4fd92f(0x222)]=void 0x0;const core_1=require(a2_0x4fd92f(0x20e)),core_2=require('@midwayjs/core'),ApiError_1=require(a2_0x4fd92f(0x1f3)),ApiService_1=require(a2_0x4fd92f(0x1d6)),action_1=require(a2_0x4fd92f(0x21b)),intercept_1=require(a2_0x4fd92f(0x1dd)),fs=require('fs'),koasend=require(a2_0x4fd92f(0x1e3)),koa=require(a2_0x4fd92f(0x1c3)),i18n=require(a2_0x4fd92f(0x218)),upload=require(a2_0x4fd92f(0x1c8)),staticFile=require(a2_0x4fd92f(0x21d)),crossDomain=require(a2_0x4fd92f(0x1f4)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0x4fd92f(0x1e7)),anncic=require(a2_0x4fd92f(0x219)),anncicCache=require('@anncic-api/cache'),anncicEvent=require(a2_0x4fd92f(0x213)),anncicTypeorm=require(a2_0x4fd92f(0x215)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require(a2_0x4fd92f(0x236));let CustomConfiguration=class CustomConfiguration{async[a2_0x4fd92f(0x1f8)](){const _0x14b125=a2_0x4fd92f;await this[_0x14b125(0x1ef)](),await this[_0x14b125(0x1cd)](),await this[_0x14b125(0x21e)](),await this[_0x14b125(0x21a)](),await this[_0x14b125(0x231)]();}async[a2_0x4fd92f(0x21e)](){}async['handlerActionRoute'](){const _0x451d03=a2_0x4fd92f,_0x556b69=(0x0,core_1[_0x451d03(0x1f2)])(intercept_1[_0x451d03(0x1fc)],intercept_1['InterceptTargetTmp'])||{};this[_0x451d03(0x211)][_0x451d03(0x1e8)](action_1[_0x451d03(0x238)],_0x31e3c3=>{const _0x5c46fc=_0x451d03,_0x2b74d9=_0x31e3c3[_0x5c46fc(0x1c7)];return{'before':async _0x5d21d0=>{const _0x3c5b07=_0x5c46fc;var _0x57ea82,_0xae98b9;const _0x26ac9d=(_0x57ea82=_0x5d21d0===null||_0x5d21d0===void 0x0?void 0x0:_0x5d21d0[_0x3c5b07(0x239)])===null||_0x57ea82===void 0x0?void 0x0:_0x57ea82[core_2[_0x3c5b07(0x1d2)]];if(_0x26ac9d&&(_0x2b74d9===null||_0x2b74d9===void 0x0?void 0x0:_0x2b74d9[_0x3c5b07(0x225)])){if(!this[_0x3c5b07(0x1c9)][_0x3c5b07(0x1fe)]((_0xae98b9=_0x26ac9d===null||_0x26ac9d===void 0x0?void 0x0:_0x26ac9d[_0x3c5b07(0x217)])===null||_0xae98b9===void 0x0?void 0x0:_0xae98b9[_0x3c5b07(0x221)]))throw new AnnError(ApiError_1[_0x3c5b07(0x1e0)]['HEADERS_SIGNATURE']);}},'around':async _0x43b93a=>{const _0x164459=_0x5c46fc;var _0x390f29,_0x109fe6,_0x1271af;const _0x4b50d8=(_0x390f29=_0x43b93a===null||_0x43b93a===void 0x0?void 0x0:_0x43b93a[_0x164459(0x239)])===null||_0x390f29===void 0x0?void 0x0:_0x390f29[core_2[_0x164459(0x1d2)]];if(_0x4b50d8&&(_0x2b74d9===null||_0x2b74d9===void 0x0?void 0x0:_0x2b74d9[_0x164459(0x225)])&&((_0x2b74d9===null||_0x2b74d9===void 0x0?void 0x0:_0x2b74d9['intercept'])||typeof(_0x2b74d9===null||_0x2b74d9===void 0x0?void 0x0:_0x2b74d9[_0x164459(0x228)])==_0x164459(0x1d8))){if(((_0x109fe6=_0x4b50d8[_0x164459(0x221)])===null||_0x109fe6===void 0x0?void 0x0:_0x109fe6['device'])&&((_0x1271af=_0x556b69===null||_0x556b69===void 0x0?void 0x0:_0x556b69[_0x4b50d8[_0x164459(0x221)]['device']])===null||_0x1271af===void 0x0?void 0x0:_0x1271af[_0x164459(0x1e6)])>0x0)for(const _0x24fac9 of _0x556b69[_0x4b50d8[_0x164459(0x221)]['device']]||[]){if(core_1[_0x164459(0x1d0)][_0x164459(0x1f5)](_0x24fac9)){const _0x1c93f8=await _0x4b50d8[_0x164459(0x1f0)][_0x164459(0x1c4)](_0x24fac9);typeof(_0x1c93f8===null||_0x1c93f8===void 0x0?void 0x0:_0x1c93f8['match'])=='function'?await _0x1c93f8[_0x164459(0x233)](_0x4b50d8,typeof(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1dc)])=='string'&&(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)])?_0x4b50d8[_0x164459(0x1dc)]['toLowerCase']()+'@'+(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)]):undefined,_0x2b74d9)&&await _0x1c93f8['handler'](_0x4b50d8,typeof(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1dc)])==_0x164459(0x235)&&(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)])?_0x4b50d8['method']['toLowerCase']()+'@'+(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)]):undefined,_0x2b74d9):await _0x1c93f8[_0x164459(0x1e4)](_0x4b50d8,typeof(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1dc)])==_0x164459(0x235)&&(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)])?_0x4b50d8[_0x164459(0x1dc)][_0x164459(0x1eb)]()+'@'+(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)]):undefined,_0x2b74d9);}else core_1['Types'][_0x164459(0x1db)](_0x24fac9)&&await _0x24fac9(_0x4b50d8,typeof(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1dc)])==_0x164459(0x235)&&(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)])?_0x4b50d8[_0x164459(0x1dc)][_0x164459(0x1eb)]()+'@'+(_0x4b50d8===null||_0x4b50d8===void 0x0?void 0x0:_0x4b50d8[_0x164459(0x1d4)]):undefined,_0x2b74d9);}}return await _0x43b93a[_0x164459(0x20a)](..._0x43b93a['args']);},'afterThrow':(_0x23d3ad,_0x2f7cad)=>{throw _0x2f7cad;}};});}async[a2_0x4fd92f(0x231)](){const _0x2fbdfe=a2_0x4fd92f;this[_0x2fbdfe(0x201)]['getApplications']([_0x2fbdfe(0x1f9)])['forEach'](_0x1e8e87=>{const _0x2a31a1=_0x2fbdfe;(_0x1e8e87===null||_0x1e8e87===void 0x0?void 0x0:_0x1e8e87[_0x2a31a1(0x1e1)])&&Object['defineProperties'](_0x1e8e87[_0x2a31a1(0x1e1)],{'ok':{'value':function(_0x519732,_0x3863a0,_0x440b37=0x0){return{'code':_0x440b37,'data':_0x519732,'extra':_0x3863a0};}},'input':{'value':function(_0x33368e,_0x513c5a){const _0x43e3d7=_0x2a31a1;var _0x13bd36;const _0x4b1684=lodash[_0x43e3d7(0x206)]({},this[_0x43e3d7(0x217)][_0x43e3d7(0x22c)]||this[_0x43e3d7(0x217)][((_0x13bd36=config===null||config===void 0x0?void 0x0:config[_0x43e3d7(0x23a)])===null||_0x13bd36===void 0x0?void 0x0:_0x13bd36['key'])||'body']||{},this[_0x43e3d7(0x217)][_0x43e3d7(0x20c)]||{});return _0x33368e?lodash[_0x43e3d7(0x1fd)](_0x4b1684,_0x33368e,_0x513c5a):_0x4b1684;}},'when':{'value':async function(_0x18d290,_0x1725fe){const _0x33fc1a=_0x2a31a1,_0x226c10=this[_0x33fc1a(0x200)](_0x18d290,null);if(!lodash[_0x33fc1a(0x1c2)](_0x226c10))return await _0x1725fe(_0x226c10);}},'only':{'value':function(_0x187340){const _0x380b6e=_0x2a31a1,_0x329095={};for(let _0xbebc10=0x0;_0xbebc10<_0x187340[_0x380b6e(0x1e6)];_0xbebc10++){lodash['isArray'](_0x187340[_0xbebc10])&&_0x187340[_0xbebc10]['length']>0x0&&lodash[_0x380b6e(0x1f6)](_0x187340[_0xbebc10][0x0])&&(_0x329095[_0x187340[_0xbebc10][0x0]]=this[_0x380b6e(0x200)](_0x187340[_0xbebc10][0x0],_0x187340[_0xbebc10][_0x380b6e(0x1e6)]>0x1?_0x187340[_0xbebc10][0x1]:null));}return _0x329095;}},'koasend':{'value':function(_0x2a62fc,_0x507b1b){const _0x3f219b=_0x2a31a1;if(!fs[_0x3f219b(0x1cc)](this[_0x3f219b(0x223)][_0x3f219b(0x1cb)]()+'/'+_0x2a62fc))return _0x3f219b(0x1e9);return this['attachment'](_0x507b1b||_0x2a62fc),koasend(this,_0x2a62fc);}}});});}async[a2_0x4fd92f(0x1cd)](){const _0x57dce6=a2_0x4fd92f;var _0x3b3dd5,_0x465d87;if(fs[_0x57dce6(0x1cc)](this[_0x57dce6(0x223)][_0x57dce6(0x212)]()+_0x57dce6(0x1cf))&&fs[_0x57dce6(0x1f1)](this['app'][_0x57dce6(0x212)]()+_0x57dce6(0x1cf))[_0x57dce6(0x230)]()){const _0x5d5361=this['config'][_0x57dce6(0x1ce)](),_0x4e92aa=((_0x3b3dd5=_0x5d5361===null||_0x5d5361===void 0x0?void 0x0:_0x5d5361['midwayLogger'])===null||_0x3b3dd5===void 0x0?void 0x0:_0x3b3dd5[_0x57dce6(0x1c6)])||{};for(const _0x122444 of fs['readdirSync'](this[_0x57dce6(0x223)][_0x57dce6(0x212)]()+_0x57dce6(0x1cf))){if(!fs['statSync'](this[_0x57dce6(0x223)][_0x57dce6(0x212)]()+'/apps/'+_0x122444)[_0x57dce6(0x230)]())continue;if(_0x4e92aa===null||_0x4e92aa===void 0x0?void 0x0:_0x4e92aa[_0x122444])continue;_0x4e92aa[_0x122444]=Object[_0x57dce6(0x208)]({},((_0x465d87=_0x5d5361===null||_0x5d5361===void 0x0?void 0x0:_0x5d5361[_0x57dce6(0x1d1)])===null||_0x465d87===void 0x0?void 0x0:_0x465d87['default'])||{'maxSize':'1m','dir':this[_0x57dce6(0x223)][_0x57dce6(0x1cb)]()+_0x57dce6(0x23c)},{'enableJSON':!![],'enableConsole':this[_0x57dce6(0x232)][_0x57dce6(0x22a)](),'fileLogName':_0x122444+_0x57dce6(0x20b),'dir':this[_0x57dce6(0x223)][_0x57dce6(0x1cb)]()+_0x57dce6(0x1de)+_0x122444+_0x57dce6(0x209)});}Object[_0x57dce6(0x207)](_0x4e92aa)[_0x57dce6(0x1e6)]>0x0&&(!_0x5d5361[_0x57dce6(0x1d1)]&&(_0x5d5361[_0x57dce6(0x1d1)]={'default':{'maxSize':'1m','dir':this[_0x57dce6(0x223)][_0x57dce6(0x1cb)]()+'/runtime'}}),_0x5d5361['midwayLogger'][_0x57dce6(0x1c6)]=_0x4e92aa),this[_0x57dce6(0x1df)][_0x57dce6(0x23b)](_0x5d5361);}}async['filterConfig'](){const _0x1e60e8=a2_0x4fd92f;var _0x82afca,_0x27c519,_0x58d4e0,_0x754bf7,_0x29700e,_0xcb83dd;const _0x177b79=this[_0x1e60e8(0x1df)]['getConfiguration']();((_0x27c519=(_0x82afca=_0x177b79===null||_0x177b79===void 0x0?void 0x0:_0x177b79['anncicapi'])===null||_0x82afca===void 0x0?void 0x0:_0x82afca[_0x1e60e8(0x22b)])===null||_0x27c519===void 0x0?void 0x0:_0x27c519[_0x1e60e8(0x1ee)])&&Object[_0x1e60e8(0x207)](_0x177b79['anncicapi'][_0x1e60e8(0x22b)])['length']>0x1&&delete _0x177b79['anncicapi']['devices']['DEFAULT'];if((_0x58d4e0=_0x177b79===null||_0x177b79===void 0x0?void 0x0:_0x177b79[_0x1e60e8(0x1da)])===null||_0x58d4e0===void 0x0?void 0x0:_0x58d4e0['dirs'])for(const _0x2e5a73 in _0x177b79['staticFile'][_0x1e60e8(0x21c)]){((_0x754bf7=_0x177b79['staticFile'][_0x1e60e8(0x21c)][_0x2e5a73])===null||_0x754bf7===void 0x0?void 0x0:_0x754bf7[_0x1e60e8(0x1c5)])&&typeof((_0x29700e=_0x177b79['staticFile'][_0x1e60e8(0x21c)][_0x2e5a73])===null||_0x29700e===void 0x0?void 0x0:_0x29700e['dir'])==_0x1e60e8(0x235)&&!fs[_0x1e60e8(0x1cc)](_0x177b79[_0x1e60e8(0x1da)][_0x1e60e8(0x21c)][_0x2e5a73][_0x1e60e8(0x1c5)])&&(fs['mkdirSync'](_0x177b79['staticFile'][_0x1e60e8(0x21c)][_0x2e5a73][_0x1e60e8(0x1c5)],{'recursive':!![]}),console[_0x1e60e8(0x1ec)](_0x1e60e8(0x234)+_0x177b79[_0x1e60e8(0x1da)][_0x1e60e8(0x21c)][_0x2e5a73][_0x1e60e8(0x1c5)]));}((_0xcb83dd=_0x177b79===null||_0x177b79===void 0x0?void 0x0:_0x177b79['upload'])===null||_0xcb83dd===void 0x0?void 0x0:_0xcb83dd[_0x1e60e8(0x23d)])&&!fs[_0x1e60e8(0x1cc)](_0x177b79['upload']['tmpdir'])&&(fs['mkdirSync'](_0x177b79[_0x1e60e8(0x22e)][_0x1e60e8(0x23d)],{'recursive':!![]}),console[_0x1e60e8(0x1ec)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0x177b79[_0x1e60e8(0x22e)][_0x1e60e8(0x23d)])),this[_0x1e60e8(0x1df)][_0x1e60e8(0x23b)](_0x177b79);}};__decorate([(0x0,core_1[a2_0x4fd92f(0x1fb)])(),__metadata(a2_0x4fd92f(0x20d),Object)],CustomConfiguration['prototype'],'app',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata('design:type',core_2[a2_0x4fd92f(0x23e)])],CustomConfiguration['prototype'],a2_0x4fd92f(0x1df),void 0x0),__decorate([(0x0,core_1[a2_0x4fd92f(0x205)])(),__metadata('design:type',core_2[a2_0x4fd92f(0x1d7)])],CustomConfiguration['prototype'],a2_0x4fd92f(0x211),void 0x0),__decorate([(0x0,core_1[a2_0x4fd92f(0x205)])(),__metadata('design:type',core_2[a2_0x4fd92f(0x20f)])],CustomConfiguration['prototype'],a2_0x4fd92f(0x201),void 0x0),__decorate([(0x0,core_1[a2_0x4fd92f(0x205)])(),__metadata(a2_0x4fd92f(0x20d),core_2[a2_0x4fd92f(0x216)])],CustomConfiguration[a2_0x4fd92f(0x203)],a2_0x4fd92f(0x232),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x4fd92f(0x20d),ApiService_1['ApiService'])],CustomConfiguration['prototype'],a2_0x4fd92f(0x1c9),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x4fd92f(0x229)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x4fd92f(0x1e5),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x4fd92f(0x222)]=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_0x5e0630=a3_0x33c0;(function(_0xd5b311,_0x37f1b7){const _0x59ea66=a3_0x33c0,_0x2939af=_0xd5b311();while(!![]){try{const _0x99fb56=parseInt(_0x59ea66(0x13d))/0x1+-parseInt(_0x59ea66(0x136))/0x2*(-parseInt(_0x59ea66(0x148))/0x3)+parseInt(_0x59ea66(0x11f))/0x4+parseInt(_0x59ea66(0x160))/0x5*(-parseInt(_0x59ea66(0x12d))/0x6)+-parseInt(_0x59ea66(0x130))/0x7+-parseInt(_0x59ea66(0x153))/0x8+-parseInt(_0x59ea66(0x128))/0x9;if(_0x99fb56===_0x37f1b7)break;else _0x2939af['push'](_0x2939af['shift']());}catch(_0x12858f){_0x2939af['push'](_0x2939af['shift']());}}}(a3_0x38e8,0x481af));function a3_0x33c0(_0x3e4a6b,_0x52bb5f){const _0x1f000a=a3_0x38e8();return a3_0x33c0=function(_0x3f8eaa,_0x583a03){_0x3f8eaa=_0x3f8eaa-0x11c;let _0x38e8bb=_0x1f000a[_0x3f8eaa];return _0x38e8bb;},a3_0x33c0(_0x3e4a6b,_0x52bb5f);}const a3_0x583a03=(function(){let _0x2660d8=!![];return function(_0x34fbf4,_0x425561){const _0x579e79=_0x2660d8?function(){const _0x1f7ab6=a3_0x33c0;if(_0x425561){const _0x7d7825=_0x425561[_0x1f7ab6(0x155)](_0x34fbf4,arguments);return _0x425561=null,_0x7d7825;}}:function(){};return _0x2660d8=![],_0x579e79;};}()),a3_0x3f8eaa=a3_0x583a03(this,function(){const _0x45b6e8=a3_0x33c0;return a3_0x3f8eaa[_0x45b6e8(0x142)]()['search'](_0x45b6e8(0x152))[_0x45b6e8(0x142)]()['constructor'](a3_0x3f8eaa)[_0x45b6e8(0x126)]('(((.+)+)+)+$');});a3_0x3f8eaa();'use strict';Object[a3_0x5e0630(0x149)](exports,a3_0x5e0630(0x156),{'value':!![]}),exports[a3_0x5e0630(0x13b)]=exports[a3_0x5e0630(0x163)]=exports[a3_0x5e0630(0x12b)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x5e0630(0x129)),core_1=require(a3_0x5e0630(0x159)),core_2=require(a3_0x5e0630(0x159)),action_1=require(a3_0x5e0630(0x12e));function Action(_0x10e038,_0x3005ca,_0x5bc5ae={'middleware':[],'sensitive':!![]}){return _0x5a1ab9=>{const _0x467503=a3_0x33c0;var _0x2903c4;_0x5bc5ae[_0x467503(0x133)]=_0x3005ca;const _0x4a5941=parseRoute(_0x10e038);if(_0x4a5941[_0x467503(0x151)]){_0x5bc5ae[_0x467503(0x124)]=_0x5bc5ae[_0x467503(0x124)]?'/'+_0x4a5941[_0x467503(0x151)]+'/'+_0x5bc5ae[_0x467503(0x124)]:'/'+_0x4a5941[_0x467503(0x164)];_0x4a5941[_0x467503(0x124)]&&(_0x5bc5ae[_0x467503(0x124)]='/'+_0x4a5941['prefix']+'/'+_0x5bc5ae[_0x467503(0x124)]);if(fs[_0x467503(0x137)](_0x4a5941[_0x467503(0x144)]+'/apps/'+_0x4a5941['module']+'/config.'+(lodash[_0x467503(0x140)](_0x4a5941['filepath'],'ts')?'ts':'js'))){const _0x3d0db5=include(_0x4a5941['rootpath']+'/apps/'+_0x4a5941[_0x467503(0x151)]+_0x467503(0x165)+(lodash['endsWith'](_0x4a5941[_0x467503(0x13f)],'ts')?'ts':'js'));if(_0x3d0db5['middleware']&&lodash[_0x467503(0x12c)](_0x3d0db5[_0x467503(0x14a)])&&_0x3d0db5[_0x467503(0x14a)][_0x467503(0x13a)]>0x0)for(let _0x3aed27 in _0x3d0db5[_0x467503(0x14a)]){if(((_0x2903c4=_0x3d0db5===null||_0x3d0db5===void 0x0?void 0x0:_0x3d0db5['middlewareIgnore'])===null||_0x2903c4===void 0x0?void 0x0:_0x2903c4['length'])>0x0&&_0x3d0db5['middlewareIgnore'][_0x467503(0x13e)](_0x3d0db5[_0x467503(0x14a)][_0x3aed27])!=-0x1)continue;_0x5bc5ae[_0x467503(0x14a)][_0x467503(0x14f)](_0x3d0db5[_0x467503(0x14a)][_0x3aed27]);}const _0x4f6200=(0x0,core_1[_0x467503(0x139)])(action_1['APPSCONFIG_KEY'],action_1[_0x467503(0x134)])||{};_0x4f6200[''+_0x4a5941[_0x467503(0x151)]]=_0x3d0db5,(0x0,core_1[_0x467503(0x11d)])(action_1[_0x467503(0x11c)],_0x4f6200,action_1['AppsConfigTmp']);}_0x5bc5ae[_0x467503(0x124)]=_0x5bc5ae[_0x467503(0x124)][_0x467503(0x154)]()[_0x467503(0x122)](/\/{2,}/g,'/'),(0x0,core_1[_0x467503(0x166)])(action_1[_0x467503(0x120)],_0x5a1ab9),(0x0,core_1[_0x467503(0x15e)])(_0x5bc5ae[_0x467503(0x124)],_0x5bc5ae)(_0x5a1ab9),(0x0,core_1[_0x467503(0x11d)])(action_1[_0x467503(0x120)],{'prefix':_0x5bc5ae[_0x467503(0x124)],'pprefix':_0x4a5941['prefix'],'module':_0x4a5941[_0x467503(0x151)],'filepath':_0x4a5941[_0x467503(0x13f)],'routerOptions':_0x5bc5ae},_0x5a1ab9);}else _0x5bc5ae[_0x467503(0x124)]=_0x5bc5ae[_0x467503(0x124)]?'/'+_0x5bc5ae['prefix']:'/'+_0x4a5941[_0x467503(0x164)],_0x4a5941[_0x467503(0x124)]&&(_0x5bc5ae[_0x467503(0x124)]='/'+_0x4a5941[_0x467503(0x124)]+'/'+_0x5bc5ae['prefix']),_0x5bc5ae[_0x467503(0x124)]=_0x5bc5ae[_0x467503(0x124)]['toLowerCase']()['replace'](/\/{2,}/g,'/'),(0x0,core_1[_0x467503(0x166)])(action_1['ACTION_KEY'],_0x5a1ab9),(0x0,core_1[_0x467503(0x15e)])(_0x5bc5ae['prefix'],_0x5bc5ae)(_0x5a1ab9),(0x0,core_1['saveClassMetadata'])(action_1['ACTION_KEY'],{'prefix':_0x5bc5ae[_0x467503(0x124)],'module':_0x4a5941['module'],'pprefix':_0x4a5941[_0x467503(0x124)],'filepath':_0x4a5941[_0x467503(0x13f)],'routerOptions':_0x5bc5ae},_0x5a1ab9);};}exports['Action']=Action,Action[a3_0x5e0630(0x13c)]=function(_0x1262ae,_0x1d810b='/',_0x37f227={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x3bb576,_0x33495e,_0x4d1a08)=>{const _0x400f6a=a3_0x33c0;ActionApi(_0x1262ae,_0x400f6a(0x13c),_0x1d810b,_0x37f227)(_0x3bb576,_0x33495e,_0x4d1a08);};},Action[a3_0x5e0630(0x147)]=function(_0x599233,_0x28564f='/',_0x15667f={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x59cb06,_0x1c8083,_0x2f1090)=>{const _0x3c4b20=a3_0x33c0;ActionApi(_0x599233,_0x3c4b20(0x147),_0x28564f,_0x15667f)(_0x59cb06,_0x1c8083,_0x2f1090);};};function ActionApi(_0x4e1356,_0x451908=a3_0x5e0630(0x13c),_0x2f6e72='/',_0x349172={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x536f82,_0x5a9673,_0xfb9fb5)=>{const _0x4425cc=a3_0x33c0;var _0x3636e6,_0xb28b5,_0xa71ec6;!_0x349172[_0x4425cc(0x14a)]&&(_0x349172['middleware']=[]);!((_0x3636e6=_0x349172===null||_0x349172===void 0x0?void 0x0:_0x349172[_0x4425cc(0x167)])===null||_0x3636e6===void 0x0?void 0x0:_0x3636e6[_0x4425cc(0x14c)])&&(_0x349172[_0x4425cc(0x167)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x4425cc(0x15a)}});if(!_0x2f6e72)_0x2f6e72='/';else typeof _0x2f6e72==_0x4425cc(0x15a)&&(!_0x2f6e72['startsWith']('/')&&!_0x2f6e72[_0x4425cc(0x162)]('-')&&(_0x2f6e72='/'+_0x2f6e72));typeof _0x349172['apimit']==_0x4425cc(0x12a)&&(_0x349172[_0x4425cc(0x15b)]=!![]);if(((_0xb28b5=_0x349172===null||_0x349172===void 0x0?void 0x0:_0x349172[_0x4425cc(0x14a)])===null||_0xb28b5===void 0x0?void 0x0:_0xb28b5[_0x4425cc(0x13a)])>0x0&&((_0xa71ec6=_0x349172===null||_0x349172===void 0x0?void 0x0:_0x349172['middlewareIgnore'])===null||_0xa71ec6===void 0x0?void 0x0:_0xa71ec6[_0x4425cc(0x13a)])>0x0)for(let _0x2d9dfb in _0x349172[_0x4425cc(0x14a)]){_0x349172[_0x4425cc(0x125)][_0x4425cc(0x13e)](_0x349172[_0x4425cc(0x14a)][_0x2d9dfb])!==-0x1&&(_0x349172[_0x4425cc(0x14a)][_0x2d9dfb]=null);}_0x349172[_0x4425cc(0x11e)]=_0x4e1356,(0x0,validator_1['Validator'])(_0x349172['validate'])(_0x536f82,_0x5a9673,_0xfb9fb5),(0x0,core_2[_0x4425cc(0x157)])(Object[_0x4425cc(0x135)](_0x349172,{'path':_0x2f6e72,'requestMethod':(_0x451908||_0x4425cc(0x13c))['toLowerCase']()}))(_0x536f82,_0x5a9673,_0xfb9fb5),(0x0,core_2[_0x4425cc(0x15d)])(action_1[_0x4425cc(0x14e)],{'path':_0x2f6e72,'method':_0x5a9673,'apimit':_0x349172['apimit'],'intercept':_0x349172[_0x4425cc(0x143)],'routerName':_0x349172['routerName'],'description':_0x349172[_0x4425cc(0x168)],'middleware':(_0x349172[_0x4425cc(0x14a)]||[])[_0x4425cc(0x150)](_0x451533=>!!_0x451533),'requestMethod':(_0x451908||_0x4425cc(0x13c))[_0x4425cc(0x154)]()},_0x536f82),(0x0,core_2[_0x4425cc(0x121)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x2f6e72,'method':_0x5a9673,'apimit':_0x349172[_0x4425cc(0x15b)],'intercept':_0x349172[_0x4425cc(0x143)],'routerName':_0x349172[_0x4425cc(0x11e)],'description':_0x349172[_0x4425cc(0x168)],'middleware':(_0x349172[_0x4425cc(0x14a)]||[])[_0x4425cc(0x150)](_0x2c0d70=>!!_0x2c0d70),'requestMethod':(_0x451908||_0x4425cc(0x13c))[_0x4425cc(0x154)]()})(_0x536f82,_0x5a9673,_0xfb9fb5);};}function a3_0x38e8(){const _0x427fda=['APPSCONFIG_KEY','saveClassMetadata','routerName','1384812LoAfXp','ACTION_KEY','createCustomMethodDecorator','replace','/apps/','prefix','middlewareIgnore','search','cwd','5766516VvKtQo','@anncic-api/validator','undefined','Action','isArray','473934IEsiZH','../types/action','basic/controller/','1090369UCnAzG','match','substring','tagName','AppsConfigTmp','assign','17452YgCYhW','existsSync','splice','getClassMetadata','length','parseRoute','get','445963ufkZIr','indexOf','filepath','endsWith','/controller/文件下','toString','intercept','rootpath','split','\x20文件请放在apps/','post','141LfxAjP','defineProperty','middleware','/controller/','validationOptions','apps/','ACTION_ROUTE_KEY','push','filter','module','(((.+)+)+)+$','251720oWFVjA','toLowerCase','apply','__esModule','RequestMapping','-controller','@midwayjs/core','string','apimit','trim','attachClassMetadata','Controller','\x20文件请放在app/controller/文件下','5yKHkOa','join','startsWith','ActionApi','route','/config.','saveModule','validate','description'];a3_0x38e8=function(){return _0x427fda;};return a3_0x38e8();}exports[a3_0x5e0630(0x163)]=ActionApi;function parseRoute(_0x5830af){const _0x2b0e7b=a3_0x5e0630;_0x5830af=_0x5830af[_0x2b0e7b(0x122)](/(\\|\/)/g,'/');const _0x8a5915=process[_0x2b0e7b(0x127)]()['replace'](/(\\|\/)/g,'/'),_0x119bbf=_0x5830af[_0x2b0e7b(0x132)](0x0,_0x8a5915['length']+_0x5830af[_0x2b0e7b(0x132)](_0x8a5915[_0x2b0e7b(0x13a)]+0x1)[_0x2b0e7b(0x13e)]('/')+0x1),_0x542030=_0x5830af['substring'](_0x119bbf[_0x2b0e7b(0x13a)]+0x1)[_0x2b0e7b(0x122)](/(\\|\/)/g,'/'),_0x92515b={'route':'','prefix':![],'module':![],'rootpath':_0x119bbf,'filepath':_0x542030};if(_0x542030[_0x2b0e7b(0x162)]('app/controller/')||_0x542030[_0x2b0e7b(0x162)](_0x2b0e7b(0x12f))){const _0x5e4064=_0x542030[_0x2b0e7b(0x132)]((_0x542030[_0x2b0e7b(0x162)]('app/controller/')?'app/controller/':_0x2b0e7b(0x12f))[_0x2b0e7b(0x13a)])['split']('/')['filter'](_0x2d288d=>_0x2d288d&&_0x2d288d[_0x2b0e7b(0x15c)]());return _0x5e4064[_0x2b0e7b(0x13a)]>0x1&&(_0x92515b[_0x2b0e7b(0x124)]=_0x5e4064[0x0]['toLowerCase'](),_0x5e4064[_0x2b0e7b(0x138)](0x0,0x1)),_0x92515b[_0x2b0e7b(0x164)]=('/'+_0x5e4064[_0x2b0e7b(0x161)]('/'))[_0x2b0e7b(0x122)](/(\.ts|\.js)$/,'')[_0x2b0e7b(0x122)](/\/{2,}/g,'/')[_0x2b0e7b(0x131)](/[\/|A-Z]*[^A-Z]+/g)[_0x2b0e7b(0x161)]('-')[_0x2b0e7b(0x154)]()[_0x2b0e7b(0x122)](/\/\-/g,'/'),_0x92515b['route'][_0x2b0e7b(0x140)]('-action')&&(_0x92515b[_0x2b0e7b(0x164)]=_0x92515b[_0x2b0e7b(0x164)][_0x2b0e7b(0x132)](0x0,_0x92515b[_0x2b0e7b(0x164)][_0x2b0e7b(0x13a)]-0x7)),_0x92515b[_0x2b0e7b(0x164)][_0x2b0e7b(0x140)](_0x2b0e7b(0x158))&&(_0x92515b[_0x2b0e7b(0x164)]=_0x92515b[_0x2b0e7b(0x164)]['substring'](0x0,_0x92515b[_0x2b0e7b(0x164)]['length']-0xb)),_0x92515b;}else{if(_0x542030[_0x2b0e7b(0x162)](_0x2b0e7b(0x14d))){const _0x53f489=_0x542030[_0x2b0e7b(0x132)](0x0,_0x542030['indexOf'](_0x2b0e7b(0x123))+0x5),_0x358242=_0x542030[_0x2b0e7b(0x132)](_0x53f489[_0x2b0e7b(0x13a)]+0x1)[_0x2b0e7b(0x122)](/(\\|\/)/g,'/')[_0x2b0e7b(0x145)]('/')[0x0];if(_0x542030['startsWith'](_0x2b0e7b(0x14d)+_0x358242+_0x2b0e7b(0x14b))){const _0x49c63a=_0x542030[_0x2b0e7b(0x132)]((_0x53f489+'/'+_0x358242+_0x2b0e7b(0x14b))['length'])[_0x2b0e7b(0x145)]('/')['filter'](_0xacecc4=>_0xacecc4&&_0xacecc4['trim']());return _0x49c63a[_0x2b0e7b(0x13a)]>0x1&&(_0x92515b['prefix']=_0x49c63a[0x0][_0x2b0e7b(0x154)](),_0x49c63a[_0x2b0e7b(0x138)](0x0,0x1)),_0x92515b['module']=_0x358242,_0x92515b[_0x2b0e7b(0x164)]=('/'+_0x358242+'/'+_0x49c63a['join']('/'))[_0x2b0e7b(0x122)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0x2b0e7b(0x131)](/[\/|A-Z]*[^A-Z]+/g)[_0x2b0e7b(0x161)]('-')[_0x2b0e7b(0x154)]()['replace'](/\/\-/g,'/'),_0x92515b[_0x2b0e7b(0x164)][_0x2b0e7b(0x140)]('-action')&&(_0x92515b[_0x2b0e7b(0x164)]=_0x92515b[_0x2b0e7b(0x164)]['substring'](0x0,_0x92515b[_0x2b0e7b(0x164)][_0x2b0e7b(0x13a)]-0x7)),_0x92515b['route']['endsWith'](_0x2b0e7b(0x158))&&(_0x92515b[_0x2b0e7b(0x164)]=_0x92515b[_0x2b0e7b(0x164)][_0x2b0e7b(0x132)](0x0,_0x92515b['route'][_0x2b0e7b(0x13a)]-0xb)),_0x92515b;}throw new Error(_0x542030+_0x2b0e7b(0x146)+_0x358242+_0x2b0e7b(0x141));}}throw new Error(_0x542030+_0x2b0e7b(0x15f));}exports[a3_0x5e0630(0x13b)]=parseRoute;
|
|
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;
|