anncic-api 3.0.6 → 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_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;
|
|
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_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;
|
|
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;
|