anncic-api 3.1.0 → 3.1.1
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_0x4b5085=a0_0x42c6;function a0_0x42c6(_0x471b1e,_0x7264c4){var _0x26789e=a0_0x28b2();return a0_0x42c6=function(_0x480cb5,_0x4fa1cb){_0x480cb5=_0x480cb5-0x106;var _0x28b2f7=_0x26789e[_0x480cb5];return _0x28b2f7;},a0_0x42c6(_0x471b1e,_0x7264c4);}(function(_0x256bc9,_0x49e692){var _0x3cddca=a0_0x42c6,_0x3b5400=_0x256bc9();while(!![]){try{var _0x8e6a49=parseInt(_0x3cddca(0x106))/0x1*(parseInt(_0x3cddca(0x10c))/0x2)+-parseInt(_0x3cddca(0x11b))/0x3+-parseInt(_0x3cddca(0x114))/0x4+parseInt(_0x3cddca(0x10d))/0x5*(parseInt(_0x3cddca(0x107))/0x6)+parseInt(_0x3cddca(0x112))/0x7*(parseInt(_0x3cddca(0x110))/0x8)+-parseInt(_0x3cddca(0x115))/0x9+parseInt(_0x3cddca(0x11c))/0xa;if(_0x8e6a49===_0x49e692)break;else _0x3b5400['push'](_0x3b5400['shift']());}catch(_0x2ec7d8){_0x3b5400['push'](_0x3b5400['shift']());}}}(a0_0x28b2,0xa1d73));var a0_0x4fa1cb=(function(){var _0x2361f9=!![];return function(_0x34d614,_0x1fbf18){var _0x38d873=_0x2361f9?function(){var _0x17be5d=a0_0x42c6;if(_0x1fbf18){var _0x46f0d9=_0x1fbf18[_0x17be5d(0x10e)](_0x34d614,arguments);return _0x1fbf18=null,_0x46f0d9;}}:function(){};return _0x2361f9=![],_0x38d873;};}()),a0_0x480cb5=a0_0x4fa1cb(this,function(){var _0x51d2fd=a0_0x42c6;return a0_0x480cb5[_0x51d2fd(0x11a)]()[_0x51d2fd(0x108)](_0x51d2fd(0x118))[_0x51d2fd(0x11a)]()[_0x51d2fd(0x113)](a0_0x480cb5)[_0x51d2fd(0x108)](_0x51d2fd(0x118));});a0_0x480cb5();'use strict';function a0_0x28b2(){var _0x21de74=['__esModule','text','(((.+)+)+)+$','name','toString','2458152vgbOGL','4823150TkfIgQ','json','31KzfeVm','2986062sKefsz','search','form','default','defineProperty','72678TxCDhQ','10QFkvYB','apply','appDir','40184GgEiBb','20mb','1386AbMgFe','constructor','4675132NVWuQc','8528994QNNXYm'];a0_0x28b2=function(){return _0x21de74;};return a0_0x28b2();}Object[a0_0x4b5085(0x10b)](exports,a0_0x4b5085(0x116),{'value':!![]}),exports[a0_0x4b5085(0x10a)]=_0x279a6d=>{var _0x261c71=a0_0x4b5085;return{'apitest':!![],'keys':_0x279a6d[_0x261c71(0x119)],'anncicapi':{'password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':'dhauo1234420123gg3234901','checkcode':'dhauo1234420123gg3234901'}}},'bodyParser':{'enableTypes':[_0x261c71(0x11d),_0x261c71(0x109),_0x261c71(0x117),'xml'],'formLimit':_0x261c71(0x111),'jsonLimit':_0x261c71(0x111),'textLimit':_0x261c71(0x111),'xmlLimit':_0x261c71(0x111)},'upload':{'tmpdir':_0x279a6d[_0x261c71(0x10f)]+'/runtime/.upload','cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a1_0x5a9a7d=a1_0x1853;function a1_0x218c(){var _0x5820ec=['9732160NjkuIo','toString','6556504ZhQjXD','search','9pqToUI','default','6WwiHpc','defineProperty','3881199xgflUh','3wmOaWa','1602589ajeFCb','2534616ZSRueI','(((.+)+)+)+$','constructor','apply','32702870ULTPZG','5465590YjykYx'];a1_0x218c=function(){return _0x5820ec;};return a1_0x218c();}(function(_0x4f0a7a,_0x470c7c){var _0x31c3a9=a1_0x1853,_0x3e4726=_0x4f0a7a();while(!![]){try{var _0x3e37e0=parseInt(_0x31c3a9(0x186))/0x1+parseInt(_0x31c3a9(0x187))/0x2+-parseInt(_0x31c3a9(0x185))/0x3*(parseInt(_0x31c3a9(0x18f))/0x4)+parseInt(_0x31c3a9(0x18c))/0x5+parseInt(_0x31c3a9(0x182))/0x6*(parseInt(_0x31c3a9(0x184))/0x7)+parseInt(_0x31c3a9(0x18d))/0x8+parseInt(_0x31c3a9(0x191))/0x9*(-parseInt(_0x31c3a9(0x18b))/0xa);if(_0x3e37e0===_0x470c7c)break;else _0x3e4726['push'](_0x3e4726['shift']());}catch(_0x34ec0d){_0x3e4726['push'](_0x3e4726['shift']());}}}(a1_0x218c,0xc9503));var a1_0x310243=(function(){var _0x59fbbe=!![];return function(_0x3fbcda,_0x4c037a){var _0x7a7e9b=_0x59fbbe?function(){var _0x2e10a8=a1_0x1853;if(_0x4c037a){var _0x49c4b5=_0x4c037a[_0x2e10a8(0x18a)](_0x3fbcda,arguments);return _0x4c037a=null,_0x49c4b5;}}:function(){};return _0x59fbbe=![],_0x7a7e9b;};}()),a1_0x53fc30=a1_0x310243(this,function(){var _0x59a129=a1_0x1853;return a1_0x53fc30['toString']()[_0x59a129(0x190)](_0x59a129(0x188))[_0x59a129(0x18e)]()[_0x59a129(0x189)](a1_0x53fc30)[_0x59a129(0x190)](_0x59a129(0x188));});function a1_0x1853(_0x36f41f,_0x5699ac){var _0x80ec82=a1_0x218c();return a1_0x1853=function(_0x53fc30,_0x310243){_0x53fc30=_0x53fc30-0x181;var _0x218cb5=_0x80ec82[_0x53fc30];return _0x218cb5;},a1_0x1853(_0x36f41f,_0x5699ac);}a1_0x53fc30();'use strict';Object[a1_0x5a9a7d(0x183)](exports,'__esModule',{'value':!![]}),exports[a1_0x5a9a7d(0x181)]={'apitest':![],'anncicapi':{}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x2cb5b9=a2_0x5376;function a2_0x5376(_0x1e1094,_0x4dd292){const _0x5c8f0f=a2_0x2e8d();return a2_0x5376=function(_0x5777b4,_0x125a9b){_0x5777b4=_0x5777b4-0x187;let _0x2e8d81=_0x5c8f0f[_0x5777b4];return _0x2e8d81;},a2_0x5376(_0x1e1094,_0x4dd292);}(function(_0x105f9b,_0x9251a){const _0x2de3a5=a2_0x5376,_0x4d4c08=_0x105f9b();while(!![]){try{const _0x11abad=parseInt(_0x2de3a5(0x1f5))/0x1+parseInt(_0x2de3a5(0x1b5))/0x2*(-parseInt(_0x2de3a5(0x199))/0x3)+-parseInt(_0x2de3a5(0x200))/0x4*(-parseInt(_0x2de3a5(0x1fd))/0x5)+parseInt(_0x2de3a5(0x1cd))/0x6+parseInt(_0x2de3a5(0x1f2))/0x7*(-parseInt(_0x2de3a5(0x1db))/0x8)+parseInt(_0x2de3a5(0x18e))/0x9*(-parseInt(_0x2de3a5(0x18c))/0xa)+parseInt(_0x2de3a5(0x1ed))/0xb;if(_0x11abad===_0x9251a)break;else _0x4d4c08['push'](_0x4d4c08['shift']());}catch(_0x5453d2){_0x4d4c08['push'](_0x4d4c08['shift']());}}}(a2_0x2e8d,0xe6c56));const a2_0x125a9b=(function(){let _0x5658ef=!![];return function(_0x43f2d4,_0x28a7d3){const _0x3c67bf=_0x5658ef?function(){const _0x37d67e=a2_0x5376;if(_0x28a7d3){const _0x2545c5=_0x28a7d3[_0x37d67e(0x1dd)](_0x43f2d4,arguments);return _0x28a7d3=null,_0x2545c5;}}:function(){};return _0x5658ef=![],_0x3c67bf;};}()),a2_0x5777b4=a2_0x125a9b(this,function(){const _0x462810=a2_0x5376;return a2_0x5777b4[_0x462810(0x1d3)]()[_0x462810(0x192)](_0x462810(0x1ee))[_0x462810(0x1d3)]()[_0x462810(0x1b9)](a2_0x5777b4)[_0x462810(0x192)](_0x462810(0x1ee));});a2_0x5777b4();'use strict';var __decorate=this&&this[a2_0x2cb5b9(0x197)]||function(_0x3d7789,_0x10bca2,_0x121f17,_0x31d8b0){const _0x4d8bfe=a2_0x2cb5b9;var _0x4d200c=arguments['length'],_0x4022c1=_0x4d200c<0x3?_0x10bca2:_0x31d8b0===null?_0x31d8b0=Object[_0x4d8bfe(0x1a7)](_0x10bca2,_0x121f17):_0x31d8b0,_0x2b1058;if(typeof Reflect==='object'&&typeof Reflect[_0x4d8bfe(0x1a3)]==='function')_0x4022c1=Reflect[_0x4d8bfe(0x1a3)](_0x3d7789,_0x10bca2,_0x121f17,_0x31d8b0);else{for(var _0x4745af=_0x3d7789['length']-0x1;_0x4745af>=0x0;_0x4745af--)if(_0x2b1058=_0x3d7789[_0x4745af])_0x4022c1=(_0x4d200c<0x3?_0x2b1058(_0x4022c1):_0x4d200c>0x3?_0x2b1058(_0x10bca2,_0x121f17,_0x4022c1):_0x2b1058(_0x10bca2,_0x121f17))||_0x4022c1;}return _0x4d200c>0x3&&_0x4022c1&&Object['defineProperty'](_0x10bca2,_0x121f17,_0x4022c1),_0x4022c1;},__metadata=this&&this[a2_0x2cb5b9(0x1d4)]||function(_0x106812,_0x3c9dbe){const _0x52802c=a2_0x2cb5b9;if(typeof Reflect==='object'&&typeof Reflect[_0x52802c(0x18f)]===_0x52802c(0x19f))return Reflect[_0x52802c(0x18f)](_0x106812,_0x3c9dbe);};function a2_0x2e8d(){const _0x581cc4=['environment','/runtime/apps-','371895OpclMC','@anncic-api/cache','request','headers','MidwayApplicationManager','./types/intercept','existsSync','apimit','5GaEoCV','args','isString','5297872waNJHn','./service/ApiService','intercept','@anncic-api/event','getConfiguration','/apps/','devices','.log','5716970ZXRIDk','getAppDir','9KEhyPG','metadata','isFunction','key','search','REQUEST_OBJ_CTX_KEY','CustomConfiguration','registerMethodHandler','input','__decorate','length','125199JekzKk','ApiService','koa-send','body','@midwayjs/cross-domain','@anncic-api/validator','function','readdirSync','handlerActionRoute','@anncic-api/core','decorate','Inject','./types/action','statSync','getOwnPropertyDescriptor','context','getClassMetadata','toLowerCase','/apps','loggerConfig','isClass','method','config','@midwayjs/static-file','string','ApiError','query','DEFAULT','50xLiKVL','@midwayjs/i18n','MidwayConfigService','handler','constructor','getBaseDir','anncicapi','log','isNull','forEach','defineProperties','mkdirSync','addObject','/runtime','-log','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','prototype','@midwayjs/upload','isArray','app','@midwayjs/koa','dir','./config/config.production','__esModule','5739744MgFIeY','isDevelopmentEnvironment','HEADERS_SIGNATURE','design:type','filterConfig','./exception/ApiError','toString','__metadata','hanlderApplications','getAsync','match','target','keys','anncic-api','8ozGcqd','dirs','apply','staticFile','./config/config.default','checkConfigKeys','midwayLogger','decorator','tmpdir','clients','_matchedRoute','device','checksign','Anncic-api\x20static-file\x20:\x20mkdir\x20','isDirectory','Types','default','application','10172569JBPQMJ','(((.+)+)+)+$','Configuration','assign','upload','7122542TyCFGj'];a2_0x2e8d=function(){return _0x581cc4;};return a2_0x2e8d();}Object['defineProperty'](exports,a2_0x2cb5b9(0x1cc),{'value':!![]}),exports[a2_0x2cb5b9(0x194)]=void 0x0;const core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),ApiError_1=require(a2_0x2cb5b9(0x1d2)),ApiService_1=require(a2_0x2cb5b9(0x201)),action_1=require(a2_0x2cb5b9(0x1a5)),intercept_1=require(a2_0x2cb5b9(0x1fa)),fs=require('fs'),koasend=require(a2_0x2cb5b9(0x19b)),koa=require(a2_0x2cb5b9(0x1c9)),i18n=require(a2_0x2cb5b9(0x1b6)),upload=require(a2_0x2cb5b9(0x1c6)),staticFile=require(a2_0x2cb5b9(0x1b0)),crossDomain=require(a2_0x2cb5b9(0x19d)),ConfigDefault=require(a2_0x2cb5b9(0x1df)),ConfigProduction=require(a2_0x2cb5b9(0x1cb)),anncic=require(a2_0x2cb5b9(0x1a2)),anncicCache=require(a2_0x2cb5b9(0x1f6)),anncicEvent=require(a2_0x2cb5b9(0x187)),anncicTypeorm=require('@anncic-api/typeorm'),anncicValidator=require(a2_0x2cb5b9(0x19e)),anncicHelper=require('anncic-apihelper');let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x5aed63=a2_0x2cb5b9;await this['filterConfig'](),await this[_0x5aed63(0x1ac)](),await this[_0x5aed63(0x1e0)](),await this[_0x5aed63(0x1a1)](),await this[_0x5aed63(0x1d5)]();}async[a2_0x2cb5b9(0x1e0)](){}async['handlerActionRoute'](){const _0x5be11d=a2_0x2cb5b9,_0x4bb97a=(0x0,core_1[_0x5be11d(0x1a9)])(intercept_1['INTERCEPT_KEY'],intercept_1['InterceptTargetTmp'])||{};this['decorator'][_0x5be11d(0x195)](action_1['ACTION_ROUTE_KEY'],_0x3750a0=>{const _0x2d07d8=_0x5be11d,_0x5281c0=_0x3750a0[_0x2d07d8(0x18f)];return{'before':async _0xa602ff=>{const _0x169464=_0x2d07d8;var _0x4b03ac,_0x33e03d;const _0x35d491=(_0x4b03ac=_0xa602ff===null||_0xa602ff===void 0x0?void 0x0:_0xa602ff[_0x169464(0x1d8)])===null||_0x4b03ac===void 0x0?void 0x0:_0x4b03ac[core_2[_0x169464(0x193)]];if(_0x35d491&&(_0x5281c0===null||_0x5281c0===void 0x0?void 0x0:_0x5281c0['apimit'])){if(!this[_0x169464(0x19a)][_0x169464(0x1e7)]((_0x33e03d=_0x35d491===null||_0x35d491===void 0x0?void 0x0:_0x35d491[_0x169464(0x1f7)])===null||_0x33e03d===void 0x0?void 0x0:_0x33e03d[_0x169464(0x1f8)]))throw new AnnError(ApiError_1[_0x169464(0x1b2)][_0x169464(0x1cf)]);}},'around':async _0x9c36c6=>{const _0x4d69c6=_0x2d07d8;var _0x2e7c4b,_0xb99ecf,_0x390ef3;const _0x460aee=(_0x2e7c4b=_0x9c36c6===null||_0x9c36c6===void 0x0?void 0x0:_0x9c36c6[_0x4d69c6(0x1d8)])===null||_0x2e7c4b===void 0x0?void 0x0:_0x2e7c4b[core_2[_0x4d69c6(0x193)]];if(_0x460aee&&(_0x5281c0===null||_0x5281c0===void 0x0?void 0x0:_0x5281c0[_0x4d69c6(0x1fc)])&&((_0x5281c0===null||_0x5281c0===void 0x0?void 0x0:_0x5281c0[_0x4d69c6(0x202)])||typeof(_0x5281c0===null||_0x5281c0===void 0x0?void 0x0:_0x5281c0[_0x4d69c6(0x202)])=='undefined')){if(((_0xb99ecf=_0x460aee['headers'])===null||_0xb99ecf===void 0x0?void 0x0:_0xb99ecf[_0x4d69c6(0x1e6)])&&((_0x390ef3=_0x4bb97a===null||_0x4bb97a===void 0x0?void 0x0:_0x4bb97a[_0x460aee[_0x4d69c6(0x1f8)][_0x4d69c6(0x1e6)]])===null||_0x390ef3===void 0x0?void 0x0:_0x390ef3['length'])>0x0)for(const _0x267cbd of _0x4bb97a[_0x460aee[_0x4d69c6(0x1f8)][_0x4d69c6(0x1e6)]]||[]){if(core_1[_0x4d69c6(0x1ea)][_0x4d69c6(0x1ad)](_0x267cbd)){const _0x32a5f4=await _0x460aee['requestContext'][_0x4d69c6(0x1d6)](_0x267cbd);typeof(_0x32a5f4===null||_0x32a5f4===void 0x0?void 0x0:_0x32a5f4[_0x4d69c6(0x1d7)])==_0x4d69c6(0x19f)?await _0x32a5f4['match'](_0x460aee,typeof(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee['method'])==_0x4d69c6(0x1b1)&&(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1e5)])?_0x460aee['method']['toLowerCase']()+'@'+(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee['_matchedRoute']):undefined,_0x5281c0)&&await _0x32a5f4[_0x4d69c6(0x1b8)](_0x460aee,typeof(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1ae)])==_0x4d69c6(0x1b1)&&(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1e5)])?_0x460aee[_0x4d69c6(0x1ae)][_0x4d69c6(0x1aa)]()+'@'+(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1e5)]):undefined,_0x5281c0):await _0x32a5f4[_0x4d69c6(0x1b8)](_0x460aee,typeof(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee['method'])=='string'&&(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1e5)])?_0x460aee[_0x4d69c6(0x1ae)][_0x4d69c6(0x1aa)]()+'@'+(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1e5)]):undefined,_0x5281c0);}else core_1[_0x4d69c6(0x1ea)][_0x4d69c6(0x190)](_0x267cbd)&&await _0x267cbd(_0x460aee,typeof(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1ae)])==_0x4d69c6(0x1b1)&&(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee[_0x4d69c6(0x1e5)])?_0x460aee[_0x4d69c6(0x1ae)][_0x4d69c6(0x1aa)]()+'@'+(_0x460aee===null||_0x460aee===void 0x0?void 0x0:_0x460aee['_matchedRoute']):undefined,_0x5281c0);}}return await _0x9c36c6['proceed'](..._0x9c36c6[_0x4d69c6(0x1fe)]);},'afterThrow':(_0x1a62ca,_0x1c8468)=>{throw _0x1c8468;}};});}async[a2_0x2cb5b9(0x1d5)](){const _0xf16811=a2_0x2cb5b9;this['application']['getApplications'](['koa'])[_0xf16811(0x1be)](_0x31bd31=>{const _0x505fa3=_0xf16811;(_0x31bd31===null||_0x31bd31===void 0x0?void 0x0:_0x31bd31[_0x505fa3(0x1a8)])&&Object[_0x505fa3(0x1bf)](_0x31bd31['context'],{'ok':{'value':function(_0x243db1,_0x340d80,_0x24a0f9=0x0){return{'code':_0x24a0f9,'data':_0x243db1,'extra':_0x340d80};}},'input':{'value':function(_0x3439a2,_0x180904){const _0x81fc6f=_0x505fa3;var _0x5a2bd9;const _0x646c0a=lodash['defaultsDeep']({},this['request'][_0x81fc6f(0x19c)]||this[_0x81fc6f(0x1f7)][((_0x5a2bd9=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x5a2bd9===void 0x0?void 0x0:_0x5a2bd9[_0x81fc6f(0x191)])||_0x81fc6f(0x19c)]||{},this[_0x81fc6f(0x1f7)][_0x81fc6f(0x1b3)]||{});return _0x3439a2?lodash['get'](_0x646c0a,_0x3439a2,_0x180904):_0x646c0a;}},'when':{'value':async function(_0x2adab8,_0x262352){const _0x1d1df0=_0x505fa3,_0x3692f9=this[_0x1d1df0(0x196)](_0x2adab8,null);if(!lodash[_0x1d1df0(0x1bd)](_0x3692f9))return await _0x262352(_0x3692f9);}},'only':{'value':function(_0x18f671){const _0x2fda50=_0x505fa3,_0x3b4941={};for(let _0x862b59=0x0;_0x862b59<_0x18f671['length'];_0x862b59++){lodash[_0x2fda50(0x1c7)](_0x18f671[_0x862b59])&&_0x18f671[_0x862b59][_0x2fda50(0x198)]>0x0&&lodash[_0x2fda50(0x1ff)](_0x18f671[_0x862b59][0x0])&&(_0x3b4941[_0x18f671[_0x862b59][0x0]]=this[_0x2fda50(0x196)](_0x18f671[_0x862b59][0x0],_0x18f671[_0x862b59][_0x2fda50(0x198)]>0x1?_0x18f671[_0x862b59][0x1]:null));}return _0x3b4941;}},'koasend':{'value':function(_0x1171ef,_0x2100e0){const _0xd8a41d=_0x505fa3;if(!fs[_0xd8a41d(0x1fb)](this['app'][_0xd8a41d(0x18d)]()+'/'+_0x1171ef))return'文件不存在';return this['attachment'](_0x2100e0||_0x1171ef),koasend(this,_0x1171ef);}}});});}async[a2_0x2cb5b9(0x1ac)](){const _0x42be67=a2_0x2cb5b9;var _0x281014,_0x2e57d9;if(fs[_0x42be67(0x1fb)](this[_0x42be67(0x1c8)][_0x42be67(0x1ba)]()+_0x42be67(0x1ab))&&fs[_0x42be67(0x1a6)](this['app'][_0x42be67(0x1ba)]()+_0x42be67(0x1ab))[_0x42be67(0x1e9)]()){const _0x2a69a1=this[_0x42be67(0x1af)]['getConfiguration'](),_0x470313=((_0x281014=_0x2a69a1===null||_0x2a69a1===void 0x0?void 0x0:_0x2a69a1['midwayLogger'])===null||_0x281014===void 0x0?void 0x0:_0x281014[_0x42be67(0x1e4)])||{};for(const _0x39bc9a of fs[_0x42be67(0x1a0)](this[_0x42be67(0x1c8)][_0x42be67(0x1ba)]()+'/apps')){if(!fs['statSync'](this[_0x42be67(0x1c8)][_0x42be67(0x1ba)]()+_0x42be67(0x189)+_0x39bc9a)[_0x42be67(0x1e9)]())continue;if(_0x470313===null||_0x470313===void 0x0?void 0x0:_0x470313[_0x39bc9a])continue;_0x470313[_0x39bc9a]=Object[_0x42be67(0x1f0)]({},((_0x2e57d9=_0x2a69a1===null||_0x2a69a1===void 0x0?void 0x0:_0x2a69a1[_0x42be67(0x1e1)])===null||_0x2e57d9===void 0x0?void 0x0:_0x2e57d9[_0x42be67(0x1eb)])||{'maxSize':'1m','dir':this[_0x42be67(0x1c8)][_0x42be67(0x18d)]()+'/runtime'},{'enableJSON':!![],'enableConsole':this['environment'][_0x42be67(0x1ce)](),'fileLogName':_0x39bc9a+_0x42be67(0x18b),'dir':this[_0x42be67(0x1c8)][_0x42be67(0x18d)]()+_0x42be67(0x1f4)+_0x39bc9a+_0x42be67(0x1c3)});}Object[_0x42be67(0x1d9)](_0x470313)['length']>0x0&&(!_0x2a69a1['midwayLogger']&&(_0x2a69a1[_0x42be67(0x1e1)]={'default':{'maxSize':'1m','dir':this[_0x42be67(0x1c8)][_0x42be67(0x18d)]()+_0x42be67(0x1c2)}}),_0x2a69a1[_0x42be67(0x1e1)][_0x42be67(0x1e4)]=_0x470313),this[_0x42be67(0x1af)][_0x42be67(0x1c1)](_0x2a69a1);}}async[a2_0x2cb5b9(0x1d1)](){const _0xd84912=a2_0x2cb5b9;var _0x22ba65,_0x223a39,_0xb6e222,_0x583a8b,_0xbec693,_0x1c438f;const _0xb2514=this[_0xd84912(0x1af)][_0xd84912(0x188)]();((_0x223a39=(_0x22ba65=_0xb2514===null||_0xb2514===void 0x0?void 0x0:_0xb2514[_0xd84912(0x1bb)])===null||_0x22ba65===void 0x0?void 0x0:_0x22ba65['devices'])===null||_0x223a39===void 0x0?void 0x0:_0x223a39[_0xd84912(0x1b4)])&&Object['keys'](_0xb2514['anncicapi'][_0xd84912(0x18a)])['length']>0x1&&delete _0xb2514['anncicapi'][_0xd84912(0x18a)]['DEFAULT'];if((_0xb6e222=_0xb2514===null||_0xb2514===void 0x0?void 0x0:_0xb2514[_0xd84912(0x1de)])===null||_0xb6e222===void 0x0?void 0x0:_0xb6e222[_0xd84912(0x1dc)])for(const _0x334ca3 in _0xb2514['staticFile'][_0xd84912(0x1dc)]){((_0x583a8b=_0xb2514[_0xd84912(0x1de)]['dirs'][_0x334ca3])===null||_0x583a8b===void 0x0?void 0x0:_0x583a8b[_0xd84912(0x1ca)])&&typeof((_0xbec693=_0xb2514[_0xd84912(0x1de)][_0xd84912(0x1dc)][_0x334ca3])===null||_0xbec693===void 0x0?void 0x0:_0xbec693[_0xd84912(0x1ca)])==_0xd84912(0x1b1)&&!fs[_0xd84912(0x1fb)](_0xb2514[_0xd84912(0x1de)]['dirs'][_0x334ca3][_0xd84912(0x1ca)])&&(fs[_0xd84912(0x1c0)](_0xb2514[_0xd84912(0x1de)][_0xd84912(0x1dc)][_0x334ca3][_0xd84912(0x1ca)],{'recursive':!![]}),console[_0xd84912(0x1bc)](_0xd84912(0x1e8)+_0xb2514[_0xd84912(0x1de)][_0xd84912(0x1dc)][_0x334ca3][_0xd84912(0x1ca)]));}((_0x1c438f=_0xb2514===null||_0xb2514===void 0x0?void 0x0:_0xb2514[_0xd84912(0x1f1)])===null||_0x1c438f===void 0x0?void 0x0:_0x1c438f[_0xd84912(0x1e3)])&&!fs[_0xd84912(0x1fb)](_0xb2514[_0xd84912(0x1f1)]['tmpdir'])&&(fs[_0xd84912(0x1c0)](_0xb2514[_0xd84912(0x1f1)][_0xd84912(0x1e3)],{'recursive':!![]}),console[_0xd84912(0x1bc)](_0xd84912(0x1c4)+_0xb2514[_0xd84912(0x1f1)][_0xd84912(0x1e3)])),this['config']['addObject'](_0xb2514);}};__decorate([(0x0,core_1['App'])(),__metadata(a2_0x2cb5b9(0x1d0),Object)],CustomConfiguration[a2_0x2cb5b9(0x1c5)],'app',void 0x0),__decorate([(0x0,core_1[a2_0x2cb5b9(0x1a4)])(),__metadata('design:type',core_2[a2_0x2cb5b9(0x1b7)])],CustomConfiguration['prototype'],a2_0x2cb5b9(0x1af),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x2cb5b9(0x1d0),core_2['MidwayDecoratorService'])],CustomConfiguration[a2_0x2cb5b9(0x1c5)],a2_0x2cb5b9(0x1e2),void 0x0),__decorate([(0x0,core_1[a2_0x2cb5b9(0x1a4)])(),__metadata(a2_0x2cb5b9(0x1d0),core_2[a2_0x2cb5b9(0x1f9)])],CustomConfiguration['prototype'],a2_0x2cb5b9(0x1ec),void 0x0),__decorate([(0x0,core_1[a2_0x2cb5b9(0x1a4)])(),__metadata(a2_0x2cb5b9(0x1d0),core_2['MidwayEnvironmentService'])],CustomConfiguration['prototype'],a2_0x2cb5b9(0x1f3),void 0x0),__decorate([(0x0,core_1[a2_0x2cb5b9(0x1a4)])(),__metadata(a2_0x2cb5b9(0x1d0),ApiService_1[a2_0x2cb5b9(0x19a)])],CustomConfiguration[a2_0x2cb5b9(0x1c5)],a2_0x2cb5b9(0x19a),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x2cb5b9(0x1ef)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x2cb5b9(0x1da),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x2cb5b9(0x194)]=CustomConfiguration;
|
|
1
|
+
const a2_0x24056d=a2_0x58af;(function(_0x4c85f7,_0x21eaf9){const _0x3500ee=a2_0x58af,_0x5b7e88=_0x4c85f7();while(!![]){try{const _0x534c63=-parseInt(_0x3500ee(0x17f))/0x1*(-parseInt(_0x3500ee(0x170))/0x2)+parseInt(_0x3500ee(0x14b))/0x3+-parseInt(_0x3500ee(0x1ae))/0x4+-parseInt(_0x3500ee(0x1a4))/0x5*(-parseInt(_0x3500ee(0x1af))/0x6)+parseInt(_0x3500ee(0x1a2))/0x7+parseInt(_0x3500ee(0x15a))/0x8+-parseInt(_0x3500ee(0x1a9))/0x9*(parseInt(_0x3500ee(0x17a))/0xa);if(_0x534c63===_0x21eaf9)break;else _0x5b7e88['push'](_0x5b7e88['shift']());}catch(_0x1f40dd){_0x5b7e88['push'](_0x5b7e88['shift']());}}}(a2_0x4d13,0xa09f2));function a2_0x58af(_0x2f719f,_0x1cf6a7){const _0x37a5b6=a2_0x4d13();return a2_0x58af=function(_0x284691,_0x3a5215){_0x284691=_0x284691-0x141;let _0x4d1397=_0x37a5b6[_0x284691];return _0x4d1397;},a2_0x58af(_0x2f719f,_0x1cf6a7);}const a2_0x3a5215=(function(){let _0x42bfaa=!![];return function(_0x37d185,_0xf19bb){const _0x18e099=_0x42bfaa?function(){const _0x572d2e=a2_0x58af;if(_0xf19bb){const _0xe54a35=_0xf19bb[_0x572d2e(0x1a6)](_0x37d185,arguments);return _0xf19bb=null,_0xe54a35;}}:function(){};return _0x42bfaa=![],_0x18e099;};}()),a2_0x284691=a2_0x3a5215(this,function(){const _0x594b98=a2_0x58af;return a2_0x284691[_0x594b98(0x155)]()[_0x594b98(0x1b2)](_0x594b98(0x197))[_0x594b98(0x155)]()[_0x594b98(0x15c)](a2_0x284691)[_0x594b98(0x1b2)](_0x594b98(0x197));});a2_0x284691();'use strict';var __decorate=this&&this['__decorate']||function(_0x5b6f20,_0x5847be,_0x16d6a5,_0x17ee9f){const _0x33ae49=a2_0x58af;var _0x1ea038=arguments[_0x33ae49(0x17e)],_0x2ea6ce=_0x1ea038<0x3?_0x5847be:_0x17ee9f===null?_0x17ee9f=Object[_0x33ae49(0x1aa)](_0x5847be,_0x16d6a5):_0x17ee9f,_0x1c4266;if(typeof Reflect===_0x33ae49(0x16c)&&typeof Reflect[_0x33ae49(0x176)]===_0x33ae49(0x168))_0x2ea6ce=Reflect[_0x33ae49(0x176)](_0x5b6f20,_0x5847be,_0x16d6a5,_0x17ee9f);else{for(var _0x5b4ec2=_0x5b6f20[_0x33ae49(0x17e)]-0x1;_0x5b4ec2>=0x0;_0x5b4ec2--)if(_0x1c4266=_0x5b6f20[_0x5b4ec2])_0x2ea6ce=(_0x1ea038<0x3?_0x1c4266(_0x2ea6ce):_0x1ea038>0x3?_0x1c4266(_0x5847be,_0x16d6a5,_0x2ea6ce):_0x1c4266(_0x5847be,_0x16d6a5))||_0x2ea6ce;}return _0x1ea038>0x3&&_0x2ea6ce&&Object[_0x33ae49(0x156)](_0x5847be,_0x16d6a5,_0x2ea6ce),_0x2ea6ce;},__metadata=this&&this['__metadata']||function(_0x34f65b,_0x10b2a6){const _0x2f9c73=a2_0x58af;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x2f9c73(0x168))return Reflect['metadata'](_0x34f65b,_0x10b2a6);};Object[a2_0x24056d(0x156)](exports,'__esModule',{'value':!![]}),exports[a2_0x24056d(0x1ab)]=void 0x0;const core_1=require(a2_0x24056d(0x148)),core_2=require(a2_0x24056d(0x148)),ApiError_1=require('./exception/ApiError'),ApiService_1=require(a2_0x24056d(0x15b)),action_1=require(a2_0x24056d(0x172)),intercept_1=require(a2_0x24056d(0x19d)),fs=require('fs'),koasend=require(a2_0x24056d(0x142)),koa=require(a2_0x24056d(0x1ac)),i18n=require(a2_0x24056d(0x164)),upload=require('@midwayjs/upload'),staticFile=require(a2_0x24056d(0x1b3)),crossDomain=require(a2_0x24056d(0x1a5)),ConfigDefault=require(a2_0x24056d(0x18b)),ConfigProduction=require(a2_0x24056d(0x17b)),anncic=require('@anncic-api/core'),anncicCache=require('@anncic-api/cache'),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x24056d(0x157)),anncicValidator=require(a2_0x24056d(0x160)),anncicHelper=require(a2_0x24056d(0x15d));function a2_0x4d13(){const _0x19b065=['koa-send','INTERCEPT_KEY','/apps','getAsync','isClass','method','@midwayjs/core','mkdirSync','proceed','557277UcKBoK','config','_matchedRoute','handler','devices','headers','getBaseDir','checksign','keys','dirs','toString','defineProperty','@anncic-api/typeorm','metadata','staticFile','3593680XPysTo','./service/ApiService','constructor','anncic-apihelper','defineProperties','-log','@anncic-api/validator','statSync','context','apimit','@midwayjs/i18n','intercept','getConfiguration','prototype','function','handlerActionRoute','body','environment','object','undefined','midwayLogger','device','168042XdwjTE','MidwayEnvironmentService','./types/action','match','attachment','anncicapi','decorate','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','checkConfigKeys','loggerConfig','80SGpxWU','./config/config.production','clients','onReady','length','11QFYuWn','/apps/','ACTION_ROUTE_KEY','design:type','filterConfig','dir','upload','hanlderApplications','toLowerCase','key','.log','string','./config/config.default','/runtime','isDirectory','Anncic-api\x20static-file\x20:\x20mkdir\x20','REQUEST_OBJ_CTX_KEY','getApplications','app','ApiService','request','application','getAppDir','HEADERS_SIGNATURE','(((.+)+)+)+$','registerMethodHandler','isDevelopmentEnvironment','log','App','MidwayApplicationManager','./types/intercept','defaultsDeep','isString','addObject','/runtime/apps-','6674773AnqQcH','DEFAULT','5FFQsGW','@midwayjs/cross-domain','apply','MidwayDecoratorService','MidwayConfigService','1662597CkdKdM','getOwnPropertyDescriptor','CustomConfiguration','@midwayjs/koa','isArray','2330856CDAdEt','1234470ZIhZHW','existsSync','args','search','@midwayjs/static-file','koa','Types','target','getClassMetadata','input','tmpdir','bodyXml','文件不存在','isFunction'];a2_0x4d13=function(){return _0x19b065;};return a2_0x4d13();}let CustomConfiguration=class CustomConfiguration{async[a2_0x24056d(0x17d)](){const _0x33fa4c=a2_0x24056d;await this[_0x33fa4c(0x183)](),await this[_0x33fa4c(0x179)](),await this[_0x33fa4c(0x178)](),await this[_0x33fa4c(0x169)](),await this[_0x33fa4c(0x186)]();}async['checkConfigKeys'](){}async[a2_0x24056d(0x169)](){const _0x447d99=a2_0x24056d,_0x4ec4de=(0x0,core_1[_0x447d99(0x1b7)])(intercept_1[_0x447d99(0x143)],intercept_1['InterceptTargetTmp'])||{};this['decorator'][_0x447d99(0x198)](action_1[_0x447d99(0x181)],_0x4dbae0=>{const _0x30cd0d=_0x447d99,_0x2c14ea=_0x4dbae0[_0x30cd0d(0x158)];return{'before':async _0x1f3622=>{const _0x3bad21=_0x30cd0d;var _0x2f8e7b,_0x500b6d;const _0x58c2aa=(_0x2f8e7b=_0x1f3622===null||_0x1f3622===void 0x0?void 0x0:_0x1f3622[_0x3bad21(0x1b6)])===null||_0x2f8e7b===void 0x0?void 0x0:_0x2f8e7b[core_2[_0x3bad21(0x18f)]];if(_0x58c2aa&&(_0x2c14ea===null||_0x2c14ea===void 0x0?void 0x0:_0x2c14ea[_0x3bad21(0x163)])){if(!this[_0x3bad21(0x192)][_0x3bad21(0x152)]((_0x500b6d=_0x58c2aa===null||_0x58c2aa===void 0x0?void 0x0:_0x58c2aa[_0x3bad21(0x193)])===null||_0x500b6d===void 0x0?void 0x0:_0x500b6d[_0x3bad21(0x150)]))throw new AnnError(ApiError_1['ApiError'][_0x3bad21(0x196)]);}},'around':async _0x272ea3=>{const _0x2ece97=_0x30cd0d;var _0x3f527d,_0x323080,_0x57bed4;const _0x1e752a=(_0x3f527d=_0x272ea3===null||_0x272ea3===void 0x0?void 0x0:_0x272ea3['target'])===null||_0x3f527d===void 0x0?void 0x0:_0x3f527d[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x1e752a&&(_0x2c14ea===null||_0x2c14ea===void 0x0?void 0x0:_0x2c14ea[_0x2ece97(0x163)])&&((_0x2c14ea===null||_0x2c14ea===void 0x0?void 0x0:_0x2c14ea[_0x2ece97(0x165)])||typeof(_0x2c14ea===null||_0x2c14ea===void 0x0?void 0x0:_0x2c14ea[_0x2ece97(0x165)])==_0x2ece97(0x16d))){if(((_0x323080=_0x1e752a[_0x2ece97(0x150)])===null||_0x323080===void 0x0?void 0x0:_0x323080['device'])&&((_0x57bed4=_0x4ec4de===null||_0x4ec4de===void 0x0?void 0x0:_0x4ec4de[_0x1e752a[_0x2ece97(0x150)]['device']])===null||_0x57bed4===void 0x0?void 0x0:_0x57bed4[_0x2ece97(0x17e)])>0x0)for(const _0x5c0b28 of _0x4ec4de[_0x1e752a['headers'][_0x2ece97(0x16f)]]||[]){if(core_1[_0x2ece97(0x1b5)][_0x2ece97(0x146)](_0x5c0b28)){const _0x5ecd86=await _0x1e752a['requestContext'][_0x2ece97(0x145)](_0x5c0b28);typeof(_0x5ecd86===null||_0x5ecd86===void 0x0?void 0x0:_0x5ecd86[_0x2ece97(0x173)])==_0x2ece97(0x168)?await _0x5ecd86[_0x2ece97(0x173)](_0x1e752a,typeof(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x147)])==_0x2ece97(0x18a)&&(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x14d)])?_0x1e752a[_0x2ece97(0x147)]['toLowerCase']()+'@'+(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x14d)]):undefined,_0x2c14ea)&&await _0x5ecd86[_0x2ece97(0x14e)](_0x1e752a,typeof(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x147)])==_0x2ece97(0x18a)&&(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x14d)])?_0x1e752a[_0x2ece97(0x147)][_0x2ece97(0x187)]()+'@'+(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x14d)]):undefined,_0x2c14ea):await _0x5ecd86[_0x2ece97(0x14e)](_0x1e752a,typeof(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x147)])=='string'&&(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a['_matchedRoute'])?_0x1e752a[_0x2ece97(0x147)]['toLowerCase']()+'@'+(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a['_matchedRoute']):undefined,_0x2c14ea);}else core_1[_0x2ece97(0x1b5)][_0x2ece97(0x141)](_0x5c0b28)&&await _0x5c0b28(_0x1e752a,typeof(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x147)])==_0x2ece97(0x18a)&&(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a[_0x2ece97(0x14d)])?_0x1e752a['method']['toLowerCase']()+'@'+(_0x1e752a===null||_0x1e752a===void 0x0?void 0x0:_0x1e752a['_matchedRoute']):undefined,_0x2c14ea);}}return await _0x272ea3[_0x2ece97(0x14a)](..._0x272ea3[_0x2ece97(0x1b1)]);},'afterThrow':(_0x456b10,_0x49a638)=>{throw _0x49a638;}};});}async[a2_0x24056d(0x186)](){const _0x23b1af=a2_0x24056d;this[_0x23b1af(0x194)][_0x23b1af(0x190)]([_0x23b1af(0x1b4)])['forEach'](_0x480b10=>{const _0x5615bf=_0x23b1af;(_0x480b10===null||_0x480b10===void 0x0?void 0x0:_0x480b10[_0x5615bf(0x162)])&&Object[_0x5615bf(0x15e)](_0x480b10[_0x5615bf(0x162)],{'ok':{'value':function(_0x26abe0,_0x3828f2,_0x529e1e=0x0){return{'code':_0x529e1e,'data':_0x26abe0,'extra':_0x3828f2};}},'input':{'value':function(_0x6a8415,_0x789384){const _0x183f97=_0x5615bf;var _0x857cae;const _0x772995=lodash[_0x183f97(0x19e)]({},this[_0x183f97(0x193)][_0x183f97(0x16a)]||this['request'][((_0x857cae=config===null||config===void 0x0?void 0x0:config[_0x183f97(0x1ba)])===null||_0x857cae===void 0x0?void 0x0:_0x857cae[_0x183f97(0x188)])||_0x183f97(0x16a)]||{},this[_0x183f97(0x193)]['query']||{});return _0x6a8415?lodash['get'](_0x772995,_0x6a8415,_0x789384):_0x772995;}},'when':{'value':async function(_0x1ba56a,_0x19663a){const _0x527360=_0x5615bf,_0x1fef0d=this[_0x527360(0x1b8)](_0x1ba56a,null);if(!lodash['isNull'](_0x1fef0d))return await _0x19663a(_0x1fef0d);}},'only':{'value':function(_0x153bba){const _0x38cb49=_0x5615bf,_0x1bb22c={};for(let _0x322dd5=0x0;_0x322dd5<_0x153bba['length'];_0x322dd5++){lodash[_0x38cb49(0x1ad)](_0x153bba[_0x322dd5])&&_0x153bba[_0x322dd5][_0x38cb49(0x17e)]>0x0&&lodash[_0x38cb49(0x19f)](_0x153bba[_0x322dd5][0x0])&&(_0x1bb22c[_0x153bba[_0x322dd5][0x0]]=this[_0x38cb49(0x1b8)](_0x153bba[_0x322dd5][0x0],_0x153bba[_0x322dd5]['length']>0x1?_0x153bba[_0x322dd5][0x1]:null));}return _0x1bb22c;}},'koasend':{'value':function(_0x331f05,_0xdceb16){const _0x1a6440=_0x5615bf;if(!fs[_0x1a6440(0x1b0)](this[_0x1a6440(0x191)][_0x1a6440(0x195)]()+'/'+_0x331f05))return _0x1a6440(0x1bb);return this[_0x1a6440(0x174)](_0xdceb16||_0x331f05),koasend(this,_0x331f05);}}});});}async[a2_0x24056d(0x179)](){const _0x5befd9=a2_0x24056d;var _0x4319d3,_0xfb4965;if(fs['existsSync'](this['app'][_0x5befd9(0x151)]()+_0x5befd9(0x144))&&fs[_0x5befd9(0x161)](this['app']['getBaseDir']()+_0x5befd9(0x144))[_0x5befd9(0x18d)]()){const _0x198784=this[_0x5befd9(0x14c)][_0x5befd9(0x166)](),_0xae0756=((_0x4319d3=_0x198784===null||_0x198784===void 0x0?void 0x0:_0x198784[_0x5befd9(0x16e)])===null||_0x4319d3===void 0x0?void 0x0:_0x4319d3[_0x5befd9(0x17c)])||{};for(const _0x188760 of fs['readdirSync'](this[_0x5befd9(0x191)][_0x5befd9(0x151)]()+'/apps')){if(!fs[_0x5befd9(0x161)](this[_0x5befd9(0x191)]['getBaseDir']()+_0x5befd9(0x180)+_0x188760)[_0x5befd9(0x18d)]())continue;if(_0xae0756===null||_0xae0756===void 0x0?void 0x0:_0xae0756[_0x188760])continue;_0xae0756[_0x188760]=Object['assign']({},((_0xfb4965=_0x198784===null||_0x198784===void 0x0?void 0x0:_0x198784[_0x5befd9(0x16e)])===null||_0xfb4965===void 0x0?void 0x0:_0xfb4965['default'])||{'maxSize':'1m','dir':this['app'][_0x5befd9(0x195)]()+_0x5befd9(0x18c)},{'enableJSON':!![],'enableConsole':this[_0x5befd9(0x16b)][_0x5befd9(0x199)](),'fileLogName':_0x188760+_0x5befd9(0x189),'dir':this[_0x5befd9(0x191)][_0x5befd9(0x195)]()+_0x5befd9(0x1a1)+_0x188760+_0x5befd9(0x15f)});}Object['keys'](_0xae0756)[_0x5befd9(0x17e)]>0x0&&(!_0x198784[_0x5befd9(0x16e)]&&(_0x198784[_0x5befd9(0x16e)]={'default':{'maxSize':'1m','dir':this[_0x5befd9(0x191)][_0x5befd9(0x195)]()+'/runtime'}}),_0x198784[_0x5befd9(0x16e)][_0x5befd9(0x17c)]=_0xae0756),this[_0x5befd9(0x14c)][_0x5befd9(0x1a0)](_0x198784);}}async['filterConfig'](){const _0x57598d=a2_0x24056d;var _0x42f171,_0x52411a,_0x1e5bcc,_0x1129fb,_0x35765a,_0x400d4e;const _0x2a5dfd=this['config'][_0x57598d(0x166)]();((_0x52411a=(_0x42f171=_0x2a5dfd===null||_0x2a5dfd===void 0x0?void 0x0:_0x2a5dfd[_0x57598d(0x175)])===null||_0x42f171===void 0x0?void 0x0:_0x42f171[_0x57598d(0x14f)])===null||_0x52411a===void 0x0?void 0x0:_0x52411a[_0x57598d(0x1a3)])&&Object[_0x57598d(0x153)](_0x2a5dfd[_0x57598d(0x175)]['devices'])['length']>0x1&&delete _0x2a5dfd[_0x57598d(0x175)][_0x57598d(0x14f)]['DEFAULT'];if((_0x1e5bcc=_0x2a5dfd===null||_0x2a5dfd===void 0x0?void 0x0:_0x2a5dfd[_0x57598d(0x159)])===null||_0x1e5bcc===void 0x0?void 0x0:_0x1e5bcc[_0x57598d(0x154)])for(const _0x1f9f3e in _0x2a5dfd[_0x57598d(0x159)][_0x57598d(0x154)]){((_0x1129fb=_0x2a5dfd[_0x57598d(0x159)][_0x57598d(0x154)][_0x1f9f3e])===null||_0x1129fb===void 0x0?void 0x0:_0x1129fb[_0x57598d(0x184)])&&typeof((_0x35765a=_0x2a5dfd[_0x57598d(0x159)][_0x57598d(0x154)][_0x1f9f3e])===null||_0x35765a===void 0x0?void 0x0:_0x35765a[_0x57598d(0x184)])==_0x57598d(0x18a)&&!fs[_0x57598d(0x1b0)](_0x2a5dfd[_0x57598d(0x159)]['dirs'][_0x1f9f3e][_0x57598d(0x184)])&&(fs[_0x57598d(0x149)](_0x2a5dfd[_0x57598d(0x159)]['dirs'][_0x1f9f3e][_0x57598d(0x184)],{'recursive':!![]}),console[_0x57598d(0x19a)](_0x57598d(0x18e)+_0x2a5dfd[_0x57598d(0x159)][_0x57598d(0x154)][_0x1f9f3e]['dir']));}((_0x400d4e=_0x2a5dfd===null||_0x2a5dfd===void 0x0?void 0x0:_0x2a5dfd[_0x57598d(0x185)])===null||_0x400d4e===void 0x0?void 0x0:_0x400d4e['tmpdir'])&&!fs[_0x57598d(0x1b0)](_0x2a5dfd[_0x57598d(0x185)][_0x57598d(0x1b9)])&&(fs[_0x57598d(0x149)](_0x2a5dfd['upload']['tmpdir'],{'recursive':!![]}),console[_0x57598d(0x19a)](_0x57598d(0x177)+_0x2a5dfd['upload'][_0x57598d(0x1b9)])),this[_0x57598d(0x14c)]['addObject'](_0x2a5dfd);}};__decorate([(0x0,core_1[a2_0x24056d(0x19b)])(),__metadata(a2_0x24056d(0x182),Object)],CustomConfiguration[a2_0x24056d(0x167)],a2_0x24056d(0x191),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x24056d(0x182),core_2[a2_0x24056d(0x1a8)])],CustomConfiguration[a2_0x24056d(0x167)],a2_0x24056d(0x14c),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x24056d(0x182),core_2[a2_0x24056d(0x1a7)])],CustomConfiguration[a2_0x24056d(0x167)],'decorator',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x24056d(0x182),core_2[a2_0x24056d(0x19c)])],CustomConfiguration[a2_0x24056d(0x167)],a2_0x24056d(0x194),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x24056d(0x182),core_2[a2_0x24056d(0x171)])],CustomConfiguration[a2_0x24056d(0x167)],'environment',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x24056d(0x182),ApiService_1[a2_0x24056d(0x192)])],CustomConfiguration[a2_0x24056d(0x167)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':'anncic-api','conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x24056d(0x1ab)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x49f316=a3_0x4de1;(function(_0x1d1b4b,_0x27c646){const _0x26c799=a3_0x4de1,_0x51d5bd=_0x1d1b4b();while(!![]){try{const _0x2988ac=parseInt(_0x26c799(0x1c3))/0x1+parseInt(_0x26c799(0x188))/0x2*(-parseInt(_0x26c799(0x1b7))/0x3)+parseInt(_0x26c799(0x198))/0x4*(-parseInt(_0x26c799(0x1ad))/0x5)+-parseInt(_0x26c799(0x195))/0x6*(-parseInt(_0x26c799(0x197))/0x7)+parseInt(_0x26c799(0x180))/0x8+-parseInt(_0x26c799(0x1ac))/0x9+-parseInt(_0x26c799(0x18e))/0xa*(-parseInt(_0x26c799(0x17e))/0xb);if(_0x2988ac===_0x27c646)break;else _0x51d5bd['push'](_0x51d5bd['shift']());}catch(_0x419b4c){_0x51d5bd['push'](_0x51d5bd['shift']());}}}(a3_0x2dcc,0xd3e52));const a3_0x16bd9a=(function(){let _0x437131=!![];return function(_0x297c1b,_0xb86621){const _0x3d9360=_0x437131?function(){const _0x2ca269=a3_0x4de1;if(_0xb86621){const _0x231740=_0xb86621[_0x2ca269(0x1ba)](_0x297c1b,arguments);return _0xb86621=null,_0x231740;}}:function(){};return _0x437131=![],_0x3d9360;};}()),a3_0x20b50e=a3_0x16bd9a(this,function(){const _0x292ed4=a3_0x4de1;return a3_0x20b50e[_0x292ed4(0x1b3)]()[_0x292ed4(0x1af)](_0x292ed4(0x1b2))[_0x292ed4(0x1b3)]()[_0x292ed4(0x19a)](a3_0x20b50e)[_0x292ed4(0x1af)](_0x292ed4(0x1b2));});a3_0x20b50e();'use strict';Object['defineProperty'](exports,a3_0x49f316(0x1a2),{'value':!![]}),exports[a3_0x49f316(0x1b9)]=exports[a3_0x49f316(0x19c)]=exports[a3_0x49f316(0x1c0)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x49f316(0x196)),core_1=require('@midwayjs/core'),core_2=require(a3_0x49f316(0x1a1)),action_1=require(a3_0x49f316(0x185));function Action(_0x1f32d5,_0x38b093,_0x459531={'middleware':[],'sensitive':!![]}){return _0x1236c6=>{const _0x2fda8a=a3_0x4de1;var _0x33af8f;_0x459531[_0x2fda8a(0x1bf)]=_0x38b093;const _0x148c96=parseRoute(_0x1f32d5);if(_0x148c96[_0x2fda8a(0x1be)]){_0x459531[_0x2fda8a(0x1a6)]=_0x459531[_0x2fda8a(0x1a6)]?'/'+_0x148c96[_0x2fda8a(0x1be)]+'/'+_0x459531['prefix']:'/'+_0x148c96[_0x2fda8a(0x19e)];_0x148c96[_0x2fda8a(0x1a6)]&&(_0x459531[_0x2fda8a(0x1a6)]='/'+_0x148c96[_0x2fda8a(0x1a6)]+'/'+_0x459531['prefix']);if(fs[_0x2fda8a(0x199)](_0x148c96[_0x2fda8a(0x18f)]+_0x2fda8a(0x1b1)+_0x148c96[_0x2fda8a(0x1be)]+_0x2fda8a(0x19d)+(lodash['endsWith'](_0x148c96[_0x2fda8a(0x1aa)],'ts')?'ts':'js'))){const _0x415823=include(_0x148c96[_0x2fda8a(0x18f)]+'/apps/'+_0x148c96[_0x2fda8a(0x1be)]+_0x2fda8a(0x19d)+(lodash[_0x2fda8a(0x1c4)](_0x148c96[_0x2fda8a(0x1aa)],'ts')?'ts':'js'));if(_0x415823[_0x2fda8a(0x1bc)]&&lodash[_0x2fda8a(0x181)](_0x415823['middleware'])&&_0x415823[_0x2fda8a(0x1bc)]['length']>0x0)for(let _0x180546 in _0x415823[_0x2fda8a(0x1bc)]){if(((_0x33af8f=_0x415823===null||_0x415823===void 0x0?void 0x0:_0x415823[_0x2fda8a(0x1c5)])===null||_0x33af8f===void 0x0?void 0x0:_0x33af8f[_0x2fda8a(0x1a7)])>0x0&&_0x415823[_0x2fda8a(0x1c5)][_0x2fda8a(0x1c8)](_0x415823[_0x2fda8a(0x1bc)][_0x180546])!=-0x1)continue;_0x459531[_0x2fda8a(0x1bc)][_0x2fda8a(0x18b)](_0x415823[_0x2fda8a(0x1bc)][_0x180546]);}const _0x35b5da=(0x0,core_1[_0x2fda8a(0x191)])(action_1[_0x2fda8a(0x182)],action_1[_0x2fda8a(0x1a3)])||{};_0x35b5da[''+_0x148c96[_0x2fda8a(0x1be)]]=_0x415823,(0x0,core_1[_0x2fda8a(0x1a5)])(action_1[_0x2fda8a(0x182)],_0x35b5da,action_1[_0x2fda8a(0x1a3)]);}_0x459531[_0x2fda8a(0x1a6)]=_0x459531[_0x2fda8a(0x1a6)][_0x2fda8a(0x1a8)]()['replace'](/\/{2,}/g,'/'),(0x0,core_1[_0x2fda8a(0x1b5)])(action_1[_0x2fda8a(0x1b8)],_0x1236c6),(0x0,core_1[_0x2fda8a(0x192)])(_0x459531[_0x2fda8a(0x1a6)],_0x459531)(_0x1236c6),(0x0,core_1[_0x2fda8a(0x1a5)])(action_1[_0x2fda8a(0x1b8)],{'prefix':_0x459531[_0x2fda8a(0x1a6)],'pprefix':_0x148c96['prefix'],'module':_0x148c96[_0x2fda8a(0x1be)],'filepath':_0x148c96[_0x2fda8a(0x1aa)],'routerOptions':_0x459531},_0x1236c6);}else _0x459531['prefix']=_0x459531[_0x2fda8a(0x1a6)]?'/'+_0x459531['prefix']:'/'+_0x148c96['route'],_0x148c96[_0x2fda8a(0x1a6)]&&(_0x459531[_0x2fda8a(0x1a6)]='/'+_0x148c96[_0x2fda8a(0x1a6)]+'/'+_0x459531['prefix']),_0x459531[_0x2fda8a(0x1a6)]=_0x459531[_0x2fda8a(0x1a6)]['toLowerCase']()['replace'](/\/{2,}/g,'/'),(0x0,core_1[_0x2fda8a(0x1b5)])(action_1['ACTION_KEY'],_0x1236c6),(0x0,core_1[_0x2fda8a(0x192)])(_0x459531['prefix'],_0x459531)(_0x1236c6),(0x0,core_1[_0x2fda8a(0x1a5)])(action_1[_0x2fda8a(0x1b8)],{'prefix':_0x459531[_0x2fda8a(0x1a6)],'module':_0x148c96[_0x2fda8a(0x1be)],'pprefix':_0x148c96['prefix'],'filepath':_0x148c96[_0x2fda8a(0x1aa)],'routerOptions':_0x459531},_0x1236c6);};}function a3_0x2dcc(){const _0x539267=['middleware','intercept','module','tagName','Action','splice','validationOptions','332280GGoGgk','endsWith','middlewareIgnore','basic/controller/','ACTION_ROUTE_KEY','indexOf','apps/','validate','startsWith','apimit','description','742544NiviIQ','match','13130144CBwvON','isArray','APPSCONFIG_KEY','/controller/','createCustomMethodDecorator','../types/action','undefined','RequestMapping','704126ObJrmJ','app/controller/','post','push','routerName','cwd','110LKoZNN','rootpath','join','getClassMetadata','Controller','substring','assign','30IthUnn','@anncic-api/validator','1243942TsZuOv','136KuZEiH','existsSync','constructor','/controller/文件下','ActionApi','/config.','route','\x20文件请放在apps/','replace','@midwayjs/core','__esModule','AppsConfigTmp','-controller','saveClassMetadata','prefix','length','toLowerCase','attachClassMetadata','filepath','trim','9212130frDYli','44835pnSTWm','filter','search','string','/apps/','(((.+)+)+)+$','toString','get','saveModule','Validator','12ovGTIj','ACTION_KEY','parseRoute','apply','split'];a3_0x2dcc=function(){return _0x539267;};return a3_0x2dcc();}function a3_0x4de1(_0x25a2dd,_0x4a180e){const _0x3d3f1a=a3_0x2dcc();return a3_0x4de1=function(_0x20b50e,_0x16bd9a){_0x20b50e=_0x20b50e-0x17a;let _0x2dcc42=_0x3d3f1a[_0x20b50e];return _0x2dcc42;},a3_0x4de1(_0x25a2dd,_0x4a180e);}exports[a3_0x49f316(0x1c0)]=Action,Action['get']=function(_0x15e4f8,_0x1cd5cf='/',_0x49b879={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x183a16,_0x17e3b3,_0x44a4c0)=>{const _0x2218b8=a3_0x4de1;ActionApi(_0x15e4f8,_0x2218b8(0x1b4),_0x1cd5cf,_0x49b879)(_0x183a16,_0x17e3b3,_0x44a4c0);};},Action[a3_0x49f316(0x18a)]=function(_0x314200,_0xda55b5='/',_0x3253b7={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x43018d,_0x2dbab2,_0x704e0c)=>{const _0x18b754=a3_0x4de1;ActionApi(_0x314200,_0x18b754(0x18a),_0xda55b5,_0x3253b7)(_0x43018d,_0x2dbab2,_0x704e0c);};};function ActionApi(_0x1f46a2,_0x22b54b=a3_0x49f316(0x1b4),_0x1936a8='/',_0x27326b={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2581c7,_0x545c2d,_0x29bdfb)=>{const _0x59ae53=a3_0x4de1;var _0x581a16,_0x4b92d6,_0x8db6e1;!_0x27326b[_0x59ae53(0x1bc)]&&(_0x27326b['middleware']=[]);!((_0x581a16=_0x27326b===null||_0x27326b===void 0x0?void 0x0:_0x27326b[_0x59ae53(0x17a)])===null||_0x581a16===void 0x0?void 0x0:_0x581a16[_0x59ae53(0x1c2)])&&(_0x27326b[_0x59ae53(0x17a)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':'string'}});if(!_0x1936a8)_0x1936a8='/';else typeof _0x1936a8==_0x59ae53(0x1b0)&&(!_0x1936a8[_0x59ae53(0x17b)]('/')&&!_0x1936a8[_0x59ae53(0x17b)]('-')&&(_0x1936a8='/'+_0x1936a8));typeof _0x27326b['apimit']==_0x59ae53(0x186)&&(_0x27326b['apimit']=!![]);if(((_0x4b92d6=_0x27326b===null||_0x27326b===void 0x0?void 0x0:_0x27326b[_0x59ae53(0x1bc)])===null||_0x4b92d6===void 0x0?void 0x0:_0x4b92d6['length'])>0x0&&((_0x8db6e1=_0x27326b===null||_0x27326b===void 0x0?void 0x0:_0x27326b[_0x59ae53(0x1c5)])===null||_0x8db6e1===void 0x0?void 0x0:_0x8db6e1[_0x59ae53(0x1a7)])>0x0)for(let _0x151b63 in _0x27326b[_0x59ae53(0x1bc)]){_0x27326b[_0x59ae53(0x1c5)][_0x59ae53(0x1c8)](_0x27326b[_0x59ae53(0x1bc)][_0x151b63])!==-0x1&&(_0x27326b['middleware'][_0x151b63]=null);}_0x27326b[_0x59ae53(0x18c)]=_0x1f46a2,(0x0,validator_1[_0x59ae53(0x1b6)])(_0x27326b['validate'])(_0x2581c7,_0x545c2d,_0x29bdfb),(0x0,core_2[_0x59ae53(0x187)])(Object[_0x59ae53(0x194)](_0x27326b,{'path':_0x1936a8,'requestMethod':(_0x22b54b||_0x59ae53(0x1b4))[_0x59ae53(0x1a8)]()}))(_0x2581c7,_0x545c2d,_0x29bdfb),(0x0,core_2[_0x59ae53(0x1a9)])(action_1[_0x59ae53(0x1c7)],{'path':_0x1936a8,'method':_0x545c2d,'apimit':_0x27326b[_0x59ae53(0x17c)],'intercept':_0x27326b[_0x59ae53(0x1bd)],'routerName':_0x27326b[_0x59ae53(0x18c)],'description':_0x27326b['description'],'middleware':(_0x27326b[_0x59ae53(0x1bc)]||[])['filter'](_0x1bbfc3=>!!_0x1bbfc3),'requestMethod':(_0x22b54b||_0x59ae53(0x1b4))[_0x59ae53(0x1a8)]()},_0x2581c7),(0x0,core_2[_0x59ae53(0x184)])(action_1[_0x59ae53(0x1c7)],{'path':_0x1936a8,'method':_0x545c2d,'apimit':_0x27326b[_0x59ae53(0x17c)],'intercept':_0x27326b[_0x59ae53(0x1bd)],'routerName':_0x27326b['routerName'],'description':_0x27326b[_0x59ae53(0x17d)],'middleware':(_0x27326b[_0x59ae53(0x1bc)]||[])[_0x59ae53(0x1ae)](_0x57b7c0=>!!_0x57b7c0),'requestMethod':(_0x22b54b||'get')[_0x59ae53(0x1a8)]()})(_0x2581c7,_0x545c2d,_0x29bdfb);};}exports[a3_0x49f316(0x19c)]=ActionApi;function parseRoute(_0x551d59){const _0x132d93=a3_0x49f316;_0x551d59=_0x551d59[_0x132d93(0x1a0)](/(\\|\/)/g,'/');const _0x536a06=process[_0x132d93(0x18d)]()[_0x132d93(0x1a0)](/(\\|\/)/g,'/'),_0x42cede=_0x551d59[_0x132d93(0x193)](0x0,_0x536a06[_0x132d93(0x1a7)]+_0x551d59[_0x132d93(0x193)](_0x536a06[_0x132d93(0x1a7)]+0x1)[_0x132d93(0x1c8)]('/')+0x1),_0x1509f8=_0x551d59[_0x132d93(0x193)](_0x42cede['length']+0x1)[_0x132d93(0x1a0)](/(\\|\/)/g,'/'),_0x2fa342={'route':'','prefix':![],'module':![],'rootpath':_0x42cede,'filepath':_0x1509f8};if(_0x1509f8[_0x132d93(0x17b)](_0x132d93(0x189))||_0x1509f8['startsWith'](_0x132d93(0x1c6))){const _0x3213b8=_0x1509f8[_0x132d93(0x193)]((_0x1509f8[_0x132d93(0x17b)](_0x132d93(0x189))?_0x132d93(0x189):_0x132d93(0x1c6))[_0x132d93(0x1a7)])[_0x132d93(0x1bb)]('/')[_0x132d93(0x1ae)](_0x58181e=>_0x58181e&&_0x58181e[_0x132d93(0x1ab)]());return _0x3213b8[_0x132d93(0x1a7)]>0x1&&(_0x2fa342[_0x132d93(0x1a6)]=_0x3213b8[0x0][_0x132d93(0x1a8)](),_0x3213b8[_0x132d93(0x1c1)](0x0,0x1)),_0x2fa342['route']=('/'+_0x3213b8[_0x132d93(0x190)]('/'))[_0x132d93(0x1a0)](/(\.ts|\.js)$/,'')[_0x132d93(0x1a0)](/\/{2,}/g,'/')[_0x132d93(0x17f)](/[\/|A-Z]*[^A-Z]+/g)[_0x132d93(0x190)]('-')[_0x132d93(0x1a8)]()[_0x132d93(0x1a0)](/\/\-/g,'/'),_0x2fa342['route'][_0x132d93(0x1c4)]('-action')&&(_0x2fa342['route']=_0x2fa342['route'][_0x132d93(0x193)](0x0,_0x2fa342[_0x132d93(0x19e)][_0x132d93(0x1a7)]-0x7)),_0x2fa342[_0x132d93(0x19e)]['endsWith'](_0x132d93(0x1a4))&&(_0x2fa342[_0x132d93(0x19e)]=_0x2fa342['route'][_0x132d93(0x193)](0x0,_0x2fa342[_0x132d93(0x19e)][_0x132d93(0x1a7)]-0xb)),_0x2fa342;}else{if(_0x1509f8[_0x132d93(0x17b)]('apps/')){const _0x3f7a1f=_0x1509f8[_0x132d93(0x193)](0x0,_0x1509f8[_0x132d93(0x1c8)](_0x132d93(0x1b1))+0x5),_0x11c34d=_0x1509f8[_0x132d93(0x193)](_0x3f7a1f['length']+0x1)[_0x132d93(0x1a0)](/(\\|\/)/g,'/')['split']('/')[0x0];if(_0x1509f8[_0x132d93(0x17b)](_0x132d93(0x1c9)+_0x11c34d+_0x132d93(0x183))){const _0x5c46d6=_0x1509f8[_0x132d93(0x193)]((_0x3f7a1f+'/'+_0x11c34d+_0x132d93(0x183))['length'])['split']('/')[_0x132d93(0x1ae)](_0x19e39b=>_0x19e39b&&_0x19e39b['trim']());return _0x5c46d6[_0x132d93(0x1a7)]>0x1&&(_0x2fa342[_0x132d93(0x1a6)]=_0x5c46d6[0x0][_0x132d93(0x1a8)](),_0x5c46d6[_0x132d93(0x1c1)](0x0,0x1)),_0x2fa342[_0x132d93(0x1be)]=_0x11c34d,_0x2fa342[_0x132d93(0x19e)]=('/'+_0x11c34d+'/'+_0x5c46d6[_0x132d93(0x190)]('/'))[_0x132d93(0x1a0)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x132d93(0x190)]('-')[_0x132d93(0x1a8)]()[_0x132d93(0x1a0)](/\/\-/g,'/'),_0x2fa342[_0x132d93(0x19e)]['endsWith']('-action')&&(_0x2fa342[_0x132d93(0x19e)]=_0x2fa342['route'][_0x132d93(0x193)](0x0,_0x2fa342['route'][_0x132d93(0x1a7)]-0x7)),_0x2fa342[_0x132d93(0x19e)][_0x132d93(0x1c4)](_0x132d93(0x1a4))&&(_0x2fa342[_0x132d93(0x19e)]=_0x2fa342[_0x132d93(0x19e)][_0x132d93(0x193)](0x0,_0x2fa342[_0x132d93(0x19e)][_0x132d93(0x1a7)]-0xb)),_0x2fa342;}throw new Error(_0x1509f8+_0x132d93(0x19f)+_0x11c34d+_0x132d93(0x19b));}}throw new Error(_0x1509f8+'\x20文件请放在app/controller/文件下');}exports[a3_0x49f316(0x1b9)]=parseRoute;
|
|
1
|
+
const a3_0x1e15ed=a3_0x5f41;(function(_0x3b5284,_0x58ec87){const _0x14ebc9=a3_0x5f41,_0x3dca34=_0x3b5284();while(!![]){try{const _0x48efc9=-parseInt(_0x14ebc9(0x161))/0x1*(-parseInt(_0x14ebc9(0x167))/0x2)+-parseInt(_0x14ebc9(0x147))/0x3*(parseInt(_0x14ebc9(0x141))/0x4)+-parseInt(_0x14ebc9(0x164))/0x5+parseInt(_0x14ebc9(0x130))/0x6*(parseInt(_0x14ebc9(0x153))/0x7)+parseInt(_0x14ebc9(0x16b))/0x8+parseInt(_0x14ebc9(0x12c))/0x9+-parseInt(_0x14ebc9(0x154))/0xa;if(_0x48efc9===_0x58ec87)break;else _0x3dca34['push'](_0x3dca34['shift']());}catch(_0x1493a4){_0x3dca34['push'](_0x3dca34['shift']());}}}(a3_0x546e,0x2c95d));const a3_0x25dfe3=(function(){let _0x3b834f=!![];return function(_0x3e0ee0,_0xdf6801){const _0x4f9df2=_0x3b834f?function(){if(_0xdf6801){const _0x4e1b6e=_0xdf6801['apply'](_0x3e0ee0,arguments);return _0xdf6801=null,_0x4e1b6e;}}:function(){};return _0x3b834f=![],_0x4f9df2;};}()),a3_0x5ed1cb=a3_0x25dfe3(this,function(){const _0x428201=a3_0x5f41;return a3_0x5ed1cb[_0x428201(0x152)]()[_0x428201(0x13e)](_0x428201(0x157))[_0x428201(0x152)]()['constructor'](a3_0x5ed1cb)[_0x428201(0x13e)](_0x428201(0x157));});a3_0x5ed1cb();function a3_0x5f41(_0xec766,_0x2c7b3e){const _0x1696eb=a3_0x546e();return a3_0x5f41=function(_0x5ed1cb,_0x25dfe3){_0x5ed1cb=_0x5ed1cb-0x12b;let _0x546eff=_0x1696eb[_0x5ed1cb];return _0x546eff;},a3_0x5f41(_0xec766,_0x2c7b3e);}'use strict';function a3_0x546e(){const _0x160cca=['post','defineProperty','/apps/','replace','Controller','129bHBaRW','/controller/文件下','intercept','ActionApi','ACTION_ROUTE_KEY','startsWith','indexOf','@anncic-api/validator','middlewareIgnore','module','saveClassMetadata','toString','119154msGIjf','5753430NzUYWJ','-action','toLowerCase','(((.+)+)+)+$','push','filter','APPSCONFIG_KEY','/controller/','description','split','splice','get','endsWith','52YEVcpy','app/controller/','validate','502790VhrEDf','getClassMetadata','rootpath','8584DafYgu','basic/controller/','saveModule','parseRoute','2787088qwzMLR','filepath','createCustomMethodDecorator','/config.','@midwayjs/core','string','routerName','__esModule','join','tagName','1828512SMbLjX','cwd','-controller','apps/','66earBkq','../types/action','prefix','isArray','match','trim','ACTION_KEY','length','existsSync','middleware','attachClassMetadata','apimit','\x20文件请放在app/controller/文件下','Action','search','substring','route','9624LsGvhC'];a3_0x546e=function(){return _0x160cca;};return a3_0x546e();}Object[a3_0x1e15ed(0x143)](exports,a3_0x1e15ed(0x172),{'value':!![]}),exports[a3_0x1e15ed(0x16a)]=exports[a3_0x1e15ed(0x14a)]=exports[a3_0x1e15ed(0x13d)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x1e15ed(0x14e)),core_1=require(a3_0x1e15ed(0x16f)),core_2=require(a3_0x1e15ed(0x16f)),action_1=require(a3_0x1e15ed(0x131));function Action(_0x51a253,_0x22f6c6,_0x20a3a7={'middleware':[],'sensitive':!![]}){return _0x55ffc4=>{const _0x35c31b=a3_0x5f41;var _0x2f399c;_0x20a3a7[_0x35c31b(0x12b)]=_0x22f6c6;const _0x8a2af6=parseRoute(_0x51a253);if(_0x8a2af6[_0x35c31b(0x150)]){_0x20a3a7[_0x35c31b(0x132)]=_0x20a3a7[_0x35c31b(0x132)]?'/'+_0x8a2af6[_0x35c31b(0x150)]+'/'+_0x20a3a7[_0x35c31b(0x132)]:'/'+_0x8a2af6[_0x35c31b(0x140)];_0x8a2af6['prefix']&&(_0x20a3a7[_0x35c31b(0x132)]='/'+_0x8a2af6[_0x35c31b(0x132)]+'/'+_0x20a3a7[_0x35c31b(0x132)]);if(fs[_0x35c31b(0x138)](_0x8a2af6[_0x35c31b(0x166)]+_0x35c31b(0x144)+_0x8a2af6[_0x35c31b(0x150)]+_0x35c31b(0x16e)+(lodash['endsWith'](_0x8a2af6[_0x35c31b(0x16c)],'ts')?'ts':'js'))){const _0x13eba6=include(_0x8a2af6['rootpath']+_0x35c31b(0x144)+_0x8a2af6['module']+_0x35c31b(0x16e)+(lodash[_0x35c31b(0x160)](_0x8a2af6[_0x35c31b(0x16c)],'ts')?'ts':'js'));if(_0x13eba6[_0x35c31b(0x139)]&&lodash[_0x35c31b(0x133)](_0x13eba6[_0x35c31b(0x139)])&&_0x13eba6['middleware'][_0x35c31b(0x137)]>0x0)for(let _0x38d906 in _0x13eba6[_0x35c31b(0x139)]){if(((_0x2f399c=_0x13eba6===null||_0x13eba6===void 0x0?void 0x0:_0x13eba6['middlewareIgnore'])===null||_0x2f399c===void 0x0?void 0x0:_0x2f399c[_0x35c31b(0x137)])>0x0&&_0x13eba6[_0x35c31b(0x14f)][_0x35c31b(0x14d)](_0x13eba6[_0x35c31b(0x139)][_0x38d906])!=-0x1)continue;_0x20a3a7[_0x35c31b(0x139)][_0x35c31b(0x158)](_0x13eba6[_0x35c31b(0x139)][_0x38d906]);}const _0x4f812e=(0x0,core_1[_0x35c31b(0x165)])(action_1[_0x35c31b(0x15a)],action_1['AppsConfigTmp'])||{};_0x4f812e[''+_0x8a2af6[_0x35c31b(0x150)]]=_0x13eba6,(0x0,core_1[_0x35c31b(0x151)])(action_1[_0x35c31b(0x15a)],_0x4f812e,action_1['AppsConfigTmp']);}_0x20a3a7[_0x35c31b(0x132)]=_0x20a3a7[_0x35c31b(0x132)]['toLowerCase']()[_0x35c31b(0x145)](/\/{2,}/g,'/'),(0x0,core_1[_0x35c31b(0x169)])(action_1['ACTION_KEY'],_0x55ffc4),(0x0,core_1['Controller'])(_0x20a3a7[_0x35c31b(0x132)],_0x20a3a7)(_0x55ffc4),(0x0,core_1['saveClassMetadata'])(action_1[_0x35c31b(0x136)],{'prefix':_0x20a3a7[_0x35c31b(0x132)],'pprefix':_0x8a2af6['prefix'],'module':_0x8a2af6['module'],'filepath':_0x8a2af6[_0x35c31b(0x16c)],'routerOptions':_0x20a3a7},_0x55ffc4);}else _0x20a3a7[_0x35c31b(0x132)]=_0x20a3a7[_0x35c31b(0x132)]?'/'+_0x20a3a7['prefix']:'/'+_0x8a2af6[_0x35c31b(0x140)],_0x8a2af6['prefix']&&(_0x20a3a7[_0x35c31b(0x132)]='/'+_0x8a2af6[_0x35c31b(0x132)]+'/'+_0x20a3a7[_0x35c31b(0x132)]),_0x20a3a7['prefix']=_0x20a3a7[_0x35c31b(0x132)][_0x35c31b(0x156)]()['replace'](/\/{2,}/g,'/'),(0x0,core_1[_0x35c31b(0x169)])(action_1[_0x35c31b(0x136)],_0x55ffc4),(0x0,core_1[_0x35c31b(0x146)])(_0x20a3a7[_0x35c31b(0x132)],_0x20a3a7)(_0x55ffc4),(0x0,core_1[_0x35c31b(0x151)])(action_1[_0x35c31b(0x136)],{'prefix':_0x20a3a7[_0x35c31b(0x132)],'module':_0x8a2af6[_0x35c31b(0x150)],'pprefix':_0x8a2af6[_0x35c31b(0x132)],'filepath':_0x8a2af6[_0x35c31b(0x16c)],'routerOptions':_0x20a3a7},_0x55ffc4);};}exports['Action']=Action,Action[a3_0x1e15ed(0x15f)]=function(_0x241c86,_0x2c6f52='/',_0x16179a={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x4c2d6c,_0x135d6d,_0x31d660)=>{const _0x4147b4=a3_0x5f41;ActionApi(_0x241c86,_0x4147b4(0x15f),_0x2c6f52,_0x16179a)(_0x4c2d6c,_0x135d6d,_0x31d660);};},Action['post']=function(_0x110f75,_0x5b5c50='/',_0x1598fc={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x44ae6f,_0x1f6fac,_0x4ee951)=>{const _0x3706e3=a3_0x5f41;ActionApi(_0x110f75,_0x3706e3(0x142),_0x5b5c50,_0x1598fc)(_0x44ae6f,_0x1f6fac,_0x4ee951);};};function ActionApi(_0x1b2d2f,_0x1ab761=a3_0x1e15ed(0x15f),_0x17f769='/',_0x465a5d={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x53fb47,_0x42c3ab,_0x151308)=>{const _0x34d0ec=a3_0x5f41;var _0x5bf286,_0x39c8d1,_0x48fe7b;!_0x465a5d[_0x34d0ec(0x139)]&&(_0x465a5d[_0x34d0ec(0x139)]=[]);!((_0x5bf286=_0x465a5d===null||_0x465a5d===void 0x0?void 0x0:_0x465a5d[_0x34d0ec(0x163)])===null||_0x5bf286===void 0x0?void 0x0:_0x5bf286['validationOptions'])&&(_0x465a5d[_0x34d0ec(0x163)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x34d0ec(0x170)}});if(!_0x17f769)_0x17f769='/';else typeof _0x17f769==_0x34d0ec(0x170)&&(!_0x17f769[_0x34d0ec(0x14c)]('/')&&!_0x17f769['startsWith']('-')&&(_0x17f769='/'+_0x17f769));typeof _0x465a5d[_0x34d0ec(0x13b)]=='undefined'&&(_0x465a5d[_0x34d0ec(0x13b)]=!![]);if(((_0x39c8d1=_0x465a5d===null||_0x465a5d===void 0x0?void 0x0:_0x465a5d[_0x34d0ec(0x139)])===null||_0x39c8d1===void 0x0?void 0x0:_0x39c8d1[_0x34d0ec(0x137)])>0x0&&((_0x48fe7b=_0x465a5d===null||_0x465a5d===void 0x0?void 0x0:_0x465a5d['middlewareIgnore'])===null||_0x48fe7b===void 0x0?void 0x0:_0x48fe7b[_0x34d0ec(0x137)])>0x0)for(let _0x548803 in _0x465a5d[_0x34d0ec(0x139)]){_0x465a5d[_0x34d0ec(0x14f)][_0x34d0ec(0x14d)](_0x465a5d[_0x34d0ec(0x139)][_0x548803])!==-0x1&&(_0x465a5d[_0x34d0ec(0x139)][_0x548803]=null);}_0x465a5d[_0x34d0ec(0x171)]=_0x1b2d2f,(0x0,validator_1['Validator'])(_0x465a5d[_0x34d0ec(0x163)])(_0x53fb47,_0x42c3ab,_0x151308),(0x0,core_2['RequestMapping'])(Object['assign'](_0x465a5d,{'path':_0x17f769,'requestMethod':(_0x1ab761||_0x34d0ec(0x15f))[_0x34d0ec(0x156)]()}))(_0x53fb47,_0x42c3ab,_0x151308),(0x0,core_2[_0x34d0ec(0x13a)])(action_1[_0x34d0ec(0x14b)],{'path':_0x17f769,'method':_0x42c3ab,'apimit':_0x465a5d[_0x34d0ec(0x13b)],'intercept':_0x465a5d[_0x34d0ec(0x149)],'routerName':_0x465a5d['routerName'],'description':_0x465a5d[_0x34d0ec(0x15c)],'middleware':(_0x465a5d[_0x34d0ec(0x139)]||[])[_0x34d0ec(0x159)](_0xb00778=>!!_0xb00778),'requestMethod':(_0x1ab761||_0x34d0ec(0x15f))[_0x34d0ec(0x156)]()},_0x53fb47),(0x0,core_2[_0x34d0ec(0x16d)])(action_1[_0x34d0ec(0x14b)],{'path':_0x17f769,'method':_0x42c3ab,'apimit':_0x465a5d[_0x34d0ec(0x13b)],'intercept':_0x465a5d[_0x34d0ec(0x149)],'routerName':_0x465a5d[_0x34d0ec(0x171)],'description':_0x465a5d[_0x34d0ec(0x15c)],'middleware':(_0x465a5d[_0x34d0ec(0x139)]||[])[_0x34d0ec(0x159)](_0x3e1786=>!!_0x3e1786),'requestMethod':(_0x1ab761||_0x34d0ec(0x15f))['toLowerCase']()})(_0x53fb47,_0x42c3ab,_0x151308);};}exports[a3_0x1e15ed(0x14a)]=ActionApi;function parseRoute(_0x13833b){const _0x390e9e=a3_0x1e15ed;_0x13833b=_0x13833b[_0x390e9e(0x145)](/(\\|\/)/g,'/');const _0x1768dd=process[_0x390e9e(0x12d)]()[_0x390e9e(0x145)](/(\\|\/)/g,'/'),_0x2952fa=_0x13833b[_0x390e9e(0x13f)](0x0,_0x1768dd[_0x390e9e(0x137)]+_0x13833b[_0x390e9e(0x13f)](_0x1768dd[_0x390e9e(0x137)]+0x1)[_0x390e9e(0x14d)]('/')+0x1),_0x41b4da=_0x13833b[_0x390e9e(0x13f)](_0x2952fa[_0x390e9e(0x137)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x1e2218={'route':'','prefix':![],'module':![],'rootpath':_0x2952fa,'filepath':_0x41b4da};if(_0x41b4da['startsWith'](_0x390e9e(0x162))||_0x41b4da[_0x390e9e(0x14c)](_0x390e9e(0x168))){const _0x398ef6=_0x41b4da[_0x390e9e(0x13f)]((_0x41b4da[_0x390e9e(0x14c)]('app/controller/')?'app/controller/':'basic/controller/')[_0x390e9e(0x137)])[_0x390e9e(0x15d)]('/')[_0x390e9e(0x159)](_0x28d6ad=>_0x28d6ad&&_0x28d6ad[_0x390e9e(0x135)]());return _0x398ef6[_0x390e9e(0x137)]>0x1&&(_0x1e2218['prefix']=_0x398ef6[0x0][_0x390e9e(0x156)](),_0x398ef6[_0x390e9e(0x15e)](0x0,0x1)),_0x1e2218[_0x390e9e(0x140)]=('/'+_0x398ef6[_0x390e9e(0x173)]('/'))['replace'](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0x390e9e(0x134)](/[\/|A-Z]*[^A-Z]+/g)[_0x390e9e(0x173)]('-')[_0x390e9e(0x156)]()[_0x390e9e(0x145)](/\/\-/g,'/'),_0x1e2218['route']['endsWith']('-action')&&(_0x1e2218[_0x390e9e(0x140)]=_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x13f)](0x0,_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x137)]-0x7)),_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x160)](_0x390e9e(0x12e))&&(_0x1e2218[_0x390e9e(0x140)]=_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x13f)](0x0,_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x137)]-0xb)),_0x1e2218;}else{if(_0x41b4da['startsWith'](_0x390e9e(0x12f))){const _0x24486b=_0x41b4da[_0x390e9e(0x13f)](0x0,_0x41b4da['indexOf']('/apps/')+0x5),_0x3428d0=_0x41b4da[_0x390e9e(0x13f)](_0x24486b['length']+0x1)[_0x390e9e(0x145)](/(\\|\/)/g,'/')[_0x390e9e(0x15d)]('/')[0x0];if(_0x41b4da[_0x390e9e(0x14c)](_0x390e9e(0x12f)+_0x3428d0+_0x390e9e(0x15b))){const _0x6b5c3d=_0x41b4da[_0x390e9e(0x13f)]((_0x24486b+'/'+_0x3428d0+_0x390e9e(0x15b))[_0x390e9e(0x137)])['split']('/')[_0x390e9e(0x159)](_0x48e269=>_0x48e269&&_0x48e269[_0x390e9e(0x135)]());return _0x6b5c3d['length']>0x1&&(_0x1e2218['prefix']=_0x6b5c3d[0x0][_0x390e9e(0x156)](),_0x6b5c3d[_0x390e9e(0x15e)](0x0,0x1)),_0x1e2218[_0x390e9e(0x150)]=_0x3428d0,_0x1e2218[_0x390e9e(0x140)]=('/'+_0x3428d0+'/'+_0x6b5c3d['join']('/'))['replace'](/(\.ts|\.js)$/,'')[_0x390e9e(0x145)](/\/{2,}/g,'/')[_0x390e9e(0x134)](/[\/|A-Z]*[^A-Z]+/g)[_0x390e9e(0x173)]('-')[_0x390e9e(0x156)]()['replace'](/\/\-/g,'/'),_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x160)](_0x390e9e(0x155))&&(_0x1e2218['route']=_0x1e2218['route'][_0x390e9e(0x13f)](0x0,_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x137)]-0x7)),_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x160)](_0x390e9e(0x12e))&&(_0x1e2218['route']=_0x1e2218[_0x390e9e(0x140)][_0x390e9e(0x13f)](0x0,_0x1e2218['route'][_0x390e9e(0x137)]-0xb)),_0x1e2218;}throw new Error(_0x41b4da+'\x20文件请放在apps/'+_0x3428d0+_0x390e9e(0x148));}}throw new Error(_0x41b4da+_0x390e9e(0x13c));}exports['parseRoute']=parseRoute;
|