anncic-api 1.1.12 → 1.1.15
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/exception/ApiError.js +1 -1
- package/dist/helper/getAppsConfig.d.ts +3 -0
- package/dist/helper/getAppsConfig.js +1 -0
- package/dist/helper/getRoutes.js +1 -1
- package/dist/index.d.ts +3 -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.d.ts +3 -0
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/index.d.ts +9 -4
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a0_0x202c6f=a0_0x58d1;(function(_0x59f6c2,_0x496ea1){var _0x1ca5af=a0_0x58d1,_0x406412=_0x59f6c2();while(!![]){try{var _0x5d2576=parseInt(_0x1ca5af(0x137))/0x1+-parseInt(_0x1ca5af(0x13e))/0x2*(-parseInt(_0x1ca5af(0x13b))/0x3)+-parseInt(_0x1ca5af(0x145))/0x4*(-parseInt(_0x1ca5af(0x139))/0x5)+parseInt(_0x1ca5af(0x142))/0x6*(parseInt(_0x1ca5af(0x13a))/0x7)+-parseInt(_0x1ca5af(0x13d))/0x8+parseInt(_0x1ca5af(0x147))/0x9*(parseInt(_0x1ca5af(0x144))/0xa)+-parseInt(_0x1ca5af(0x13f))/0xb;if(_0x5d2576===_0x496ea1)break;else _0x406412['push'](_0x406412['shift']());}catch(_0x75f0b6){_0x406412['push'](_0x406412['shift']());}}}(a0_0x1d4f,0xb3045));function a0_0x58d1(_0x58650e,_0x6e2d61){var _0x1d4fa7=a0_0x1d4f();return a0_0x58d1=function(_0x58d1d1,_0x379cf9){_0x58d1d1=_0x58d1d1-0x137;var _0x5fc9b2=_0x1d4fa7[_0x58d1d1];return _0x5fc9b2;},a0_0x58d1(_0x58650e,_0x6e2d61);}Object[a0_0x202c6f(0x141)](exports,a0_0x202c6f(0x146),{'value':!![]}),exports[a0_0x202c6f(0x148)]=_0xc8ef21=>{var _0x307023=a0_0x202c6f;return{'apitest':!![],'keys':_0xc8ef21[_0x307023(0x143)],'anncicapi':{'timeout':0x1388,'password':_0x307023(0x140),'devices':{'DEFAULT':{'secret':'dhauo1234420123gg3234901','checkcode':_0x307023(0x13c)}}},'upload':{'tmpdir':_0xc8ef21['appDir']+_0x307023(0x138),'cleanTimeout':0x5265c00}};};function a0_0x1d4f(){var _0x1e5684=['343KyuXgW','47991QDVqGh','dhauo1234420123gg3234901','10703712WiJDXu','102QjVeVy','23312311vzhNWR','zhiulanuiy7892387985hnoi','defineProperty','136092nXfppp','name','2670iuojCd','8192cuEYvq','__esModule','32067RffZrY','default','967868CUGLHO','/runtime/.upload','840WmQrIy'];a0_0x1d4f=function(){return _0x1e5684;};return a0_0x1d4f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a1_0x5985(_0x3ec99f,_0x2d9107){var _0x2189dd=a1_0x2189();return a1_0x5985=function(_0x59858e,_0x126c51){_0x59858e=_0x59858e-0x154;var _0x270d1a=_0x2189dd[_0x59858e];return _0x270d1a;},a1_0x5985(_0x3ec99f,_0x2d9107);}var a1_0x29f704=a1_0x5985;function a1_0x2189(){var _0x2109a8=['__esModule','6lalcfr','22xOgtpl','1351065BIYmKg','17436cUYPBf','defineProperty','144aAqGNb','541352YkVZcf','12823chKdmd','9023778YzaTqH','149136TcYTXC','747410OluZxL','33DilsKS'];a1_0x2189=function(){return _0x2109a8;};return a1_0x2189();}(function(_0x54e8cc,_0x4ca6b1){var _0x5ef9c2=a1_0x5985,_0x576c50=_0x54e8cc();while(!![]){try{var _0x17eeb0=-parseInt(_0x5ef9c2(0x157))/0x1*(parseInt(_0x5ef9c2(0x155))/0x2)+-parseInt(_0x5ef9c2(0x15b))/0x3*(parseInt(_0x5ef9c2(0x160))/0x4)+-parseInt(_0x5ef9c2(0x15f))/0x5*(-parseInt(_0x5ef9c2(0x15d))/0x6)+parseInt(_0x5ef9c2(0x156))/0x7+parseInt(_0x5ef9c2(0x159))/0x8+parseInt(_0x5ef9c2(0x158))/0x9+parseInt(_0x5ef9c2(0x15a))/0xa*(parseInt(_0x5ef9c2(0x15e))/0xb);if(_0x17eeb0===_0x4ca6b1)break;else _0x576c50['push'](_0x576c50['shift']());}catch(_0x5a3d0a){_0x576c50['push'](_0x576c50['shift']());}}}(a1_0x2189,0x85926));Object[a1_0x29f704(0x154)](exports,a1_0x29f704(0x15c),{'value':!![]}),exports['default']={'apitest':![],'anncicapi':{'timeout':0x1388}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a2_0x528e(_0x5b6c49,_0x488f26){const _0x3d8156=a2_0x3d81();return a2_0x528e=function(_0x528ec5,_0x5aaddd){_0x528ec5=_0x528ec5-0x1cb;let _0x40eb0c=_0x3d8156[_0x528ec5];return _0x40eb0c;},a2_0x528e(_0x5b6c49,_0x488f26);}const a2_0x2f11ec=a2_0x528e;(function(_0x13b791,_0x148011){const _0x275ea0=a2_0x528e,_0x3c6754=_0x13b791();while(!![]){try{const _0x36d3ab=parseInt(_0x275ea0(0x1dc))/0x1+-parseInt(_0x275ea0(0x1d4))/0x2+-parseInt(_0x275ea0(0x214))/0x3*(parseInt(_0x275ea0(0x211))/0x4)+parseInt(_0x275ea0(0x1e2))/0x5+parseInt(_0x275ea0(0x1d1))/0x6+-parseInt(_0x275ea0(0x21a))/0x7*(-parseInt(_0x275ea0(0x201))/0x8)+-parseInt(_0x275ea0(0x216))/0x9;if(_0x36d3ab===_0x148011)break;else _0x3c6754['push'](_0x3c6754['shift']());}catch(_0x3557f7){_0x3c6754['push'](_0x3c6754['shift']());}}}(a2_0x3d81,0x5c2bb));var __decorate=this&&this[a2_0x2f11ec(0x1cc)]||function(_0x12ce0e,_0x54e22a,_0x39f702,_0x24f624){const _0x9c50a5=a2_0x2f11ec;var _0x3e5afa=arguments[_0x9c50a5(0x20c)],_0x2c1f09=_0x3e5afa<0x3?_0x54e22a:_0x24f624===null?_0x24f624=Object[_0x9c50a5(0x210)](_0x54e22a,_0x39f702):_0x24f624,_0x38fe62;if(typeof Reflect===_0x9c50a5(0x21f)&&typeof Reflect[_0x9c50a5(0x1cb)]===_0x9c50a5(0x20f))_0x2c1f09=Reflect[_0x9c50a5(0x1cb)](_0x12ce0e,_0x54e22a,_0x39f702,_0x24f624);else{for(var _0x6b8828=_0x12ce0e['length']-0x1;_0x6b8828>=0x0;_0x6b8828--)if(_0x38fe62=_0x12ce0e[_0x6b8828])_0x2c1f09=(_0x3e5afa<0x3?_0x38fe62(_0x2c1f09):_0x3e5afa>0x3?_0x38fe62(_0x54e22a,_0x39f702,_0x2c1f09):_0x38fe62(_0x54e22a,_0x39f702))||_0x2c1f09;}return _0x3e5afa>0x3&&_0x2c1f09&&Object['defineProperty'](_0x54e22a,_0x39f702,_0x2c1f09),_0x2c1f09;},__metadata=this&&this[a2_0x2f11ec(0x209)]||function(_0x15aacf,_0x1d5363){const _0x32c200=a2_0x2f11ec;if(typeof Reflect===_0x32c200(0x21f)&&typeof Reflect['metadata']===_0x32c200(0x20f))return Reflect[_0x32c200(0x202)](_0x15aacf,_0x1d5363);};Object[a2_0x2f11ec(0x1d3)](exports,a2_0x2f11ec(0x228),{'value':!![]}),exports[a2_0x2f11ec(0x1fb)]=void 0x0;function a2_0x3d81(){const _0x557275=['prototype','./exception/ApiError','object','anncicapi','upload','staticFile','MidwayConfigService','@midwayjs/task','@midwayjs/core','@midwayjs/static-file','isString','__esModule','checkConfigKeys','decorate','__decorate','input','forEach','devices','design:type','3764742DEqmvM','HEADERS_SIGNATURE','defineProperty','588526wCBFOv','context','environment','@midwayjs/i18n','ApiError','beforeRoute','dir','@anncic-api/event','272763agVOMK','query','addObject','ACTION_ROUTE_KEY','headers','apimit','468065xvMKCq','bodyParser','bodyXml','checksign','@midwayjs/cross-domain','dirs','mkdirSync','key','getApplications','application','isArray','@midwayjs/decorator','body','./service/ApiService','./config/config.default','onReady','@anncic-api/typeorm','keys','registerMethodHandler','existsSync','string','Inject','anncic-api','@anncic-api/validator','handlerActionRoute','CustomConfiguration','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','@midwayjs/koa','@midwayjs/upload','config','request','159912xLCOLM','metadata','useMiddleware','koa-xml-body','filterConfig','target','ApiService','get','__metadata','log','DEFAULT','length','Anncic-api\x20static-file\x20:\x20mkdir\x20','anncic-apihelper','function','getOwnPropertyDescriptor','395656rthLxI','hanlderApplications','REQUEST_OBJ_CTX_KEY','3QpBelT','decorator','3987036bGixgB','@anncic-api/core','device','tmpdir','77oCaonB','Configuration','getConfiguration'];a2_0x3d81=function(){return _0x557275;};return a2_0x3d81();}const decorator_1=require(a2_0x2f11ec(0x1ed)),core_1=require(a2_0x2f11ec(0x225)),ApiError_1=require(a2_0x2f11ec(0x21e)),ApiService_1=require(a2_0x2f11ec(0x1ef)),action_1=require('./types/action'),fs=require('fs'),koa=require(a2_0x2f11ec(0x1fd)),i18n=require(a2_0x2f11ec(0x1d7)),task=require(a2_0x2f11ec(0x224)),upload=require(a2_0x2f11ec(0x1fe)),staticFile=require(a2_0x2f11ec(0x226)),crossDomain=require(a2_0x2f11ec(0x1e6)),bodyXml=require(a2_0x2f11ec(0x204)),bodyParser=require('koa-bodyparser'),ConfigDefault=require(a2_0x2f11ec(0x1f0)),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x2f11ec(0x217)),anncicEvent=require(a2_0x2f11ec(0x1db)),anncicTypeorm=require(a2_0x2f11ec(0x1f2)),anncicValidator=require(a2_0x2f11ec(0x1f9)),anncicHelper=require(a2_0x2f11ec(0x20e));let CustomConfiguration=class CustomConfiguration{async[a2_0x2f11ec(0x1f1)](){const _0xffeced=a2_0x2f11ec;await this['filterConfig'](),await this[_0xffeced(0x229)](),await this[_0xffeced(0x1fa)](),await this[_0xffeced(0x212)]();}async['checkConfigKeys'](){}async[a2_0x2f11ec(0x1fa)](){const _0x2cde71=a2_0x2f11ec,_0x63361c=this['config'][_0x2cde71(0x21c)]();this[_0x2cde71(0x215)][_0x2cde71(0x1f4)](action_1[_0x2cde71(0x1df)],_0x2570fd=>{const _0x23c5bb=_0x2cde71,_0x46b30b=_0x2570fd[_0x23c5bb(0x202)];return{'before':async _0x43cd7c=>{const _0x44d4a5=_0x23c5bb;var _0x950410,_0xe26e16,_0x3df5c0,_0x526ab3,_0xef94ad;const _0x22f926=(_0x950410=_0x43cd7c===null||_0x43cd7c===void 0x0?void 0x0:_0x43cd7c[_0x44d4a5(0x206)])===null||_0x950410===void 0x0?void 0x0:_0x950410[core_1[_0x44d4a5(0x213)]];if(_0x22f926){if((_0x46b30b===null||_0x46b30b===void 0x0?void 0x0:_0x46b30b[_0x44d4a5(0x1e1)])&&!this['ApiService'][_0x44d4a5(0x1e5)]((_0xe26e16=_0x22f926===null||_0x22f926===void 0x0?void 0x0:_0x22f926['request'])===null||_0xe26e16===void 0x0?void 0x0:_0xe26e16[_0x44d4a5(0x1e0)]))throw new AnnError(ApiError_1[_0x44d4a5(0x1d8)][_0x44d4a5(0x1d2)]);((_0x3df5c0=_0x22f926[_0x44d4a5(0x1e0)])===null||_0x3df5c0===void 0x0?void 0x0:_0x3df5c0[_0x44d4a5(0x218)])&&((_0xef94ad=(_0x526ab3=_0x63361c===null||_0x63361c===void 0x0?void 0x0:_0x63361c[_0x44d4a5(0x220)])===null||_0x526ab3===void 0x0?void 0x0:_0x526ab3[_0x44d4a5(0x1cf)])===null||_0xef94ad===void 0x0?void 0x0:_0xef94ad[_0x22f926[_0x44d4a5(0x1e0)][_0x44d4a5(0x218)]])&&(typeof _0x63361c[_0x44d4a5(0x220)][_0x44d4a5(0x1cf)][_0x22f926[_0x44d4a5(0x1e0)]['device']][_0x44d4a5(0x1d9)]==_0x44d4a5(0x20f)&&await _0x63361c['anncicapi'][_0x44d4a5(0x1cf)][_0x22f926[_0x44d4a5(0x1e0)][_0x44d4a5(0x218)]][_0x44d4a5(0x1d9)]((_0x22f926===null||_0x22f926===void 0x0?void 0x0:_0x22f926['_matchedRoute'])||undefined,_0x46b30b,_0x22f926));}},'afterThrow':(_0x5d3f8a,_0xa4fde9)=>{throw _0xa4fde9;}};});}async[a2_0x2f11ec(0x212)](){const _0x18a56e=a2_0x2f11ec;this['application'][_0x18a56e(0x1ea)](['koa'])[_0x18a56e(0x1ce)](_0x118f35=>{const _0x457d3a=_0x18a56e;_0x118f35[_0x457d3a(0x203)](bodyXml(this['config'][_0x457d3a(0x21c)](_0x457d3a(0x1e4)))),_0x118f35[_0x457d3a(0x203)](bodyParser(this[_0x457d3a(0x1ff)][_0x457d3a(0x21c)](_0x457d3a(0x1e3)))),(_0x118f35===null||_0x118f35===void 0x0?void 0x0:_0x118f35['context'])&&Object['defineProperties'](_0x118f35[_0x457d3a(0x1d5)],{'ok':{'value':function(_0x57eea4,_0x562a77,_0x5bbde9=0x0){return{'code':_0x5bbde9,'data':_0x57eea4,'extra':_0x562a77};}},'err':{'value':function(_0x54730e,_0x58c7e6,_0x592e50=0x1){return{'code':_0x592e50,'extra':_0x58c7e6,'msg':_0x54730e};}},'input':{'value':function(_0x34f478,_0x535648){const _0xcbd1d0=_0x457d3a;var _0x432fd6;const _0x579d3b=lodash['defaultsDeep']({},this['request'][_0xcbd1d0(0x1ee)]||this[_0xcbd1d0(0x200)][((_0x432fd6=config===null||config===void 0x0?void 0x0:config[_0xcbd1d0(0x1e4)])===null||_0x432fd6===void 0x0?void 0x0:_0x432fd6[_0xcbd1d0(0x1e9)])||_0xcbd1d0(0x1ee)]||{},this[_0xcbd1d0(0x200)][_0xcbd1d0(0x1dd)]||{});return _0x34f478?lodash[_0xcbd1d0(0x208)](_0x579d3b,_0x34f478,_0x535648):_0x579d3b;}},'when':{'value':async function(_0x579237,_0x5161a0){const _0xea54ba=_0x457d3a,_0x54b774=this[_0xea54ba(0x1cd)](_0x579237,null);if(!lodash['isNull'](_0x54b774))return await _0x5161a0(_0x54b774);}},'only':{'value':function(_0x42cd60){const _0x46140a=_0x457d3a,_0x1cdc74={};for(let _0x9ec2d6=0x0;_0x9ec2d6<_0x42cd60[_0x46140a(0x20c)];_0x9ec2d6++){lodash[_0x46140a(0x1ec)](_0x42cd60[_0x9ec2d6])&&_0x42cd60[_0x9ec2d6]['length']>0x0&&lodash[_0x46140a(0x227)](_0x42cd60[_0x9ec2d6][0x0])&&(_0x1cdc74[_0x42cd60[_0x9ec2d6][0x0]]=this[_0x46140a(0x1cd)](_0x42cd60[_0x9ec2d6][0x0],_0x42cd60[_0x9ec2d6][_0x46140a(0x20c)]>0x1?_0x42cd60[_0x9ec2d6][0x1]:null));}return _0x1cdc74;}}});});}async[a2_0x2f11ec(0x205)](){const _0x460735=a2_0x2f11ec;var _0x1666db,_0x2d725d,_0x35df69,_0x443415,_0x221e2d,_0x27ab24;const _0x4522b7=this[_0x460735(0x1ff)][_0x460735(0x21c)]();((_0x2d725d=(_0x1666db=_0x4522b7===null||_0x4522b7===void 0x0?void 0x0:_0x4522b7['anncicapi'])===null||_0x1666db===void 0x0?void 0x0:_0x1666db[_0x460735(0x1cf)])===null||_0x2d725d===void 0x0?void 0x0:_0x2d725d[_0x460735(0x20b)])&&Object[_0x460735(0x1f3)](_0x4522b7[_0x460735(0x220)]['devices'])[_0x460735(0x20c)]>0x1&&delete _0x4522b7[_0x460735(0x220)][_0x460735(0x1cf)][_0x460735(0x20b)];if((_0x35df69=_0x4522b7===null||_0x4522b7===void 0x0?void 0x0:_0x4522b7[_0x460735(0x222)])===null||_0x35df69===void 0x0?void 0x0:_0x35df69[_0x460735(0x1e7)])for(const _0x1daae7 in _0x4522b7['staticFile'][_0x460735(0x1e7)]){((_0x443415=_0x4522b7[_0x460735(0x222)][_0x460735(0x1e7)][_0x1daae7])===null||_0x443415===void 0x0?void 0x0:_0x443415['dir'])&&typeof((_0x221e2d=_0x4522b7[_0x460735(0x222)][_0x460735(0x1e7)][_0x1daae7])===null||_0x221e2d===void 0x0?void 0x0:_0x221e2d[_0x460735(0x1da)])==_0x460735(0x1f6)&&!fs[_0x460735(0x1f5)](_0x4522b7['staticFile'][_0x460735(0x1e7)][_0x1daae7][_0x460735(0x1da)])&&(fs[_0x460735(0x1e8)](_0x4522b7[_0x460735(0x222)][_0x460735(0x1e7)][_0x1daae7][_0x460735(0x1da)],{'recursive':!![]}),console[_0x460735(0x20a)](_0x460735(0x20d)+_0x4522b7[_0x460735(0x222)][_0x460735(0x1e7)][_0x1daae7][_0x460735(0x1da)]));}((_0x27ab24=_0x4522b7===null||_0x4522b7===void 0x0?void 0x0:_0x4522b7[_0x460735(0x221)])===null||_0x27ab24===void 0x0?void 0x0:_0x27ab24[_0x460735(0x219)])&&!fs[_0x460735(0x1f5)](_0x4522b7['upload']['tmpdir'])&&(fs[_0x460735(0x1e8)](_0x4522b7['upload'][_0x460735(0x219)],{'recursive':!![]}),console[_0x460735(0x20a)](_0x460735(0x1fc)+_0x4522b7[_0x460735(0x221)]['tmpdir'])),this[_0x460735(0x1ff)][_0x460735(0x1de)](_0x4522b7);}};__decorate([(0x0,decorator_1[a2_0x2f11ec(0x1f7)])(),__metadata('design:type',core_1[a2_0x2f11ec(0x223)])],CustomConfiguration[a2_0x2f11ec(0x21d)],'config',void 0x0),__decorate([(0x0,decorator_1[a2_0x2f11ec(0x1f7)])(),__metadata('design:type',core_1['MidwayDecoratorService'])],CustomConfiguration[a2_0x2f11ec(0x21d)],'decorator',void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x2f11ec(0x1d0),core_1['MidwayApplicationManager'])],CustomConfiguration[a2_0x2f11ec(0x21d)],a2_0x2f11ec(0x1eb),void 0x0),__decorate([(0x0,decorator_1[a2_0x2f11ec(0x1f7)])(),__metadata('design:type',core_1['MidwayEnvironmentService'])],CustomConfiguration['prototype'],a2_0x2f11ec(0x1d6),void 0x0),__decorate([(0x0,decorator_1[a2_0x2f11ec(0x1f7)])(),__metadata('design:type',ApiService_1[a2_0x2f11ec(0x207)])],CustomConfiguration[a2_0x2f11ec(0x21d)],a2_0x2f11ec(0x207),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x2f11ec(0x21b)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x2f11ec(0x1f8),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x2f11ec(0x1fb)]=CustomConfiguration;
|
|
1
|
+
'use strict';const a2_0xc6c3f2=a2_0x3833;(function(_0x2a9ba3,_0x40f191){const _0x223134=a2_0x3833,_0x1ce171=_0x2a9ba3();while(!![]){try{const _0x244110=-parseInt(_0x223134(0x71))/0x1+parseInt(_0x223134(0x9d))/0x2*(parseInt(_0x223134(0x6b))/0x3)+parseInt(_0x223134(0x92))/0x4+parseInt(_0x223134(0x81))/0x5*(-parseInt(_0x223134(0xbb))/0x6)+parseInt(_0x223134(0x8d))/0x7+-parseInt(_0x223134(0xb0))/0x8+parseInt(_0x223134(0xb1))/0x9;if(_0x244110===_0x40f191)break;else _0x1ce171['push'](_0x1ce171['shift']());}catch(_0x6609eb){_0x1ce171['push'](_0x1ce171['shift']());}}}(a2_0x40e3,0x7ea06));function a2_0x3833(_0x1e0ec6,_0x118610){const _0x40e33a=a2_0x40e3();return a2_0x3833=function(_0x383313,_0x22f953){_0x383313=_0x383313-0x6b;let _0xb417ba=_0x40e33a[_0x383313];return _0xb417ba;},a2_0x3833(_0x1e0ec6,_0x118610);}var __decorate=this&&this['__decorate']||function(_0x5cf662,_0x1eef20,_0x30ddad,_0x30565c){const _0x1acc46=a2_0x3833;var _0x264cab=arguments[_0x1acc46(0xbd)],_0x5dcd58=_0x264cab<0x3?_0x1eef20:_0x30565c===null?_0x30565c=Object[_0x1acc46(0xba)](_0x1eef20,_0x30ddad):_0x30565c,_0x5320ba;if(typeof Reflect===_0x1acc46(0xa2)&&typeof Reflect[_0x1acc46(0x75)]===_0x1acc46(0x85))_0x5dcd58=Reflect[_0x1acc46(0x75)](_0x5cf662,_0x1eef20,_0x30ddad,_0x30565c);else{for(var _0x1c312d=_0x5cf662[_0x1acc46(0xbd)]-0x1;_0x1c312d>=0x0;_0x1c312d--)if(_0x5320ba=_0x5cf662[_0x1c312d])_0x5dcd58=(_0x264cab<0x3?_0x5320ba(_0x5dcd58):_0x264cab>0x3?_0x5320ba(_0x1eef20,_0x30ddad,_0x5dcd58):_0x5320ba(_0x1eef20,_0x30ddad))||_0x5dcd58;}return _0x264cab>0x3&&_0x5dcd58&&Object[_0x1acc46(0xc6)](_0x1eef20,_0x30ddad,_0x5dcd58),_0x5dcd58;},__metadata=this&&this[a2_0xc6c3f2(0x82)]||function(_0x5f5094,_0x46c3b2){const _0x3434c8=a2_0xc6c3f2;if(typeof Reflect===_0x3434c8(0xa2)&&typeof Reflect['metadata']==='function')return Reflect[_0x3434c8(0xa1)](_0x5f5094,_0x46c3b2);};Object[a2_0xc6c3f2(0xc6)](exports,a2_0xc6c3f2(0x86),{'value':!![]}),exports[a2_0xc6c3f2(0xbf)]=void 0x0;const decorator_1=require(a2_0xc6c3f2(0x79)),core_1=require(a2_0xc6c3f2(0x6f)),ApiError_1=require(a2_0xc6c3f2(0x91)),ApiService_1=require(a2_0xc6c3f2(0xbe)),action_1=require('./types/action'),fs=require('fs'),koa=require(a2_0xc6c3f2(0x80)),i18n=require('@midwayjs/i18n'),task=require(a2_0xc6c3f2(0xb3)),upload=require(a2_0xc6c3f2(0x9e)),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0xc6c3f2(0x97)),bodyXml=require(a2_0xc6c3f2(0xb6)),bodyParser=require(a2_0xc6c3f2(0xb9)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0xc6c3f2(0x9b)),anncic=require(a2_0xc6c3f2(0xc4)),anncicEvent=require(a2_0xc6c3f2(0x8a)),anncicTypeorm=require(a2_0xc6c3f2(0x76)),anncicValidator=require(a2_0xc6c3f2(0xc1)),anncicHelper=require(a2_0xc6c3f2(0xa7));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x5b368b=a2_0xc6c3f2;await this['filterConfig'](),await this[_0x5b368b(0xac)](),await this['handlerActionRoute'](),await this[_0x5b368b(0x96)]();}async['checkConfigKeys'](){}async[a2_0xc6c3f2(0xa5)](){const _0x38798d=a2_0xc6c3f2,_0x51c7b1=this[_0x38798d(0x94)][_0x38798d(0x88)]();this[_0x38798d(0x6d)][_0x38798d(0xb4)](action_1[_0x38798d(0x83)],_0x268d18=>{const _0x25102b=_0x268d18['metadata'];return{'before':async _0x23e4fc=>{const _0x46ba31=a2_0x3833;var _0x4c5a4f,_0x1c6069,_0x374dc3,_0x3f1588,_0xd5a573;const _0x1ddd30=(_0x4c5a4f=_0x23e4fc===null||_0x23e4fc===void 0x0?void 0x0:_0x23e4fc['target'])===null||_0x4c5a4f===void 0x0?void 0x0:_0x4c5a4f[core_1[_0x46ba31(0x74)]];if(_0x1ddd30){if((_0x25102b===null||_0x25102b===void 0x0?void 0x0:_0x25102b[_0x46ba31(0x84)])&&!this['ApiService'][_0x46ba31(0x77)]((_0x1c6069=_0x1ddd30===null||_0x1ddd30===void 0x0?void 0x0:_0x1ddd30[_0x46ba31(0x9f)])===null||_0x1c6069===void 0x0?void 0x0:_0x1c6069[_0x46ba31(0xc2)]))throw new AnnError(ApiError_1[_0x46ba31(0x8b)][_0x46ba31(0x87)]);((_0x374dc3=_0x1ddd30[_0x46ba31(0xc2)])===null||_0x374dc3===void 0x0?void 0x0:_0x374dc3[_0x46ba31(0xa4)])&&((_0xd5a573=(_0x3f1588=_0x51c7b1===null||_0x51c7b1===void 0x0?void 0x0:_0x51c7b1[_0x46ba31(0x95)])===null||_0x3f1588===void 0x0?void 0x0:_0x3f1588[_0x46ba31(0xaa)])===null||_0xd5a573===void 0x0?void 0x0:_0xd5a573[_0x1ddd30[_0x46ba31(0xc2)][_0x46ba31(0xa4)]])&&(typeof _0x51c7b1[_0x46ba31(0x95)][_0x46ba31(0xaa)][_0x1ddd30[_0x46ba31(0xc2)][_0x46ba31(0xa4)]][_0x46ba31(0xb8)]=='function'&&await _0x51c7b1[_0x46ba31(0x95)][_0x46ba31(0xaa)][_0x1ddd30[_0x46ba31(0xc2)][_0x46ba31(0xa4)]][_0x46ba31(0xb8)]((_0x1ddd30===null||_0x1ddd30===void 0x0?void 0x0:_0x1ddd30[_0x46ba31(0xc0)])||undefined,_0x25102b,_0x1ddd30));}},'afterThrow':(_0x4e2aaa,_0x5792bf)=>{throw _0x5792bf;}};});}async[a2_0xc6c3f2(0x96)](){const _0x469c7f=a2_0xc6c3f2;this['application'][_0x469c7f(0x93)]([_0x469c7f(0xb7)])[_0x469c7f(0x99)](_0x51ef0e=>{const _0x5e1959=_0x469c7f;_0x51ef0e['useMiddleware'](bodyXml(this[_0x5e1959(0x94)][_0x5e1959(0x88)]('bodyXml'))),_0x51ef0e[_0x5e1959(0x7b)](bodyParser(this[_0x5e1959(0x94)]['getConfiguration']('bodyParser'))),(_0x51ef0e===null||_0x51ef0e===void 0x0?void 0x0:_0x51ef0e['context'])&&Object[_0x5e1959(0x8c)](_0x51ef0e[_0x5e1959(0x7e)],{'ok':{'value':function(_0x375b10,_0x1b3224,_0x1e9bc6=0x0){return{'code':_0x1e9bc6,'data':_0x375b10,'extra':_0x1b3224};}},'err':{'value':function(_0x543c84,_0x4c4384,_0x13ff8c=0x1){return{'code':_0x13ff8c,'extra':_0x4c4384,'msg':_0x543c84};}},'input':{'value':function(_0x579da3,_0x4767fc){const _0x252c08=_0x5e1959;var _0x4a77f9;const _0x43a5f1=lodash[_0x252c08(0x98)]({},this[_0x252c08(0x9f)][_0x252c08(0x7d)]||this[_0x252c08(0x9f)][((_0x4a77f9=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x4a77f9===void 0x0?void 0x0:_0x4a77f9[_0x252c08(0x7a)])||_0x252c08(0x7d)]||{},this['request']['query']||{});return _0x579da3?lodash[_0x252c08(0x7f)](_0x43a5f1,_0x579da3,_0x4767fc):_0x43a5f1;}},'when':{'value':async function(_0x5763b1,_0x4c8e32){const _0x565129=_0x5e1959,_0x850f93=this['input'](_0x5763b1,null);if(!lodash[_0x565129(0xbc)](_0x850f93))return await _0x4c8e32(_0x850f93);}},'only':{'value':function(_0x39215c){const _0x1e150d=_0x5e1959,_0x403774={};for(let _0x67d870=0x0;_0x67d870<_0x39215c[_0x1e150d(0xbd)];_0x67d870++){lodash[_0x1e150d(0xc3)](_0x39215c[_0x67d870])&&_0x39215c[_0x67d870][_0x1e150d(0xbd)]>0x0&&lodash['isString'](_0x39215c[_0x67d870][0x0])&&(_0x403774[_0x39215c[_0x67d870][0x0]]=this[_0x1e150d(0x78)](_0x39215c[_0x67d870][0x0],_0x39215c[_0x67d870][_0x1e150d(0xbd)]>0x1?_0x39215c[_0x67d870][0x1]:null));}return _0x403774;}}});});}async[a2_0xc6c3f2(0x7c)](){const _0x39e111=a2_0xc6c3f2;var _0x4205fd,_0x2ddb51,_0x42f301,_0x556d05,_0x69c050,_0x2b35cf;const _0x2832bf=this[_0x39e111(0x94)]['getConfiguration']();((_0x2ddb51=(_0x4205fd=_0x2832bf===null||_0x2832bf===void 0x0?void 0x0:_0x2832bf[_0x39e111(0x95)])===null||_0x4205fd===void 0x0?void 0x0:_0x4205fd[_0x39e111(0xaa)])===null||_0x2ddb51===void 0x0?void 0x0:_0x2ddb51[_0x39e111(0xab)])&&Object['keys'](_0x2832bf['anncicapi']['devices'])['length']>0x1&&delete _0x2832bf[_0x39e111(0x95)]['devices'][_0x39e111(0xab)];if((_0x42f301=_0x2832bf===null||_0x2832bf===void 0x0?void 0x0:_0x2832bf[_0x39e111(0x8e)])===null||_0x42f301===void 0x0?void 0x0:_0x42f301[_0x39e111(0xb5)])for(const _0x16ec2a in _0x2832bf[_0x39e111(0x8e)]['dirs']){((_0x556d05=_0x2832bf['staticFile'][_0x39e111(0xb5)][_0x16ec2a])===null||_0x556d05===void 0x0?void 0x0:_0x556d05[_0x39e111(0xaf)])&&typeof((_0x69c050=_0x2832bf[_0x39e111(0x8e)]['dirs'][_0x16ec2a])===null||_0x69c050===void 0x0?void 0x0:_0x69c050[_0x39e111(0xaf)])=='string'&&!fs['existsSync'](_0x2832bf['staticFile'][_0x39e111(0xb5)][_0x16ec2a]['dir'])&&(fs['mkdirSync'](_0x2832bf[_0x39e111(0x8e)][_0x39e111(0xb5)][_0x16ec2a][_0x39e111(0xaf)],{'recursive':!![]}),console[_0x39e111(0xc5)](_0x39e111(0x70)+_0x2832bf[_0x39e111(0x8e)][_0x39e111(0xb5)][_0x16ec2a][_0x39e111(0xaf)]));}((_0x2b35cf=_0x2832bf===null||_0x2832bf===void 0x0?void 0x0:_0x2832bf['upload'])===null||_0x2b35cf===void 0x0?void 0x0:_0x2b35cf[_0x39e111(0x89)])&&!fs[_0x39e111(0x9c)](_0x2832bf[_0x39e111(0xa3)]['tmpdir'])&&(fs[_0x39e111(0xad)](_0x2832bf['upload'][_0x39e111(0x89)],{'recursive':!![]}),console[_0x39e111(0xc5)](_0x39e111(0x73)+_0x2832bf[_0x39e111(0xa3)]['tmpdir'])),this[_0x39e111(0x94)][_0x39e111(0xa6)](_0x2832bf);}};__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0xc6c3f2(0xae),core_1[a2_0xc6c3f2(0x8f)])],CustomConfiguration[a2_0xc6c3f2(0xa8)],a2_0xc6c3f2(0x94),void 0x0),__decorate([(0x0,decorator_1[a2_0xc6c3f2(0x90)])(),__metadata(a2_0xc6c3f2(0xae),core_1[a2_0xc6c3f2(0x6e)])],CustomConfiguration['prototype'],a2_0xc6c3f2(0x6d),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0xc6c3f2(0xae),core_1[a2_0xc6c3f2(0xa9)])],CustomConfiguration[a2_0xc6c3f2(0xa8)],'application',void 0x0),__decorate([(0x0,decorator_1[a2_0xc6c3f2(0x90)])(),__metadata(a2_0xc6c3f2(0xae),core_1[a2_0xc6c3f2(0x72)])],CustomConfiguration[a2_0xc6c3f2(0xa8)],a2_0xc6c3f2(0xa0),void 0x0),__decorate([(0x0,decorator_1[a2_0xc6c3f2(0x90)])(),__metadata('design:type',ApiService_1[a2_0xc6c3f2(0xb2)])],CustomConfiguration[a2_0xc6c3f2(0xa8)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0xc6c3f2(0x9a)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0xc6c3f2(0x6c),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0xc6c3f2(0xbf)]=CustomConfiguration;function a2_0x40e3(){const _0xa9b806=['get','@midwayjs/koa','25gDaRQa','__metadata','ACTION_ROUTE_KEY','apimit','function','__esModule','HEADERS_SIGNATURE','getConfiguration','tmpdir','@anncic-api/event','ApiError','defineProperties','4139891EycXtc','staticFile','MidwayConfigService','Inject','./exception/ApiError','1438420rBCRjI','getApplications','config','anncicapi','hanlderApplications','@midwayjs/cross-domain','defaultsDeep','forEach','Configuration','./config/config.production','existsSync','70TVRgMl','@midwayjs/upload','request','environment','metadata','object','upload','device','handlerActionRoute','addObject','anncic-apihelper','prototype','MidwayApplicationManager','devices','DEFAULT','checkConfigKeys','mkdirSync','design:type','dir','6780184oFCwoH','10259397GAQcnA','ApiService','@midwayjs/task','registerMethodHandler','dirs','koa-xml-body','koa','beforeRoute','koa-bodyparser','getOwnPropertyDescriptor','897378VJbUcN','isNull','length','./service/ApiService','CustomConfiguration','_matchedRoute','@anncic-api/validator','headers','isArray','@anncic-api/core','log','defineProperty','41475AwWEFT','anncic-api','decorator','MidwayDecoratorService','@midwayjs/core','Anncic-api\x20static-file\x20:\x20mkdir\x20','460826DyrwKz','MidwayEnvironmentService','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','REQUEST_OBJ_CTX_KEY','decorate','@anncic-api/typeorm','checksign','input','@midwayjs/decorator','key','useMiddleware','filterConfig','body','context'];a2_0x40e3=function(){return _0xa9b806;};return a2_0x40e3();}
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a3_0x2d53(_0x9f81d0,_0x3ca01e){const _0x30c505=a3_0x30c5();return a3_0x2d53=function(_0x2d53ed,_0x1af3f3){_0x2d53ed=_0x2d53ed-0x1c2;let _0x55541c=_0x30c505[_0x2d53ed];return _0x55541c;},a3_0x2d53(_0x9f81d0,_0x3ca01e);}const a3_0x4af395=a3_0x2d53;(function(_0x2c2239,_0x1dba6b){const _0x27ff86=a3_0x2d53,_0x482602=_0x2c2239();while(!![]){try{const _0x1c4398=-parseInt(_0x27ff86(0x1e9))/0x1*(-parseInt(_0x27ff86(0x1d0))/0x2)+-parseInt(_0x27ff86(0x1c7))/0x3*(parseInt(_0x27ff86(0x1e2))/0x4)+-parseInt(_0x27ff86(0x1d7))/0x5+-parseInt(_0x27ff86(0x1cb))/0x6*(-parseInt(_0x27ff86(0x1f2))/0x7)+-parseInt(_0x27ff86(0x1c2))/0x8*(-parseInt(_0x27ff86(0x1f3))/0x9)+-parseInt(_0x27ff86(0x1f5))/0xa*(parseInt(_0x27ff86(0x1d9))/0xb)+parseInt(_0x27ff86(0x1e1))/0xc;if(_0x1c4398===_0x1dba6b)break;else _0x482602['push'](_0x482602['shift']());}catch(_0x2d31f8){_0x482602['push'](_0x482602['shift']());}}}(a3_0x30c5,0xa15e8));Object[a3_0x4af395(0x1d4)](exports,a3_0x4af395(0x1ea),{'value':!![]}),exports[a3_0x4af395(0x1e3)]=exports['Action']=void 0x0;const fs=require('fs'),decorator_1=require(a3_0x4af395(0x1df)),action_1=require(a3_0x4af395(0x1e4));function Action(_0x23c1ba,_0x2a6825,_0x2626dc={'middleware':[],'sensitive':!![]}){return _0x1a68d1=>{const _0x5c7be2=a3_0x2d53;_0x2626dc[_0x5c7be2(0x1ee)]=_0x2a6825;const _0x37107b=parseRoute(_0x23c1ba);if(_0x37107b[_0x5c7be2(0x1ec)]){_0x2626dc[_0x5c7be2(0x1d3)]=_0x2626dc[_0x5c7be2(0x1d3)]?'/'+_0x37107b['module']+'/'+_0x2626dc[_0x5c7be2(0x1d3)]:'/'+_0x37107b[_0x5c7be2(0x1eb)];_0x37107b['prefix']&&(_0x2626dc[_0x5c7be2(0x1d3)]='/'+_0x37107b[_0x5c7be2(0x1d3)]+'/'+_0x2626dc[_0x5c7be2(0x1d3)]);if(fs['existsSync'](_0x37107b[_0x5c7be2(0x1c4)]+_0x5c7be2(0x1e5)+_0x37107b[_0x5c7be2(0x1ec)]+'/config.'+(lodash[_0x5c7be2(0x1f1)](_0x37107b[_0x5c7be2(0x1cc)],'ts')?'ts':'js'))){const _0x16cbda=include(_0x37107b[_0x5c7be2(0x1c4)]+_0x5c7be2(0x1e5)+_0x37107b[_0x5c7be2(0x1ec)]+'/config.'+(lodash[_0x5c7be2(0x1f1)](_0x37107b[_0x5c7be2(0x1cc)],'ts')?'ts':'js'));if(_0x16cbda[_0x5c7be2(0x1c6)]&&lodash[_0x5c7be2(0x1de)](_0x16cbda['middleware'])&&_0x16cbda[_0x5c7be2(0x1c6)]['length']>0x0)for(let _0x2df479 in _0x16cbda[_0x5c7be2(0x1c6)]){_0x16cbda['middlewareIgnore'][_0x5c7be2(0x1c8)](_0x16cbda['middleware'][_0x2df479])==-0x1&&_0x2626dc[_0x5c7be2(0x1c6)][_0x5c7be2(0x1ef)](_0x16cbda[_0x5c7be2(0x1c6)][_0x2df479]);}const _0x2615ec=(0x0,decorator_1[_0x5c7be2(0x1f8)])(action_1[_0x5c7be2(0x1d6)],action_1[_0x5c7be2(0x1c9)])||{};_0x2615ec[''+_0x37107b[_0x5c7be2(0x1ec)]]=_0x16cbda,(0x0,decorator_1['saveClassMetadata'])(action_1['APPSCONFIG_KEY'],_0x2615ec,action_1[_0x5c7be2(0x1c9)]);}_0x2626dc['prefix']=_0x2626dc[_0x5c7be2(0x1d3)][_0x5c7be2(0x1cf)]()[_0x5c7be2(0x1dd)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x5c7be2(0x1c5)])(action_1[_0x5c7be2(0x1e0)],_0x1a68d1),(0x0,decorator_1[_0x5c7be2(0x1d2)])(_0x2626dc[_0x5c7be2(0x1d3)],_0x2626dc)(_0x1a68d1),(0x0,decorator_1[_0x5c7be2(0x1ce)])(action_1[_0x5c7be2(0x1e0)],{'prefix':_0x2626dc[_0x5c7be2(0x1d3)],'pprefix':_0x37107b['prefix'],'module':_0x37107b['module'],'filepath':_0x37107b['filepath'],'routerOptions':_0x2626dc},_0x1a68d1);}else _0x2626dc[_0x5c7be2(0x1d3)]=_0x2626dc['prefix']?'/'+_0x2626dc[_0x5c7be2(0x1d3)]:'/'+_0x37107b['route'],_0x37107b[_0x5c7be2(0x1d3)]&&(_0x2626dc[_0x5c7be2(0x1d3)]='/'+_0x37107b[_0x5c7be2(0x1d3)]+'/'+_0x2626dc[_0x5c7be2(0x1d3)]),_0x2626dc['prefix']=_0x2626dc[_0x5c7be2(0x1d3)][_0x5c7be2(0x1cf)]()['replace'](/\/{2,}/g,'/'),(0x0,decorator_1[_0x5c7be2(0x1c5)])(action_1['ACTION_KEY'],_0x1a68d1),(0x0,decorator_1[_0x5c7be2(0x1d2)])(_0x2626dc[_0x5c7be2(0x1d3)],_0x2626dc)(_0x1a68d1),(0x0,decorator_1[_0x5c7be2(0x1ce)])(action_1[_0x5c7be2(0x1e0)],{'prefix':_0x2626dc[_0x5c7be2(0x1d3)],'module':_0x37107b[_0x5c7be2(0x1ec)],'pprefix':_0x37107b[_0x5c7be2(0x1d3)],'filepath':_0x37107b[_0x5c7be2(0x1cc)],'routerOptions':_0x2626dc},_0x1a68d1);};}exports['Action']=Action;function a3_0x30c5(){const _0x421b7c=['APPSCONFIG_KEY','2772850fkYZXi','\x20文件请放在app/controller/文件下','12869516EpbOYT','startsWith','filter','-controller','replace','isArray','@midwayjs/decorator','ACTION_KEY','32594724APozNd','1072UlNHuh','parseRoute','../types/action','/apps/','substring','/controller/文件下','splice','1yzHtqN','__esModule','route','module','trim','tagName','push','cwd','endsWith','405965bQejql','9tjaeLN','length','10uNoRHt','/controller/','split','getClassMetadata','4854760CZZQJL','-action','rootpath','saveModule','middleware','12825ThyUGF','indexOf','AppsConfigTmp','app/controller/','6tDblNU','filepath','match','saveClassMetadata','toLowerCase','300254vYcIgZ','join','Controller','prefix','defineProperty','apps/'];a3_0x30c5=function(){return _0x421b7c;};return a3_0x30c5();}function parseRoute(_0x45408e){const _0x290637=a3_0x4af395;_0x45408e=_0x45408e[_0x290637(0x1dd)](/(\\|\/)/g,'/');const _0x45d7a4=process[_0x290637(0x1f0)]()['replace'](/(\\|\/)/g,'/'),_0x3594bd=_0x45408e[_0x290637(0x1e6)](0x0,_0x45d7a4[_0x290637(0x1f4)]+_0x45408e['substring'](_0x45d7a4['length']+0x1)[_0x290637(0x1c8)]('/')+0x1),_0x1794d7=_0x45408e['substring'](_0x3594bd[_0x290637(0x1f4)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x5ed45a={'route':'','prefix':![],'module':![],'rootpath':_0x3594bd,'filepath':_0x1794d7};if(_0x1794d7[_0x290637(0x1da)](_0x290637(0x1ca))){const _0x4a01fb=_0x1794d7[_0x290637(0x1e6)](_0x290637(0x1ca)['length'])['split']('/')[_0x290637(0x1db)](_0x35c32d=>_0x35c32d&&_0x35c32d[_0x290637(0x1ed)]());return _0x4a01fb[_0x290637(0x1f4)]>0x1&&(_0x5ed45a[_0x290637(0x1d3)]=_0x4a01fb[0x0]['toLowerCase'](),_0x4a01fb[_0x290637(0x1e8)](0x0,0x1)),_0x5ed45a[_0x290637(0x1eb)]=('/'+_0x4a01fb[_0x290637(0x1d1)]('/'))['replace'](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0x290637(0x1cd)](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x290637(0x1cf)]()[_0x290637(0x1dd)](/\/\-/g,'/'),_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f1)](_0x290637(0x1c3))&&(_0x5ed45a['route']=_0x5ed45a['route'][_0x290637(0x1e6)](0x0,_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f4)]-0x7)),_0x5ed45a['route']['endsWith'](_0x290637(0x1dc))&&(_0x5ed45a[_0x290637(0x1eb)]=_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1e6)](0x0,_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f4)]-0xb)),_0x5ed45a;}else{if(_0x1794d7['startsWith'](_0x290637(0x1d5))){const _0x2ff470=_0x1794d7[_0x290637(0x1e6)](0x0,_0x1794d7[_0x290637(0x1c8)](_0x290637(0x1e5))+0x5),_0x89656d=_0x1794d7[_0x290637(0x1e6)](_0x2ff470[_0x290637(0x1f4)]+0x1)['replace'](/(\\|\/)/g,'/')[_0x290637(0x1f7)]('/')[0x0];if(_0x1794d7[_0x290637(0x1da)]('apps/'+_0x89656d+_0x290637(0x1f6))){const _0x3385e4=_0x1794d7[_0x290637(0x1e6)]((_0x2ff470+'/'+_0x89656d+_0x290637(0x1f6))[_0x290637(0x1f4)])[_0x290637(0x1f7)]('/')['filter'](_0x555e15=>_0x555e15&&_0x555e15[_0x290637(0x1ed)]());return _0x3385e4[_0x290637(0x1f4)]>0x1&&(_0x5ed45a[_0x290637(0x1d3)]=_0x3385e4[0x0][_0x290637(0x1cf)](),_0x3385e4['splice'](0x0,0x1)),_0x5ed45a[_0x290637(0x1ec)]=_0x89656d,_0x5ed45a[_0x290637(0x1eb)]=('/'+_0x89656d+'/'+_0x3385e4[_0x290637(0x1d1)]('/'))[_0x290637(0x1dd)](/(\.ts|\.js)$/,'')[_0x290637(0x1dd)](/\/{2,}/,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x290637(0x1d1)]('-')['toLowerCase']()['replace'](/\/\-/g,'/'),_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f1)](_0x290637(0x1c3))&&(_0x5ed45a['route']=_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1e6)](0x0,_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f4)]-0x7)),_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f1)](_0x290637(0x1dc))&&(_0x5ed45a[_0x290637(0x1eb)]=_0x5ed45a['route'][_0x290637(0x1e6)](0x0,_0x5ed45a[_0x290637(0x1eb)][_0x290637(0x1f4)]-0xb)),_0x5ed45a;}throw new Error(_0x1794d7+'\x20文件请放在apps/'+_0x89656d+_0x290637(0x1e7));}}throw new Error(_0x1794d7+_0x290637(0x1d8));}exports[a3_0x4af395(0x1e3)]=parseRoute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a4_0x4d3d(_0x55a443,_0x19e98a){const _0x532b31=a4_0x532b();return a4_0x4d3d=function(_0x4d3d5b,_0x33d9b9){_0x4d3d5b=_0x4d3d5b-0xa5;let _0x5c2605=_0x532b31[_0x4d3d5b];return _0x5c2605;},a4_0x4d3d(_0x55a443,_0x19e98a);}const a4_0x1673a3=a4_0x4d3d;(function(_0x4758f,_0x4e6ede){const _0x4b03df=a4_0x4d3d,_0x3415b3=_0x4758f();while(!![]){try{const _0x52d099=-parseInt(_0x4b03df(0xa9))/0x1+parseInt(_0x4b03df(0xc1))/0x2*(-parseInt(_0x4b03df(0xa7))/0x3)+parseInt(_0x4b03df(0xa6))/0x4+-parseInt(_0x4b03df(0xba))/0x5*(parseInt(_0x4b03df(0xb3))/0x6)+parseInt(_0x4b03df(0xb2))/0x7+-parseInt(_0x4b03df(0xb8))/0x8+parseInt(_0x4b03df(0xac))/0x9;if(_0x52d099===_0x4e6ede)break;else _0x3415b3['push'](_0x3415b3['shift']());}catch(_0x42f51a){_0x3415b3['push'](_0x3415b3['shift']());}}}(a4_0x532b,0x72692));function a4_0x532b(){const _0x469229=['ACTION_ROUTE_KEY','__esModule','2628200uzOIDV','description','3015505VsCjkc','delete','routerName','middleware','Validator','@anncic-api/validator','utc','524YoSrhy','@midwayjs/decorator','493472Zqwobf','2952JuANtu','apimit','212300EoOrMx','get','toLowerCase','10337310DYgOaL','RequestMapping','indexOf','length','attachClassMetadata','del','4188814NmRAOu','6qNpvxl','validationOptions','defineProperty'];a4_0x532b=function(){return _0x469229;};return a4_0x532b();}Object[a4_0x1673a3(0xb5)](exports,a4_0x1673a3(0xb7),{'value':!![]}),exports['Api']=void 0x0;const validator_1=require(a4_0x1673a3(0xbf)),decorator_1=require(a4_0x1673a3(0xa5)),action_1=require('../types/action');function Api(_0x3d3739,_0x1335c5=a4_0x1673a3(0xaa),_0x1b7c5b='/',_0x35b618={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x4ae2,_0xc25224,_0x5d2429)=>{const _0x2c219c=a4_0x4d3d;var _0x4f38e7,_0x2a5e5a,_0x418db4;!_0x35b618[_0x2c219c(0xbd)]&&(_0x35b618[_0x2c219c(0xbd)]=[]);!((_0x4f38e7=_0x35b618===null||_0x35b618===void 0x0?void 0x0:_0x35b618['validate'])===null||_0x4f38e7===void 0x0?void 0x0:_0x4f38e7[_0x2c219c(0xb4)])&&(_0x35b618['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x2c219c(0xc0)}});if(((_0x2a5e5a=_0x35b618===null||_0x35b618===void 0x0?void 0x0:_0x35b618['middleware'])===null||_0x2a5e5a===void 0x0?void 0x0:_0x2a5e5a[_0x2c219c(0xaf)])>0x0&&((_0x418db4=_0x35b618===null||_0x35b618===void 0x0?void 0x0:_0x35b618['middlewareIgnore'])===null||_0x418db4===void 0x0?void 0x0:_0x418db4[_0x2c219c(0xaf)])>0x0)for(let _0x32f74b in _0x35b618['middleware']){_0x35b618['middlewareIgnore'][_0x2c219c(0xae)](_0x35b618[_0x2c219c(0xbd)][_0x32f74b])!==-0x1&&(_0x35b618[_0x2c219c(0xbd)][_0x32f74b]=null);}_0x35b618['routerName']=_0x3d3739,(0x0,validator_1[_0x2c219c(0xbe)])(_0x35b618['validate'])(_0x4ae2,_0xc25224,_0x5d2429),(0x0,decorator_1[_0x2c219c(0xad)])(Object['assign'](_0x35b618,{'path':_0x1b7c5b,'requestMethod':(_0x1335c5==_0x2c219c(0xb1)?_0x2c219c(0xbb):_0x1335c5)[_0x2c219c(0xab)]()}))(_0x4ae2,_0xc25224,_0x5d2429),(0x0,decorator_1[_0x2c219c(0xb0)])(action_1[_0x2c219c(0xb6)],{'path':_0x1b7c5b,'method':_0xc25224,'apimit':_0x35b618['apimit'],'routerName':_0x35b618[_0x2c219c(0xbc)],'description':_0x35b618[_0x2c219c(0xb9)],'middleware':(_0x35b618[_0x2c219c(0xbd)]||[])['filter'](_0x1fa103=>!!_0x1fa103),'requestMethod':(_0x1335c5==_0x2c219c(0xb1)?_0x2c219c(0xbb):_0x1335c5)[_0x2c219c(0xab)]()},_0x4ae2),(0x0,decorator_1['createCustomMethodDecorator'])(action_1[_0x2c219c(0xb6)],{'path':_0x1b7c5b,'method':_0xc25224,'apimit':_0x35b618[_0x2c219c(0xa8)],'routerName':_0x35b618[_0x2c219c(0xbc)],'description':_0x35b618[_0x2c219c(0xb9)],'middleware':(_0x35b618[_0x2c219c(0xbd)]||[])['filter'](_0x2b6a98=>!!_0x2b6a98),'requestMethod':(_0x1335c5==_0x2c219c(0xb1)?'delete':_0x1335c5)[_0x2c219c(0xab)]()})(_0x4ae2,_0xc25224,_0x5d2429);};}exports['Api']=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a5_0x3655(){const _0x365171=['426ZBjnJo','RequestMapping','value','get','Apitest','filepath','isDevelopmentEnvironment','getConfig','MidwayEnvironmentService','307320icRsmp','getAsync','app','ApitestService','1725048revAcW','@midwayjs/decorator','2686875qoiLJV','610ijNfOT','98288YrPGQP','33xbpTLm','18xAJxkc','defineProperty','apidoc','16eTTGuK','REQUEST_OBJ_CTX_KEY','1167691ypiOjx','5008190XgCvYQ','apitest','/apitest','getApplicationContext'];a5_0x3655=function(){return _0x365171;};return a5_0x3655();}function a5_0x490b(_0x3c4608,_0xb0ebbd){const _0x36556d=a5_0x3655();return a5_0x490b=function(_0x490bf0,_0x56949d){_0x490bf0=_0x490bf0-0xff;let _0x2ad400=_0x36556d[_0x490bf0];return _0x2ad400;},a5_0x490b(_0x3c4608,_0xb0ebbd);}const a5_0x48d710=a5_0x490b;(function(_0x23fc5c,_0x3ca0b7){const _0x429705=a5_0x490b,_0xf582b=_0x23fc5c();while(!![]){try{const _0x3c1c8e=-parseInt(_0x429705(0x10c))/0x1*(-parseInt(_0x429705(0xff))/0x2)+-parseInt(_0x429705(0x101))/0x3*(parseInt(_0x429705(0x100))/0x4)+parseInt(_0x429705(0x11b))/0x5+-parseInt(_0x429705(0x119))/0x6+parseInt(_0x429705(0x107))/0x7*(-parseInt(_0x429705(0x105))/0x8)+parseInt(_0x429705(0x102))/0x9*(parseInt(_0x429705(0x115))/0xa)+parseInt(_0x429705(0x108))/0xb;if(_0x3c1c8e===_0x3ca0b7)break;else _0xf582b['push'](_0xf582b['shift']());}catch(_0x2bebf5){_0xf582b['push'](_0xf582b['shift']());}}}(a5_0x3655,0x47719));Object[a5_0x48d710(0x103)](exports,'__esModule',{'value':!![]}),exports[a5_0x48d710(0x110)]=void 0x0;const decorator_1=require(a5_0x48d710(0x11a)),core_1=require('@midwayjs/core'),ApitestService_1=require('../service/ApitestService');function Apitest(_0x156fbc=a5_0x48d710(0x10a),_0x29657c){return(_0x1e731e,_0x52eb6b,_0x35bbeb)=>{const _0x454fb3=a5_0x490b;return(0x0,decorator_1[_0x454fb3(0x10d)])({'path':_0x156fbc,'requestMethod':_0x454fb3(0x10f)})(_0x1e731e,_0x52eb6b,_0x35bbeb),_0x35bbeb[_0x454fb3(0x10e)]=async function(..._0x1e9ed7){const _0x2a97da=_0x454fb3;var _0x555c27;const _0x93e97f=(_0x555c27=this[core_1[_0x2a97da(0x106)]])===null||_0x555c27===void 0x0?void 0x0:_0x555c27[_0x2a97da(0x117)];if(_0x93e97f&&_0x93e97f[_0x2a97da(0x113)](_0x2a97da(0x109))){const _0x4dd62c=await _0x93e97f['getApplicationContext']()['getAsync'](ApitestService_1[_0x2a97da(0x118)]),_0x9c7329=await _0x93e97f[_0x2a97da(0x10b)]()[_0x2a97da(0x116)](core_1[_0x2a97da(0x114)]);return _0x9c7329[_0x2a97da(0x112)]()&&(_0x29657c[_0x2a97da(0x111)]=!![]),await _0x4dd62c[_0x2a97da(0x104)](_0x29657c);}return'';},_0x35bbeb;};}exports[a5_0x48d710(0x110)]=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a6_0x1a9f(){var _0x5af064=['metadata','305088tsEpxT','__decorate','883420BYjmrR','HEADERS_CHECKCODE','HEADERS_SIGNATURE','length','design:type','32DQsImi','__metadata','ApiError','请求头信息不完整','132wkDMAv','TIMEOUT','1276460sdyWAm','HEADERS_LACK','defineProperty','decorate','527310jqVdDR','function','698FIagXy','46860cQmtDh','382xMewZH','object','checkcode验证失败','网络繁忙,请稍后重试','signature验证失败','HEADERS_DEVICE','16975oQvWAy'];a6_0x1a9f=function(){return _0x5af064;};return a6_0x1a9f();}var a6_0x50dabd=a6_0x3e80;(function(_0x526c67,_0x3d9f9d){var _0x11fd71=a6_0x3e80,_0x2bf47b=_0x526c67();while(!![]){try{var _0x4390be=parseInt(_0x11fd71(0x1a0))/0x1*(parseInt(_0x11fd71(0x1a2))/0x2)+parseInt(_0x11fd71(0x18d))/0x3+parseInt(_0x11fd71(0x18f))/0x4+-parseInt(_0x11fd71(0x1a1))/0x5*(parseInt(_0x11fd71(0x198))/0x6)+-parseInt(_0x11fd71(0x18b))/0x7*(parseInt(_0x11fd71(0x194))/0x8)+parseInt(_0x11fd71(0x19e))/0x9+-parseInt(_0x11fd71(0x19a))/0xa;if(_0x4390be===_0x3d9f9d)break;else _0x2bf47b['push'](_0x2bf47b['shift']());}catch(_0x7dc7e){_0x2bf47b['push'](_0x2bf47b['shift']());}}}(a6_0x1a9f,0x29bb1));var __decorate=this&&this[a6_0x50dabd(0x18e)]||function(_0x5644bc,_0x1e2ac9,_0x28cfa9,_0x73a2d7){var _0x4d0953=a6_0x50dabd,_0x26cd8b=arguments[_0x4d0953(0x192)],_0x3d79a3=_0x26cd8b<0x3?_0x1e2ac9:_0x73a2d7===null?_0x73a2d7=Object['getOwnPropertyDescriptor'](_0x1e2ac9,_0x28cfa9):_0x73a2d7,_0xa647d6;if(typeof Reflect===_0x4d0953(0x1a3)&&typeof Reflect[_0x4d0953(0x19d)]===_0x4d0953(0x19f))_0x3d79a3=Reflect[_0x4d0953(0x19d)](_0x5644bc,_0x1e2ac9,_0x28cfa9,_0x73a2d7);else{for(var _0x3eace8=_0x5644bc[_0x4d0953(0x192)]-0x1;_0x3eace8>=0x0;_0x3eace8--)if(_0xa647d6=_0x5644bc[_0x3eace8])_0x3d79a3=(_0x26cd8b<0x3?_0xa647d6(_0x3d79a3):_0x26cd8b>0x3?_0xa647d6(_0x1e2ac9,_0x28cfa9,_0x3d79a3):_0xa647d6(_0x1e2ac9,_0x28cfa9))||_0x3d79a3;}return _0x26cd8b>0x3&&_0x3d79a3&&Object[_0x4d0953(0x19c)](_0x1e2ac9,_0x28cfa9,_0x3d79a3),_0x3d79a3;},__metadata=this&&this[a6_0x50dabd(0x195)]||function(_0x2d7789,_0x11e779){var _0x375443=a6_0x50dabd;if(typeof Reflect===_0x375443(0x1a3)&&typeof Reflect[_0x375443(0x18c)]===_0x375443(0x19f))return Reflect[_0x375443(0x18c)](_0x2d7789,_0x11e779);};Object[a6_0x50dabd(0x19c)](exports,'__esModule',{'value':!![]}),exports[a6_0x50dabd(0x196)]=void 0x0;class ApiError{}function a6_0x3e80(_0x54b0fe,_0x3a45f1){var _0x1a9f59=a6_0x1a9f();return a6_0x3e80=function(_0x3e800a,_0x1f4c6d){_0x3e800a=_0x3e800a-0x187;var _0x3c9672=_0x1a9f59[_0x3e800a];return _0x3c9672;},a6_0x3e80(_0x54b0fe,_0x3a45f1);}ApiError[a6_0x50dabd(0x199)]=0x18a89,ApiError[a6_0x50dabd(0x19b)]=0x18a8a,ApiError[a6_0x50dabd(0x18a)]=0x18a8b,ApiError[a6_0x50dabd(0x190)]=0x18a8c,ApiError[a6_0x50dabd(0x191)]=0x18a8d,__decorate([AnnErrorMsg(a6_0x50dabd(0x188)),__metadata('design:type',Object)],ApiError,'TIMEOUT',void 0x0),__decorate([AnnErrorMsg(a6_0x50dabd(0x197)),__metadata(a6_0x50dabd(0x193),Object)],ApiError,a6_0x50dabd(0x19b),void 0x0),__decorate([AnnErrorMsg('请使用正确的设备'),__metadata(a6_0x50dabd(0x193),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg(a6_0x50dabd(0x187)),__metadata('design:type',Object)],ApiError,a6_0x50dabd(0x190),void 0x0),__decorate([AnnErrorMsg(a6_0x50dabd(0x189)),__metadata('design:type',Object)],ApiError,a6_0x50dabd(0x191),void 0x0),exports[a6_0x50dabd(0x196)]=ApiError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const a7_0x31bb3d=a7_0x2080;(function(_0x4da90f,_0x47e72b){const _0x34dff5=a7_0x2080,_0x319ed8=_0x4da90f();while(!![]){try{const _0x39968e=parseInt(_0x34dff5(0xfc))/0x1+-parseInt(_0x34dff5(0xf9))/0x2*(parseInt(_0x34dff5(0xf5))/0x3)+-parseInt(_0x34dff5(0x101))/0x4*(parseInt(_0x34dff5(0xf7))/0x5)+parseInt(_0x34dff5(0xf8))/0x6+-parseInt(_0x34dff5(0xfb))/0x7+parseInt(_0x34dff5(0xfe))/0x8+-parseInt(_0x34dff5(0xfd))/0x9*(-parseInt(_0x34dff5(0xf3))/0xa);if(_0x39968e===_0x47e72b)break;else _0x319ed8['push'](_0x319ed8['shift']());}catch(_0x37b517){_0x319ed8['push'](_0x319ed8['shift']());}}}(a7_0x52c6,0x2c7c1));function a7_0x52c6(){const _0x503766=['AppsConfigTmp','4ATFSMm','160CdTLJn','getAppsConfig','54xPzDyn','@midwayjs/decorator','1229945dgqdfu','1048434AuZVpI','34894WlcGVr','getClassMetadata','365694mbpYmI','142522JzRByP','180972Wyxryq','1243976JdgUsT','defineProperty'];a7_0x52c6=function(){return _0x503766;};return a7_0x52c6();}Object[a7_0x31bb3d(0xff)](exports,'__esModule',{'value':!![]}),exports[a7_0x31bb3d(0xf4)]=void 0x0;const decorator_1=require(a7_0x31bb3d(0xf6)),action_1=require('../types/action');function getAppsConfig(_0x8319d7){const _0x1517c5=a7_0x31bb3d,_0x6e5cd5=(0x0,decorator_1[_0x1517c5(0xfa)])(action_1['APPSCONFIG_KEY'],action_1[_0x1517c5(0x100)])||{};return _0x8319d7?lodash['get'](_0x6e5cd5,_0x8319d7):_0x6e5cd5;}function a7_0x2080(_0x52ff20,_0x149850){const _0x52c625=a7_0x52c6();return a7_0x2080=function(_0x208041,_0x396512){_0x208041=_0x208041-0xf3;let _0x115253=_0x52c625[_0x208041];return _0x115253;},a7_0x2080(_0x52ff20,_0x149850);}exports[a7_0x31bb3d(0xf4)]=getAppsConfig;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a7_0x37fd5f=a7_0x3ed5;(function(_0x4ada8,_0x28cd0b){const _0x5de149=a7_0x3ed5,_0x17d21c=_0x4ada8();while(!![]){try{const _0x4a065a=-parseInt(_0x5de149(0x125))/0x1*(parseInt(_0x5de149(0x13c))/0x2)+-parseInt(_0x5de149(0x12e))/0x3+-parseInt(_0x5de149(0x12d))/0x4*(-parseInt(_0x5de149(0x135))/0x5)+-parseInt(_0x5de149(0x13f))/0x6+-parseInt(_0x5de149(0x15a))/0x7+parseInt(_0x5de149(0x143))/0x8*(parseInt(_0x5de149(0x148))/0x9)+parseInt(_0x5de149(0x113))/0xa;if(_0x4a065a===_0x28cd0b)break;else _0x17d21c['push'](_0x17d21c['shift']());}catch(_0x3a28b3){_0x17d21c['push'](_0x17d21c['shift']());}}}(a7_0x2101,0x7b546));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a7_0x37fd5f(0x15c)]=void 0x0;const lodash_1=require('lodash'),validator_1=require(a7_0x37fd5f(0x11c)),decorator_1=require(a7_0x37fd5f(0x116)),decorator_2=require('@midwayjs/decorator'),decorator_3=require('@midwayjs/decorator'),action_1=require(a7_0x37fd5f(0x11f));function a7_0x3ed5(_0xabc311,_0x95b64e){const _0x210103=a7_0x2101();return a7_0x3ed5=function(_0x3ed5da,_0x485a04){_0x3ed5da=_0x3ed5da-0x107;let _0x47e8cb=_0x210103[_0x3ed5da];return _0x47e8cb;},a7_0x3ed5(_0xabc311,_0x95b64e);}function a7_0x2101(){const _0x461419=['2205393ayAYfG','-array','keys','query','routes','type','HEADERS','311330wlDRvO','ACTION_KEY','request','summary','flags.presence','routerName','function','2RdHoHr','number','indexOf','5435424DmUyOz','route','string','body','32tKrVJY','Number','getMethodParamTypes','default','path','1192896sYqvat','getClassMetadata','startsWith','children','name','description','routerOptions','title','FIELDS','tagName','ACTION_ROUTE_KEY','header','args','flags.default','method','iterator','push','concat','3409959LmWDWF','只允许:[','getRoutes','array','items','module','isArray','log','file','noreq','join','parameterIndex','PARAM','BODY','required','flags.label','prefix','max','20423520tktrbQ','rules','metadata','@midwayjs/decorator','boolean','filepath','key','filter','allow','@anncic-api/validator','getClassExtendedMetadata','describe','../types/action','length','RouteParamTypes','replace','limit','WEB_ROUTER_PARAM_KEY','1464ghLZDs','listModule','propertyData','get','find','File','split','pprefix','4DgXHgs'];a7_0x2101=function(){return _0x461419;};return a7_0x2101();}function getRoutes(_0xcaad51={'prefix':'/','module':![]}){const _0x41c622=a7_0x37fd5f;var _0x5d4595,_0x29e31f;const _0x4d8cef=(0x0,decorator_3[_0x41c622(0x126)])(action_1[_0x41c622(0x136)]),_0x5953be={},_0xe1ea63=Array[_0x41c622(0x107)](_0xcaad51[_0x41c622(0x11a)]||[])?_0xcaad51[_0x41c622(0x11a)]||[]:[_0xcaad51[_0x41c622(0x11a)]];_0x3f7236:for(const _0x1372c9 of _0x4d8cef){let _0x44fa61=(0x0,decorator_3[_0x41c622(0x149)])(action_1[_0x41c622(0x136)],_0x1372c9),_0x1db30a=(0x0,decorator_3[_0x41c622(0x149)])(action_1[_0x41c622(0x152)],_0x1372c9);if(_0x44fa61&&_0x1db30a){let _0x20a7e9=_0x44fa61[_0x41c622(0x111)],_0x2857ec={};if(_0xcaad51[_0x41c622(0x15f)]&&(0x0,lodash_1[_0x41c622(0x128)])(_0x44fa61,'module',![])!=_0xcaad51[_0x41c622(0x15f)])continue _0x3f7236;else{if(_0xcaad51[_0x41c622(0x15f)]===![]&&!!(0x0,lodash_1[_0x41c622(0x128)])(_0x44fa61,'module',null))continue _0x3f7236;}if(_0xcaad51[_0x41c622(0x111)]&&!_0x20a7e9[_0x41c622(0x14a)](_0xcaad51[_0x41c622(0x111)]))continue _0x3f7236;_0x20a7e9!=='/'?(_0x2857ec[_0x41c622(0x138)]=(_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61[_0x41c622(0x14e)][_0x41c622(0x151)])||(/^\//['test'](_0x20a7e9)?_0x20a7e9[_0x41c622(0x12b)]('/')[0x1]:_0x20a7e9),_0x2857ec[_0x41c622(0x14d)]=(_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61[_0x41c622(0x14e)][_0x41c622(0x14d)])||_0x2857ec[_0x41c622(0x138)],_0x2857ec[_0x41c622(0x132)]=[]):(_0x2857ec['summary']=(_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61[_0x41c622(0x14e)][_0x41c622(0x151)])||_0x41c622(0x146),_0x2857ec['description']=(_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61[_0x41c622(0x14e)][_0x41c622(0x14d)])||'',_0x2857ec[_0x41c622(0x132)]=[]);_0xcaad51[_0x41c622(0x118)]&&(_0x2857ec[_0x41c622(0x118)]=_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61[_0x41c622(0x118)]);(_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61['pprefix'])&&(_0x2857ec[_0x41c622(0x111)]=_0x44fa61[_0x41c622(0x12c)]);(_0x44fa61===null||_0x44fa61===void 0x0?void 0x0:_0x44fa61[_0x41c622(0x15f)])&&(_0x2857ec[_0x41c622(0x15f)]=_0x44fa61[_0x41c622(0x15f)]);let _0x57599f=(0x0,decorator_3[_0x41c622(0x149)])(decorator_2['INJECT_CUSTOM_PARAM'],_0x1372c9)||{};if(typeof _0x1db30a[Symbol[_0x41c622(0x157)]]===_0x41c622(0x13b))for(let _0x32958d of _0x1db30a){let _0x119e7e={};_0x119e7e[_0x41c622(0x156)]=_0x32958d['requestMethod'],_0x119e7e[_0x41c622(0x140)]=(_0x20a7e9+_0x32958d['path'])[_0x41c622(0x122)](/\/{1,}/,'/'),_0x119e7e[_0x41c622(0x138)]=(_0x32958d===null||_0x32958d===void 0x0?void 0x0:_0x32958d[_0x41c622(0x13a)])||_0x2857ec[_0x41c622(0x138)]||_0x41c622(0x146),_0x119e7e['description']=(_0x32958d===null||_0x32958d===void 0x0?void 0x0:_0x32958d[_0x41c622(0x14d)])||'',_0x119e7e[_0x41c622(0x137)]=[];if(!(0x0,lodash_1[_0x41c622(0x14a)])(_0x119e7e[_0x41c622(0x140)],'static/apitest')&&!(0x0,lodash_1[_0x41c622(0x14a)])(_0x119e7e[_0x41c622(0x140)],'/static/apitest')&&_0xe1ea63[_0x41c622(0x13e)](_0x119e7e['route'])===-0x1){if(!(_0xcaad51===null||_0xcaad51===void 0x0?void 0x0:_0xcaad51[_0x41c622(0x10a)])){let _0x3cb67d=(0x0,decorator_3[_0x41c622(0x145)])(new _0x1372c9(),_0x32958d[_0x41c622(0x156)]);for(const _0xd57e4d in _0x3cb67d){let _0x46b4a2=(_0x5d4595=_0x57599f[_0x32958d['method']])===null||_0x5d4595===void 0x0?void 0x0:_0x5d4595['find'](_0x2d0212=>_0x2d0212[_0x41c622(0x10c)]==_0xd57e4d&&_0x2d0212[_0x41c622(0x119)]===decorator_2[_0x41c622(0x124)]&&(_0x2d0212===null||_0x2d0212===void 0x0?void 0x0:_0x2d0212[_0x41c622(0x115)]));if(_0x46b4a2===null||_0x46b4a2===void 0x0?void 0x0:_0x46b4a2[_0x41c622(0x115)]){let _0x6bdaed=convertTypeToString(_0x46b4a2[_0x41c622(0x115)][_0x41c622(0x133)]||0x0);if([_0x41c622(0x131),_0x41c622(0x142)]['indexOf'](_0x6bdaed)!=-0x1&&_0x46b4a2['metadata'][_0x41c622(0x127)][_0x41c622(0x13e)](':')==-0x1&&!_0x119e7e[_0x41c622(0x137)][_0x41c622(0x129)](_0x33872c=>_0x33872c[_0x41c622(0x119)]==_0x46b4a2[_0x41c622(0x115)]['propertyData']))_0x119e7e[_0x41c622(0x137)][_0x41c622(0x158)]({'key':_0x46b4a2[_0x41c622(0x115)][_0x41c622(0x127)],'title':_0x46b4a2['metadata'][_0x41c622(0x127)],'type':convertSchemaType(_0x3cb67d[_0x46b4a2[_0x41c622(0x10c)]]['name']),'required':![],'default':'','desc':''});else{if(_0x6bdaed==_0x41c622(0x109)){let _0x32e7c2=((_0x29e31f=_0x46b4a2===null||_0x46b4a2===void 0x0?void 0x0:_0x46b4a2[_0x41c622(0x115)])===null||_0x29e31f===void 0x0?void 0x0:_0x29e31f['propertyData'])||_0x41c622(0x109);_0x32e7c2[_0x41c622(0x13e)](':')==-0x1&&!_0x119e7e[_0x41c622(0x137)][_0x41c622(0x129)](_0x53c8fa=>_0x53c8fa['key']==_0x32e7c2&&_0x53c8fa['type']=='file')&&_0x119e7e[_0x41c622(0x137)][_0x41c622(0x158)]({'key':_0x32e7c2,'title':'文件上传-'+_0x32e7c2,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x47a6bf=(0x0,decorator_3[_0x41c622(0x11d)])(validator_1['RULES_KEY'],_0x3cb67d[_0xd57e4d]);_0x47a6bf&&_0x119e7e[_0x41c622(0x137)]['push'](...getJoiRequest(_0x47a6bf));}}}_0x2857ec[_0x41c622(0x132)][_0x41c622(0x158)](_0x119e7e);}}if(_0x2857ec[_0x41c622(0x132)][_0x41c622(0x120)]>0x0){let _0x4f40c3=_0x5953be[_0x20a7e9];_0x4f40c3?(_0x4f40c3[_0x41c622(0x138)]!=_0x2857ec['summary']&&(_0x4f40c3['summary']=_0x4f40c3[_0x41c622(0x138)]+','+_0x2857ec[_0x41c622(0x138)]),_0x4f40c3[_0x41c622(0x14d)]!=_0x2857ec[_0x41c622(0x14d)]&&(_0x4f40c3['description']=_0x4f40c3[_0x41c622(0x14d)]+','+_0x2857ec[_0x41c622(0x14d)]),_0x4f40c3['routes']=_0x4f40c3[_0x41c622(0x132)][_0x41c622(0x159)](_0x2857ec[_0x41c622(0x132)]),_0x5953be[_0x20a7e9]=_0x4f40c3):_0x5953be[_0x20a7e9]=_0x2857ec;}}}return _0x5953be;}exports['getRoutes']=getRoutes;function getJoiRequest(_0x2b7aeb){const _0x2c9735=a7_0x37fd5f,_0x5b541a=[];for(let _0x133599 in _0x2b7aeb){const _0x1d2325={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x200781=typeof _0x2b7aeb[_0x133599][_0x2c9735(0x11e)]==_0x2c9735(0x13b)?_0x2b7aeb[_0x133599]['describe']():_0x2b7aeb[_0x133599];_0x1d2325[_0x2c9735(0x119)]=_0x133599,_0x1d2325[_0x2c9735(0x133)]=_0x200781[_0x2c9735(0x133)],_0x1d2325[_0x2c9735(0x14f)]=(0x0,lodash_1[_0x2c9735(0x128)])(_0x200781,_0x2c9735(0x110),_0x133599),_0x1d2325[_0x2c9735(0x146)]=(0x0,lodash_1[_0x2c9735(0x128)])(_0x200781,_0x2c9735(0x155),''),_0x1d2325['required']=(0x0,lodash_1['get'])(_0x200781,_0x2c9735(0x139),'')==_0x2c9735(0x10f),_0x1d2325[_0x2c9735(0x14d)]=(0x0,lodash_1[_0x2c9735(0x128)])(_0x200781,'flags.description','');if(_0x200781[_0x2c9735(0x133)]=='object')_0x1d2325[_0x2c9735(0x14b)]=getJoiRequest(_0x200781[_0x2c9735(0x130)]);else _0x200781[_0x2c9735(0x133)]==_0x2c9735(0x15d)&&_0x200781[_0x2c9735(0x15e)]&&Array[_0x2c9735(0x107)](_0x200781[_0x2c9735(0x15e)])&&_0x200781[_0x2c9735(0x15e)][0x0]&&console[_0x2c9735(0x108)](_0x133599+_0x2c9735(0x12f),_0x200781);_0x200781['allow']&&Array[_0x2c9735(0x107)](_0x200781[_0x2c9735(0x11b)])&&_0x200781[_0x2c9735(0x11b)][_0x2c9735(0x120)]>0x0&&(_0x1d2325[_0x2c9735(0x14d)]=_0x2c9735(0x15b)+_0x200781[_0x2c9735(0x11b)][_0x2c9735(0x10b)](',')+'];'+_0x1d2325[_0x2c9735(0x14d)]);if(_0x1d2325[_0x2c9735(0x119)]&&_0x1d2325['type']){const _0x1eaad5={};for(const _0x3a7d07 of _0x200781[_0x2c9735(0x114)]||[]){if(_0x3a7d07[_0x2c9735(0x14c)]==='min'&&_0x3a7d07['args'])_0x1eaad5['min']=_0x3a7d07[_0x2c9735(0x154)][_0x2c9735(0x123)];else _0x3a7d07[_0x2c9735(0x14c)]===_0x2c9735(0x112)&&(_0x1eaad5[_0x2c9735(0x112)]=_0x3a7d07[_0x2c9735(0x154)]['limit']);}_0x1d2325[_0x2c9735(0x114)]=_0x1eaad5;}_0x1d2325[_0x2c9735(0x119)]&&_0x1d2325[_0x2c9735(0x14f)]&&_0x5b541a['push'](_0x1d2325);}return _0x5b541a;}function convertSchemaType(_0x3ec5c0){const _0x3e2ec0=a7_0x37fd5f;switch(_0x3ec5c0){case'Object':return'object';case'Boolean':return _0x3e2ec0(0x117);case _0x3e2ec0(0x144):return _0x3e2ec0(0x13d);case'String':return'string';case _0x3e2ec0(0x12a):return'file';default:return _0x3e2ec0(0x141);}}function convertTypeToString(_0x54df8d){const _0x474a9c=a7_0x37fd5f;switch(_0x54df8d){case decorator_1[_0x474a9c(0x121)][_0x474a9c(0x134)]:return _0x474a9c(0x153);case decorator_1[_0x474a9c(0x121)]['QUERY']:return'query';case decorator_1[_0x474a9c(0x121)][_0x474a9c(0x10d)]:return _0x474a9c(0x147);case decorator_1[_0x474a9c(0x121)][_0x474a9c(0x10e)]:return _0x474a9c(0x142);case decorator_1[_0x474a9c(0x121)][_0x474a9c(0x150)]:case decorator_1[_0x474a9c(0x121)]['FILESSTREAM']:case decorator_1[_0x474a9c(0x121)]['FILESTREAM']:return _0x474a9c(0x109);default:return'header';}}
|
|
1
|
+
'use strict';const a8_0x43873b=a8_0x17bd;(function(_0x35e395,_0x5ee330){const _0x44b1ad=a8_0x17bd,_0x564b26=_0x35e395();while(!![]){try{const _0x4f3690=parseInt(_0x44b1ad(0x13c))/0x1*(parseInt(_0x44b1ad(0x181))/0x2)+parseInt(_0x44b1ad(0x160))/0x3*(-parseInt(_0x44b1ad(0x173))/0x4)+-parseInt(_0x44b1ad(0x158))/0x5*(-parseInt(_0x44b1ad(0x176))/0x6)+-parseInt(_0x44b1ad(0x12b))/0x7*(parseInt(_0x44b1ad(0x132))/0x8)+-parseInt(_0x44b1ad(0x13e))/0x9+-parseInt(_0x44b1ad(0x130))/0xa+-parseInt(_0x44b1ad(0x162))/0xb*(-parseInt(_0x44b1ad(0x15e))/0xc);if(_0x4f3690===_0x5ee330)break;else _0x564b26['push'](_0x564b26['shift']());}catch(_0xb57ebd){_0x564b26['push'](_0x564b26['shift']());}}}(a8_0x47c9,0x221da));Object[a8_0x43873b(0x187)](exports,a8_0x43873b(0x15d),{'value':!![]}),exports['getRoutes']=void 0x0;const lodash_1=require(a8_0x43873b(0x147)),validator_1=require(a8_0x43873b(0x17c)),decorator_1=require('@midwayjs/decorator'),decorator_2=require('@midwayjs/decorator'),decorator_3=require(a8_0x43873b(0x14d)),action_1=require(a8_0x43873b(0x166));function getRoutes(_0x4e2071={'prefix':'/','module':![]}){const _0x5e1061=a8_0x43873b;var _0x6fe202,_0x3c2344;const _0x331b71=(0x0,decorator_3[_0x5e1061(0x137)])(action_1[_0x5e1061(0x138)]),_0x26fc81={},_0x2b7447=Array[_0x5e1061(0x149)](_0x4e2071[_0x5e1061(0x151)]||[])?_0x4e2071[_0x5e1061(0x151)]||[]:[_0x4e2071['filter']];_0x335fbe:for(const _0x300465 of _0x331b71){let _0x4156e8=(0x0,decorator_3['getClassMetadata'])(action_1[_0x5e1061(0x138)],_0x300465),_0x16660e=(0x0,decorator_3['getClassMetadata'])(action_1[_0x5e1061(0x135)],_0x300465);if(_0x4156e8&&_0x16660e){let _0x26e428=_0x4156e8[_0x5e1061(0x17d)],_0x3e9245={};if(_0x4e2071[_0x5e1061(0x150)]&&(0x0,lodash_1[_0x5e1061(0x188)])(_0x4156e8,_0x5e1061(0x150),![])!=_0x4e2071[_0x5e1061(0x150)])continue _0x335fbe;else{if(_0x4e2071[_0x5e1061(0x150)]===![]&&!!(0x0,lodash_1[_0x5e1061(0x188)])(_0x4156e8,_0x5e1061(0x150),null))continue _0x335fbe;}if(_0x4e2071['prefix']&&!_0x26e428[_0x5e1061(0x17e)](_0x4e2071[_0x5e1061(0x17d)]))continue _0x335fbe;_0x26e428!=='/'?(_0x3e9245['summary']=(_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8['routerOptions'][_0x5e1061(0x15f)])||(/^\//[_0x5e1061(0x16d)](_0x26e428)?_0x26e428[_0x5e1061(0x178)]('/')[0x1]:_0x26e428),_0x3e9245[_0x5e1061(0x17b)]=(_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8[_0x5e1061(0x145)]['description'])||_0x3e9245[_0x5e1061(0x14f)],_0x3e9245[_0x5e1061(0x16e)]=[]):(_0x3e9245[_0x5e1061(0x14f)]=(_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8['routerOptions'][_0x5e1061(0x15f)])||_0x5e1061(0x143),_0x3e9245[_0x5e1061(0x17b)]=(_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8[_0x5e1061(0x145)][_0x5e1061(0x17b)])||'',_0x3e9245[_0x5e1061(0x16e)]=[]);_0x4e2071['filepath']&&(_0x3e9245[_0x5e1061(0x13d)]=_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8[_0x5e1061(0x13d)]);(_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8[_0x5e1061(0x12d)])&&(_0x3e9245[_0x5e1061(0x17d)]=_0x4156e8['pprefix']);(_0x4156e8===null||_0x4156e8===void 0x0?void 0x0:_0x4156e8['module'])&&(_0x3e9245[_0x5e1061(0x150)]=_0x4156e8['module']);let _0x53378f=(0x0,decorator_3[_0x5e1061(0x148)])(decorator_2['INJECT_CUSTOM_PARAM'],_0x300465)||{};if(typeof _0x16660e[Symbol[_0x5e1061(0x12f)]]===_0x5e1061(0x144))for(let _0x987439 of _0x16660e){let _0xce0c52={};_0xce0c52[_0x5e1061(0x183)]=_0x987439[_0x5e1061(0x185)],_0xce0c52[_0x5e1061(0x125)]=(_0x26e428+_0x987439[_0x5e1061(0x142)])[_0x5e1061(0x169)](/\/{1,}/,'/'),_0xce0c52[_0x5e1061(0x14f)]=(_0x987439===null||_0x987439===void 0x0?void 0x0:_0x987439[_0x5e1061(0x17f)])||_0x3e9245[_0x5e1061(0x14f)]||_0x5e1061(0x143),_0xce0c52['description']=(_0x987439===null||_0x987439===void 0x0?void 0x0:_0x987439[_0x5e1061(0x17b)])||'',_0xce0c52['request']=[];if(!(0x0,lodash_1[_0x5e1061(0x17e)])(_0xce0c52[_0x5e1061(0x125)],'static/apitest')&&!(0x0,lodash_1[_0x5e1061(0x17e)])(_0xce0c52['route'],_0x5e1061(0x180))&&_0x2b7447[_0x5e1061(0x146)](_0xce0c52[_0x5e1061(0x125)])===-0x1){if(!(_0x4e2071===null||_0x4e2071===void 0x0?void 0x0:_0x4e2071[_0x5e1061(0x159)])){let _0x1d0e4f=(0x0,decorator_3[_0x5e1061(0x163)])(new _0x300465(),_0x987439[_0x5e1061(0x183)]);for(const _0x2d4eab in _0x1d0e4f){let _0x580cbb=(_0x6fe202=_0x53378f[_0x987439[_0x5e1061(0x183)]])===null||_0x6fe202===void 0x0?void 0x0:_0x6fe202[_0x5e1061(0x133)](_0x137a33=>_0x137a33[_0x5e1061(0x13f)]==_0x2d4eab&&_0x137a33[_0x5e1061(0x136)]===decorator_2[_0x5e1061(0x12c)]&&(_0x137a33===null||_0x137a33===void 0x0?void 0x0:_0x137a33[_0x5e1061(0x184)]));if(_0x580cbb===null||_0x580cbb===void 0x0?void 0x0:_0x580cbb[_0x5e1061(0x184)]){let _0x40c3bb=convertTypeToString(_0x580cbb[_0x5e1061(0x184)][_0x5e1061(0x139)]||0x0);if([_0x5e1061(0x16c),_0x5e1061(0x140)]['indexOf'](_0x40c3bb)!=-0x1&&_0x580cbb[_0x5e1061(0x184)]['propertyData'][_0x5e1061(0x146)](':')==-0x1&&!_0xce0c52[_0x5e1061(0x165)]['find'](_0x104342=>_0x104342[_0x5e1061(0x136)]==_0x580cbb['metadata'][_0x5e1061(0x13b)]))_0xce0c52['request']['push']({'key':_0x580cbb['metadata']['propertyData'],'title':_0x580cbb[_0x5e1061(0x184)][_0x5e1061(0x13b)],'type':convertSchemaType(_0x1d0e4f[_0x580cbb[_0x5e1061(0x13f)]][_0x5e1061(0x172)]),'required':![],'default':'','desc':''});else{if(_0x40c3bb==_0x5e1061(0x164)){let _0x2f94f0=((_0x3c2344=_0x580cbb===null||_0x580cbb===void 0x0?void 0x0:_0x580cbb[_0x5e1061(0x184)])===null||_0x3c2344===void 0x0?void 0x0:_0x3c2344[_0x5e1061(0x13b)])||_0x5e1061(0x164);_0x2f94f0[_0x5e1061(0x146)](':')==-0x1&&!_0xce0c52[_0x5e1061(0x165)][_0x5e1061(0x133)](_0x1f8d90=>_0x1f8d90['key']==_0x2f94f0&&_0x1f8d90['type']==_0x5e1061(0x164))&&_0xce0c52[_0x5e1061(0x165)]['push']({'key':_0x2f94f0,'title':_0x5e1061(0x182)+_0x2f94f0,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x80f6fe=(0x0,decorator_3['getClassExtendedMetadata'])(validator_1['RULES_KEY'],_0x1d0e4f[_0x2d4eab]);_0x80f6fe&&_0xce0c52[_0x5e1061(0x165)]['push'](...getJoiRequest(_0x80f6fe));}}}_0x3e9245['routes']['push'](_0xce0c52);}}if(_0x3e9245[_0x5e1061(0x16e)][_0x5e1061(0x186)]>0x0){let _0xc0b267=_0x26fc81[_0x26e428];_0xc0b267?(_0xc0b267[_0x5e1061(0x14f)]!=_0x3e9245[_0x5e1061(0x14f)]&&(_0xc0b267['summary']=_0xc0b267[_0x5e1061(0x14f)]+','+_0x3e9245[_0x5e1061(0x14f)]),_0xc0b267[_0x5e1061(0x17b)]!=_0x3e9245[_0x5e1061(0x17b)]&&(_0xc0b267[_0x5e1061(0x17b)]=_0xc0b267[_0x5e1061(0x17b)]+','+_0x3e9245[_0x5e1061(0x17b)]),_0xc0b267[_0x5e1061(0x16e)]=_0xc0b267[_0x5e1061(0x16e)][_0x5e1061(0x13a)](_0x3e9245[_0x5e1061(0x16e)]),_0x26fc81[_0x26e428]=_0xc0b267):_0x26fc81[_0x26e428]=_0x3e9245;}}}return _0x26fc81;}exports[a8_0x43873b(0x16b)]=getRoutes;function a8_0x47c9(){const _0x5ecdf1=['426xEmKbB','Number','split','min','limit','description','@anncic-api/validator','prefix','startsWith','routerName','/static/apitest','53864nXGnHa','文件上传-','method','metadata','requestMethod','length','defineProperty','get','required','RouteParamTypes','-array','route','number','FILESSTREAM','Boolean','log','max','91kymGMe','WEB_ROUTER_PARAM_KEY','pprefix','string','iterator','677380UzMZoR','push','149816nIZSNu','find','allow','ACTION_ROUTE_KEY','key','listModule','ACTION_KEY','type','concat','propertyData','6LXlRPL','filepath','1167966FmlelE','parameterIndex','body','File','path','default','function','routerOptions','indexOf','lodash','getClassMetadata','isArray','flags.label','keys','array','@midwayjs/decorator','title','summary','module','filter','header','BODY','describe','只允许:[','Object','rules','10670FvieHu','noreq','PARAM','FILESTREAM','boolean','__esModule','965232aSBRkp','tagName','939jOmjLE','join','44AJvVHg','getMethodParamTypes','file','request','../types/action','args','children','replace','items','getRoutes','query','test','routes','HEADERS','QUERY','String','name','692ynWfeG','object','FIELDS'];a8_0x47c9=function(){return _0x5ecdf1;};return a8_0x47c9();}function getJoiRequest(_0x1c91a3){const _0x2dd8b4=a8_0x43873b,_0x3bcdbd=[];for(let _0x45e873 in _0x1c91a3){const _0x4fe743={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x42fe88=typeof _0x1c91a3[_0x45e873][_0x2dd8b4(0x154)]=='function'?_0x1c91a3[_0x45e873][_0x2dd8b4(0x154)]():_0x1c91a3[_0x45e873];_0x4fe743[_0x2dd8b4(0x136)]=_0x45e873,_0x4fe743[_0x2dd8b4(0x139)]=_0x42fe88['type'],_0x4fe743[_0x2dd8b4(0x14e)]=(0x0,lodash_1[_0x2dd8b4(0x188)])(_0x42fe88,_0x2dd8b4(0x14a),_0x45e873),_0x4fe743[_0x2dd8b4(0x143)]=(0x0,lodash_1[_0x2dd8b4(0x188)])(_0x42fe88,'flags.default',''),_0x4fe743[_0x2dd8b4(0x189)]=(0x0,lodash_1[_0x2dd8b4(0x188)])(_0x42fe88,'flags.presence','')=='required',_0x4fe743[_0x2dd8b4(0x17b)]=(0x0,lodash_1[_0x2dd8b4(0x188)])(_0x42fe88,'flags.description','');if(_0x42fe88['type']==_0x2dd8b4(0x174))_0x4fe743[_0x2dd8b4(0x168)]=getJoiRequest(_0x42fe88[_0x2dd8b4(0x14b)]);else _0x42fe88['type']==_0x2dd8b4(0x14c)&&_0x42fe88[_0x2dd8b4(0x16a)]&&Array['isArray'](_0x42fe88[_0x2dd8b4(0x16a)])&&_0x42fe88[_0x2dd8b4(0x16a)][0x0]&&console[_0x2dd8b4(0x129)](_0x45e873+_0x2dd8b4(0x124),_0x42fe88);_0x42fe88[_0x2dd8b4(0x134)]&&Array['isArray'](_0x42fe88['allow'])&&_0x42fe88['allow'][_0x2dd8b4(0x186)]>0x0&&(_0x4fe743[_0x2dd8b4(0x17b)]=_0x2dd8b4(0x155)+_0x42fe88[_0x2dd8b4(0x134)][_0x2dd8b4(0x161)](',')+'];'+_0x4fe743['description']);if(_0x4fe743[_0x2dd8b4(0x136)]&&_0x4fe743[_0x2dd8b4(0x139)]){const _0x5970f6={};for(const _0x5022d9 of _0x42fe88[_0x2dd8b4(0x157)]||[]){if(_0x5022d9[_0x2dd8b4(0x172)]===_0x2dd8b4(0x179)&&_0x5022d9['args'])_0x5970f6[_0x2dd8b4(0x179)]=_0x5022d9[_0x2dd8b4(0x167)][_0x2dd8b4(0x17a)];else _0x5022d9[_0x2dd8b4(0x172)]===_0x2dd8b4(0x12a)&&(_0x5970f6['max']=_0x5022d9[_0x2dd8b4(0x167)]['limit']);}_0x4fe743['rules']=_0x5970f6;}_0x4fe743[_0x2dd8b4(0x136)]&&_0x4fe743['title']&&_0x3bcdbd[_0x2dd8b4(0x131)](_0x4fe743);}return _0x3bcdbd;}function a8_0x17bd(_0x2cbf98,_0x1e56b9){const _0x47c94a=a8_0x47c9();return a8_0x17bd=function(_0x17bd6d,_0x570a9e){_0x17bd6d=_0x17bd6d-0x123;let _0x3b4f02=_0x47c94a[_0x17bd6d];return _0x3b4f02;},a8_0x17bd(_0x2cbf98,_0x1e56b9);}function convertSchemaType(_0x3b46f4){const _0x218566=a8_0x43873b;switch(_0x3b46f4){case _0x218566(0x156):return _0x218566(0x174);case _0x218566(0x128):return _0x218566(0x15c);case _0x218566(0x177):return _0x218566(0x126);case _0x218566(0x171):return _0x218566(0x12e);case _0x218566(0x141):return _0x218566(0x164);default:return _0x218566(0x12e);}}function convertTypeToString(_0x16498b){const _0x41672f=a8_0x43873b;switch(_0x16498b){case decorator_1[_0x41672f(0x123)][_0x41672f(0x16f)]:return _0x41672f(0x152);case decorator_1[_0x41672f(0x123)][_0x41672f(0x170)]:return _0x41672f(0x16c);case decorator_1[_0x41672f(0x123)][_0x41672f(0x15a)]:return _0x41672f(0x142);case decorator_1['RouteParamTypes'][_0x41672f(0x153)]:return _0x41672f(0x140);case decorator_1['RouteParamTypes'][_0x41672f(0x175)]:case decorator_1[_0x41672f(0x123)][_0x41672f(0x127)]:case decorator_1['RouteParamTypes'][_0x41672f(0x15b)]:return'file';default:return _0x41672f(0x152);}}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { getAppsConfig } from './helper/getAppsConfig';
|
|
1
2
|
export * from './types/common';
|
|
2
3
|
export * from './service/ApitestService';
|
|
3
|
-
export { getRoutes } from './helper/getRoutes';
|
|
4
4
|
export { Api } from './decorator/ActionApi';
|
|
5
5
|
export { Action } from './decorator/Action';
|
|
6
6
|
export { Apitest } from './decorator/ActionApitest';
|
|
7
|
+
export { getRoutes } from './helper/getRoutes';
|
|
7
8
|
export { ILogger } from '@midwayjs/logger';
|
|
8
9
|
export { ApiError } from './exception/ApiError';
|
|
9
10
|
export { QueueService } from '@midwayjs/task';
|
|
@@ -15,3 +16,4 @@ export { ValidatorError, ValidatorService } from '@anncic-api/validator';
|
|
|
15
16
|
export { CustomConfiguration as Configuration } from './configuration';
|
|
16
17
|
export { File, Files, Fields, Body, Param, Query, Headers, Init } from "@midwayjs/decorator";
|
|
17
18
|
export { App, Config, Logger, Provide, Inject, Scope, ScopeEnum } from "@midwayjs/decorator";
|
|
19
|
+
export { getAppsConfig };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0x8e9449=a9_0x455a;(function(_0x2c00c3,_0x1f2744){var _0xdd99ed=a9_0x455a,_0x3ba02e=_0x2c00c3();while(!![]){try{var _0x12f96a=parseInt(_0xdd99ed(0x11c))/0x1*(parseInt(_0xdd99ed(0x10b))/0x2)+-parseInt(_0xdd99ed(0x136))/0x3+parseInt(_0xdd99ed(0x126))/0x4+parseInt(_0xdd99ed(0x11d))/0x5*(-parseInt(_0xdd99ed(0x130))/0x6)+parseInt(_0xdd99ed(0x13f))/0x7+-parseInt(_0xdd99ed(0x148))/0x8*(-parseInt(_0xdd99ed(0x131))/0x9)+-parseInt(_0xdd99ed(0x11f))/0xa*(parseInt(_0xdd99ed(0x142))/0xb);if(_0x12f96a===_0x1f2744)break;else _0x3ba02e['push'](_0x3ba02e['shift']());}catch(_0x51dea){_0x3ba02e['push'](_0x3ba02e['shift']());}}}(a9_0x21ea,0x6a2d8));var __createBinding=this&&this['__createBinding']||(Object[a9_0x8e9449(0x143)]?function(_0x3d7124,_0x41012d,_0xb0c7b4,_0x32389e){var _0x22d5eb=a9_0x8e9449;if(_0x32389e===undefined)_0x32389e=_0xb0c7b4;var _0x3d0f25=Object[_0x22d5eb(0x144)](_0x41012d,_0xb0c7b4);(!_0x3d0f25||(_0x22d5eb(0x145)in _0x3d0f25?!_0x41012d[_0x22d5eb(0x110)]:_0x3d0f25[_0x22d5eb(0x125)]||_0x3d0f25[_0x22d5eb(0x10e)]))&&(_0x3d0f25={'enumerable':!![],'get':function(){return _0x41012d[_0xb0c7b4];}}),Object[_0x22d5eb(0x117)](_0x3d7124,_0x32389e,_0x3d0f25);}:function(_0x44a5cd,_0xa702e3,_0x369136,_0xf31721){if(_0xf31721===undefined)_0xf31721=_0x369136;_0x44a5cd[_0xf31721]=_0xa702e3[_0x369136];}),__exportStar=this&&this[a9_0x8e9449(0x128)]||function(_0x573fd3,_0xb1d857){var _0x1edec2=a9_0x8e9449;for(var _0xc951b8 in _0x573fd3)if(_0xc951b8!==_0x1edec2(0x122)&&!Object[_0x1edec2(0x141)][_0x1edec2(0x116)][_0x1edec2(0x124)](_0xb1d857,_0xc951b8))__createBinding(_0xb1d857,_0x573fd3,_0xc951b8);};Object[a9_0x8e9449(0x117)](exports,'__esModule',{'value':!![]}),exports[a9_0x8e9449(0x10f)]=exports[a9_0x8e9449(0x11a)]=exports['Scope']=exports[a9_0x8e9449(0x13a)]=exports[a9_0x8e9449(0x140)]=exports[a9_0x8e9449(0x123)]=exports[a9_0x8e9449(0x10c)]=exports[a9_0x8e9449(0x12c)]=exports[a9_0x8e9449(0x11e)]=exports[a9_0x8e9449(0x133)]=exports['Query']=exports['Param']=exports['Body']=exports['Fields']=exports[a9_0x8e9449(0x129)]=exports[a9_0x8e9449(0x134)]=exports[a9_0x8e9449(0x121)]=exports['ValidatorService']=exports['ValidatorError']=exports['ExcelService']=exports['ApiService']=exports[a9_0x8e9449(0x115)]=exports[a9_0x8e9449(0x10d)]=exports['QueueService']=exports['ApiError']=exports[a9_0x8e9449(0x119)]=exports[a9_0x8e9449(0x13b)]=exports[a9_0x8e9449(0x13e)]=exports['Api']=void 0x0;const getAppsConfig_1=require('./helper/getAppsConfig');Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x10f),{'enumerable':!![],'get':function(){var _0x2e4097=a9_0x8e9449;return getAppsConfig_1[_0x2e4097(0x10f)];}}),__exportStar(require(a9_0x8e9449(0x138)),exports),__exportStar(require(a9_0x8e9449(0x12e)),exports);var ActionApi_1=require(a9_0x8e9449(0x11b));Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x12a),{'enumerable':!![],'get':function(){return ActionApi_1['Api'];}});var Action_1=require(a9_0x8e9449(0x113));Object['defineProperty'](exports,a9_0x8e9449(0x13e),{'enumerable':!![],'get':function(){var _0x94c8af=a9_0x8e9449;return Action_1[_0x94c8af(0x13e)];}});var ActionApitest_1=require('./decorator/ActionApitest');Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x13b),{'enumerable':!![],'get':function(){var _0x34d094=a9_0x8e9449;return ActionApitest_1[_0x34d094(0x13b)];}});var getRoutes_1=require('./helper/getRoutes');Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x119),{'enumerable':!![],'get':function(){var _0xc52583=a9_0x8e9449;return getRoutes_1[_0xc52583(0x119)];}});var ApiError_1=require(a9_0x8e9449(0x147));function a9_0x455a(_0xf74d26,_0x22ba0f){var _0x21ea78=a9_0x21ea();return a9_0x455a=function(_0x455a3a,_0x4b1418){_0x455a3a=_0x455a3a-0x10b;var _0x4be8ed=_0x21ea78[_0x455a3a];return _0x4be8ed;},a9_0x455a(_0xf74d26,_0x22ba0f);}Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x13d),{'enumerable':!![],'get':function(){var _0x1729cd=a9_0x8e9449;return ApiError_1[_0x1729cd(0x13d)];}});var task_1=require(a9_0x8e9449(0x12d));Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x114),{'enumerable':!![],'get':function(){var _0x16247c=a9_0x8e9449;return task_1[_0x16247c(0x114)];}});var cache_1=require(a9_0x8e9449(0x118));Object[a9_0x8e9449(0x117)](exports,'CacheService',{'enumerable':!![],'get':function(){var _0x402062=a9_0x8e9449;return cache_1[_0x402062(0x10d)];}});var event_1=require(a9_0x8e9449(0x12b));Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x115),{'enumerable':!![],'get':function(){var _0x15103a=a9_0x8e9449;return event_1[_0x15103a(0x115)];}});function a9_0x21ea(){var _0x19b8ac=['ExcelService','ApiError','Action','2910698rOtSql','Provide','prototype','9469933GOAlUs','create','getOwnPropertyDescriptor','get','CustomConfiguration','./exception/ApiError','1946656cRUjKJ','Scope','1766lYMIiM','Config','CacheService','configurable','getAppsConfig','__esModule','ValidatorError','Param','./decorator/Action','QueueService','EventService','hasOwnProperty','defineProperty','@anncic-api/cache','getRoutes','ScopeEnum','./decorator/ActionApi','937bpGFNH','11195SAXsgc','Init','10EBiKeI','Query','Configuration','default','Logger','call','writable','1070832jaTyts','./service/ApiService','__exportStar','Files','Api','@anncic-api/event','App','@midwayjs/task','./service/ApitestService','Body','288GZGrlA','9Tcvgew','ApiService','Headers','File','@midwayjs/decorator','1052838hEURXs','ValidatorService','./types/common','Fields','Inject','Apitest'];a9_0x21ea=function(){return _0x19b8ac;};return a9_0x21ea();}var ApiService_1=require(a9_0x8e9449(0x127));Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x132),{'enumerable':!![],'get':function(){var _0x59abea=a9_0x8e9449;return ApiService_1[_0x59abea(0x132)];}});var ExcelService_1=require('./service/ExcelService');Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x13c),{'enumerable':!![],'get':function(){var _0x20b0fb=a9_0x8e9449;return ExcelService_1[_0x20b0fb(0x13c)];}});var validator_1=require('@anncic-api/validator');Object['defineProperty'](exports,a9_0x8e9449(0x111),{'enumerable':!![],'get':function(){var _0x282db3=a9_0x8e9449;return validator_1[_0x282db3(0x111)];}}),Object['defineProperty'](exports,a9_0x8e9449(0x137),{'enumerable':!![],'get':function(){var _0x4318cd=a9_0x8e9449;return validator_1[_0x4318cd(0x137)];}});var configuration_1=require('./configuration');Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x121),{'enumerable':!![],'get':function(){var _0x4fc90a=a9_0x8e9449;return configuration_1[_0x4fc90a(0x146)];}});var decorator_1=require('@midwayjs/decorator');Object['defineProperty'](exports,a9_0x8e9449(0x134),{'enumerable':!![],'get':function(){return decorator_1['File'];}}),Object[a9_0x8e9449(0x117)](exports,'Files',{'enumerable':!![],'get':function(){var _0x1c93d4=a9_0x8e9449;return decorator_1[_0x1c93d4(0x129)];}}),Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x139),{'enumerable':!![],'get':function(){var _0x38ded5=a9_0x8e9449;return decorator_1[_0x38ded5(0x139)];}}),Object[a9_0x8e9449(0x117)](exports,'Body',{'enumerable':!![],'get':function(){var _0x5eb9f6=a9_0x8e9449;return decorator_1[_0x5eb9f6(0x12f)];}}),Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x112),{'enumerable':!![],'get':function(){var _0x49b33d=a9_0x8e9449;return decorator_1[_0x49b33d(0x112)];}}),Object['defineProperty'](exports,'Query',{'enumerable':!![],'get':function(){var _0x2f57db=a9_0x8e9449;return decorator_1[_0x2f57db(0x120)];}}),Object['defineProperty'](exports,a9_0x8e9449(0x133),{'enumerable':!![],'get':function(){var _0x3c6852=a9_0x8e9449;return decorator_1[_0x3c6852(0x133)];}}),Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x11e),{'enumerable':!![],'get':function(){return decorator_1['Init'];}});var decorator_2=require(a9_0x8e9449(0x135));Object[a9_0x8e9449(0x117)](exports,'App',{'enumerable':!![],'get':function(){var _0x2eba01=a9_0x8e9449;return decorator_2[_0x2eba01(0x12c)];}}),Object[a9_0x8e9449(0x117)](exports,'Config',{'enumerable':!![],'get':function(){var _0x5cb8f3=a9_0x8e9449;return decorator_2[_0x5cb8f3(0x10c)];}}),Object['defineProperty'](exports,'Logger',{'enumerable':!![],'get':function(){return decorator_2['Logger'];}}),Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x140),{'enumerable':!![],'get':function(){return decorator_2['Provide'];}}),Object['defineProperty'](exports,a9_0x8e9449(0x13a),{'enumerable':!![],'get':function(){var _0x4d0b27=a9_0x8e9449;return decorator_2[_0x4d0b27(0x13a)];}}),Object[a9_0x8e9449(0x117)](exports,a9_0x8e9449(0x149),{'enumerable':!![],'get':function(){var _0x5b0a42=a9_0x8e9449;return decorator_2[_0x5b0a42(0x149)];}}),Object[a9_0x8e9449(0x117)](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x39bbd5=a9_0x8e9449;return decorator_2[_0x39bbd5(0x11a)];}}),global[a9_0x8e9449(0x10f)]=getAppsConfig_1[a9_0x8e9449(0x10f)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a10_0x14c2d5=a10_0x251f;(function(_0x34363a,_0x512ff3){var _0x1c3e6d=a10_0x251f,_0x58d30b=_0x34363a();while(!![]){try{var _0x257085=-parseInt(_0x1c3e6d(0x20b))/0x1*(parseInt(_0x1c3e6d(0x1f9))/0x2)+-parseInt(_0x1c3e6d(0x21c))/0x3*(-parseInt(_0x1c3e6d(0x1f6))/0x4)+-parseInt(_0x1c3e6d(0x217))/0x5*(parseInt(_0x1c3e6d(0x221))/0x6)+parseInt(_0x1c3e6d(0x210))/0x7+parseInt(_0x1c3e6d(0x1f0))/0x8+-parseInt(_0x1c3e6d(0x223))/0x9*(parseInt(_0x1c3e6d(0x20e))/0xa)+parseInt(_0x1c3e6d(0x203))/0xb;if(_0x257085===_0x512ff3)break;else _0x58d30b['push'](_0x58d30b['shift']());}catch(_0x37b02f){_0x58d30b['push'](_0x58d30b['shift']());}}}(a10_0x2ef6,0x860b9));var __decorate=this&&this[a10_0x14c2d5(0x215)]||function(_0x1a99a2,_0x5366ee,_0x3caa59,_0x2e3a13){var _0x2e7495=a10_0x14c2d5,_0x3d315e=arguments[_0x2e7495(0x229)],_0x4a22d2=_0x3d315e<0x3?_0x5366ee:_0x2e3a13===null?_0x2e3a13=Object[_0x2e7495(0x218)](_0x5366ee,_0x3caa59):_0x2e3a13,_0x4634c3;if(typeof Reflect===_0x2e7495(0x206)&&typeof Reflect[_0x2e7495(0x219)]===_0x2e7495(0x1f3))_0x4a22d2=Reflect[_0x2e7495(0x219)](_0x1a99a2,_0x5366ee,_0x3caa59,_0x2e3a13);else{for(var _0x44e84d=_0x1a99a2[_0x2e7495(0x229)]-0x1;_0x44e84d>=0x0;_0x44e84d--)if(_0x4634c3=_0x1a99a2[_0x44e84d])_0x4a22d2=(_0x3d315e<0x3?_0x4634c3(_0x4a22d2):_0x3d315e>0x3?_0x4634c3(_0x5366ee,_0x3caa59,_0x4a22d2):_0x4634c3(_0x5366ee,_0x3caa59))||_0x4a22d2;}return _0x3d315e>0x3&&_0x4a22d2&&Object['defineProperty'](_0x5366ee,_0x3caa59,_0x4a22d2),_0x4a22d2;},__metadata=this&&this['__metadata']||function(_0x530a8e,_0x53621b){var _0xce0ddd=a10_0x14c2d5;if(typeof Reflect===_0xce0ddd(0x206)&&typeof Reflect['metadata']===_0xce0ddd(0x1f3))return Reflect[_0xce0ddd(0x20f)](_0x530a8e,_0x53621b);};Object[a10_0x14c2d5(0x1f5)](exports,a10_0x14c2d5(0x228),{'value':!![]}),exports[a10_0x14c2d5(0x21e)]=void 0x0;const crypto_js_1=require('crypto-js'),decorator_1=require(a10_0x14c2d5(0x216)),ApiError_1=require('../exception/ApiError');function a10_0x251f(_0xf3d94e,_0x533ca2){var _0x2ef6e9=a10_0x2ef6();return a10_0x251f=function(_0x251f46,_0xa7b9e7){_0x251f46=_0x251f46-0x1f0;var _0x16e033=_0x2ef6e9[_0x251f46];return _0x16e033;},a10_0x251f(_0xf3d94e,_0x533ca2);}let ApiService=class ApiService{[a10_0x14c2d5(0x220)](_0x364080){var _0x3bfd65=a10_0x14c2d5,_0xdfe8bf;return _0x364080?(0x0,crypto_js_1[_0x3bfd65(0x201)])(_0x364080+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1[_0x3bfd65(0x201)])(_0x364080)['toString']()+((_0xdfe8bf=this['config'])===null||_0xdfe8bf===void 0x0?void 0x0:_0xdfe8bf[_0x3bfd65(0x220)]))['toString']())['toString']():'';}['getcheck'](_0x35b417,_0x59393d,_0x1395e2=Date['now']()){return{'Token':_0x35b417,'Logintime':_0x1395e2,'Checkcode':this['checkcode'](_0x35b417,_0x59393d,_0x1395e2)};}[a10_0x14c2d5(0x202)](_0x3d5735={}){var _0x1f6988=a10_0x14c2d5;const _0x4482fa=[],_0x5a4daf=Object[_0x1f6988(0x200)](Object[_0x1f6988(0x225)](_0x3d5735)[_0x1f6988(0x1f2)](_0x29d6a2=>[_0x29d6a2[0x0][_0x1f6988(0x22a)](),_0x29d6a2[0x1]]));for(let _0x220b97 of['device','requesttime',_0x1f6988(0x1f4),_0x1f6988(0x22b),'checkcode']){if(typeof _0x5a4daf[_0x220b97]==_0x1f6988(0x1fc))throw new AnnError(ApiError_1['ApiError']['HEADERS_LACK'],{'message':_0x1f6988(0x208)+_0x220b97});_0x4482fa[_0x1f6988(0x222)](_0x220b97+'='+_0x5a4daf[_0x220b97]);}if(Math[_0x1f6988(0x212)](_0x5a4daf[_0x1f6988(0x1f7)])-Date[_0x1f6988(0x20c)]()>this[_0x1f6988(0x209)][_0x1f6988(0x20d)])throw new AnnError(ApiError_1[_0x1f6988(0x1fb)][_0x1f6988(0x207)]);if(!this[_0x1f6988(0x209)][_0x1f6988(0x21f)][_0x5a4daf[_0x1f6988(0x1fd)]]||!this[_0x1f6988(0x209)]['devices'][_0x5a4daf[_0x1f6988(0x1fd)]]['secret']||!this[_0x1f6988(0x209)][_0x1f6988(0x21f)][_0x5a4daf[_0x1f6988(0x1fd)]]['checkcode'])throw new AnnError(ApiError_1[_0x1f6988(0x1fb)][_0x1f6988(0x21d)]);if(_0x5a4daf[_0x1f6988(0x1f4)]&&_0x5a4daf[_0x1f6988(0x21b)]!=this[_0x1f6988(0x21b)](_0x5a4daf[_0x1f6988(0x1f4)],_0x5a4daf[_0x1f6988(0x1fd)],_0x5a4daf['logintime']))throw new AnnError(ApiError_1[_0x1f6988(0x1fb)]['HEADERS_CHECKCODE']);return _0x4482fa['push']('secret='+this[_0x1f6988(0x209)][_0x1f6988(0x21f)][_0x5a4daf[_0x1f6988(0x1fd)]]['secret']),(0x0,crypto_js_1[_0x1f6988(0x201)])(_0x4482fa[_0x1f6988(0x204)]()[_0x1f6988(0x227)](''))[_0x1f6988(0x1ff)]();}[a10_0x14c2d5(0x21b)](_0x336637,_0x77e187,_0x50cc13=Date[a10_0x14c2d5(0x20c)]()){var _0x46f166=a10_0x14c2d5,_0x314041,_0x49fa72,_0x438246;if(!((_0x314041=this['config'])===null||_0x314041===void 0x0?void 0x0:_0x314041[_0x46f166(0x21f)][_0x77e187])||!((_0x438246=(_0x49fa72=this[_0x46f166(0x209)])===null||_0x49fa72===void 0x0?void 0x0:_0x49fa72[_0x46f166(0x21f)][_0x77e187])===null||_0x438246===void 0x0?void 0x0:_0x438246[_0x46f166(0x21b)]))throw new AnnError(ApiError_1[_0x46f166(0x1fb)][_0x46f166(0x21d)]);return(0x0,crypto_js_1[_0x46f166(0x201)])(_0x336637+(0x0,crypto_js_1['MD5'])(_0x50cc13+this[_0x46f166(0x209)]['devices'][_0x77e187]['checkcode'])[_0x46f166(0x1ff)]())[_0x46f166(0x1ff)]();}[a10_0x14c2d5(0x1f8)](_0x1071c3={}){var _0x298404=a10_0x14c2d5;const _0xb7b4f0=Object['fromEntries'](Object[_0x298404(0x225)](_0x1071c3)[_0x298404(0x1f2)](_0x27bcdf=>[_0x27bcdf[0x0]['toLowerCase'](),_0x27bcdf[0x1]]));if(!(_0xb7b4f0===null||_0xb7b4f0===void 0x0?void 0x0:_0xb7b4f0[_0x298404(0x213)]))throw new AnnError(ApiError_1[_0x298404(0x1fb)]['HEADERS_LACK'],{'message':_0x298404(0x224)});if((_0xb7b4f0===null||_0xb7b4f0===void 0x0?void 0x0:_0xb7b4f0[_0x298404(0x213)])!=this[_0x298404(0x202)](_0xb7b4f0))throw new AnnError(ApiError_1['ApiError'][_0x298404(0x211)]);return!![];}};function a10_0x2ef6(){var _0xf79d66=['ScopeEnum','ApiError','undefined','device','anncicapi','toString','fromEntries','MD5','getsign','8330674kzNfqf','sort','Config','object','TIMEOUT','缺少头信息:','config','Provide','1YHaRuA','now','timeout','10dlHIaK','metadata','587174vOqFRR','HEADERS_SIGNATURE','abs','signature','Singleton','__decorate','@midwayjs/decorator','31775SwutUa','getOwnPropertyDescriptor','decorate','design:type','checkcode','843KDqpSP','HEADERS_DEVICE','ApiService','devices','password','564yBjDIB','push','5597973LtqnAk','缺少头信息:signature','entries','prototype','join','__esModule','length','toLowerCase','logintime','7466256LWuaiH','Scope','map','function','token','defineProperty','6924OkTcJl','requesttime','checksign','984986dSpUaA'];a10_0x2ef6=function(){return _0xf79d66;};return a10_0x2ef6();}__decorate([(0x0,decorator_1[a10_0x14c2d5(0x205)])(a10_0x14c2d5(0x1fe)),__metadata(a10_0x14c2d5(0x21a),Object)],ApiService[a10_0x14c2d5(0x226)],a10_0x14c2d5(0x209),void 0x0),ApiService=__decorate([(0x0,decorator_1[a10_0x14c2d5(0x20a)])(),(0x0,decorator_1[a10_0x14c2d5(0x1f1)])(decorator_1[a10_0x14c2d5(0x1fa)][a10_0x14c2d5(0x214)])],ApiService),exports[a10_0x14c2d5(0x21e)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a11_0x33ad(_0x137652,_0x3f809b){const _0x144ed1=a11_0x144e();return a11_0x33ad=function(_0x33add0,_0x5e24fc){_0x33add0=_0x33add0-0x12a;let _0x1530dc=_0x144ed1[_0x33add0];return _0x1530dc;},a11_0x33ad(_0x137652,_0x3f809b);}const a11_0x5ad12e=a11_0x33ad;(function(_0x4d3ab9,_0x2fd2d1){const _0x4ae718=a11_0x33ad,_0x49a2f0=_0x4d3ab9();while(!![]){try{const _0x24c126=-parseInt(_0x4ae718(0x13e))/0x1*(parseInt(_0x4ae718(0x155))/0x2)+parseInt(_0x4ae718(0x167))/0x3+-parseInt(_0x4ae718(0x12c))/0x4*(-parseInt(_0x4ae718(0x13f))/0x5)+-parseInt(_0x4ae718(0x170))/0x6*(-parseInt(_0x4ae718(0x159))/0x7)+-parseInt(_0x4ae718(0x164))/0x8+parseInt(_0x4ae718(0x17d))/0x9*(parseInt(_0x4ae718(0x14c))/0xa)+parseInt(_0x4ae718(0x15f))/0xb*(-parseInt(_0x4ae718(0x168))/0xc);if(_0x24c126===_0x2fd2d1)break;else _0x49a2f0['push'](_0x49a2f0['shift']());}catch(_0x501943){_0x49a2f0['push'](_0x49a2f0['shift']());}}}(a11_0x144e,0xb4681));function a11_0x144e(){const _0x5394f0=['75803PegcTK','/apitest-:module','design:paramtypes','Provide','getOwnPropertyDescriptor','__apiList__','87945gkxVwd','../helper/getRoutes','method','ApitestStaticController','design:type','7247456InoUYm','module','devices','4433112LwDOrs','3936WSYIAy','ctx','getRoutes','substring','Environment','join','metadata','Singleton','642bBmKlm','Param','__esModule','application/javascript;\x20charset=utf-8','Get','public,\x20max-age=604800','ScopeEnum','__devices__','replace','readFileSync','.css','apitesthtml','Inject','72esrVmB','utf-8','@midwayjs/decorator','text/css;\x20charset=utf-8','3451920UaYlSq','apidoc','apiteststatic','route','url','/apiteststatic/*','content-type','filepath','prototype','ApitestService','Scope','apitestmodule','anncicapi','Config','path','push','cache-control','@midwayjs/core','1gKPleV','5WsfBBm','set','extname','existsSync','__param','/apiteststatic/','length','request','routes','function','__metadata','design:returntype','Controller','1455130FxEBhI','config','apitest','../../public/','summary','isDevelopmentEnvironment','/apitest','object','/index.html','792508xTjgkl','../../public/index.html','MidwayEnvironmentService','decorate'];a11_0x144e=function(){return _0x5394f0;};return a11_0x144e();}var __decorate=this&&this['__decorate']||function(_0x4999e2,_0xce1cc9,_0x11ecc5,_0x4ee5ec){const _0x313c29=a11_0x33ad;var _0x3ca509=arguments[_0x313c29(0x145)],_0x218ebd=_0x3ca509<0x3?_0xce1cc9:_0x4ee5ec===null?_0x4ee5ec=Object[_0x313c29(0x15d)](_0xce1cc9,_0x11ecc5):_0x4ee5ec,_0xf09883;if(typeof Reflect===_0x313c29(0x153)&&typeof Reflect[_0x313c29(0x158)]===_0x313c29(0x148))_0x218ebd=Reflect[_0x313c29(0x158)](_0x4999e2,_0xce1cc9,_0x11ecc5,_0x4ee5ec);else{for(var _0x531cd0=_0x4999e2[_0x313c29(0x145)]-0x1;_0x531cd0>=0x0;_0x531cd0--)if(_0xf09883=_0x4999e2[_0x531cd0])_0x218ebd=(_0x3ca509<0x3?_0xf09883(_0x218ebd):_0x3ca509>0x3?_0xf09883(_0xce1cc9,_0x11ecc5,_0x218ebd):_0xf09883(_0xce1cc9,_0x11ecc5))||_0x218ebd;}return _0x3ca509>0x3&&_0x218ebd&&Object['defineProperty'](_0xce1cc9,_0x11ecc5,_0x218ebd),_0x218ebd;},__metadata=this&&this[a11_0x5ad12e(0x149)]||function(_0x5a2422,_0x3262a8){const _0x55fbfb=a11_0x5ad12e;if(typeof Reflect===_0x55fbfb(0x153)&&typeof Reflect[_0x55fbfb(0x16e)]===_0x55fbfb(0x148))return Reflect['metadata'](_0x5a2422,_0x3262a8);},__param=this&&this[a11_0x5ad12e(0x143)]||function(_0x5363b1,_0x181f7f){return function(_0x4bdb93,_0x46a711){_0x181f7f(_0x4bdb93,_0x46a711,_0x5363b1);};};Object['defineProperty'](exports,a11_0x5ad12e(0x172),{'value':!![]}),exports[a11_0x5ad12e(0x162)]=exports[a11_0x5ad12e(0x135)]=void 0x0;const path_1=require(a11_0x5ad12e(0x13a)),fs_1=require('fs'),core_1=require(a11_0x5ad12e(0x13d)),decorator_1=require(a11_0x5ad12e(0x12a)),decorator_2=require(a11_0x5ad12e(0x12a)),getRoutes_1=require(a11_0x5ad12e(0x160));let ApitestService=class ApitestService{async[a11_0x5ad12e(0x12d)](_0x531f63){const _0x47c68d=a11_0x5ad12e,_0x23ba14=(0x0,getRoutes_1[_0x47c68d(0x16a)])(_0x531f63),_0x29fc87=[];for(let _0x4328cd in _0x23ba14){for(let _0x286c0c in _0x23ba14[_0x4328cd][_0x47c68d(0x147)]){let _0x5f2de5=_0x23ba14[_0x4328cd]['routes'][_0x286c0c],_0x122991=[];for(let _0x52b1ce in _0x5f2de5[_0x47c68d(0x146)]){_0x122991[_0x47c68d(0x13b)](_0x5f2de5[_0x47c68d(0x146)][_0x52b1ce]);}_0x29fc87[_0x47c68d(0x13b)]({'title':_0x23ba14[_0x4328cd][_0x47c68d(0x150)]+':'+_0x5f2de5[_0x47c68d(0x150)],'prefix':_0x23ba14[_0x4328cd]['prefix'],'router':_0x5f2de5[_0x47c68d(0x12f)],'method':_0x5f2de5[_0x47c68d(0x161)],'describe':_0x5f2de5['description']||'','filepath':_0x23ba14[_0x4328cd]['filepath']||'','request':_0x122991});}}const _0x619068=(0x0,path_1[_0x47c68d(0x16d)])(__dirname,_0x47c68d(0x156));return(0x0,fs_1[_0x47c68d(0x179)])(_0x619068,{'encoding':_0x47c68d(0x17e)})['replace'](/__res__/g,'/apiteststatic/')[_0x47c68d(0x178)](_0x47c68d(0x15e),JSON['stringify'](_0x29fc87))[_0x47c68d(0x178)](_0x47c68d(0x177),JSON['stringify'](this['config'][_0x47c68d(0x166)]));}};__decorate([(0x0,decorator_2[a11_0x5ad12e(0x139)])(a11_0x5ad12e(0x138)),__metadata(a11_0x5ad12e(0x163),Object)],ApitestService[a11_0x5ad12e(0x134)],a11_0x5ad12e(0x14d),void 0x0),ApitestService=__decorate([(0x0,decorator_1[a11_0x5ad12e(0x15c)])(a11_0x5ad12e(0x14e)),(0x0,decorator_2[a11_0x5ad12e(0x136)])(decorator_2[a11_0x5ad12e(0x176)][a11_0x5ad12e(0x16f)])],ApitestService),exports[a11_0x5ad12e(0x135)]=ApitestService;let ApitestStaticController=class ApitestStaticController{async[a11_0x5ad12e(0x17b)](){const _0x7e5494=a11_0x5ad12e;if(this[_0x7e5494(0x14e)]){const _0x3679f0={'module':![]};return this[_0x7e5494(0x16c)][_0x7e5494(0x151)]()&&(_0x3679f0['filepath']=!![]),await this[_0x7e5494(0x135)][_0x7e5494(0x12d)](_0x3679f0);}return'';}async[a11_0x5ad12e(0x137)](_0x47088f){const _0x173af9=a11_0x5ad12e;if(this[_0x173af9(0x14e)]){const _0x3d8a79={'module':_0x47088f};return this[_0x173af9(0x16c)]['isDevelopmentEnvironment']()&&(_0x3d8a79[_0x173af9(0x133)]=!![]),await this['ApitestService']['apidoc'](_0x3d8a79);}return'';}async[a11_0x5ad12e(0x12e)](){const _0x590f0f=a11_0x5ad12e;if((0x0,path_1[_0x590f0f(0x141)])(this[_0x590f0f(0x169)]['request'][_0x590f0f(0x130)])){var _0xb07bb7=(0x0,path_1[_0x590f0f(0x16d)])(__dirname,_0x590f0f(0x14f)+this[_0x590f0f(0x169)]['request'][_0x590f0f(0x130)][_0x590f0f(0x178)](_0x590f0f(0x144),'/'));if(_0xb07bb7[_0x590f0f(0x16b)](_0xb07bb7[_0x590f0f(0x145)]-0xb)!=_0x590f0f(0x154)){this[_0x590f0f(0x169)]['set'](_0x590f0f(0x13c),_0x590f0f(0x175));if((0x0,path_1[_0x590f0f(0x141)])(this['ctx'][_0x590f0f(0x146)][_0x590f0f(0x130)])=='.js')this[_0x590f0f(0x169)][_0x590f0f(0x140)]('content-type',_0x590f0f(0x173));else(0x0,path_1[_0x590f0f(0x141)])(this[_0x590f0f(0x169)][_0x590f0f(0x146)][_0x590f0f(0x130)])==_0x590f0f(0x17a)&&this[_0x590f0f(0x169)][_0x590f0f(0x140)](_0x590f0f(0x132),_0x590f0f(0x12b));return(0x0,fs_1[_0x590f0f(0x142)])(_0xb07bb7)&&(0x0,fs_1['readFileSync'])(_0xb07bb7,{'encoding':_0x590f0f(0x17e)});}}return'';}};__decorate([(0x0,decorator_2[a11_0x5ad12e(0x17c)])(),__metadata(a11_0x5ad12e(0x163),Object)],ApitestStaticController['prototype'],'ctx',void 0x0),__decorate([(0x0,decorator_2[a11_0x5ad12e(0x17c)])(),__metadata(a11_0x5ad12e(0x163),core_1[a11_0x5ad12e(0x157)])],ApitestStaticController[a11_0x5ad12e(0x134)],a11_0x5ad12e(0x16c),void 0x0),__decorate([(0x0,decorator_2[a11_0x5ad12e(0x17c)])(),__metadata(a11_0x5ad12e(0x163),ApitestService)],ApitestStaticController[a11_0x5ad12e(0x134)],a11_0x5ad12e(0x135),void 0x0),__decorate([(0x0,decorator_2['Config'])(a11_0x5ad12e(0x14e)),__metadata(a11_0x5ad12e(0x163),Boolean)],ApitestStaticController[a11_0x5ad12e(0x134)],'apitest',void 0x0),__decorate([(0x0,decorator_2[a11_0x5ad12e(0x139)])(a11_0x5ad12e(0x138)),__metadata(a11_0x5ad12e(0x163),Object)],ApitestStaticController['prototype'],a11_0x5ad12e(0x14d),void 0x0),__decorate([(0x0,decorator_1['Get'])(a11_0x5ad12e(0x152)),__metadata(a11_0x5ad12e(0x163),Function),__metadata(a11_0x5ad12e(0x15b),[]),__metadata(a11_0x5ad12e(0x14a),Promise)],ApitestStaticController['prototype'],a11_0x5ad12e(0x17b),null),__decorate([(0x0,decorator_1[a11_0x5ad12e(0x174)])(a11_0x5ad12e(0x15a)),__param(0x0,(0x0,decorator_1[a11_0x5ad12e(0x171)])(a11_0x5ad12e(0x165))),__metadata(a11_0x5ad12e(0x163),Function),__metadata('design:paramtypes',[String]),__metadata(a11_0x5ad12e(0x14a),Promise)],ApitestStaticController[a11_0x5ad12e(0x134)],a11_0x5ad12e(0x137),null),__decorate([(0x0,decorator_1[a11_0x5ad12e(0x174)])(a11_0x5ad12e(0x131)),__metadata('design:type',Function),__metadata(a11_0x5ad12e(0x15b),[]),__metadata(a11_0x5ad12e(0x14a),Promise)],ApitestStaticController['prototype'],a11_0x5ad12e(0x12e),null),ApitestStaticController=__decorate([(0x0,decorator_1[a11_0x5ad12e(0x14b)])('/'),(0x0,decorator_2[a11_0x5ad12e(0x136)])(decorator_2[a11_0x5ad12e(0x176)]['Request'])],ApitestStaticController),exports['ApitestStaticController']=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a12_0x2b01(){const _0x25fdb5=['worksheets','prototype','col','__metadata','Api\x20Excel\x20Error:\x20','existsSync','/public/xlsx/','decorate','object','__esModule','parse','function','3865962tWouZC','app','getAppDir','metadata','length','ExcelService','Singleton','eachCell','Scope','App','get','Provide','random','header','99rrtFva','handler','keys','rowCount','3470840VkUNqB','mkdirSync','export','value','getWorksheet','389288AIkUWo','download','toString','69403iNwSVZ','getRow','getCell','318490SPzPcF','trim','substring','__decorate','cellCount','startsWith','koa-send','findRows','push','1995582PPAhlh','Sheet\x201','Workbook','replace','getOwnPropertyDescriptor','addWorksheet','1045apCEsw','@midwayjs/decorator','xlsx','6020399GpfpGJ','endsWith','key','5rxyOPp','2mKbHWW','defineProperty','readFile','.xlsx'];a12_0x2b01=function(){return _0x25fdb5;};return a12_0x2b01();}const a12_0x4ffc0b=a12_0x1e58;(function(_0x2fec56,_0x2d6669){const _0x21ac13=a12_0x1e58,_0x17776a=_0x2fec56();while(!![]){try{const _0x22acbd=parseInt(_0x21ac13(0xce))/0x1*(-parseInt(_0x21ac13(0xa4))/0x2)+-parseInt(_0x21ac13(0x97))/0x3+-parseInt(_0x21ac13(0xc6))/0x4+parseInt(_0x21ac13(0xa3))/0x5*(-parseInt(_0x21ac13(0xb4))/0x6)+-parseInt(_0x21ac13(0xa0))/0x7+-parseInt(_0x21ac13(0xcb))/0x8*(-parseInt(_0x21ac13(0xc2))/0x9)+parseInt(_0x21ac13(0xd1))/0xa*(parseInt(_0x21ac13(0x9d))/0xb);if(_0x22acbd===_0x2d6669)break;else _0x17776a['push'](_0x17776a['shift']());}catch(_0x88f28b){_0x17776a['push'](_0x17776a['shift']());}}}(a12_0x2b01,0x6ee5b));var __decorate=this&&this[a12_0x4ffc0b(0x91)]||function(_0x32391b,_0x381d81,_0x3e023a,_0x3d505e){const _0x366f39=a12_0x4ffc0b;var _0x5034ba=arguments[_0x366f39(0xb8)],_0x1f561e=_0x5034ba<0x3?_0x381d81:_0x3d505e===null?_0x3d505e=Object[_0x366f39(0x9b)](_0x381d81,_0x3e023a):_0x3d505e,_0x153ef8;if(typeof Reflect==='object'&&typeof Reflect[_0x366f39(0xaf)]===_0x366f39(0xb3))_0x1f561e=Reflect[_0x366f39(0xaf)](_0x32391b,_0x381d81,_0x3e023a,_0x3d505e);else{for(var _0x2979be=_0x32391b[_0x366f39(0xb8)]-0x1;_0x2979be>=0x0;_0x2979be--)if(_0x153ef8=_0x32391b[_0x2979be])_0x1f561e=(_0x5034ba<0x3?_0x153ef8(_0x1f561e):_0x5034ba>0x3?_0x153ef8(_0x381d81,_0x3e023a,_0x1f561e):_0x153ef8(_0x381d81,_0x3e023a))||_0x1f561e;}return _0x5034ba>0x3&&_0x1f561e&&Object[_0x366f39(0xa5)](_0x381d81,_0x3e023a,_0x1f561e),_0x1f561e;},__metadata=this&&this[a12_0x4ffc0b(0xab)]||function(_0x343d40,_0x4b3b00){const _0x547bdc=a12_0x4ffc0b;if(typeof Reflect===_0x547bdc(0xb0)&&typeof Reflect[_0x547bdc(0xb7)]===_0x547bdc(0xb3))return Reflect[_0x547bdc(0xb7)](_0x343d40,_0x4b3b00);};Object[a12_0x4ffc0b(0xa5)](exports,a12_0x4ffc0b(0xb1),{'value':!![]}),exports[a12_0x4ffc0b(0xb9)]=void 0x0;function a12_0x1e58(_0x1e5a44,_0x43ad2f){const _0x2b01ae=a12_0x2b01();return a12_0x1e58=function(_0x1e587f,_0x25b801){_0x1e587f=_0x1e587f-0x91;let _0x23a5d2=_0x2b01ae[_0x1e587f];return _0x23a5d2;},a12_0x1e58(_0x1e5a44,_0x43ad2f);}const fs=require('fs'),exceljs=require('exceljs'),koasend=require(a12_0x4ffc0b(0x94)),decorator_1=require(a12_0x4ffc0b(0x9e));let ExcelService=class ExcelService{async[a12_0x4ffc0b(0xb2)](_0x5ed002,_0x39a0d5,_0x2edcae=[0x0]){const _0x46df21=a12_0x4ffc0b;var _0x1dc3de,_0x4852a2;const _0x4d9ba0=new exceljs[(_0x46df21(0x99))](),_0x3b7763=[];let _0x25ce12=_0x5ed002[_0x46df21(0x9a)](/(\\|\/)/g,'/')[_0x46df21(0x9a)](/\/{2,}/g,'/');!(_0x25ce12===null||_0x25ce12===void 0x0?void 0x0:_0x25ce12[_0x46df21(0x93)]('/'))&&(_0x25ce12=this[_0x46df21(0xb5)]['getAppDir']()+'/'+_0x25ce12);try{await _0x4d9ba0[_0x46df21(0x9f)][_0x46df21(0xa6)](_0x25ce12);}catch(_0xd8f88b){return console['log'](_0x46df21(0xac)+_0x25ce12+'\x20is\x20read\x20fail'),_0x3b7763;}for(const _0x420346 of _0x2edcae){const _0x2dbe47=lodash['isNumber'](_0x420346)?((_0x1dc3de=_0x4d9ba0[_0x46df21(0xa8)])===null||_0x1dc3de===void 0x0?void 0x0:_0x1dc3de[_0x420346])||undefined:_0x4d9ba0[_0x46df21(0xca)](_0x420346);if(_0x2dbe47){var _0x3fac32=0x1;const _0x1df326=_0x2dbe47[_0x46df21(0xcf)](0x1),_0x35aa1a=await new Promise(_0xb43dba=>{const _0x15eec3=_0x46df21,_0x34f096={};_0x1df326[_0x15eec3(0xbb)]((_0x11d9ba,_0x9e9c94)=>{const _0x305c20=_0x15eec3;for(const _0x36ece0 of _0x39a0d5){if(_0x11d9ba[_0x305c20(0xc9)]==_0x36ece0[_0x305c20(0xc1)])_0x3fac32=0x2,_0x34f096[_0x36ece0[_0x305c20(0xa2)]]={'header':_0x11d9ba[_0x305c20(0xaa)],'handler':_0x36ece0['handler']};else{if(!_0x34f096[_0x36ece0[_0x305c20(0xa2)]])try{const _0x232df5=_0x1df326[_0x305c20(0xd0)](_0x36ece0[_0x305c20(0xc1)]);_0x232df5&&(_0x34f096[_0x36ece0['key']]={'header':_0x232df5[_0x305c20(0xaa)],'handler':_0x36ece0[_0x305c20(0xc3)]});}catch{}}}_0x1df326[_0x305c20(0x92)]==_0x9e9c94&&_0xb43dba(_0x34f096);});});for(const _0x2d35c3 of _0x2dbe47[_0x46df21(0x95)](_0x3fac32,_0x2dbe47[_0x46df21(0xc5)])){const _0x2e756c={};for(const _0x9e8ab8 in _0x35aa1a){_0x35aa1a[_0x9e8ab8]['header']&&(typeof((_0x4852a2=_0x35aa1a[_0x9e8ab8])===null||_0x4852a2===void 0x0?void 0x0:_0x4852a2[_0x46df21(0xc3)])==_0x46df21(0xb3)?_0x2e756c[_0x9e8ab8]=_0x35aa1a[_0x9e8ab8][_0x46df21(0xc3)](_0x2d35c3[_0x46df21(0xd0)](lodash[_0x46df21(0xd2)](''+_0x35aa1a[_0x9e8ab8][_0x46df21(0xc1)],'\x20'))[_0x46df21(0xcd)]()):_0x2e756c[_0x9e8ab8]=_0x2d35c3[_0x46df21(0xd0)](_0x35aa1a[_0x9e8ab8]['header'])['toString']());}Object[_0x46df21(0xc4)](_0x2e756c)[_0x46df21(0xb8)]>0x0&&_0x3b7763[_0x46df21(0x96)](_0x2e756c);}}}return _0x3b7763;}async[a12_0x4ffc0b(0xc8)](_0x3c2340,_0xd95dc9,_0x15d37c,_0x4a52de='public/xlsx'){const _0x176fd2=a12_0x4ffc0b;var _0x47c236,_0x38dc9e;const _0x1ac4aa=new exceljs[(_0x176fd2(0x99))](),_0x2a6b63={},_0x44527a=[],_0x4d7fe8=_0x1ac4aa[_0x176fd2(0x9c)](_0x176fd2(0x98),{'views':[{'state':'frozen','xSplit':0x1}]});for(const _0xa2e1ea in _0xd95dc9){_0x2a6b63[_0xd95dc9[_0xa2e1ea]['key']]=_0xd95dc9[_0xa2e1ea][_0x176fd2(0xc1)],_0x44527a[_0x176fd2(0x96)]({'header':_0xd95dc9[_0xa2e1ea][_0x176fd2(0xc1)],'key':(_0x47c236=_0xd95dc9[_0xa2e1ea])===null||_0x47c236===void 0x0?void 0x0:_0x47c236[_0x176fd2(0xa2)]['replace'](/\./g,'_')});}_0x4d7fe8['columns']=_0x44527a;for(const _0x460dd9 of _0x15d37c){const _0x215942={};for(const _0x33da24 in _0xd95dc9){typeof((_0x38dc9e=_0xd95dc9[_0x33da24])===null||_0x38dc9e===void 0x0?void 0x0:_0x38dc9e[_0x176fd2(0xc3)])==_0x176fd2(0xb3)?_0x215942[_0xd95dc9[_0x33da24]['key'][_0x176fd2(0x9a)](/\./g,'_')]=await _0xd95dc9[_0x33da24][_0x176fd2(0xc3)](_0x460dd9):_0x215942[_0xd95dc9[_0x33da24][_0x176fd2(0xa2)][_0x176fd2(0x9a)](/\./g,'_')]=lodash[_0x176fd2(0xbe)](_0x460dd9,_0xd95dc9[_0x33da24]['key'],'');}_0x4d7fe8['addRow'](_0x215942);}let _0x4643b='';const _0x13eeb1=_0x3c2340+'-'+lodash[_0x176fd2(0xc0)](0x2710,0x1869f)+_0x176fd2(0xa7);if(_0x4a52de&&_0x4a52de[_0x176fd2(0x93)]('/'))_0x4643b=_0x4a52de+'/'+_0x13eeb1;else _0x4a52de&&!_0x4a52de[_0x176fd2(0x93)]('/')&&!_0x4a52de['startsWith']('\x5c')?_0x4643b=this[_0x176fd2(0xb5)]['getAppDir']()+'/'+_0x4a52de+'/'+_0x13eeb1:_0x4643b=this[_0x176fd2(0xb5)][_0x176fd2(0xb6)]()+'/public/xlsx';return(_0x4643b[_0x176fd2(0xa1)]('/')||_0x4643b['endsWith']('\x5c'))&&(_0x4643b=_0x4643b[_0x176fd2(0xd3)](0x0,_0x4643b[_0x176fd2(0xb8)]-0x1)),_0x4643b=_0x4643b[_0x176fd2(0x9a)](/(\\|\/)/g,'/')[_0x176fd2(0x9a)](/\/{2,}/g,'/'),!fs[_0x176fd2(0xad)](_0x4643b)&&fs[_0x176fd2(0xc7)](_0x4643b,{'recursive':!![]}),await _0x1ac4aa[_0x176fd2(0x9f)]['writeFile']((_0x4643b+'/'+_0x13eeb1)[_0x176fd2(0x9a)](/(\\|\/)/g,'/')[_0x176fd2(0x9a)](/\/{2,}/g,'/')),{'filename':_0x13eeb1,'filepath':_0x4643b};}async[a12_0x4ffc0b(0xcc)](_0x396582,_0x3bc907){const _0x39d601=a12_0x4ffc0b;await koasend(_0x396582,_0x39d601(0xae)+_0x3bc907);}};__decorate([(0x0,decorator_1[a12_0x4ffc0b(0xbd)])(),__metadata('design:type',Object)],ExcelService[a12_0x4ffc0b(0xa9)],'app',void 0x0),ExcelService=__decorate([(0x0,decorator_1[a12_0x4ffc0b(0xbf)])(),(0x0,decorator_1[a12_0x4ffc0b(0xbc)])(decorator_1['ScopeEnum'][a12_0x4ffc0b(0xba)])],ExcelService),exports[a12_0x4ffc0b(0xb9)]=ExcelService;
|
package/dist/types/action.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ValidatorOptions } from "@anncic-api/validator";
|
|
|
2
2
|
import { MiddlewareParamArray } from '@midwayjs/decorator';
|
|
3
3
|
export declare const ACTION_KEY = "anncic-api:action";
|
|
4
4
|
export declare const ACTION_ROUTE_KEY = "anncic-api:action:route";
|
|
5
|
+
export declare const APPSCONFIG_KEY = "anncic-api:apps:config";
|
|
5
6
|
export interface ActionOption {
|
|
6
7
|
prefix?: string;
|
|
7
8
|
alias?: string[];
|
|
@@ -21,3 +22,5 @@ export interface ActionApiOption {
|
|
|
21
22
|
middlewareIgnore?: MiddlewareParamArray;
|
|
22
23
|
ignoreGlobalPrefix?: boolean;
|
|
23
24
|
}
|
|
25
|
+
export declare class AppsConfigTmp {
|
|
26
|
+
}
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a13_0x4eb66a=a13_0x56f9;function a13_0x56f9(_0x313637,_0x838ff4){var _0x11ef30=a13_0x11ef();return a13_0x56f9=function(_0x56f995,_0x23e492){_0x56f995=_0x56f995-0x15e;var _0x5bd65d=_0x11ef30[_0x56f995];return _0x5bd65d;},a13_0x56f9(_0x313637,_0x838ff4);}(function(_0x4e70b8,_0x1eef83){var _0x3935ff=a13_0x56f9,_0x256e71=_0x4e70b8();while(!![]){try{var _0x37a1fb=-parseInt(_0x3935ff(0x16c))/0x1*(-parseInt(_0x3935ff(0x164))/0x2)+-parseInt(_0x3935ff(0x16e))/0x3+parseInt(_0x3935ff(0x168))/0x4*(parseInt(_0x3935ff(0x161))/0x5)+-parseInt(_0x3935ff(0x163))/0x6+-parseInt(_0x3935ff(0x16a))/0x7*(parseInt(_0x3935ff(0x15e))/0x8)+-parseInt(_0x3935ff(0x160))/0x9+parseInt(_0x3935ff(0x16d))/0xa;if(_0x37a1fb===_0x1eef83)break;else _0x256e71['push'](_0x256e71['shift']());}catch(_0x447c04){_0x256e71['push'](_0x256e71['shift']());}}}(a13_0x11ef,0x90d7a));Object[a13_0x4eb66a(0x162)](exports,a13_0x4eb66a(0x16b),{'value':!![]}),exports[a13_0x4eb66a(0x15f)]=exports[a13_0x4eb66a(0x16f)]=exports[a13_0x4eb66a(0x169)]=exports[a13_0x4eb66a(0x167)]=void 0x0,exports['ACTION_KEY']=a13_0x4eb66a(0x165),exports['ACTION_ROUTE_KEY']=a13_0x4eb66a(0x166),exports[a13_0x4eb66a(0x16f)]='anncic-api:apps:config';class AppsConfigTmp{}function a13_0x11ef(){var _0x4ec4ae=['ACTION_KEY','590636sXRjms','ACTION_ROUTE_KEY','7FIrdub','__esModule','2042xxbPjs','15123290hsPxGR','752475AZQatM','APPSCONFIG_KEY','5576712ohVXLN','AppsConfigTmp','7525998ATsNhp','5KNqGjg','defineProperty','2323800SRUQii','1082jMBQTd','anncic-api:action','anncic-api:action:route'];a13_0x11ef=function(){return _0x4ec4ae;};return a13_0x11ef();}exports[a13_0x4eb66a(0x15f)]=AppsConfigTmp;
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a14_0xeba5(_0x3cd208,_0x46f500){var _0x3566cc=a14_0x3566();return a14_0xeba5=function(_0xeba5e4,_0x5a266a){_0xeba5e4=_0xeba5e4-0x154;var _0x135849=_0x3566cc[_0xeba5e4];return _0x135849;},a14_0xeba5(_0x3cd208,_0x46f500);}var a14_0x4eeb58=a14_0xeba5;function a14_0x3566(){var _0x4718b6=['prototype','getOwnPropertyDescriptor','RuleType','design:type','length','分页数量','trim','第一页为1,第二页为2','@anncic-api/validator','Rule','valid','__metadata','1:是;0:否','167474cYjfMF','PageDTO','defineProperty','object','_isreverse','_order','metadata','5oJEiBL','4441760iZMiVv','decorate','6191444UcBrOU','min','42ZTFMzi','integer','_page','string','number','_size','__decorate','86468kuJLlz','2556963XUbgfK','function','是否倒序','536325IjEikb','2969082AmCcef','__esModule'];a14_0x3566=function(){return _0x4718b6;};return a14_0x3566();}(function(_0x3fe5e2,_0x4a3702){var _0x5077b2=a14_0xeba5,_0x571bfe=_0x3fe5e2();while(!![]){try{var _0x200c77=-parseInt(_0x5077b2(0x176))/0x1*(-parseInt(_0x5077b2(0x16f))/0x2)+-parseInt(_0x5077b2(0x154))/0x3*(parseInt(_0x5077b2(0x15b))/0x4)+-parseInt(_0x5077b2(0x15f))/0x5+parseInt(_0x5077b2(0x160))/0x6+parseInt(_0x5077b2(0x179))/0x7+-parseInt(_0x5077b2(0x177))/0x8+-parseInt(_0x5077b2(0x15c))/0x9;if(_0x200c77===_0x4a3702)break;else _0x571bfe['push'](_0x571bfe['shift']());}catch(_0x37de0f){_0x571bfe['push'](_0x571bfe['shift']());}}}(a14_0x3566,0x85fba));var __decorate=this&&this[a14_0x4eeb58(0x15a)]||function(_0x29b52d,_0x19289b,_0x3a509b,_0x34e1e4){var _0x5001c6=a14_0x4eeb58,_0x5b7f16=arguments[_0x5001c6(0x166)],_0x1cd3b6=_0x5b7f16<0x3?_0x19289b:_0x34e1e4===null?_0x34e1e4=Object[_0x5001c6(0x163)](_0x19289b,_0x3a509b):_0x34e1e4,_0x19f85f;if(typeof Reflect===_0x5001c6(0x172)&&typeof Reflect[_0x5001c6(0x178)]===_0x5001c6(0x15d))_0x1cd3b6=Reflect[_0x5001c6(0x178)](_0x29b52d,_0x19289b,_0x3a509b,_0x34e1e4);else{for(var _0x378421=_0x29b52d[_0x5001c6(0x166)]-0x1;_0x378421>=0x0;_0x378421--)if(_0x19f85f=_0x29b52d[_0x378421])_0x1cd3b6=(_0x5b7f16<0x3?_0x19f85f(_0x1cd3b6):_0x5b7f16>0x3?_0x19f85f(_0x19289b,_0x3a509b,_0x1cd3b6):_0x19f85f(_0x19289b,_0x3a509b))||_0x1cd3b6;}return _0x5b7f16>0x3&&_0x1cd3b6&&Object[_0x5001c6(0x171)](_0x19289b,_0x3a509b,_0x1cd3b6),_0x1cd3b6;},__metadata=this&&this[a14_0x4eeb58(0x16d)]||function(_0x271e29,_0x128d4b){var _0x4fc188=a14_0x4eeb58;if(typeof Reflect===_0x4fc188(0x172)&&typeof Reflect[_0x4fc188(0x175)]==='function')return Reflect[_0x4fc188(0x175)](_0x271e29,_0x128d4b);};Object[a14_0x4eeb58(0x171)](exports,a14_0x4eeb58(0x161),{'value':!![]}),exports[a14_0x4eeb58(0x170)]=void 0x0;const validator_1=require(a14_0x4eeb58(0x16a));class PageDTO{}__decorate([(0x0,validator_1[a14_0x4eeb58(0x16b)])('分页',validator_1['RuleType'][a14_0x4eeb58(0x158)]()[a14_0x4eeb58(0x155)]()[a14_0x4eeb58(0x17a)](0x1),a14_0x4eeb58(0x169)),__metadata(a14_0x4eeb58(0x165),Number)],PageDTO[a14_0x4eeb58(0x162)],a14_0x4eeb58(0x156),void 0x0),__decorate([(0x0,validator_1[a14_0x4eeb58(0x16b)])(a14_0x4eeb58(0x167),validator_1['RuleType'][a14_0x4eeb58(0x158)]()[a14_0x4eeb58(0x155)]()[a14_0x4eeb58(0x17a)](0x1)),__metadata(a14_0x4eeb58(0x165),Number)],PageDTO[a14_0x4eeb58(0x162)],a14_0x4eeb58(0x159),void 0x0),__decorate([(0x0,validator_1[a14_0x4eeb58(0x16b)])('排序方式',validator_1[a14_0x4eeb58(0x164)][a14_0x4eeb58(0x157)]()[a14_0x4eeb58(0x168)]()),__metadata('design:type',String)],PageDTO[a14_0x4eeb58(0x162)],a14_0x4eeb58(0x174),void 0x0),__decorate([(0x0,validator_1[a14_0x4eeb58(0x16b)])(a14_0x4eeb58(0x15e),validator_1[a14_0x4eeb58(0x164)][a14_0x4eeb58(0x158)]()['integer']()[a14_0x4eeb58(0x16c)](0x0,0x1),a14_0x4eeb58(0x16e)),__metadata(a14_0x4eeb58(0x165),Number)],PageDTO[a14_0x4eeb58(0x162)],a14_0x4eeb58(0x173),void 0x0),exports[a14_0x4eeb58(0x170)]=PageDTO;
|
package/index.d.ts
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
/// <reference types="@anncic-api/core" />
|
|
2
2
|
export * from './dist/index';
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
declare module '@midwayjs/koa/dist/interface' {
|
|
6
|
-
interface Context{
|
|
5
|
+
interface Context {
|
|
7
6
|
app: Application;
|
|
8
|
-
|
|
9
|
-
when(key: string, callbal:
|
|
7
|
+
|
|
8
|
+
when(key: string, callbal: (value: any) => {}): void;
|
|
10
9
|
only(keys: Array<Array<any>>): { [key: string]: any };
|
|
11
10
|
input(key?: string, defval?: any): any | { [key: string]: any } | any[];
|
|
12
11
|
|
|
13
12
|
ok(data?: any, extra?: any, code?: number): { code: number, data: any, extra: any };
|
|
14
13
|
err(msg: string, extra?: any, code?: number): { code: number, extra: any, msg: string };
|
|
15
14
|
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare global {
|
|
18
|
+
export function getAppsConfig(appName?: string): {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
16
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.15",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/cache": "^1.1.
|
|
21
|
-
"@anncic-api/core": "^1.1.
|
|
22
|
-
"@anncic-api/event": "^1.1.
|
|
23
|
-
"@anncic-api/typeorm": "^1.1.
|
|
24
|
-
"@anncic-api/validator": "^1.1.
|
|
20
|
+
"@anncic-api/cache": "^1.1.15",
|
|
21
|
+
"@anncic-api/core": "^1.1.15",
|
|
22
|
+
"@anncic-api/event": "^1.1.15",
|
|
23
|
+
"@anncic-api/typeorm": "^1.1.15",
|
|
24
|
+
"@anncic-api/validator": "^1.1.15",
|
|
25
25
|
"@midwayjs/cross-domain": "^3.5.0",
|
|
26
26
|
"@midwayjs/i18n": "^3.5.0",
|
|
27
27
|
"@midwayjs/koa": "^3.5.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@midwayjs/task": "^3.5.0",
|
|
30
30
|
"@midwayjs/upload": "^3.5.0",
|
|
31
31
|
"@types/bull": "^3.15.9",
|
|
32
|
-
"anncic-apihelper": "^1.1.
|
|
32
|
+
"anncic-apihelper": "^1.1.15",
|
|
33
33
|
"exceljs": "^4.3.0",
|
|
34
34
|
"koa-bodyparser": "^4.3.0",
|
|
35
35
|
"koa-send": "^5.0.1",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"javascript-obfuscator": "2.19.0",
|
|
42
42
|
"typescript": "^4.7.4"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "1bb790cbb0a88ead20bd2f92799ed0c510cdce01"
|
|
45
45
|
}
|