anncic-api 3.0.5 → 3.0.7
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_0x5b237e=a0_0x4da3;(function(_0x38ee65,_0x19b3ff){var _0x236223=a0_0x4da3,_0x6ba569=_0x38ee65();while(!![]){try{var _0x214267=-parseInt(_0x236223(0x76))/0x1+parseInt(_0x236223(0x86))/0x2+parseInt(_0x236223(0x82))/0x3*(parseInt(_0x236223(0x77))/0x4)+parseInt(_0x236223(0x83))/0x5+parseInt(_0x236223(0x7f))/0x6*(parseInt(_0x236223(0x70))/0x7)+parseInt(_0x236223(0x84))/0x8+parseInt(_0x236223(0x7b))/0x9*(-parseInt(_0x236223(0x7a))/0xa);if(_0x214267===_0x19b3ff)break;else _0x6ba569['push'](_0x6ba569['shift']());}catch(_0x445524){_0x6ba569['push'](_0x6ba569['shift']());}}}(a0_0x1d1e,0xb5de5));var a0_0x2904fa=(function(){var _0x46749c=!![];return function(_0x15c6f9,_0xa7599f){var _0x88d651=_0x46749c?function(){var _0x14918c=a0_0x4da3;if(_0xa7599f){var _0x3e92bf=_0xa7599f[_0x14918c(0x78)](_0x15c6f9,arguments);return _0xa7599f=null,_0x3e92bf;}}:function(){};return _0x46749c=![],_0x88d651;};}()),a0_0x443bec=a0_0x2904fa(this,function(){var _0x1abe92=a0_0x4da3;return a0_0x443bec[_0x1abe92(0x71)]()[_0x1abe92(0x81)](_0x1abe92(0x6f))[_0x1abe92(0x71)]()[_0x1abe92(0x7e)](a0_0x443bec)[_0x1abe92(0x81)](_0x1abe92(0x6f));});function a0_0x1d1e(){var _0x4e4224=['21148lAvCsK','apply','appDir','6772710pxsEGh','63YFcjLb','dhauo1234420123gg3234901','20mb','constructor','168mkZamu','__esModule','search','723LUsovk','6351410toRfyt','8460352Rzazhc','/runtime/.upload','2858846hQgrFP','(((.+)+)+)+$','154357mnLjvV','toString','text','json','defineProperty','form','163014qUFXrB'];a0_0x1d1e=function(){return _0x4e4224;};return a0_0x1d1e();}function a0_0x4da3(_0x4fb7a3,_0xc34686){var _0x1cfb7e=a0_0x1d1e();return a0_0x4da3=function(_0x443bec,_0x2904fa){_0x443bec=_0x443bec-0x6f;var _0x1d1ed1=_0x1cfb7e[_0x443bec];return _0x1d1ed1;},a0_0x4da3(_0x4fb7a3,_0xc34686);}a0_0x443bec();'use strict';Object[a0_0x5b237e(0x74)](exports,a0_0x5b237e(0x80),{'value':!![]}),exports['default']=_0x322968=>{var _0x5eceaf=a0_0x5b237e;return{'apitest':!![],'keys':_0x322968['name'],'anncicapi':{'password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':_0x5eceaf(0x7c),'checkcode':_0x5eceaf(0x7c)}}},'bodyParser':{'enableTypes':[_0x5eceaf(0x73),_0x5eceaf(0x75),_0x5eceaf(0x72),'xml'],'formLimit':_0x5eceaf(0x7d),'jsonLimit':_0x5eceaf(0x7d),'textLimit':'20mb','xmlLimit':'20mb'},'upload':{'tmpdir':_0x322968[_0x5eceaf(0x79)]+_0x5eceaf(0x85),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a1_0x3847(){var _0x5e7954=['1473627jvcQxd','constructor','13961576FoLLLG','410140othmBQ','72wPuOoR','1043787GtvFhh','default','42600qsvANM','search','apply','(((.+)+)+)+$','10RDJsXd','45BFyfAg','toString','5380860UCurza','22FTMvrd','7aNwFBP','355715PEfneT'];a1_0x3847=function(){return _0x5e7954;};return a1_0x3847();}function a1_0x1874(_0x31ad25,_0x3c3ebc){var _0x3698cf=a1_0x3847();return a1_0x1874=function(_0x4cfdda,_0x27e90e){_0x4cfdda=_0x4cfdda-0x15d;var _0x384771=_0x3698cf[_0x4cfdda];return _0x384771;},a1_0x1874(_0x31ad25,_0x3c3ebc);}var a1_0x21cdc8=a1_0x1874;(function(_0x3f2480,_0x371b18){var _0x48069b=a1_0x1874,_0x350dd3=_0x3f2480();while(!![]){try{var _0x7c24c2=parseInt(_0x48069b(0x15f))/0x1+parseInt(_0x48069b(0x16a))/0x2*(parseInt(_0x48069b(0x164))/0x3)+-parseInt(_0x48069b(0x163))/0x4*(parseInt(_0x48069b(0x15e))/0x5)+parseInt(_0x48069b(0x166))/0x6+-parseInt(_0x48069b(0x15d))/0x7*(parseInt(_0x48069b(0x161))/0x8)+parseInt(_0x48069b(0x16b))/0x9*(-parseInt(_0x48069b(0x162))/0xa)+-parseInt(_0x48069b(0x16e))/0xb*(-parseInt(_0x48069b(0x16d))/0xc);if(_0x7c24c2===_0x371b18)break;else _0x350dd3['push'](_0x350dd3['shift']());}catch(_0x5ad20b){_0x350dd3['push'](_0x350dd3['shift']());}}}(a1_0x3847,0xd8645));var a1_0x27e90e=(function(){var _0x10bad6=!![];return function(_0x3cdb3f,_0x14f3b2){var _0x3e34bb=_0x10bad6?function(){var _0x24cb88=a1_0x1874;if(_0x14f3b2){var _0x491cdb=_0x14f3b2[_0x24cb88(0x168)](_0x3cdb3f,arguments);return _0x14f3b2=null,_0x491cdb;}}:function(){};return _0x10bad6=![],_0x3e34bb;};}()),a1_0x4cfdda=a1_0x27e90e(this,function(){var _0x102d88=a1_0x1874;return a1_0x4cfdda[_0x102d88(0x16c)]()[_0x102d88(0x167)](_0x102d88(0x169))[_0x102d88(0x16c)]()[_0x102d88(0x160)](a1_0x4cfdda)[_0x102d88(0x167)](_0x102d88(0x169));});a1_0x4cfdda();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a1_0x21cdc8(0x165)]={'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_0x2cf73b=a2_0x590a;function a2_0x590a(_0xf2c9ed,_0x4aa79b){const _0x5b6198=a2_0x3501();return a2_0x590a=function(_0x3bb37f,_0x5b364e){_0x3bb37f=_0x3bb37f-0x158;let _0x350192=_0x5b6198[_0x3bb37f];return _0x350192;},a2_0x590a(_0xf2c9ed,_0x4aa79b);}(function(_0x461197,_0x55de01){const _0x54cf45=a2_0x590a,_0x2edfde=_0x461197();while(!![]){try{const _0x19ec71=-parseInt(_0x54cf45(0x162))/0x1*(-parseInt(_0x54cf45(0x19f))/0x2)+-parseInt(_0x54cf45(0x1c8))/0x3+parseInt(_0x54cf45(0x16c))/0x4*(-parseInt(_0x54cf45(0x1d5))/0x5)+-parseInt(_0x54cf45(0x1c3))/0x6*(-parseInt(_0x54cf45(0x1b7))/0x7)+parseInt(_0x54cf45(0x18e))/0x8*(-parseInt(_0x54cf45(0x16f))/0x9)+parseInt(_0x54cf45(0x1ba))/0xa*(-parseInt(_0x54cf45(0x18d))/0xb)+parseInt(_0x54cf45(0x16a))/0xc*(parseInt(_0x54cf45(0x1a8))/0xd);if(_0x19ec71===_0x55de01)break;else _0x2edfde['push'](_0x2edfde['shift']());}catch(_0xcba598){_0x2edfde['push'](_0x2edfde['shift']());}}}(a2_0x3501,0x40ed5));const a2_0x5b364e=(function(){let _0x20af02=!![];return function(_0x5ea6dc,_0x32950b){const _0x1b4a2e=_0x20af02?function(){const _0x3a3a86=a2_0x590a;if(_0x32950b){const _0x2e60e8=_0x32950b[_0x3a3a86(0x19c)](_0x5ea6dc,arguments);return _0x32950b=null,_0x2e60e8;}}:function(){};return _0x20af02=![],_0x1b4a2e;};}()),a2_0x3bb37f=a2_0x5b364e(this,function(){const _0x11a3e2=a2_0x590a;return a2_0x3bb37f['toString']()['search'](_0x11a3e2(0x17e))[_0x11a3e2(0x19e)]()['constructor'](a2_0x3bb37f)[_0x11a3e2(0x1d1)](_0x11a3e2(0x17e));});a2_0x3bb37f();'use strict';var __decorate=this&&this[a2_0x2cf73b(0x191)]||function(_0x3b5f12,_0x337068,_0x38ad53,_0x4012bc){const _0x7da772=a2_0x2cf73b;var _0x1dd1d2=arguments[_0x7da772(0x15b)],_0x2f6716=_0x1dd1d2<0x3?_0x337068:_0x4012bc===null?_0x4012bc=Object[_0x7da772(0x19a)](_0x337068,_0x38ad53):_0x4012bc,_0x662a8c;if(typeof Reflect===_0x7da772(0x1d2)&&typeof Reflect[_0x7da772(0x19b)]===_0x7da772(0x171))_0x2f6716=Reflect[_0x7da772(0x19b)](_0x3b5f12,_0x337068,_0x38ad53,_0x4012bc);else{for(var _0x41e68f=_0x3b5f12[_0x7da772(0x15b)]-0x1;_0x41e68f>=0x0;_0x41e68f--)if(_0x662a8c=_0x3b5f12[_0x41e68f])_0x2f6716=(_0x1dd1d2<0x3?_0x662a8c(_0x2f6716):_0x1dd1d2>0x3?_0x662a8c(_0x337068,_0x38ad53,_0x2f6716):_0x662a8c(_0x337068,_0x38ad53))||_0x2f6716;}return _0x1dd1d2>0x3&&_0x2f6716&&Object[_0x7da772(0x1b9)](_0x337068,_0x38ad53,_0x2f6716),_0x2f6716;},__metadata=this&&this[a2_0x2cf73b(0x16b)]||function(_0x196a85,_0x5546bb){const _0x3fd5df=a2_0x2cf73b;if(typeof Reflect===_0x3fd5df(0x1d2)&&typeof Reflect[_0x3fd5df(0x159)]===_0x3fd5df(0x171))return Reflect['metadata'](_0x196a85,_0x5546bb);};Object['defineProperty'](exports,a2_0x2cf73b(0x1cd),{'value':!![]}),exports[a2_0x2cf73b(0x181)]=void 0x0;const core_1=require(a2_0x2cf73b(0x15f)),core_2=require(a2_0x2cf73b(0x15f)),ApiError_1=require(a2_0x2cf73b(0x166)),ApiService_1=require(a2_0x2cf73b(0x172)),action_1=require(a2_0x2cf73b(0x1c6)),intercept_1=require('./types/intercept'),fs=require('fs'),koasend=require(a2_0x2cf73b(0x1ab)),koa=require(a2_0x2cf73b(0x1a5)),i18n=require(a2_0x2cf73b(0x180)),upload=require('@midwayjs/upload'),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0x2cf73b(0x17d)),ConfigDefault=require(a2_0x2cf73b(0x1c9)),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x2cf73b(0x167)),anncicCache=require(a2_0x2cf73b(0x1c2)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x2cf73b(0x1da)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require('anncic-apihelper');function a2_0x3501(){const _0x1f5a8e=['444285WNkPdZ','./config/config.default','INTERCEPT_KEY','ApiError','isString','__esModule','isNull','handlerActionRoute','getBaseDir','search','object','headers','isClass','892090NDniHj','keys','string','ACTION_ROUTE_KEY','Inject','@anncic-api/typeorm','undefined','metadata','Types','length','query','devices','staticFile','@midwayjs/core','dir','input','15726ioXEKE','isDirectory','loggerConfig','-log','./exception/ApiError','@anncic-api/core','config','requestContext','132hcDQlS','__metadata','4ErPZLw','design:type','MidwayApplicationManager','27OwabXl','/apps/','function','./service/ApiService','/apps','isFunction','bodyXml','.log','handler','hanlderApplications','proceed','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','MidwayDecoratorService','App','@midwayjs/cross-domain','(((.+)+)+)+$','decorator','@midwayjs/i18n','CustomConfiguration','log','midwayLogger','context','defineProperties','HEADERS_SIGNATURE','checkConfigKeys','InterceptTargetTmp','upload','koa','mkdirSync','environment','750453KvIRfA','1116456xXaCbM','anncic-api','request','__decorate','statSync','apimit','_matchedRoute','toLowerCase','target','REQUEST_OBJ_CTX_KEY','getAppDir','match','getOwnPropertyDescriptor','decorate','apply','tmpdir','toString','58tYZMRi','onReady','MidwayConfigService','/runtime','dirs','device','@midwayjs/koa','assign','method','618059YJsEMo','getClassMetadata','getApplications','koa-send','anncicapi','existsSync','MidwayEnvironmentService','getAsync','ApiService','Anncic-api\x20static-file\x20:\x20mkdir\x20','intercept','registerMethodHandler','filterConfig','forEach','Configuration','3567613uApVhK','body','defineProperty','70vYEbaC','文件不存在','clients','defaultsDeep','prototype','DEFAULT','args','addObject','@anncic-api/cache','6BwlYjs','key','application','./types/action','app'];a2_0x3501=function(){return _0x1f5a8e;};return a2_0x3501();}let CustomConfiguration=class CustomConfiguration{async[a2_0x2cf73b(0x1a0)](){const _0x146fb0=a2_0x2cf73b;await this[_0x146fb0(0x1b4)](),await this['loggerConfig'](),await this[_0x146fb0(0x187)](),await this[_0x146fb0(0x1cf)](),await this[_0x146fb0(0x178)]();}async[a2_0x2cf73b(0x187)](){}async[a2_0x2cf73b(0x1cf)](){const _0x5c41b4=a2_0x2cf73b,_0x3300af=(0x0,core_1[_0x5c41b4(0x1a9)])(intercept_1[_0x5c41b4(0x1ca)],intercept_1[_0x5c41b4(0x188)])||{};this[_0x5c41b4(0x17f)][_0x5c41b4(0x1b3)](action_1[_0x5c41b4(0x1d8)],_0x360882=>{const _0x1d621b=_0x5c41b4,_0x46ba13=_0x360882[_0x1d621b(0x159)];return{'before':async _0x312113=>{const _0x297eaf=_0x1d621b;var _0x323c87,_0xee068e;const _0x4d4729=(_0x323c87=_0x312113===null||_0x312113===void 0x0?void 0x0:_0x312113[_0x297eaf(0x196)])===null||_0x323c87===void 0x0?void 0x0:_0x323c87[core_2[_0x297eaf(0x197)]];if(_0x4d4729&&(_0x46ba13===null||_0x46ba13===void 0x0?void 0x0:_0x46ba13[_0x297eaf(0x193)])){if(!this[_0x297eaf(0x1b0)]['checksign']((_0xee068e=_0x4d4729===null||_0x4d4729===void 0x0?void 0x0:_0x4d4729[_0x297eaf(0x190)])===null||_0xee068e===void 0x0?void 0x0:_0xee068e[_0x297eaf(0x1d3)]))throw new AnnError(ApiError_1[_0x297eaf(0x1cb)][_0x297eaf(0x186)]);}},'around':async _0x5430de=>{const _0x4c2708=_0x1d621b;var _0x4b2786,_0x335218,_0x306a20;const _0x160f1b=(_0x4b2786=_0x5430de===null||_0x5430de===void 0x0?void 0x0:_0x5430de[_0x4c2708(0x196)])===null||_0x4b2786===void 0x0?void 0x0:_0x4b2786[core_2[_0x4c2708(0x197)]];if(_0x160f1b&&(_0x46ba13===null||_0x46ba13===void 0x0?void 0x0:_0x46ba13[_0x4c2708(0x193)])&&((_0x46ba13===null||_0x46ba13===void 0x0?void 0x0:_0x46ba13[_0x4c2708(0x1b2)])||typeof(_0x46ba13===null||_0x46ba13===void 0x0?void 0x0:_0x46ba13[_0x4c2708(0x1b2)])==_0x4c2708(0x158))){if(((_0x335218=_0x160f1b['headers'])===null||_0x335218===void 0x0?void 0x0:_0x335218['device'])&&((_0x306a20=_0x3300af===null||_0x3300af===void 0x0?void 0x0:_0x3300af[_0x160f1b[_0x4c2708(0x1d3)][_0x4c2708(0x1a4)]])===null||_0x306a20===void 0x0?void 0x0:_0x306a20[_0x4c2708(0x15b)])>0x0)for(const _0x3c5731 of _0x3300af[_0x160f1b[_0x4c2708(0x1d3)][_0x4c2708(0x1a4)]]||[]){if(core_1['Types'][_0x4c2708(0x1d4)](_0x3c5731)){const _0x1b3adf=await _0x160f1b[_0x4c2708(0x169)][_0x4c2708(0x1af)](_0x3c5731);typeof(_0x1b3adf===null||_0x1b3adf===void 0x0?void 0x0:_0x1b3adf[_0x4c2708(0x199)])==_0x4c2708(0x171)?await _0x1b3adf[_0x4c2708(0x199)](_0x160f1b,typeof(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b['method'])==_0x4c2708(0x1d7)&&(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)])?_0x160f1b[_0x4c2708(0x1a7)][_0x4c2708(0x195)]()+'@'+(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)]):undefined,_0x46ba13)&&await _0x1b3adf[_0x4c2708(0x177)](_0x160f1b,typeof(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x1a7)])=='string'&&(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)])?_0x160f1b[_0x4c2708(0x1a7)][_0x4c2708(0x195)]()+'@'+(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b['_matchedRoute']):undefined,_0x46ba13):await _0x1b3adf[_0x4c2708(0x177)](_0x160f1b,typeof(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x1a7)])==_0x4c2708(0x1d7)&&(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)])?_0x160f1b[_0x4c2708(0x1a7)][_0x4c2708(0x195)]()+'@'+(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)]):undefined,_0x46ba13);}else core_1[_0x4c2708(0x15a)][_0x4c2708(0x174)](_0x3c5731)&&await _0x3c5731(_0x160f1b,typeof(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x1a7)])==_0x4c2708(0x1d7)&&(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)])?_0x160f1b['method']['toLowerCase']()+'@'+(_0x160f1b===null||_0x160f1b===void 0x0?void 0x0:_0x160f1b[_0x4c2708(0x194)]):undefined,_0x46ba13);}}return await _0x5430de[_0x4c2708(0x179)](..._0x5430de[_0x4c2708(0x1c0)]);},'afterThrow':(_0x3e9236,_0x28af15)=>{throw _0x28af15;}};});}async[a2_0x2cf73b(0x178)](){const _0x5cf7c0=a2_0x2cf73b;this[_0x5cf7c0(0x1c5)][_0x5cf7c0(0x1aa)]([_0x5cf7c0(0x18a)])[_0x5cf7c0(0x1b5)](_0x3456da=>{const _0x7debf9=_0x5cf7c0;(_0x3456da===null||_0x3456da===void 0x0?void 0x0:_0x3456da['context'])&&Object[_0x7debf9(0x185)](_0x3456da[_0x7debf9(0x184)],{'ok':{'value':function(_0x23eba3,_0x2ece67,_0x18b61d=0x0){return{'code':_0x18b61d,'data':_0x23eba3,'extra':_0x2ece67};}},'input':{'value':function(_0x393a3e,_0x3f3a84){const _0x3a27ee=_0x7debf9;var _0xc720a2;const _0x59de55=lodash[_0x3a27ee(0x1bd)]({},this['request'][_0x3a27ee(0x1b8)]||this[_0x3a27ee(0x190)][((_0xc720a2=config===null||config===void 0x0?void 0x0:config[_0x3a27ee(0x175)])===null||_0xc720a2===void 0x0?void 0x0:_0xc720a2[_0x3a27ee(0x1c4)])||_0x3a27ee(0x1b8)]||{},this[_0x3a27ee(0x190)][_0x3a27ee(0x15c)]||{});return _0x393a3e?lodash['get'](_0x59de55,_0x393a3e,_0x3f3a84):_0x59de55;}},'when':{'value':async function(_0x37631e,_0x5298f){const _0x120a6c=_0x7debf9,_0x46f29e=this['input'](_0x37631e,null);if(!lodash[_0x120a6c(0x1ce)](_0x46f29e))return await _0x5298f(_0x46f29e);}},'only':{'value':function(_0x28cc0a){const _0x4a6313=_0x7debf9,_0x2e4edf={};for(let _0x1a28eb=0x0;_0x1a28eb<_0x28cc0a[_0x4a6313(0x15b)];_0x1a28eb++){lodash['isArray'](_0x28cc0a[_0x1a28eb])&&_0x28cc0a[_0x1a28eb][_0x4a6313(0x15b)]>0x0&&lodash[_0x4a6313(0x1cc)](_0x28cc0a[_0x1a28eb][0x0])&&(_0x2e4edf[_0x28cc0a[_0x1a28eb][0x0]]=this[_0x4a6313(0x161)](_0x28cc0a[_0x1a28eb][0x0],_0x28cc0a[_0x1a28eb]['length']>0x1?_0x28cc0a[_0x1a28eb][0x1]:null));}return _0x2e4edf;}},'koasend':{'value':function(_0x150e1b,_0x4a0bea){const _0x2b44c9=_0x7debf9;if(!fs[_0x2b44c9(0x1ad)](this[_0x2b44c9(0x1c7)][_0x2b44c9(0x198)]()+'/'+_0x150e1b))return _0x2b44c9(0x1bb);return this['attachment'](_0x4a0bea||_0x150e1b),koasend(this,_0x150e1b);}}});});}async[a2_0x2cf73b(0x164)](){const _0x32fa47=a2_0x2cf73b;var _0x47eb00,_0x2eb8aa;if(fs['existsSync'](this[_0x32fa47(0x1c7)][_0x32fa47(0x1d0)]()+_0x32fa47(0x173))&&fs[_0x32fa47(0x192)](this[_0x32fa47(0x1c7)][_0x32fa47(0x1d0)]()+'/apps')[_0x32fa47(0x163)]()){const _0x1dfed3=this['config']['getConfiguration'](),_0x20b5c3=((_0x47eb00=_0x1dfed3===null||_0x1dfed3===void 0x0?void 0x0:_0x1dfed3[_0x32fa47(0x183)])===null||_0x47eb00===void 0x0?void 0x0:_0x47eb00[_0x32fa47(0x1bc)])||{};for(const _0x37c9e1 of fs['readdirSync'](this[_0x32fa47(0x1c7)][_0x32fa47(0x1d0)]()+'/apps')){if(!fs[_0x32fa47(0x192)](this[_0x32fa47(0x1c7)][_0x32fa47(0x1d0)]()+_0x32fa47(0x170)+_0x37c9e1)[_0x32fa47(0x163)]())continue;if(_0x20b5c3===null||_0x20b5c3===void 0x0?void 0x0:_0x20b5c3[_0x37c9e1])continue;_0x20b5c3[_0x37c9e1]=Object[_0x32fa47(0x1a6)]({},((_0x2eb8aa=_0x1dfed3===null||_0x1dfed3===void 0x0?void 0x0:_0x1dfed3[_0x32fa47(0x183)])===null||_0x2eb8aa===void 0x0?void 0x0:_0x2eb8aa['default'])||{'maxSize':'1m','dir':this[_0x32fa47(0x1c7)][_0x32fa47(0x198)]()+'/runtime'},{'enableJSON':!![],'enableConsole':this[_0x32fa47(0x18c)]['isDevelopmentEnvironment'](),'fileLogName':_0x37c9e1+_0x32fa47(0x176),'dir':this[_0x32fa47(0x1c7)][_0x32fa47(0x198)]()+'/runtime/apps-'+_0x37c9e1+_0x32fa47(0x165)});}Object[_0x32fa47(0x1d6)](_0x20b5c3)['length']>0x0&&(!_0x1dfed3[_0x32fa47(0x183)]&&(_0x1dfed3['midwayLogger']={'default':{'maxSize':'1m','dir':this[_0x32fa47(0x1c7)]['getAppDir']()+_0x32fa47(0x1a2)}}),_0x1dfed3[_0x32fa47(0x183)][_0x32fa47(0x1bc)]=_0x20b5c3),this[_0x32fa47(0x168)]['addObject'](_0x1dfed3);}}async[a2_0x2cf73b(0x1b4)](){const _0x5a14d2=a2_0x2cf73b;var _0x2dc2a2,_0x143a35,_0x108451,_0x35700e,_0x41c391,_0x19e664;const _0x340969=this[_0x5a14d2(0x168)]['getConfiguration']();((_0x143a35=(_0x2dc2a2=_0x340969===null||_0x340969===void 0x0?void 0x0:_0x340969[_0x5a14d2(0x1ac)])===null||_0x2dc2a2===void 0x0?void 0x0:_0x2dc2a2[_0x5a14d2(0x15d)])===null||_0x143a35===void 0x0?void 0x0:_0x143a35[_0x5a14d2(0x1bf)])&&Object[_0x5a14d2(0x1d6)](_0x340969[_0x5a14d2(0x1ac)][_0x5a14d2(0x15d)])['length']>0x1&&delete _0x340969[_0x5a14d2(0x1ac)]['devices'][_0x5a14d2(0x1bf)];if((_0x108451=_0x340969===null||_0x340969===void 0x0?void 0x0:_0x340969[_0x5a14d2(0x15e)])===null||_0x108451===void 0x0?void 0x0:_0x108451[_0x5a14d2(0x1a3)])for(const _0x3842a6 in _0x340969[_0x5a14d2(0x15e)]['dirs']){((_0x35700e=_0x340969[_0x5a14d2(0x15e)][_0x5a14d2(0x1a3)][_0x3842a6])===null||_0x35700e===void 0x0?void 0x0:_0x35700e['dir'])&&typeof((_0x41c391=_0x340969[_0x5a14d2(0x15e)]['dirs'][_0x3842a6])===null||_0x41c391===void 0x0?void 0x0:_0x41c391['dir'])=='string'&&!fs['existsSync'](_0x340969['staticFile'][_0x5a14d2(0x1a3)][_0x3842a6]['dir'])&&(fs[_0x5a14d2(0x18b)](_0x340969[_0x5a14d2(0x15e)]['dirs'][_0x3842a6]['dir'],{'recursive':!![]}),console[_0x5a14d2(0x182)](_0x5a14d2(0x1b1)+_0x340969[_0x5a14d2(0x15e)][_0x5a14d2(0x1a3)][_0x3842a6][_0x5a14d2(0x160)]));}((_0x19e664=_0x340969===null||_0x340969===void 0x0?void 0x0:_0x340969[_0x5a14d2(0x189)])===null||_0x19e664===void 0x0?void 0x0:_0x19e664[_0x5a14d2(0x19d)])&&!fs[_0x5a14d2(0x1ad)](_0x340969['upload'][_0x5a14d2(0x19d)])&&(fs[_0x5a14d2(0x18b)](_0x340969['upload'][_0x5a14d2(0x19d)],{'recursive':!![]}),console[_0x5a14d2(0x182)](_0x5a14d2(0x17a)+_0x340969[_0x5a14d2(0x189)][_0x5a14d2(0x19d)])),this[_0x5a14d2(0x168)][_0x5a14d2(0x1c1)](_0x340969);}};__decorate([(0x0,core_1[a2_0x2cf73b(0x17c)])(),__metadata(a2_0x2cf73b(0x16d),Object)],CustomConfiguration[a2_0x2cf73b(0x1be)],'app',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x2cf73b(0x16d),core_2[a2_0x2cf73b(0x1a1)])],CustomConfiguration['prototype'],a2_0x2cf73b(0x168),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata('design:type',core_2[a2_0x2cf73b(0x17b)])],CustomConfiguration[a2_0x2cf73b(0x1be)],a2_0x2cf73b(0x17f),void 0x0),__decorate([(0x0,core_1[a2_0x2cf73b(0x1d9)])(),__metadata(a2_0x2cf73b(0x16d),core_2[a2_0x2cf73b(0x16e)])],CustomConfiguration[a2_0x2cf73b(0x1be)],'application',void 0x0),__decorate([(0x0,core_1[a2_0x2cf73b(0x1d9)])(),__metadata(a2_0x2cf73b(0x16d),core_2[a2_0x2cf73b(0x1ae)])],CustomConfiguration[a2_0x2cf73b(0x1be)],a2_0x2cf73b(0x18c),void 0x0),__decorate([(0x0,core_1[a2_0x2cf73b(0x1d9)])(),__metadata(a2_0x2cf73b(0x16d),ApiService_1[a2_0x2cf73b(0x1b0)])],CustomConfiguration['prototype'],a2_0x2cf73b(0x1b0),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x2cf73b(0x1b6)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x2cf73b(0x18f),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x2cf73b(0x181)]=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_0x47b63b=a3_0x497c;(function(_0x2619aa,_0x579940){const _0x118598=a3_0x497c,_0xde6204=_0x2619aa();while(!![]){try{const _0x173962=parseInt(_0x118598(0x1dc))/0x1+parseInt(_0x118598(0x1e0))/0x2*(-parseInt(_0x118598(0x1fc))/0x3)+-parseInt(_0x118598(0x21f))/0x4+parseInt(_0x118598(0x1fd))/0x5*(-parseInt(_0x118598(0x209))/0x6)+parseInt(_0x118598(0x1e7))/0x7+parseInt(_0x118598(0x1f7))/0x8*(parseInt(_0x118598(0x1fa))/0x9)+parseInt(_0x118598(0x215))/0xa;if(_0x173962===_0x579940)break;else _0xde6204['push'](_0xde6204['shift']());}catch(_0x20f679){_0xde6204['push'](_0xde6204['shift']());}}}(a3_0x57ac,0x482e8));const a3_0x2046a1=(function(){let _0x177d0a=!![];return function(_0x47ebf1,_0x4b7977){const _0x5c5859=_0x177d0a?function(){const _0x468a84=a3_0x497c;if(_0x4b7977){const _0x55aa1e=_0x4b7977[_0x468a84(0x1d4)](_0x47ebf1,arguments);return _0x4b7977=null,_0x55aa1e;}}:function(){};return _0x177d0a=![],_0x5c5859;};}()),a3_0x1743c4=a3_0x2046a1(this,function(){const _0x1cacbd=a3_0x497c;return a3_0x1743c4[_0x1cacbd(0x1ff)]()[_0x1cacbd(0x202)]('(((.+)+)+)+$')[_0x1cacbd(0x1ff)]()[_0x1cacbd(0x216)](a3_0x1743c4)[_0x1cacbd(0x202)](_0x1cacbd(0x1e9));});function a3_0x497c(_0x50396b,_0x286fb7){const _0x405a35=a3_0x57ac();return a3_0x497c=function(_0x1743c4,_0x2046a1){_0x1743c4=_0x1743c4-0x1d3;let _0x57ac4c=_0x405a35[_0x1743c4];return _0x57ac4c;},a3_0x497c(_0x50396b,_0x286fb7);}a3_0x1743c4();'use strict';Object[a3_0x47b63b(0x217)](exports,a3_0x47b63b(0x1ee),{'value':!![]}),exports[a3_0x47b63b(0x1d9)]=exports['ActionApi']=exports[a3_0x47b63b(0x1db)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x47b63b(0x1e8)),core_1=require(a3_0x47b63b(0x1f8)),core_2=require(a3_0x47b63b(0x1f8)),action_1=require(a3_0x47b63b(0x212));function Action(_0x15c5a6,_0x4f9920,_0x487153={'middleware':[],'sensitive':!![]}){return _0xefb61=>{const _0x455c9b=a3_0x497c;var _0x180998;_0x487153[_0x455c9b(0x20f)]=_0x4f9920;const _0x392be6=parseRoute(_0x15c5a6);if(_0x392be6['module']){_0x487153[_0x455c9b(0x1df)]=_0x487153[_0x455c9b(0x1df)]?'/'+_0x392be6['module']+'/'+_0x487153[_0x455c9b(0x1df)]:'/'+_0x392be6[_0x455c9b(0x1e3)];_0x392be6[_0x455c9b(0x1df)]&&(_0x487153['prefix']='/'+_0x392be6[_0x455c9b(0x1df)]+'/'+_0x487153[_0x455c9b(0x1df)]);if(fs[_0x455c9b(0x1ed)](_0x392be6[_0x455c9b(0x1f6)]+'/apps/'+_0x392be6[_0x455c9b(0x1f4)]+_0x455c9b(0x1e5)+(lodash[_0x455c9b(0x1f0)](_0x392be6[_0x455c9b(0x220)],'ts')?'ts':'js'))){const _0x1b2988=include(_0x392be6[_0x455c9b(0x1f6)]+_0x455c9b(0x1e4)+_0x392be6['module']+_0x455c9b(0x1e5)+(lodash[_0x455c9b(0x1f0)](_0x392be6[_0x455c9b(0x220)],'ts')?'ts':'js'));if(_0x1b2988['middleware']&&lodash[_0x455c9b(0x1fb)](_0x1b2988[_0x455c9b(0x1dd)])&&_0x1b2988[_0x455c9b(0x1dd)][_0x455c9b(0x1f2)]>0x0)for(let _0x538ec3 in _0x1b2988[_0x455c9b(0x1dd)]){if(((_0x180998=_0x1b2988===null||_0x1b2988===void 0x0?void 0x0:_0x1b2988[_0x455c9b(0x207)])===null||_0x180998===void 0x0?void 0x0:_0x180998[_0x455c9b(0x1f2)])>0x0&&_0x1b2988['middlewareIgnore'][_0x455c9b(0x214)](_0x1b2988['middleware'][_0x538ec3])!=-0x1)continue;_0x487153[_0x455c9b(0x1dd)][_0x455c9b(0x1d6)](_0x1b2988['middleware'][_0x538ec3]);}const _0x228711=(0x0,core_1[_0x455c9b(0x201)])(action_1[_0x455c9b(0x1fe)],action_1[_0x455c9b(0x213)])||{};_0x228711[''+_0x392be6['module']]=_0x1b2988,(0x0,core_1['saveClassMetadata'])(action_1[_0x455c9b(0x1fe)],_0x228711,action_1[_0x455c9b(0x213)]);}_0x487153['prefix']=_0x487153[_0x455c9b(0x1df)][_0x455c9b(0x1e2)]()[_0x455c9b(0x211)](/\/{2,}/g,'/'),(0x0,core_1[_0x455c9b(0x1ea)])(action_1[_0x455c9b(0x1f1)],_0xefb61),(0x0,core_1[_0x455c9b(0x219)])(_0x487153[_0x455c9b(0x1df)],_0x487153)(_0xefb61),(0x0,core_1[_0x455c9b(0x20d)])(action_1[_0x455c9b(0x1f1)],{'prefix':_0x487153[_0x455c9b(0x1df)],'pprefix':_0x392be6['prefix'],'module':_0x392be6[_0x455c9b(0x1f4)],'filepath':_0x392be6[_0x455c9b(0x220)],'routerOptions':_0x487153},_0xefb61);}else _0x487153[_0x455c9b(0x1df)]=_0x487153[_0x455c9b(0x1df)]?'/'+_0x487153[_0x455c9b(0x1df)]:'/'+_0x392be6['route'],_0x392be6['prefix']&&(_0x487153[_0x455c9b(0x1df)]='/'+_0x392be6[_0x455c9b(0x1df)]+'/'+_0x487153[_0x455c9b(0x1df)]),_0x487153[_0x455c9b(0x1df)]=_0x487153['prefix'][_0x455c9b(0x1e2)]()['replace'](/\/{2,}/g,'/'),(0x0,core_1['saveModule'])(action_1[_0x455c9b(0x1f1)],_0xefb61),(0x0,core_1[_0x455c9b(0x219)])(_0x487153[_0x455c9b(0x1df)],_0x487153)(_0xefb61),(0x0,core_1[_0x455c9b(0x20d)])(action_1[_0x455c9b(0x1f1)],{'prefix':_0x487153[_0x455c9b(0x1df)],'module':_0x392be6[_0x455c9b(0x1f4)],'pprefix':_0x392be6[_0x455c9b(0x1df)],'filepath':_0x392be6[_0x455c9b(0x220)],'routerOptions':_0x487153},_0xefb61);};}exports[a3_0x47b63b(0x1db)]=Action,Action[a3_0x47b63b(0x206)]=function(_0x40c424,_0x5ed7ed='/',_0x5ca949={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x786ab2,_0x4c22df,_0x22038a)=>{const _0x22cd41=a3_0x497c;ActionApi(_0x40c424,_0x22cd41(0x206),_0x5ed7ed,_0x5ca949)(_0x786ab2,_0x4c22df,_0x22038a);};},Action['post']=function(_0x5a1675,_0x3985fd='/',_0x9684e0={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x782af2,_0x401d22,_0x165bdb)=>{const _0x51f025=a3_0x497c;ActionApi(_0x5a1675,_0x51f025(0x1d5),_0x3985fd,_0x9684e0)(_0x782af2,_0x401d22,_0x165bdb);};};function ActionApi(_0x4c91cc,_0x5eff3d=a3_0x47b63b(0x206),_0x1cb224='/',_0x516cfc={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x37d7d7,_0x3a5c0f,_0x47b1d6)=>{const _0x3a6f61=a3_0x497c;var _0x231cec,_0x24dd25,_0x5a3625;!_0x516cfc[_0x3a6f61(0x1dd)]&&(_0x516cfc[_0x3a6f61(0x1dd)]=[]);!((_0x231cec=_0x516cfc===null||_0x516cfc===void 0x0?void 0x0:_0x516cfc['validate'])===null||_0x231cec===void 0x0?void 0x0:_0x231cec[_0x3a6f61(0x21d)])&&(_0x516cfc['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x3a6f61(0x1d3)}});if(!_0x1cb224)_0x1cb224='/';else typeof _0x1cb224==_0x3a6f61(0x1d3)&&(!_0x1cb224[_0x3a6f61(0x218)]('/')&&!_0x1cb224['startsWith']('-')&&(_0x1cb224='/'+_0x1cb224));typeof _0x516cfc['apimit']==_0x3a6f61(0x21a)&&(_0x516cfc[_0x3a6f61(0x21c)]=!![]);if(((_0x24dd25=_0x516cfc===null||_0x516cfc===void 0x0?void 0x0:_0x516cfc[_0x3a6f61(0x1dd)])===null||_0x24dd25===void 0x0?void 0x0:_0x24dd25['length'])>0x0&&((_0x5a3625=_0x516cfc===null||_0x516cfc===void 0x0?void 0x0:_0x516cfc[_0x3a6f61(0x207)])===null||_0x5a3625===void 0x0?void 0x0:_0x5a3625[_0x3a6f61(0x1f2)])>0x0)for(let _0x184e94 in _0x516cfc['middleware']){_0x516cfc[_0x3a6f61(0x207)][_0x3a6f61(0x214)](_0x516cfc[_0x3a6f61(0x1dd)][_0x184e94])!==-0x1&&(_0x516cfc[_0x3a6f61(0x1dd)][_0x184e94]=null);}_0x516cfc['routerName']=_0x4c91cc,(0x0,validator_1[_0x3a6f61(0x1f3)])(_0x516cfc[_0x3a6f61(0x1da)])(_0x37d7d7,_0x3a5c0f,_0x47b1d6),(0x0,core_2[_0x3a6f61(0x20c)])(Object[_0x3a6f61(0x1e6)](_0x516cfc,{'path':_0x1cb224,'requestMethod':(_0x5eff3d||'get')[_0x3a6f61(0x1e2)]()}))(_0x37d7d7,_0x3a5c0f,_0x47b1d6),(0x0,core_2[_0x3a6f61(0x21b)])(action_1[_0x3a6f61(0x203)],{'path':_0x1cb224,'method':_0x3a5c0f,'apimit':_0x516cfc[_0x3a6f61(0x21c)],'intercept':_0x516cfc['intercept'],'routerName':_0x516cfc[_0x3a6f61(0x20b)],'description':_0x516cfc[_0x3a6f61(0x21e)],'middleware':(_0x516cfc[_0x3a6f61(0x1dd)]||[])[_0x3a6f61(0x204)](_0xa1a724=>!!_0xa1a724),'requestMethod':(_0x5eff3d||_0x3a6f61(0x206))[_0x3a6f61(0x1e2)]()},_0x37d7d7),(0x0,core_2[_0x3a6f61(0x1ef)])(action_1[_0x3a6f61(0x203)],{'path':_0x1cb224,'method':_0x3a5c0f,'apimit':_0x516cfc[_0x3a6f61(0x21c)],'intercept':_0x516cfc['intercept'],'routerName':_0x516cfc[_0x3a6f61(0x20b)],'description':_0x516cfc[_0x3a6f61(0x21e)],'middleware':(_0x516cfc[_0x3a6f61(0x1dd)]||[])[_0x3a6f61(0x204)](_0x5d7a9a=>!!_0x5d7a9a),'requestMethod':(_0x5eff3d||_0x3a6f61(0x206))['toLowerCase']()})(_0x37d7d7,_0x3a5c0f,_0x47b1d6);};}function a3_0x57ac(){const _0x59962f=['1225790PHuUiy','constructor','defineProperty','startsWith','Controller','undefined','attachClassMetadata','apimit','validationOptions','description','431852BoIHDc','filepath','string','apply','post','push','substring','\x20文件请放在app/controller/文件下','parseRoute','validate','Action','38912jGcvvp','middleware','split','prefix','134GdZquJ','splice','toLowerCase','route','/apps/','/config.','assign','2887458aMNavn','@anncic-api/validator','(((.+)+)+)+$','saveModule','/controller/文件下','/controller/','existsSync','__esModule','createCustomMethodDecorator','endsWith','ACTION_KEY','length','Validator','module','apps/','rootpath','1242672UZUmCC','@midwayjs/core','app/controller/','9kirUxR','isArray','12675jyMjHM','1375yTLZHf','APPSCONFIG_KEY','toString','join','getClassMetadata','search','ACTION_ROUTE_KEY','filter','basic/controller/','get','middlewareIgnore','ActionApi','930RQBEvn','-action','routerName','RequestMapping','saveClassMetadata','\x20文件请放在apps/','tagName','trim','replace','../types/action','AppsConfigTmp','indexOf'];a3_0x57ac=function(){return _0x59962f;};return a3_0x57ac();}exports[a3_0x47b63b(0x208)]=ActionApi;function parseRoute(_0x5d7cca){const _0x43fe2f=a3_0x47b63b;_0x5d7cca=_0x5d7cca[_0x43fe2f(0x211)](/(\\|\/)/g,'/');const _0x2d68dd=process['cwd']()[_0x43fe2f(0x211)](/(\\|\/)/g,'/'),_0x4a5364=_0x5d7cca[_0x43fe2f(0x1d7)](0x0,_0x2d68dd[_0x43fe2f(0x1f2)]+_0x5d7cca['substring'](_0x2d68dd[_0x43fe2f(0x1f2)]+0x1)[_0x43fe2f(0x214)]('/')+0x1),_0x261d2d=_0x5d7cca[_0x43fe2f(0x1d7)](_0x4a5364[_0x43fe2f(0x1f2)]+0x1)[_0x43fe2f(0x211)](/(\\|\/)/g,'/'),_0x215f45={'route':'','prefix':![],'module':![],'rootpath':_0x4a5364,'filepath':_0x261d2d};if(_0x261d2d['startsWith'](_0x43fe2f(0x1f9))||_0x261d2d[_0x43fe2f(0x218)](_0x43fe2f(0x205))){const _0x1dc4bf=_0x261d2d[_0x43fe2f(0x1d7)]((_0x261d2d[_0x43fe2f(0x218)](_0x43fe2f(0x1f9))?_0x43fe2f(0x1f9):_0x43fe2f(0x205))[_0x43fe2f(0x1f2)])[_0x43fe2f(0x1de)]('/')['filter'](_0x29935d=>_0x29935d&&_0x29935d['trim']());return _0x1dc4bf[_0x43fe2f(0x1f2)]>0x1&&(_0x215f45[_0x43fe2f(0x1df)]=_0x1dc4bf[0x0][_0x43fe2f(0x1e2)](),_0x1dc4bf[_0x43fe2f(0x1e1)](0x0,0x1)),_0x215f45[_0x43fe2f(0x1e3)]=('/'+_0x1dc4bf['join']('/'))['replace'](/(\.ts|\.js)$/,'')[_0x43fe2f(0x211)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x43fe2f(0x200)]('-')[_0x43fe2f(0x1e2)]()[_0x43fe2f(0x211)](/\/\-/g,'/'),_0x215f45[_0x43fe2f(0x1e3)][_0x43fe2f(0x1f0)](_0x43fe2f(0x20a))&&(_0x215f45[_0x43fe2f(0x1e3)]=_0x215f45[_0x43fe2f(0x1e3)][_0x43fe2f(0x1d7)](0x0,_0x215f45[_0x43fe2f(0x1e3)]['length']-0x7)),_0x215f45[_0x43fe2f(0x1e3)][_0x43fe2f(0x1f0)]('-controller')&&(_0x215f45['route']=_0x215f45[_0x43fe2f(0x1e3)]['substring'](0x0,_0x215f45[_0x43fe2f(0x1e3)]['length']-0xb)),_0x215f45;}else{if(_0x261d2d['startsWith']('apps/')){const _0x55b879=_0x261d2d[_0x43fe2f(0x1d7)](0x0,_0x261d2d[_0x43fe2f(0x214)](_0x43fe2f(0x1e4))+0x5),_0xe82a38=_0x261d2d[_0x43fe2f(0x1d7)](_0x55b879['length']+0x1)[_0x43fe2f(0x211)](/(\\|\/)/g,'/')[_0x43fe2f(0x1de)]('/')[0x0];if(_0x261d2d[_0x43fe2f(0x218)](_0x43fe2f(0x1f5)+_0xe82a38+'/controller/')){const _0x29d9ab=_0x261d2d['substring']((_0x55b879+'/'+_0xe82a38+_0x43fe2f(0x1ec))[_0x43fe2f(0x1f2)])['split']('/')[_0x43fe2f(0x204)](_0x2c340f=>_0x2c340f&&_0x2c340f[_0x43fe2f(0x210)]());return _0x29d9ab[_0x43fe2f(0x1f2)]>0x1&&(_0x215f45['prefix']=_0x29d9ab[0x0][_0x43fe2f(0x1e2)](),_0x29d9ab[_0x43fe2f(0x1e1)](0x0,0x1)),_0x215f45[_0x43fe2f(0x1f4)]=_0xe82a38,_0x215f45['route']=('/'+_0xe82a38+'/'+_0x29d9ab['join']('/'))['replace'](/(\.ts|\.js)$/,'')[_0x43fe2f(0x211)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x43fe2f(0x200)]('-')[_0x43fe2f(0x1e2)]()['replace'](/\/\-/g,'/'),_0x215f45[_0x43fe2f(0x1e3)]['endsWith']('-action')&&(_0x215f45['route']=_0x215f45[_0x43fe2f(0x1e3)][_0x43fe2f(0x1d7)](0x0,_0x215f45[_0x43fe2f(0x1e3)][_0x43fe2f(0x1f2)]-0x7)),_0x215f45['route'][_0x43fe2f(0x1f0)]('-controller')&&(_0x215f45[_0x43fe2f(0x1e3)]=_0x215f45['route'][_0x43fe2f(0x1d7)](0x0,_0x215f45[_0x43fe2f(0x1e3)][_0x43fe2f(0x1f2)]-0xb)),_0x215f45;}throw new Error(_0x261d2d+_0x43fe2f(0x20e)+_0xe82a38+_0x43fe2f(0x1eb));}}throw new Error(_0x261d2d+_0x43fe2f(0x1d8));}exports[a3_0x47b63b(0x1d9)]=parseRoute;
|