anncic-api 1.1.12 → 1.1.13
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_0x4bcbe6=a0_0x3e59;(function(_0x3978a4,_0x4b23f8){var _0x5574f0=a0_0x3e59,_0x1d3296=_0x3978a4();while(!![]){try{var _0x29e69e=-parseInt(_0x5574f0(0x10f))/0x1+parseInt(_0x5574f0(0x110))/0x2+-parseInt(_0x5574f0(0x11c))/0x3*(parseInt(_0x5574f0(0x116))/0x4)+parseInt(_0x5574f0(0x111))/0x5*(-parseInt(_0x5574f0(0x11a))/0x6)+parseInt(_0x5574f0(0x119))/0x7+parseInt(_0x5574f0(0x115))/0x8*(-parseInt(_0x5574f0(0x114))/0x9)+parseInt(_0x5574f0(0x112))/0xa*(parseInt(_0x5574f0(0x113))/0xb);if(_0x29e69e===_0x4b23f8)break;else _0x1d3296['push'](_0x1d3296['shift']());}catch(_0x32c7b1){_0x1d3296['push'](_0x1d3296['shift']());}}}(a0_0x590d,0x91f6c));function a0_0x590d(){var _0x262e1e=['24qxxVqH','2564vQOiHg','defineProperty','name','7543375TaVOXu','6arcpCh','dhauo1234420123gg3234901','462YOLmRQ','default','appDir','215699aMAkFv','1614464iNiAlF','5433155jUcYiz','40XzDFfJ','3377363kKuWwD','3342231ANeELd'];a0_0x590d=function(){return _0x262e1e;};return a0_0x590d();}function a0_0x3e59(_0x33d90a,_0x426397){var _0x590db6=a0_0x590d();return a0_0x3e59=function(_0x3e5996,_0x7b725e){_0x3e5996=_0x3e5996-0x10d;var _0x130020=_0x590db6[_0x3e5996];return _0x130020;},a0_0x3e59(_0x33d90a,_0x426397);}Object[a0_0x4bcbe6(0x117)](exports,'__esModule',{'value':!![]}),exports[a0_0x4bcbe6(0x10d)]=_0x230a39=>{var _0x5e739a=a0_0x4bcbe6;return{'apitest':!![],'keys':_0x230a39[_0x5e739a(0x118)],'anncicapi':{'timeout':0x1388,'password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':_0x5e739a(0x11b),'checkcode':_0x5e739a(0x11b)}}},'upload':{'tmpdir':_0x230a39[_0x5e739a(0x10e)]+'/runtime/.upload','cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x42413f=a1_0x1513;function a1_0x5eed(){var _0x4d778c=['13581zpnWsx','133JqIfHH','12409850fIsGZx','1866252KnYcxw','__esModule','342138TIKWmb','440vXyriX','273535rbISDk','default','992000zrXztr','defineProperty','1385316SzWaJD','3AKjarp'];a1_0x5eed=function(){return _0x4d778c;};return a1_0x5eed();}(function(_0x267abc,_0x5b2126){var _0x17f94e=a1_0x1513,_0x38b71a=_0x267abc();while(!![]){try{var _0x2e86ef=parseInt(_0x17f94e(0x95))/0x1+parseInt(_0x17f94e(0x91))/0x2*(parseInt(_0x17f94e(0x8d))/0x3)+-parseInt(_0x17f94e(0x8c))/0x4+-parseInt(_0x17f94e(0x8a))/0x5+-parseInt(_0x17f94e(0x93))/0x6*(-parseInt(_0x17f94e(0x8f))/0x7)+-parseInt(_0x17f94e(0x94))/0x8*(-parseInt(_0x17f94e(0x8e))/0x9)+-parseInt(_0x17f94e(0x90))/0xa;if(_0x2e86ef===_0x5b2126)break;else _0x38b71a['push'](_0x38b71a['shift']());}catch(_0x2e1e19){_0x38b71a['push'](_0x38b71a['shift']());}}}(a1_0x5eed,0x8f673));function a1_0x1513(_0x356085,_0xe64bb){var _0x5eede9=a1_0x5eed();return a1_0x1513=function(_0x15133e,_0x4528f1){_0x15133e=_0x15133e-0x8a;var _0x488f39=_0x5eede9[_0x15133e];return _0x488f39;},a1_0x1513(_0x356085,_0xe64bb);}Object[a1_0x42413f(0x8b)](exports,a1_0x42413f(0x92),{'value':!![]}),exports[a1_0x42413f(0x96)]={'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';function a2_0x1b69(){const _0x1e7057=['length','2xHXuHo','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','ApiError','dir','forEach','anncicapi','keys','decorate','decorator','staticFile','Anncic-api\x20static-file\x20:\x20mkdir\x20','@midwayjs/static-file','isArray','__esModule','application','MidwayApplicationManager','addObject','@midwayjs/decorator','existsSync','REQUEST_OBJ_CTX_KEY','string','./types/action','body','filterConfig','912230SSMrSV','design:type','upload','koa','bodyParser','request','koa-bodyparser','@midwayjs/i18n','CustomConfiguration','tmpdir','anncic-api','mkdirSync','prototype','target','@anncic-api/typeorm','5FVpkyr','231gbIAQU','query','85268bWsBEU','HEADERS_SIGNATURE','onReady','defaultsDeep','MidwayConfigService','3051398YpnYvm','isString','config','./config/config.production','handlerActionRoute','metadata','input','ACTION_ROUTE_KEY','function','ApiService','@anncic-api/event','6683841fRHhWo','6769024qNbAwM','MidwayEnvironmentService','@midwayjs/koa','headers','@anncic-api/core','bodyXml','MidwayDecoratorService','dirs','isNull','1424377utUKtR','getConfiguration','beforeRoute','66cKxYUK','checksign','apimit','get','defineProperty','getApplications','context','device','hanlderApplications','9840966MWKRun','checkConfigKeys','koa-xml-body','log','@midwayjs/cross-domain','devices','@midwayjs/core','Inject','./service/ApiService','useMiddleware'];a2_0x1b69=function(){return _0x1e7057;};return a2_0x1b69();}const a2_0x493668=a2_0x3ea3;(function(_0xb89d51,_0x143ccb){const _0x384959=a2_0x3ea3,_0x1fbf8a=_0xb89d51();while(!![]){try{const _0x1fcbaa=parseInt(_0x384959(0xe1))/0x1*(parseInt(_0x384959(0x9d))/0x2)+parseInt(_0x384959(0xe4))/0x3*(-parseInt(_0x384959(0xc7))/0x4)+parseInt(_0x384959(0xc4))/0x5*(-parseInt(_0x384959(0x92))/0x6)+-parseInt(_0x384959(0xcc))/0x7+parseInt(_0x384959(0xd8))/0x8+-parseInt(_0x384959(0xd7))/0x9+parseInt(_0x384959(0xb5))/0xa*(parseInt(_0x384959(0xc5))/0xb);if(_0x1fcbaa===_0x143ccb)break;else _0x1fbf8a['push'](_0x1fbf8a['shift']());}catch(_0x44c3cd){_0x1fbf8a['push'](_0x1fbf8a['shift']());}}}(a2_0x1b69,0xdb5ba));var __decorate=this&&this['__decorate']||function(_0x1b3495,_0x512d51,_0x9e8e9f,_0x567bd7){const _0x48a61e=a2_0x3ea3;var _0x233ed0=arguments[_0x48a61e(0x9c)],_0x3cf4f4=_0x233ed0<0x3?_0x512d51:_0x567bd7===null?_0x567bd7=Object['getOwnPropertyDescriptor'](_0x512d51,_0x9e8e9f):_0x567bd7,_0x1c2540;if(typeof Reflect==='object'&&typeof Reflect[_0x48a61e(0xa4)]==='function')_0x3cf4f4=Reflect[_0x48a61e(0xa4)](_0x1b3495,_0x512d51,_0x9e8e9f,_0x567bd7);else{for(var _0x59c62b=_0x1b3495[_0x48a61e(0x9c)]-0x1;_0x59c62b>=0x0;_0x59c62b--)if(_0x1c2540=_0x1b3495[_0x59c62b])_0x3cf4f4=(_0x233ed0<0x3?_0x1c2540(_0x3cf4f4):_0x233ed0>0x3?_0x1c2540(_0x512d51,_0x9e8e9f,_0x3cf4f4):_0x1c2540(_0x512d51,_0x9e8e9f))||_0x3cf4f4;}return _0x233ed0>0x3&&_0x3cf4f4&&Object[_0x48a61e(0x8d)](_0x512d51,_0x9e8e9f,_0x3cf4f4),_0x3cf4f4;},__metadata=this&&this['__metadata']||function(_0x5bafa7,_0x652e06){const _0x4d331c=a2_0x3ea3;if(typeof Reflect==='object'&&typeof Reflect[_0x4d331c(0xd1)]===_0x4d331c(0xd4))return Reflect[_0x4d331c(0xd1)](_0x5bafa7,_0x652e06);};function a2_0x3ea3(_0x193ed1,_0x172716){const _0x1b69e0=a2_0x1b69();return a2_0x3ea3=function(_0x3ea316,_0x5758e2){_0x3ea316=_0x3ea316-0x8c;let _0x42d320=_0x1b69e0[_0x3ea316];return _0x42d320;},a2_0x3ea3(_0x193ed1,_0x172716);}Object[a2_0x493668(0x8d)](exports,a2_0x493668(0xaa),{'value':!![]}),exports[a2_0x493668(0xbd)]=void 0x0;const decorator_1=require(a2_0x493668(0xae)),core_1=require(a2_0x493668(0x98)),ApiError_1=require('./exception/ApiError'),ApiService_1=require(a2_0x493668(0x9a)),action_1=require(a2_0x493668(0xb2)),fs=require('fs'),koa=require(a2_0x493668(0xda)),i18n=require(a2_0x493668(0xbc)),task=require('@midwayjs/task'),upload=require('@midwayjs/upload'),staticFile=require(a2_0x493668(0xa8)),crossDomain=require(a2_0x493668(0x96)),bodyXml=require(a2_0x493668(0x94)),bodyParser=require(a2_0x493668(0xbb)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0x493668(0xcf)),anncic=require(a2_0x493668(0xdc)),anncicEvent=require(a2_0x493668(0xd6)),anncicTypeorm=require(a2_0x493668(0xc3)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require('anncic-apihelper');let CustomConfiguration=class CustomConfiguration{async[a2_0x493668(0xc9)](){const _0x2fbdd2=a2_0x493668;await this[_0x2fbdd2(0xb4)](),await this[_0x2fbdd2(0x93)](),await this[_0x2fbdd2(0xd0)](),await this[_0x2fbdd2(0x91)]();}async[a2_0x493668(0x93)](){}async['handlerActionRoute'](){const _0x52a283=a2_0x493668,_0x3e62e9=this['config']['getConfiguration']();this[_0x52a283(0xa5)]['registerMethodHandler'](action_1[_0x52a283(0xd3)],_0x4780aa=>{const _0xcaad13=_0x52a283,_0x54a100=_0x4780aa[_0xcaad13(0xd1)];return{'before':async _0xff36c8=>{const _0xa7d223=_0xcaad13;var _0xb32af0,_0x42b9de,_0x3dca5c,_0x5eb190,_0x40702c;const _0x4ef9e0=(_0xb32af0=_0xff36c8===null||_0xff36c8===void 0x0?void 0x0:_0xff36c8[_0xa7d223(0xc2)])===null||_0xb32af0===void 0x0?void 0x0:_0xb32af0[core_1[_0xa7d223(0xb0)]];if(_0x4ef9e0){if((_0x54a100===null||_0x54a100===void 0x0?void 0x0:_0x54a100[_0xa7d223(0xe6)])&&!this['ApiService'][_0xa7d223(0xe5)]((_0x42b9de=_0x4ef9e0===null||_0x4ef9e0===void 0x0?void 0x0:_0x4ef9e0[_0xa7d223(0xba)])===null||_0x42b9de===void 0x0?void 0x0:_0x42b9de[_0xa7d223(0xdb)]))throw new AnnError(ApiError_1[_0xa7d223(0x9f)][_0xa7d223(0xc8)]);((_0x3dca5c=_0x4ef9e0[_0xa7d223(0xdb)])===null||_0x3dca5c===void 0x0?void 0x0:_0x3dca5c[_0xa7d223(0x90)])&&((_0x40702c=(_0x5eb190=_0x3e62e9===null||_0x3e62e9===void 0x0?void 0x0:_0x3e62e9[_0xa7d223(0xa2)])===null||_0x5eb190===void 0x0?void 0x0:_0x5eb190['devices'])===null||_0x40702c===void 0x0?void 0x0:_0x40702c[_0x4ef9e0[_0xa7d223(0xdb)][_0xa7d223(0x90)]])&&(typeof _0x3e62e9[_0xa7d223(0xa2)]['devices'][_0x4ef9e0[_0xa7d223(0xdb)][_0xa7d223(0x90)]][_0xa7d223(0xe3)]==_0xa7d223(0xd4)&&await _0x3e62e9['anncicapi']['devices'][_0x4ef9e0[_0xa7d223(0xdb)][_0xa7d223(0x90)]][_0xa7d223(0xe3)]((_0x4ef9e0===null||_0x4ef9e0===void 0x0?void 0x0:_0x4ef9e0['_matchedRoute'])||undefined,_0x54a100,_0x4ef9e0));}},'afterThrow':(_0xf4fe1c,_0x43564f)=>{throw _0x43564f;}};});}async['hanlderApplications'](){const _0x2f229b=a2_0x493668;this[_0x2f229b(0xab)][_0x2f229b(0x8e)]([_0x2f229b(0xb8)])[_0x2f229b(0xa1)](_0xa0b27c=>{const _0x147dea=_0x2f229b;_0xa0b27c['useMiddleware'](bodyXml(this[_0x147dea(0xce)]['getConfiguration'](_0x147dea(0xdd)))),_0xa0b27c[_0x147dea(0x9b)](bodyParser(this[_0x147dea(0xce)][_0x147dea(0xe2)](_0x147dea(0xb9)))),(_0xa0b27c===null||_0xa0b27c===void 0x0?void 0x0:_0xa0b27c[_0x147dea(0x8f)])&&Object['defineProperties'](_0xa0b27c[_0x147dea(0x8f)],{'ok':{'value':function(_0x3ccdda,_0x1d5a6f,_0x361516=0x0){return{'code':_0x361516,'data':_0x3ccdda,'extra':_0x1d5a6f};}},'err':{'value':function(_0x59375c,_0x16da9c,_0x3554b0=0x1){return{'code':_0x3554b0,'extra':_0x16da9c,'msg':_0x59375c};}},'input':{'value':function(_0x23d837,_0x473ce1){const _0x3cf2fd=_0x147dea;var _0x5b4c8c;const _0x275a90=lodash[_0x3cf2fd(0xca)]({},this['request'][_0x3cf2fd(0xb3)]||this[_0x3cf2fd(0xba)][((_0x5b4c8c=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x5b4c8c===void 0x0?void 0x0:_0x5b4c8c['key'])||_0x3cf2fd(0xb3)]||{},this['request'][_0x3cf2fd(0xc6)]||{});return _0x23d837?lodash[_0x3cf2fd(0x8c)](_0x275a90,_0x23d837,_0x473ce1):_0x275a90;}},'when':{'value':async function(_0x201f5a,_0x25d8dd){const _0x52869b=_0x147dea,_0x306639=this[_0x52869b(0xd2)](_0x201f5a,null);if(!lodash[_0x52869b(0xe0)](_0x306639))return await _0x25d8dd(_0x306639);}},'only':{'value':function(_0x1feb80){const _0x472246=_0x147dea,_0x173bbd={};for(let _0x1c18e5=0x0;_0x1c18e5<_0x1feb80[_0x472246(0x9c)];_0x1c18e5++){lodash[_0x472246(0xa9)](_0x1feb80[_0x1c18e5])&&_0x1feb80[_0x1c18e5][_0x472246(0x9c)]>0x0&&lodash[_0x472246(0xcd)](_0x1feb80[_0x1c18e5][0x0])&&(_0x173bbd[_0x1feb80[_0x1c18e5][0x0]]=this[_0x472246(0xd2)](_0x1feb80[_0x1c18e5][0x0],_0x1feb80[_0x1c18e5][_0x472246(0x9c)]>0x1?_0x1feb80[_0x1c18e5][0x1]:null));}return _0x173bbd;}}});});}async['filterConfig'](){const _0x157a69=a2_0x493668;var _0x46c1b3,_0x4233cb,_0x322753,_0x17f143,_0x3560c5,_0x2d9a05;const _0x5f4667=this[_0x157a69(0xce)][_0x157a69(0xe2)]();((_0x4233cb=(_0x46c1b3=_0x5f4667===null||_0x5f4667===void 0x0?void 0x0:_0x5f4667[_0x157a69(0xa2)])===null||_0x46c1b3===void 0x0?void 0x0:_0x46c1b3[_0x157a69(0x97)])===null||_0x4233cb===void 0x0?void 0x0:_0x4233cb['DEFAULT'])&&Object[_0x157a69(0xa3)](_0x5f4667[_0x157a69(0xa2)][_0x157a69(0x97)])['length']>0x1&&delete _0x5f4667[_0x157a69(0xa2)][_0x157a69(0x97)]['DEFAULT'];if((_0x322753=_0x5f4667===null||_0x5f4667===void 0x0?void 0x0:_0x5f4667[_0x157a69(0xa6)])===null||_0x322753===void 0x0?void 0x0:_0x322753[_0x157a69(0xdf)])for(const _0x6843f7 in _0x5f4667['staticFile'][_0x157a69(0xdf)]){((_0x17f143=_0x5f4667[_0x157a69(0xa6)][_0x157a69(0xdf)][_0x6843f7])===null||_0x17f143===void 0x0?void 0x0:_0x17f143['dir'])&&typeof((_0x3560c5=_0x5f4667[_0x157a69(0xa6)][_0x157a69(0xdf)][_0x6843f7])===null||_0x3560c5===void 0x0?void 0x0:_0x3560c5[_0x157a69(0xa0)])==_0x157a69(0xb1)&&!fs['existsSync'](_0x5f4667[_0x157a69(0xa6)]['dirs'][_0x6843f7][_0x157a69(0xa0)])&&(fs[_0x157a69(0xc0)](_0x5f4667[_0x157a69(0xa6)][_0x157a69(0xdf)][_0x6843f7][_0x157a69(0xa0)],{'recursive':!![]}),console['log'](_0x157a69(0xa7)+_0x5f4667[_0x157a69(0xa6)][_0x157a69(0xdf)][_0x6843f7][_0x157a69(0xa0)]));}((_0x2d9a05=_0x5f4667===null||_0x5f4667===void 0x0?void 0x0:_0x5f4667['upload'])===null||_0x2d9a05===void 0x0?void 0x0:_0x2d9a05[_0x157a69(0xbe)])&&!fs[_0x157a69(0xaf)](_0x5f4667['upload'][_0x157a69(0xbe)])&&(fs[_0x157a69(0xc0)](_0x5f4667[_0x157a69(0xb7)][_0x157a69(0xbe)],{'recursive':!![]}),console[_0x157a69(0x95)](_0x157a69(0x9e)+_0x5f4667[_0x157a69(0xb7)][_0x157a69(0xbe)])),this[_0x157a69(0xce)][_0x157a69(0xad)](_0x5f4667);}};__decorate([(0x0,decorator_1[a2_0x493668(0x99)])(),__metadata(a2_0x493668(0xb6),core_1[a2_0x493668(0xcb)])],CustomConfiguration[a2_0x493668(0xc1)],a2_0x493668(0xce),void 0x0),__decorate([(0x0,decorator_1[a2_0x493668(0x99)])(),__metadata(a2_0x493668(0xb6),core_1[a2_0x493668(0xde)])],CustomConfiguration[a2_0x493668(0xc1)],a2_0x493668(0xa5),void 0x0),__decorate([(0x0,decorator_1[a2_0x493668(0x99)])(),__metadata(a2_0x493668(0xb6),core_1[a2_0x493668(0xac)])],CustomConfiguration['prototype'],a2_0x493668(0xab),void 0x0),__decorate([(0x0,decorator_1[a2_0x493668(0x99)])(),__metadata(a2_0x493668(0xb6),core_1[a2_0x493668(0xd9)])],CustomConfiguration[a2_0x493668(0xc1)],'environment',void 0x0),__decorate([(0x0,decorator_1[a2_0x493668(0x99)])(),__metadata(a2_0x493668(0xb6),ApiService_1[a2_0x493668(0xd5)])],CustomConfiguration[a2_0x493668(0xc1)],a2_0x493668(0xd5),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1['Configuration'])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x493668(0xbf),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x493668(0xbd)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x5a3164=a3_0x2770;(function(_0x44a892,_0x11d461){const _0x43b115=a3_0x2770,_0x4e2cc5=_0x44a892();while(!![]){try{const _0x18afc7=-parseInt(_0x43b115(0x21c))/0x1+parseInt(_0x43b115(0x218))/0x2+parseInt(_0x43b115(0x21e))/0x3*(parseInt(_0x43b115(0x21b))/0x4)+-parseInt(_0x43b115(0x1fe))/0x5*(parseInt(_0x43b115(0x1f7))/0x6)+parseInt(_0x43b115(0x220))/0x7*(parseInt(_0x43b115(0x210))/0x8)+parseInt(_0x43b115(0x227))/0x9*(parseInt(_0x43b115(0x228))/0xa)+parseInt(_0x43b115(0x213))/0xb*(-parseInt(_0x43b115(0x20a))/0xc);if(_0x18afc7===_0x11d461)break;else _0x4e2cc5['push'](_0x4e2cc5['shift']());}catch(_0x3b5a4a){_0x4e2cc5['push'](_0x4e2cc5['shift']());}}}(a3_0x1914,0xd18a1));function a3_0x2770(_0x125d8f,_0x2c15c1){const _0x191451=a3_0x1914();return a3_0x2770=function(_0x277075,_0x38a54e){_0x277075=_0x277075-0x1f4;let _0x47114f=_0x191451[_0x277075];return _0x47114f;},a3_0x2770(_0x125d8f,_0x2c15c1);}Object[a3_0x5a3164(0x21f)](exports,a3_0x5a3164(0x1ff),{'value':!![]}),exports[a3_0x5a3164(0x207)]=exports[a3_0x5a3164(0x224)]=void 0x0;const fs=require('fs'),decorator_1=require(a3_0x5a3164(0x222)),action_1=require('../types/action');function Action(_0x516dd4,_0x4e2165,_0x272708={'middleware':[],'sensitive':!![]}){return _0x2b5b77=>{const _0x2158ab=a3_0x2770;_0x272708[_0x2158ab(0x1f5)]=_0x4e2165;const _0x1ea888=parseRoute(_0x516dd4);if(_0x1ea888['module']){_0x272708[_0x2158ab(0x223)]=_0x272708[_0x2158ab(0x223)]?'/'+_0x1ea888[_0x2158ab(0x221)]+'/'+_0x272708[_0x2158ab(0x223)]:'/'+_0x1ea888[_0x2158ab(0x1fb)];_0x1ea888[_0x2158ab(0x223)]&&(_0x272708[_0x2158ab(0x223)]='/'+_0x1ea888[_0x2158ab(0x223)]+'/'+_0x272708['prefix']);if(fs[_0x2158ab(0x20e)](_0x1ea888[_0x2158ab(0x211)]+'/apps/'+_0x1ea888[_0x2158ab(0x221)]+'/config.'+(lodash[_0x2158ab(0x200)](_0x1ea888[_0x2158ab(0x219)],'ts')?'ts':'js'))){const _0x317dc1=include(_0x1ea888[_0x2158ab(0x211)]+'/apps/'+_0x1ea888[_0x2158ab(0x221)]+_0x2158ab(0x203)+(lodash['endsWith'](_0x1ea888['filepath'],'ts')?'ts':'js'));if(_0x317dc1[_0x2158ab(0x204)]&&lodash[_0x2158ab(0x20d)](_0x317dc1[_0x2158ab(0x204)])&&_0x317dc1[_0x2158ab(0x204)]['length']>0x0)for(let _0x5e54a0 in _0x317dc1[_0x2158ab(0x204)]){_0x317dc1[_0x2158ab(0x20b)][_0x2158ab(0x20c)](_0x317dc1[_0x2158ab(0x204)][_0x5e54a0])==-0x1&&_0x272708[_0x2158ab(0x204)]['push'](_0x317dc1[_0x2158ab(0x204)][_0x5e54a0]);}const _0x1bf5ac=(0x0,decorator_1[_0x2158ab(0x1f9)])(action_1[_0x2158ab(0x1f4)],action_1[_0x2158ab(0x215)])||{};_0x1bf5ac[''+_0x1ea888[_0x2158ab(0x221)]]=_0x317dc1,(0x0,decorator_1[_0x2158ab(0x214)])(action_1[_0x2158ab(0x1f4)],_0x1bf5ac,action_1[_0x2158ab(0x215)]);}_0x272708[_0x2158ab(0x223)]=_0x272708[_0x2158ab(0x223)][_0x2158ab(0x1f6)]()[_0x2158ab(0x226)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x2158ab(0x1fd)])(action_1['ACTION_KEY'],_0x2b5b77),(0x0,decorator_1[_0x2158ab(0x208)])(_0x272708['prefix'],_0x272708)(_0x2b5b77),(0x0,decorator_1[_0x2158ab(0x214)])(action_1[_0x2158ab(0x1fc)],{'prefix':_0x272708['prefix'],'pprefix':_0x1ea888[_0x2158ab(0x223)],'module':_0x1ea888['module'],'filepath':_0x1ea888['filepath'],'routerOptions':_0x272708},_0x2b5b77);}else _0x272708[_0x2158ab(0x223)]=_0x272708['prefix']?'/'+_0x272708[_0x2158ab(0x223)]:'/'+_0x1ea888['route'],_0x1ea888[_0x2158ab(0x223)]&&(_0x272708['prefix']='/'+_0x1ea888['prefix']+'/'+_0x272708[_0x2158ab(0x223)]),_0x272708[_0x2158ab(0x223)]=_0x272708[_0x2158ab(0x223)][_0x2158ab(0x1f6)]()[_0x2158ab(0x226)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x2158ab(0x1fd)])(action_1[_0x2158ab(0x1fc)],_0x2b5b77),(0x0,decorator_1['Controller'])(_0x272708[_0x2158ab(0x223)],_0x272708)(_0x2b5b77),(0x0,decorator_1[_0x2158ab(0x214)])(action_1[_0x2158ab(0x1fc)],{'prefix':_0x272708[_0x2158ab(0x223)],'module':_0x1ea888[_0x2158ab(0x221)],'pprefix':_0x1ea888[_0x2158ab(0x223)],'filepath':_0x1ea888[_0x2158ab(0x219)],'routerOptions':_0x272708},_0x2b5b77);};}function a3_0x1914(){const _0x188456=['/controller/','8fZbGKr','rootpath','filter','48067459wMbPnp','saveClassMetadata','AppsConfigTmp','-action','split','3410908kzLQBA','filepath','startsWith','6323668VWRBzt','165083PYXDgZ','trim','3CbfnYi','defineProperty','10812431rhiShx','module','@midwayjs/decorator','prefix','Action','splice','replace','18gTfVFA','6113170fWYaMT','length','substring','APPSCONFIG_KEY','tagName','toLowerCase','8946hAMmCJ','/controller/文件下','getClassMetadata','apps/','route','ACTION_KEY','saveModule','2215lqvWzU','__esModule','endsWith','-controller','app/controller/','/config.','middleware','join','match','parseRoute','Controller','\x20文件请放在apps/','12SoPnNJ','middlewareIgnore','indexOf','isArray','existsSync'];a3_0x1914=function(){return _0x188456;};return a3_0x1914();}exports[a3_0x5a3164(0x224)]=Action;function parseRoute(_0x1aa949){const _0xfe3160=a3_0x5a3164;_0x1aa949=_0x1aa949[_0xfe3160(0x226)](/(\\|\/)/g,'/');const _0x564ef5=process['cwd']()[_0xfe3160(0x226)](/(\\|\/)/g,'/'),_0x589b9e=_0x1aa949[_0xfe3160(0x22a)](0x0,_0x564ef5[_0xfe3160(0x229)]+_0x1aa949[_0xfe3160(0x22a)](_0x564ef5[_0xfe3160(0x229)]+0x1)[_0xfe3160(0x20c)]('/')+0x1),_0x45e4b9=_0x1aa949[_0xfe3160(0x22a)](_0x589b9e[_0xfe3160(0x229)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x3b6df1={'route':'','prefix':![],'module':![],'rootpath':_0x589b9e,'filepath':_0x45e4b9};if(_0x45e4b9[_0xfe3160(0x21a)]('app/controller/')){const _0xd0c5aa=_0x45e4b9[_0xfe3160(0x22a)](_0xfe3160(0x202)[_0xfe3160(0x229)])[_0xfe3160(0x217)]('/')['filter'](_0x1e870b=>_0x1e870b&&_0x1e870b[_0xfe3160(0x21d)]());return _0xd0c5aa[_0xfe3160(0x229)]>0x1&&(_0x3b6df1[_0xfe3160(0x223)]=_0xd0c5aa[0x0][_0xfe3160(0x1f6)](),_0xd0c5aa[_0xfe3160(0x225)](0x0,0x1)),_0x3b6df1[_0xfe3160(0x1fb)]=('/'+_0xd0c5aa[_0xfe3160(0x205)]('/'))[_0xfe3160(0x226)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0xfe3160(0x206)](/[\/|A-Z]*[^A-Z]+/g)['join']('-')['toLowerCase']()[_0xfe3160(0x226)](/\/\-/g,'/'),_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x200)](_0xfe3160(0x216))&&(_0x3b6df1[_0xfe3160(0x1fb)]=_0x3b6df1[_0xfe3160(0x1fb)]['substring'](0x0,_0x3b6df1['route']['length']-0x7)),_0x3b6df1[_0xfe3160(0x1fb)]['endsWith'](_0xfe3160(0x201))&&(_0x3b6df1[_0xfe3160(0x1fb)]=_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x22a)](0x0,_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x229)]-0xb)),_0x3b6df1;}else{if(_0x45e4b9['startsWith'](_0xfe3160(0x1fa))){const _0x233bfd=_0x45e4b9['substring'](0x0,_0x45e4b9[_0xfe3160(0x20c)]('/apps/')+0x5),_0x5df3f3=_0x45e4b9[_0xfe3160(0x22a)](_0x233bfd['length']+0x1)[_0xfe3160(0x226)](/(\\|\/)/g,'/')['split']('/')[0x0];if(_0x45e4b9[_0xfe3160(0x21a)](_0xfe3160(0x1fa)+_0x5df3f3+_0xfe3160(0x20f))){const _0xb06f62=_0x45e4b9['substring']((_0x233bfd+'/'+_0x5df3f3+'/controller/')['length'])['split']('/')[_0xfe3160(0x212)](_0x52bf51=>_0x52bf51&&_0x52bf51[_0xfe3160(0x21d)]());return _0xb06f62[_0xfe3160(0x229)]>0x1&&(_0x3b6df1['prefix']=_0xb06f62[0x0][_0xfe3160(0x1f6)](),_0xb06f62[_0xfe3160(0x225)](0x0,0x1)),_0x3b6df1[_0xfe3160(0x221)]=_0x5df3f3,_0x3b6df1[_0xfe3160(0x1fb)]=('/'+_0x5df3f3+'/'+_0xb06f62[_0xfe3160(0x205)]('/'))[_0xfe3160(0x226)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/,'/')[_0xfe3160(0x206)](/[\/|A-Z]*[^A-Z]+/g)[_0xfe3160(0x205)]('-')[_0xfe3160(0x1f6)]()[_0xfe3160(0x226)](/\/\-/g,'/'),_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x200)](_0xfe3160(0x216))&&(_0x3b6df1[_0xfe3160(0x1fb)]=_0x3b6df1[_0xfe3160(0x1fb)]['substring'](0x0,_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x229)]-0x7)),_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x200)](_0xfe3160(0x201))&&(_0x3b6df1[_0xfe3160(0x1fb)]=_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x22a)](0x0,_0x3b6df1[_0xfe3160(0x1fb)][_0xfe3160(0x229)]-0xb)),_0x3b6df1;}throw new Error(_0x45e4b9+_0xfe3160(0x209)+_0x5df3f3+_0xfe3160(0x1f8));}}throw new Error(_0x45e4b9+'\x20文件请放在app/controller/文件下');}exports[a3_0x5a3164(0x207)]=parseRoute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0xc6794c=a4_0xdb70;(function(_0x34a29f,_0x211517){const _0x1b641a=a4_0xdb70,_0x101932=_0x34a29f();while(!![]){try{const _0x1d2624=-parseInt(_0x1b641a(0xb1))/0x1*(parseInt(_0x1b641a(0xb5))/0x2)+parseInt(_0x1b641a(0xcb))/0x3+-parseInt(_0x1b641a(0xc2))/0x4+parseInt(_0x1b641a(0xc6))/0x5*(parseInt(_0x1b641a(0xbc))/0x6)+parseInt(_0x1b641a(0xc4))/0x7+-parseInt(_0x1b641a(0xc3))/0x8*(-parseInt(_0x1b641a(0xb9))/0x9)+parseInt(_0x1b641a(0xbd))/0xa;if(_0x1d2624===_0x211517)break;else _0x101932['push'](_0x101932['shift']());}catch(_0x3f3180){_0x101932['push'](_0x101932['shift']());}}}(a4_0x4239,0x9f6ea));function a4_0xdb70(_0x4896c2,_0x1c74b4){const _0x4239b7=a4_0x4239();return a4_0xdb70=function(_0xdb70be,_0x4a0ab7){_0xdb70be=_0xdb70be-0xb0;let _0x133e7e=_0x4239b7[_0xdb70be];return _0x133e7e;},a4_0xdb70(_0x4896c2,_0x1c74b4);}Object[a4_0xc6794c(0xb7)](exports,'__esModule',{'value':!![]}),exports[a4_0xc6794c(0xc7)]=void 0x0;const validator_1=require('@anncic-api/validator'),decorator_1=require(a4_0xc6794c(0xc5)),action_1=require(a4_0xc6794c(0xb0));function Api(_0x4ef6f8,_0x19be85=a4_0xc6794c(0xbe),_0x163c93='/',_0x421478={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x17ac46,_0x4ed19b,_0xe23225)=>{const _0x437f01=a4_0xdb70;var _0x4d5ccf,_0x6bec15,_0x2d649c;!_0x421478[_0x437f01(0xbf)]&&(_0x421478['middleware']=[]);!((_0x4d5ccf=_0x421478===null||_0x421478===void 0x0?void 0x0:_0x421478[_0x437f01(0xb8)])===null||_0x4d5ccf===void 0x0?void 0x0:_0x4d5ccf[_0x437f01(0xc9)])&&(_0x421478[_0x437f01(0xb8)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x437f01(0xce)}});if(((_0x6bec15=_0x421478===null||_0x421478===void 0x0?void 0x0:_0x421478[_0x437f01(0xbf)])===null||_0x6bec15===void 0x0?void 0x0:_0x6bec15[_0x437f01(0xc0)])>0x0&&((_0x2d649c=_0x421478===null||_0x421478===void 0x0?void 0x0:_0x421478['middlewareIgnore'])===null||_0x2d649c===void 0x0?void 0x0:_0x2d649c[_0x437f01(0xc0)])>0x0)for(let _0x1404a3 in _0x421478[_0x437f01(0xbf)]){_0x421478['middlewareIgnore'][_0x437f01(0xb6)](_0x421478[_0x437f01(0xbf)][_0x1404a3])!==-0x1&&(_0x421478[_0x437f01(0xbf)][_0x1404a3]=null);}_0x421478[_0x437f01(0xc1)]=_0x4ef6f8,(0x0,validator_1[_0x437f01(0xbb)])(_0x421478[_0x437f01(0xb8)])(_0x17ac46,_0x4ed19b,_0xe23225),(0x0,decorator_1['RequestMapping'])(Object[_0x437f01(0xcc)](_0x421478,{'path':_0x163c93,'requestMethod':(_0x19be85==_0x437f01(0xcd)?_0x437f01(0xca):_0x19be85)[_0x437f01(0xc8)]()}))(_0x17ac46,_0x4ed19b,_0xe23225),(0x0,decorator_1['attachClassMetadata'])(action_1['ACTION_ROUTE_KEY'],{'path':_0x163c93,'method':_0x4ed19b,'apimit':_0x421478['apimit'],'routerName':_0x421478[_0x437f01(0xc1)],'description':_0x421478['description'],'middleware':(_0x421478[_0x437f01(0xbf)]||[])[_0x437f01(0xb4)](_0x43f329=>!!_0x43f329),'requestMethod':(_0x19be85==_0x437f01(0xcd)?_0x437f01(0xca):_0x19be85)[_0x437f01(0xc8)]()},_0x17ac46),(0x0,decorator_1[_0x437f01(0xba)])(action_1[_0x437f01(0xb3)],{'path':_0x163c93,'method':_0x4ed19b,'apimit':_0x421478[_0x437f01(0xb2)],'routerName':_0x421478[_0x437f01(0xc1)],'description':_0x421478['description'],'middleware':(_0x421478[_0x437f01(0xbf)]||[])['filter'](_0x5e238f=>!!_0x5e238f),'requestMethod':(_0x19be85==_0x437f01(0xcd)?'delete':_0x19be85)[_0x437f01(0xc8)]()})(_0x17ac46,_0x4ed19b,_0xe23225);};}function a4_0x4239(){const _0x113cf8=['defineProperty','validate','9uhpUOB','createCustomMethodDecorator','Validator','15162fIQgSW','1914010LkzyCj','get','middleware','length','routerName','5097308VPtEHq','2727024FajjxR','8809514UHGUHF','@midwayjs/decorator','20JbDIru','Api','toLowerCase','validationOptions','delete','2190882RRvcyc','assign','del','utc','../types/action','3846FUDWCs','apimit','ACTION_ROUTE_KEY','filter','314OSprtV','indexOf'];a4_0x4239=function(){return _0x113cf8;};return a4_0x4239();}exports[a4_0xc6794c(0xc7)]=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5_0x2d465f=a5_0x2148;(function(_0x1f180c,_0x2e082a){const _0x1e9254=a5_0x2148,_0xbba2b4=_0x1f180c();while(!![]){try{const _0x515797=-parseInt(_0x1e9254(0x1c2))/0x1+-parseInt(_0x1e9254(0x1b3))/0x2*(-parseInt(_0x1e9254(0x1b0))/0x3)+-parseInt(_0x1e9254(0x1ba))/0x4*(parseInt(_0x1e9254(0x1af))/0x5)+parseInt(_0x1e9254(0x1bf))/0x6*(parseInt(_0x1e9254(0x1ae))/0x7)+parseInt(_0x1e9254(0x1b1))/0x8*(-parseInt(_0x1e9254(0x1c1))/0x9)+-parseInt(_0x1e9254(0x1ab))/0xa*(-parseInt(_0x1e9254(0x1be))/0xb)+parseInt(_0x1e9254(0x1b2))/0xc*(parseInt(_0x1e9254(0x1ac))/0xd);if(_0x515797===_0x2e082a)break;else _0xbba2b4['push'](_0xbba2b4['shift']());}catch(_0x51f0aa){_0xbba2b4['push'](_0xbba2b4['shift']());}}}(a5_0x5827,0xc4663));Object[a5_0x2d465f(0x1b6)](exports,a5_0x2d465f(0x1c3),{'value':!![]}),exports['Apitest']=void 0x0;function a5_0x5827(){const _0xccf33d=['getConfig','getApplicationContext','400BhTDNC','26XiQndQ','apitest','2626365RZJtbt','2668200yyJGEM','39GfYmiM','184lRBhAu','10083840GrpRAR','21026jbonbh','@midwayjs/core','@midwayjs/decorator','defineProperty','../service/ApitestService','filepath','RequestMapping','4oeHOcO','app','getAsync','apidoc','256091JUobIo','18zEIFqs','ApitestService','494847DDoBCP','1271434DVPMlN','__esModule'];a5_0x5827=function(){return _0xccf33d;};return a5_0x5827();}const decorator_1=require(a5_0x2d465f(0x1b5)),core_1=require(a5_0x2d465f(0x1b4)),ApitestService_1=require(a5_0x2d465f(0x1b7));function Apitest(_0x40af10='/apitest',_0x58609c){return(_0x59ddd5,_0x2c2b2b,_0xcc832a)=>{const _0x442cf5=a5_0x2148;return(0x0,decorator_1[_0x442cf5(0x1b9)])({'path':_0x40af10,'requestMethod':'get'})(_0x59ddd5,_0x2c2b2b,_0xcc832a),_0xcc832a['value']=async function(..._0x5e28bf){const _0x1625d4=_0x442cf5;var _0x27c614;const _0x167180=(_0x27c614=this[core_1['REQUEST_OBJ_CTX_KEY']])===null||_0x27c614===void 0x0?void 0x0:_0x27c614[_0x1625d4(0x1bb)];if(_0x167180&&_0x167180[_0x1625d4(0x1c4)](_0x1625d4(0x1ad))){const _0x19495b=await _0x167180[_0x1625d4(0x1aa)]()[_0x1625d4(0x1bc)](ApitestService_1[_0x1625d4(0x1c0)]),_0x497c7d=await _0x167180['getApplicationContext']()[_0x1625d4(0x1bc)](core_1['MidwayEnvironmentService']);return _0x497c7d['isDevelopmentEnvironment']()&&(_0x58609c[_0x1625d4(0x1b8)]=!![]),await _0x19495b[_0x1625d4(0x1bd)](_0x58609c);}return'';},_0xcc832a;};}function a5_0x2148(_0x5aead4,_0x5d075a){const _0x5827af=a5_0x5827();return a5_0x2148=function(_0x2148ca,_0x22a797){_0x2148ca=_0x2148ca-0x1aa;let _0x51766e=_0x5827af[_0x2148ca];return _0x51766e;},a5_0x2148(_0x5aead4,_0x5d075a);}exports['Apitest']=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a6_0x1250b3=a6_0x4b5d;(function(_0x27fa32,_0x465add){var _0x118fb8=a6_0x4b5d,_0x53929c=_0x27fa32();while(!![]){try{var _0x535986=-parseInt(_0x118fb8(0x1c2))/0x1*(parseInt(_0x118fb8(0x1d2))/0x2)+parseInt(_0x118fb8(0x1d8))/0x3+parseInt(_0x118fb8(0x1c4))/0x4+-parseInt(_0x118fb8(0x1d4))/0x5*(-parseInt(_0x118fb8(0x1c7))/0x6)+parseInt(_0x118fb8(0x1db))/0x7*(parseInt(_0x118fb8(0x1dc))/0x8)+parseInt(_0x118fb8(0x1c0))/0x9*(-parseInt(_0x118fb8(0x1ca))/0xa)+-parseInt(_0x118fb8(0x1c6))/0xb;if(_0x535986===_0x465add)break;else _0x53929c['push'](_0x53929c['shift']());}catch(_0x381120){_0x53929c['push'](_0x53929c['shift']());}}}(a6_0x2335,0x95d3a));function a6_0x4b5d(_0x265d70,_0x174ec7){var _0x2335ac=a6_0x2335();return a6_0x4b5d=function(_0x4b5d28,_0x42b0f3){_0x4b5d28=_0x4b5d28-0x1be;var _0x1b8dfd=_0x2335ac[_0x4b5d28];return _0x1b8dfd;},a6_0x4b5d(_0x265d70,_0x174ec7);}var __decorate=this&&this[a6_0x1250b3(0x1ce)]||function(_0x2d7635,_0x12632b,_0xb51f0,_0x3ab70a){var _0x2beda8=a6_0x1250b3,_0x116ed0=arguments['length'],_0x339b0b=_0x116ed0<0x3?_0x12632b:_0x3ab70a===null?_0x3ab70a=Object[_0x2beda8(0x1d1)](_0x12632b,_0xb51f0):_0x3ab70a,_0x19f2c1;if(typeof Reflect===_0x2beda8(0x1d7)&&typeof Reflect[_0x2beda8(0x1c3)]===_0x2beda8(0x1dd))_0x339b0b=Reflect['decorate'](_0x2d7635,_0x12632b,_0xb51f0,_0x3ab70a);else{for(var _0x4c4e97=_0x2d7635[_0x2beda8(0x1be)]-0x1;_0x4c4e97>=0x0;_0x4c4e97--)if(_0x19f2c1=_0x2d7635[_0x4c4e97])_0x339b0b=(_0x116ed0<0x3?_0x19f2c1(_0x339b0b):_0x116ed0>0x3?_0x19f2c1(_0x12632b,_0xb51f0,_0x339b0b):_0x19f2c1(_0x12632b,_0xb51f0))||_0x339b0b;}return _0x116ed0>0x3&&_0x339b0b&&Object[_0x2beda8(0x1cb)](_0x12632b,_0xb51f0,_0x339b0b),_0x339b0b;},__metadata=this&&this[a6_0x1250b3(0x1bf)]||function(_0x5f05b8,_0x1e8073){var _0x49963f=a6_0x1250b3;if(typeof Reflect===_0x49963f(0x1d7)&&typeof Reflect[_0x49963f(0x1d5)]===_0x49963f(0x1dd))return Reflect[_0x49963f(0x1d5)](_0x5f05b8,_0x1e8073);};Object[a6_0x1250b3(0x1cb)](exports,'__esModule',{'value':!![]}),exports[a6_0x1250b3(0x1d9)]=void 0x0;function a6_0x2335(){var _0x135195=['7irfMDA','8234224hwdsnY','function','length','__metadata','2974329hZtYQd','signature验证失败','1WBocoI','decorate','4706180jaWlnU','请求头信息不完整','6574150pSLbkm','3126tcwnKv','HEADERS_LACK','HEADERS_SIGNATURE','10txZVVM','defineProperty','HEADERS_DEVICE','HEADERS_CHECKCODE','__decorate','design:type','checkcode验证失败','getOwnPropertyDescriptor','1527374ledduI','网络繁忙,请稍后重试','295wqblLG','metadata','请使用正确的设备','object','206838gTsBPJ','ApiError','TIMEOUT'];a6_0x2335=function(){return _0x135195;};return a6_0x2335();}class ApiError{}ApiError[a6_0x1250b3(0x1da)]=0x18a89,ApiError[a6_0x1250b3(0x1c8)]=0x18a8a,ApiError['HEADERS_DEVICE']=0x18a8b,ApiError['HEADERS_CHECKCODE']=0x18a8c,ApiError['HEADERS_SIGNATURE']=0x18a8d,__decorate([AnnErrorMsg(a6_0x1250b3(0x1d3)),__metadata('design:type',Object)],ApiError,a6_0x1250b3(0x1da),void 0x0),__decorate([AnnErrorMsg(a6_0x1250b3(0x1c5)),__metadata(a6_0x1250b3(0x1cf),Object)],ApiError,'HEADERS_LACK',void 0x0),__decorate([AnnErrorMsg(a6_0x1250b3(0x1d6)),__metadata(a6_0x1250b3(0x1cf),Object)],ApiError,a6_0x1250b3(0x1cc),void 0x0),__decorate([AnnErrorMsg(a6_0x1250b3(0x1d0)),__metadata(a6_0x1250b3(0x1cf),Object)],ApiError,a6_0x1250b3(0x1cd),void 0x0),__decorate([AnnErrorMsg(a6_0x1250b3(0x1c1)),__metadata('design:type',Object)],ApiError,a6_0x1250b3(0x1c9),void 0x0),exports[a6_0x1250b3(0x1d9)]=ApiError;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const a7_0x447a36=a7_0x2a20;(function(_0x46da19,_0x4143d6){const _0x3263cf=a7_0x2a20,_0x3c241c=_0x46da19();while(!![]){try{const _0x44d593=-parseInt(_0x3263cf(0x15b))/0x1+-parseInt(_0x3263cf(0x15e))/0x2+-parseInt(_0x3263cf(0x153))/0x3*(-parseInt(_0x3263cf(0x15a))/0x4)+parseInt(_0x3263cf(0x15c))/0x5+parseInt(_0x3263cf(0x15f))/0x6*(parseInt(_0x3263cf(0x154))/0x7)+parseInt(_0x3263cf(0x155))/0x8*(parseInt(_0x3263cf(0x152))/0x9)+-parseInt(_0x3263cf(0x161))/0xa;if(_0x44d593===_0x4143d6)break;else _0x3c241c['push'](_0x3c241c['shift']());}catch(_0x2338ea){_0x3c241c['push'](_0x3c241c['shift']());}}}(a7_0xf7af,0x25c31));Object[a7_0x447a36(0x157)](exports,a7_0x447a36(0x15d),{'value':!![]}),exports['getAppsConfig']=void 0x0;const decorator_1=require(a7_0x447a36(0x158)),action_1=require(a7_0x447a36(0x160));function a7_0xf7af(){const _0x42c378=['18900qCSCUt','18CAwYDR','../types/action','6379010gkTwnJ','1156086hbMYtl','3tqmrNh','138761lLHTAr','16ChHLOO','APPSCONFIG_KEY','defineProperty','@midwayjs/decorator','AppsConfigTmp','1038116nJDbwT','45614vvGyZT','1358660kbyzjU','__esModule'];a7_0xf7af=function(){return _0x42c378;};return a7_0xf7af();}function getAppsConfig(_0x538211){const _0x10c243=a7_0x447a36,_0x680239=(0x0,decorator_1['getClassMetadata'])(action_1[_0x10c243(0x156)],action_1[_0x10c243(0x159)])||{};return _0x538211?_0x680239[_0x538211]:_0x680239;}function a7_0x2a20(_0x885ab5,_0x1cbdd4){const _0xf7afb1=a7_0xf7af();return a7_0x2a20=function(_0x2a202e,_0x51cbbe){_0x2a202e=_0x2a202e-0x152;let _0x392899=_0xf7afb1[_0x2a202e];return _0x392899;},a7_0x2a20(_0x885ab5,_0x1cbdd4);}exports['getAppsConfig']=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';function a8_0x1d7a(_0x250448,_0x29fc84){const _0x1f5dbe=a8_0x1f5d();return a8_0x1d7a=function(_0x1d7adb,_0x10e7ff){_0x1d7adb=_0x1d7adb-0x1a2;let _0x916268=_0x1f5dbe[_0x1d7adb];return _0x916268;},a8_0x1d7a(_0x250448,_0x29fc84);}const a8_0x166a9c=a8_0x1d7a;(function(_0x23fd50,_0x3ba64d){const _0x16a712=a8_0x1d7a,_0x50da74=_0x23fd50();while(!![]){try{const _0x4fd3ae=parseInt(_0x16a712(0x1a9))/0x1+-parseInt(_0x16a712(0x1ed))/0x2+-parseInt(_0x16a712(0x1f9))/0x3+-parseInt(_0x16a712(0x1fd))/0x4+-parseInt(_0x16a712(0x1eb))/0x5*(parseInt(_0x16a712(0x1e4))/0x6)+-parseInt(_0x16a712(0x1c5))/0x7*(-parseInt(_0x16a712(0x1ae))/0x8)+-parseInt(_0x16a712(0x1d7))/0x9*(-parseInt(_0x16a712(0x1af))/0xa);if(_0x4fd3ae===_0x3ba64d)break;else _0x50da74['push'](_0x50da74['shift']());}catch(_0x38e9c2){_0x50da74['push'](_0x50da74['shift']());}}}(a8_0x1f5d,0x4b123));function a8_0x1f5d(){const _0x27c2e1=['Boolean','FIELDS','summary','270512NULjZB','routerOptions','header','boolean','object','1016TCIWiV','2109780OCApmG','array','description','path','query','ACTION_KEY','request','replace','WEB_ROUTER_PARAM_KEY','getRoutes','test','allow','FILESTREAM','getClassMetadata','type','HEADERS','pprefix','__esModule','limit','parameterIndex','isArray','title','1967luiFPC','join','log','string','route','module','body','lodash','get','concat','required','getClassExtendedMetadata','tagName','defineProperty','@anncic-api/validator','name','../types/action','noreq','36dXdlbj','prefix','filepath','BODY','RULES_KEY','items','push','length','min','flags.presence','indexOf','/static/apitest','只允许:[','2250MaLAYH','describe','default','rules','flags.description','static/apitest','routerName','4805ZJOysL','method','504452rYKurX','PARAM','QUERY','ACTION_ROUTE_KEY','Object','startsWith','RouteParamTypes','key','function','@midwayjs/decorator','iterator','metadata','388110UIpkLT','filter','max','number','402596aaEhfo','routes','args','INJECT_CUSTOM_PARAM','file','propertyData','FILESSTREAM'];a8_0x1f5d=function(){return _0x27c2e1;};return a8_0x1f5d();}Object[a8_0x166a9c(0x1d2)](exports,a8_0x166a9c(0x1c0),{'value':!![]}),exports[a8_0x166a9c(0x1b8)]=void 0x0;const lodash_1=require(a8_0x166a9c(0x1cc)),validator_1=require(a8_0x166a9c(0x1d3)),decorator_1=require(a8_0x166a9c(0x1f6)),decorator_2=require('@midwayjs/decorator'),decorator_3=require(a8_0x166a9c(0x1f6)),action_1=require(a8_0x166a9c(0x1d5));function getRoutes(_0x2e2895={'prefix':'/','module':![]}){const _0x49188b=a8_0x166a9c;var _0x5761df,_0x28d11c;const _0x48d53e=(0x0,decorator_3['listModule'])(action_1[_0x49188b(0x1b4)]),_0x3a55ef={},_0x4fe616=Array[_0x49188b(0x1c3)](_0x2e2895['filter']||[])?_0x2e2895['filter']||[]:[_0x2e2895[_0x49188b(0x1fa)]];_0x38ba7d:for(const _0x5eaca8 of _0x48d53e){let _0x581c59=(0x0,decorator_3[_0x49188b(0x1bc)])(action_1[_0x49188b(0x1b4)],_0x5eaca8),_0x59c247=(0x0,decorator_3[_0x49188b(0x1bc)])(action_1[_0x49188b(0x1f0)],_0x5eaca8);if(_0x581c59&&_0x59c247){let _0x25b4c9=_0x581c59['prefix'],_0x44f287={};if(_0x2e2895[_0x49188b(0x1ca)]&&(0x0,lodash_1[_0x49188b(0x1cd)])(_0x581c59,'module',![])!=_0x2e2895[_0x49188b(0x1ca)])continue _0x38ba7d;else{if(_0x2e2895[_0x49188b(0x1ca)]===![]&&!!(0x0,lodash_1[_0x49188b(0x1cd)])(_0x581c59,_0x49188b(0x1ca),null))continue _0x38ba7d;}if(_0x2e2895[_0x49188b(0x1d8)]&&!_0x25b4c9['startsWith'](_0x2e2895['prefix']))continue _0x38ba7d;_0x25b4c9!=='/'?(_0x44f287[_0x49188b(0x1a8)]=(_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59[_0x49188b(0x1aa)]['tagName'])||(/^\//[_0x49188b(0x1b9)](_0x25b4c9)?_0x25b4c9['split']('/')[0x1]:_0x25b4c9),_0x44f287['description']=(_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59[_0x49188b(0x1aa)][_0x49188b(0x1b1)])||_0x44f287[_0x49188b(0x1a8)],_0x44f287[_0x49188b(0x1fe)]=[]):(_0x44f287['summary']=(_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59['routerOptions'][_0x49188b(0x1d1)])||_0x49188b(0x1e6),_0x44f287[_0x49188b(0x1b1)]=(_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59[_0x49188b(0x1aa)][_0x49188b(0x1b1)])||'',_0x44f287['routes']=[]);_0x2e2895[_0x49188b(0x1d9)]&&(_0x44f287[_0x49188b(0x1d9)]=_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59['filepath']);(_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59[_0x49188b(0x1bf)])&&(_0x44f287['prefix']=_0x581c59['pprefix']);(_0x581c59===null||_0x581c59===void 0x0?void 0x0:_0x581c59[_0x49188b(0x1ca)])&&(_0x44f287[_0x49188b(0x1ca)]=_0x581c59['module']);let _0x38774e=(0x0,decorator_3[_0x49188b(0x1bc)])(decorator_2[_0x49188b(0x1a2)],_0x5eaca8)||{};if(typeof _0x59c247[Symbol[_0x49188b(0x1f7)]]===_0x49188b(0x1f5))for(let _0x524ddb of _0x59c247){let _0x2fcd2f={};_0x2fcd2f['method']=_0x524ddb['requestMethod'],_0x2fcd2f[_0x49188b(0x1c9)]=(_0x25b4c9+_0x524ddb[_0x49188b(0x1b2)])[_0x49188b(0x1b6)](/\/{1,}/,'/'),_0x2fcd2f[_0x49188b(0x1a8)]=(_0x524ddb===null||_0x524ddb===void 0x0?void 0x0:_0x524ddb[_0x49188b(0x1ea)])||_0x44f287[_0x49188b(0x1a8)]||_0x49188b(0x1e6),_0x2fcd2f['description']=(_0x524ddb===null||_0x524ddb===void 0x0?void 0x0:_0x524ddb['description'])||'',_0x2fcd2f[_0x49188b(0x1b5)]=[];if(!(0x0,lodash_1[_0x49188b(0x1f2)])(_0x2fcd2f[_0x49188b(0x1c9)],_0x49188b(0x1e9))&&!(0x0,lodash_1[_0x49188b(0x1f2)])(_0x2fcd2f[_0x49188b(0x1c9)],_0x49188b(0x1e2))&&_0x4fe616[_0x49188b(0x1e1)](_0x2fcd2f['route'])===-0x1){if(!(_0x2e2895===null||_0x2e2895===void 0x0?void 0x0:_0x2e2895[_0x49188b(0x1d6)])){let _0x2e2b86=(0x0,decorator_3['getMethodParamTypes'])(new _0x5eaca8(),_0x524ddb[_0x49188b(0x1ec)]);for(const _0x8d56fa in _0x2e2b86){let _0x31952f=(_0x5761df=_0x38774e[_0x524ddb[_0x49188b(0x1ec)]])===null||_0x5761df===void 0x0?void 0x0:_0x5761df['find'](_0xd32b3e=>_0xd32b3e['parameterIndex']==_0x8d56fa&&_0xd32b3e['key']===decorator_2[_0x49188b(0x1b7)]&&(_0xd32b3e===null||_0xd32b3e===void 0x0?void 0x0:_0xd32b3e[_0x49188b(0x1f8)]));if(_0x31952f===null||_0x31952f===void 0x0?void 0x0:_0x31952f[_0x49188b(0x1f8)]){let _0x31f424=convertTypeToString(_0x31952f['metadata'][_0x49188b(0x1bd)]||0x0);if([_0x49188b(0x1b3),_0x49188b(0x1cb)][_0x49188b(0x1e1)](_0x31f424)!=-0x1&&_0x31952f['metadata'][_0x49188b(0x1a4)][_0x49188b(0x1e1)](':')==-0x1&&!_0x2fcd2f['request']['find'](_0x2279e3=>_0x2279e3[_0x49188b(0x1f4)]==_0x31952f[_0x49188b(0x1f8)][_0x49188b(0x1a4)]))_0x2fcd2f[_0x49188b(0x1b5)]['push']({'key':_0x31952f[_0x49188b(0x1f8)][_0x49188b(0x1a4)],'title':_0x31952f[_0x49188b(0x1f8)][_0x49188b(0x1a4)],'type':convertSchemaType(_0x2e2b86[_0x31952f[_0x49188b(0x1c2)]][_0x49188b(0x1d4)]),'required':![],'default':'','desc':''});else{if(_0x31f424==_0x49188b(0x1a3)){let _0x5a6750=((_0x28d11c=_0x31952f===null||_0x31952f===void 0x0?void 0x0:_0x31952f[_0x49188b(0x1f8)])===null||_0x28d11c===void 0x0?void 0x0:_0x28d11c[_0x49188b(0x1a4)])||_0x49188b(0x1a3);_0x5a6750[_0x49188b(0x1e1)](':')==-0x1&&!_0x2fcd2f['request']['find'](_0x18f199=>_0x18f199[_0x49188b(0x1f4)]==_0x5a6750&&_0x18f199[_0x49188b(0x1bd)]==_0x49188b(0x1a3))&&_0x2fcd2f[_0x49188b(0x1b5)][_0x49188b(0x1dd)]({'key':_0x5a6750,'title':'文件上传-'+_0x5a6750,'type':_0x49188b(0x1a3),'required':!![],'default':'','desc':''});}}}else{const _0x32b550=(0x0,decorator_3[_0x49188b(0x1d0)])(validator_1[_0x49188b(0x1db)],_0x2e2b86[_0x8d56fa]);_0x32b550&&_0x2fcd2f['request'][_0x49188b(0x1dd)](...getJoiRequest(_0x32b550));}}}_0x44f287[_0x49188b(0x1fe)][_0x49188b(0x1dd)](_0x2fcd2f);}}if(_0x44f287[_0x49188b(0x1fe)][_0x49188b(0x1de)]>0x0){let _0x3fe5f3=_0x3a55ef[_0x25b4c9];_0x3fe5f3?(_0x3fe5f3[_0x49188b(0x1a8)]!=_0x44f287[_0x49188b(0x1a8)]&&(_0x3fe5f3['summary']=_0x3fe5f3[_0x49188b(0x1a8)]+','+_0x44f287[_0x49188b(0x1a8)]),_0x3fe5f3[_0x49188b(0x1b1)]!=_0x44f287[_0x49188b(0x1b1)]&&(_0x3fe5f3['description']=_0x3fe5f3[_0x49188b(0x1b1)]+','+_0x44f287[_0x49188b(0x1b1)]),_0x3fe5f3[_0x49188b(0x1fe)]=_0x3fe5f3['routes'][_0x49188b(0x1ce)](_0x44f287[_0x49188b(0x1fe)]),_0x3a55ef[_0x25b4c9]=_0x3fe5f3):_0x3a55ef[_0x25b4c9]=_0x44f287;}}}return _0x3a55ef;}exports[a8_0x166a9c(0x1b8)]=getRoutes;function getJoiRequest(_0x31eb31){const _0x1b1ce8=a8_0x166a9c,_0x5221a2=[];for(let _0x2863ef in _0x31eb31){const _0x3ecc11={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0xf90d2d=typeof _0x31eb31[_0x2863ef][_0x1b1ce8(0x1e5)]==_0x1b1ce8(0x1f5)?_0x31eb31[_0x2863ef][_0x1b1ce8(0x1e5)]():_0x31eb31[_0x2863ef];_0x3ecc11[_0x1b1ce8(0x1f4)]=_0x2863ef,_0x3ecc11['type']=_0xf90d2d[_0x1b1ce8(0x1bd)],_0x3ecc11[_0x1b1ce8(0x1c4)]=(0x0,lodash_1[_0x1b1ce8(0x1cd)])(_0xf90d2d,'flags.label',_0x2863ef),_0x3ecc11[_0x1b1ce8(0x1e6)]=(0x0,lodash_1[_0x1b1ce8(0x1cd)])(_0xf90d2d,'flags.default',''),_0x3ecc11[_0x1b1ce8(0x1cf)]=(0x0,lodash_1[_0x1b1ce8(0x1cd)])(_0xf90d2d,_0x1b1ce8(0x1e0),'')=='required',_0x3ecc11[_0x1b1ce8(0x1b1)]=(0x0,lodash_1['get'])(_0xf90d2d,_0x1b1ce8(0x1e8),'');if(_0xf90d2d['type']==_0x1b1ce8(0x1ad))_0x3ecc11['children']=getJoiRequest(_0xf90d2d['keys']);else _0xf90d2d[_0x1b1ce8(0x1bd)]==_0x1b1ce8(0x1b0)&&_0xf90d2d[_0x1b1ce8(0x1dc)]&&Array[_0x1b1ce8(0x1c3)](_0xf90d2d[_0x1b1ce8(0x1dc)])&&_0xf90d2d[_0x1b1ce8(0x1dc)][0x0]&&console[_0x1b1ce8(0x1c7)](_0x2863ef+'-array',_0xf90d2d);_0xf90d2d[_0x1b1ce8(0x1ba)]&&Array[_0x1b1ce8(0x1c3)](_0xf90d2d['allow'])&&_0xf90d2d[_0x1b1ce8(0x1ba)][_0x1b1ce8(0x1de)]>0x0&&(_0x3ecc11['description']=_0x1b1ce8(0x1e3)+_0xf90d2d[_0x1b1ce8(0x1ba)][_0x1b1ce8(0x1c6)](',')+'];'+_0x3ecc11[_0x1b1ce8(0x1b1)]);if(_0x3ecc11[_0x1b1ce8(0x1f4)]&&_0x3ecc11[_0x1b1ce8(0x1bd)]){const _0x4ab81a={};for(const _0x5875d2 of _0xf90d2d[_0x1b1ce8(0x1e7)]||[]){if(_0x5875d2[_0x1b1ce8(0x1d4)]===_0x1b1ce8(0x1df)&&_0x5875d2[_0x1b1ce8(0x1ff)])_0x4ab81a[_0x1b1ce8(0x1df)]=_0x5875d2['args'][_0x1b1ce8(0x1c1)];else _0x5875d2[_0x1b1ce8(0x1d4)]===_0x1b1ce8(0x1fb)&&(_0x4ab81a[_0x1b1ce8(0x1fb)]=_0x5875d2['args']['limit']);}_0x3ecc11[_0x1b1ce8(0x1e7)]=_0x4ab81a;}_0x3ecc11['key']&&_0x3ecc11['title']&&_0x5221a2['push'](_0x3ecc11);}return _0x5221a2;}function convertSchemaType(_0xf0d412){const _0x15f246=a8_0x166a9c;switch(_0xf0d412){case _0x15f246(0x1f1):return'object';case _0x15f246(0x1a6):return _0x15f246(0x1ac);case'Number':return _0x15f246(0x1fc);case'String':return _0x15f246(0x1c8);case'File':return _0x15f246(0x1a3);default:return'string';}}function convertTypeToString(_0x11cb0d){const _0x462565=a8_0x166a9c;switch(_0x11cb0d){case decorator_1[_0x462565(0x1f3)][_0x462565(0x1be)]:return _0x462565(0x1ab);case decorator_1[_0x462565(0x1f3)][_0x462565(0x1ef)]:return _0x462565(0x1b3);case decorator_1[_0x462565(0x1f3)][_0x462565(0x1ee)]:return _0x462565(0x1b2);case decorator_1['RouteParamTypes'][_0x462565(0x1da)]:return'body';case decorator_1['RouteParamTypes'][_0x462565(0x1a7)]:case decorator_1[_0x462565(0x1f3)][_0x462565(0x1a5)]:case decorator_1[_0x462565(0x1f3)][_0x462565(0x1bb)]:return _0x462565(0x1a3);default:return _0x462565(0x1ab);}}
|
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_0x1ecbe2=a9_0x42a4;(function(_0x1e9872,_0x414dcb){var _0xfbbc2b=a9_0x42a4,_0x461548=_0x1e9872();while(!![]){try{var _0x5b604e=-parseInt(_0xfbbc2b(0x1b4))/0x1*(parseInt(_0xfbbc2b(0x197))/0x2)+-parseInt(_0xfbbc2b(0x1bb))/0x3*(-parseInt(_0xfbbc2b(0x18c))/0x4)+parseInt(_0xfbbc2b(0x190))/0x5*(-parseInt(_0xfbbc2b(0x1c4))/0x6)+-parseInt(_0xfbbc2b(0x1c6))/0x7*(-parseInt(_0xfbbc2b(0x19a))/0x8)+parseInt(_0xfbbc2b(0x194))/0x9+-parseInt(_0xfbbc2b(0x18d))/0xa*(-parseInt(_0xfbbc2b(0x1b9))/0xb)+parseInt(_0xfbbc2b(0x198))/0xc;if(_0x5b604e===_0x414dcb)break;else _0x461548['push'](_0x461548['shift']());}catch(_0x435806){_0x461548['push'](_0x461548['shift']());}}}(a9_0x382d,0x2929d));var __createBinding=this&&this[a9_0x1ecbe2(0x1c7)]||(Object[a9_0x1ecbe2(0x18f)]?function(_0xe8f259,_0x1a1b27,_0x1949b8,_0x272f62){var _0x158158=a9_0x1ecbe2;if(_0x272f62===undefined)_0x272f62=_0x1949b8;var _0x1f1b51=Object[_0x158158(0x1b2)](_0x1a1b27,_0x1949b8);(!_0x1f1b51||(_0x158158(0x195)in _0x1f1b51?!_0x1a1b27['__esModule']:_0x1f1b51[_0x158158(0x1b3)]||_0x1f1b51[_0x158158(0x192)]))&&(_0x1f1b51={'enumerable':!![],'get':function(){return _0x1a1b27[_0x1949b8];}}),Object[_0x158158(0x1b8)](_0xe8f259,_0x272f62,_0x1f1b51);}:function(_0x4540c1,_0x10b79d,_0x1d2092,_0x212eee){if(_0x212eee===undefined)_0x212eee=_0x1d2092;_0x4540c1[_0x212eee]=_0x10b79d[_0x1d2092];}),__exportStar=this&&this[a9_0x1ecbe2(0x1bc)]||function(_0x62dde7,_0x3fccd4){var _0x4b3157=a9_0x1ecbe2;for(var _0x578ec5 in _0x62dde7)if(_0x578ec5!==_0x4b3157(0x1ad)&&!Object[_0x4b3157(0x1c3)][_0x4b3157(0x1a2)][_0x4b3157(0x1b1)](_0x3fccd4,_0x578ec5))__createBinding(_0x3fccd4,_0x62dde7,_0x578ec5);};Object[a9_0x1ecbe2(0x1b8)](exports,'__esModule',{'value':!![]}),exports['getAppsConfig']=exports['ScopeEnum']=exports[a9_0x1ecbe2(0x1ba)]=exports[a9_0x1ecbe2(0x1a3)]=exports[a9_0x1ecbe2(0x1c0)]=exports['Logger']=exports['Config']=exports[a9_0x1ecbe2(0x1a7)]=exports[a9_0x1ecbe2(0x1b6)]=exports[a9_0x1ecbe2(0x199)]=exports[a9_0x1ecbe2(0x191)]=exports[a9_0x1ecbe2(0x18b)]=exports[a9_0x1ecbe2(0x1a9)]=exports[a9_0x1ecbe2(0x1c1)]=exports['Files']=exports['File']=exports['Configuration']=exports[a9_0x1ecbe2(0x1b5)]=exports[a9_0x1ecbe2(0x1a5)]=exports['ExcelService']=exports[a9_0x1ecbe2(0x1ab)]=exports[a9_0x1ecbe2(0x19f)]=exports[a9_0x1ecbe2(0x1a4)]=exports[a9_0x1ecbe2(0x193)]=exports[a9_0x1ecbe2(0x18a)]=exports[a9_0x1ecbe2(0x1c9)]=exports[a9_0x1ecbe2(0x196)]=exports[a9_0x1ecbe2(0x19c)]=exports['Api']=void 0x0;const getAppsConfig_1=require(a9_0x1ecbe2(0x1a8));Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1ac),{'enumerable':!![],'get':function(){var _0x2de051=a9_0x1ecbe2;return getAppsConfig_1[_0x2de051(0x1ac)];}}),__exportStar(require(a9_0x1ecbe2(0x1c2)),exports),__exportStar(require(a9_0x1ecbe2(0x18e)),exports);var ActionApi_1=require(a9_0x1ecbe2(0x1c5));Object['defineProperty'](exports,a9_0x1ecbe2(0x19d),{'enumerable':!![],'get':function(){var _0x5d104f=a9_0x1ecbe2;return ActionApi_1[_0x5d104f(0x19d)];}});var Action_1=require('./decorator/Action');Object[a9_0x1ecbe2(0x1b8)](exports,'Action',{'enumerable':!![],'get':function(){var _0x29d48a=a9_0x1ecbe2;return Action_1[_0x29d48a(0x19c)];}});var ActionApitest_1=require('./decorator/ActionApitest');Object['defineProperty'](exports,'Apitest',{'enumerable':!![],'get':function(){var _0x1582bc=a9_0x1ecbe2;return ActionApitest_1[_0x1582bc(0x196)];}});function a9_0x42a4(_0x3be9b0,_0x4e3cec){var _0x382dac=a9_0x382d();return a9_0x42a4=function(_0x42a4fa,_0x4091f0){_0x42a4fa=_0x42a4fa-0x18a;var _0x1eef06=_0x382dac[_0x42a4fa];return _0x1eef06;},a9_0x42a4(_0x3be9b0,_0x4e3cec);}var getRoutes_1=require(a9_0x1ecbe2(0x19e));Object[a9_0x1ecbe2(0x1b8)](exports,'getRoutes',{'enumerable':!![],'get':function(){var _0x14259f=a9_0x1ecbe2;return getRoutes_1[_0x14259f(0x1c9)];}});var ApiError_1=require(a9_0x1ecbe2(0x1bf));Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x18a),{'enumerable':!![],'get':function(){var _0x3f5656=a9_0x1ecbe2;return ApiError_1[_0x3f5656(0x18a)];}});var task_1=require(a9_0x1ecbe2(0x1a0));Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x193),{'enumerable':!![],'get':function(){var _0x3f5f44=a9_0x1ecbe2;return task_1[_0x3f5f44(0x193)];}});var cache_1=require(a9_0x1ecbe2(0x1b7));Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1a4),{'enumerable':!![],'get':function(){var _0x357b70=a9_0x1ecbe2;return cache_1[_0x357b70(0x1a4)];}});var event_1=require(a9_0x1ecbe2(0x19b));Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x19f),{'enumerable':!![],'get':function(){return event_1['EventService'];}});var ApiService_1=require(a9_0x1ecbe2(0x1a6));Object[a9_0x1ecbe2(0x1b8)](exports,'ApiService',{'enumerable':!![],'get':function(){return ApiService_1['ApiService'];}});var ExcelService_1=require(a9_0x1ecbe2(0x1b0));function a9_0x382d(){var _0x325aff=['ApiError','Param','4aGlkSP','93530ERFnvW','./service/ApitestService','create','1625945KLvEUf','Query','configurable','QueueService','1797750UDMalF','get','Apitest','4vcYRAS','5944536rfbdhj','Headers','16HThaJF','@anncic-api/event','Action','Api','./helper/getRoutes','EventService','@midwayjs/task','@midwayjs/decorator','hasOwnProperty','Inject','CacheService','ValidatorError','./service/ApiService','App','./helper/getAppsConfig','Body','ExcelService','ApiService','getAppsConfig','default','Logger','./configuration','./service/ExcelService','call','getOwnPropertyDescriptor','writable','150587ELfboJ','ValidatorService','Init','@anncic-api/cache','defineProperty','11EqTfVT','Scope','148209Hrxkxz','__exportStar','ScopeEnum','Files','./exception/ApiError','Provide','Fields','./types/common','prototype','6osUUAw','./decorator/ActionApi','143794npapJJ','__createBinding','Configuration','getRoutes','Config','File'];a9_0x382d=function(){return _0x325aff;};return a9_0x382d();}Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1aa),{'enumerable':!![],'get':function(){var _0x57920e=a9_0x1ecbe2;return ExcelService_1[_0x57920e(0x1aa)];}});var validator_1=require('@anncic-api/validator');Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1a5),{'enumerable':!![],'get':function(){var _0x52bb51=a9_0x1ecbe2;return validator_1[_0x52bb51(0x1a5)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1b5),{'enumerable':!![],'get':function(){return validator_1['ValidatorService'];}});var configuration_1=require(a9_0x1ecbe2(0x1af));Object['defineProperty'](exports,a9_0x1ecbe2(0x1c8),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var decorator_1=require(a9_0x1ecbe2(0x1a1));Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1cb),{'enumerable':!![],'get':function(){return decorator_1['File'];}}),Object[a9_0x1ecbe2(0x1b8)](exports,'Files',{'enumerable':!![],'get':function(){var _0x2f3ccd=a9_0x1ecbe2;return decorator_1[_0x2f3ccd(0x1be)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1c1),{'enumerable':!![],'get':function(){var _0x461374=a9_0x1ecbe2;return decorator_1[_0x461374(0x1c1)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1a9),{'enumerable':!![],'get':function(){var _0x1e4cdb=a9_0x1ecbe2;return decorator_1[_0x1e4cdb(0x1a9)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x18b),{'enumerable':!![],'get':function(){var _0x438fe4=a9_0x1ecbe2;return decorator_1[_0x438fe4(0x18b)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x191),{'enumerable':!![],'get':function(){return decorator_1['Query'];}}),Object[a9_0x1ecbe2(0x1b8)](exports,'Headers',{'enumerable':!![],'get':function(){var _0x2c749c=a9_0x1ecbe2;return decorator_1[_0x2c749c(0x199)];}}),Object['defineProperty'](exports,a9_0x1ecbe2(0x1b6),{'enumerable':!![],'get':function(){var _0x28c5fe=a9_0x1ecbe2;return decorator_1[_0x28c5fe(0x1b6)];}});var decorator_2=require(a9_0x1ecbe2(0x1a1));Object[a9_0x1ecbe2(0x1b8)](exports,'App',{'enumerable':!![],'get':function(){var _0x295a67=a9_0x1ecbe2;return decorator_2[_0x295a67(0x1a7)];}}),Object['defineProperty'](exports,a9_0x1ecbe2(0x1ca),{'enumerable':!![],'get':function(){var _0x7b036e=a9_0x1ecbe2;return decorator_2[_0x7b036e(0x1ca)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1ae),{'enumerable':!![],'get':function(){var _0x4f0ed2=a9_0x1ecbe2;return decorator_2[_0x4f0ed2(0x1ae)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1c0),{'enumerable':!![],'get':function(){var _0x505394=a9_0x1ecbe2;return decorator_2[_0x505394(0x1c0)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1a3),{'enumerable':!![],'get':function(){var _0x3468f0=a9_0x1ecbe2;return decorator_2[_0x3468f0(0x1a3)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,'Scope',{'enumerable':!![],'get':function(){var _0x189e79=a9_0x1ecbe2;return decorator_2[_0x189e79(0x1ba)];}}),Object[a9_0x1ecbe2(0x1b8)](exports,a9_0x1ecbe2(0x1bd),{'enumerable':!![],'get':function(){var _0x2edc3e=a9_0x1ecbe2;return decorator_2[_0x2edc3e(0x1bd)];}}),global['getAppsConfig']=getAppsConfig_1[a9_0x1ecbe2(0x1ac)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a10_0x46ed(){var _0x5d644e=['now','checksign','checkcode','signature','design:type','undefined','ApiService','timeout','getcheck','MD5','push','getOwnPropertyDescriptor','toString','join','entries','5552ftJZoz','3ONuVJx','HEADERS_CHECKCODE','metadata','4186220HIqXvA','11KekBZr','map','toLowerCase','__metadata','object','108obIsAB','requesttime','HEADERS_LACK','1524464fBsSiF','function','device','logintime','2497060uThuVA','HEADERS_DEVICE','sort','26742hdXzyR','548121XeHDvF','decorate','length','TIMEOUT','fromEntries','ApiError','defineProperty','token','password','../exception/ApiError','ScopeEnum','secret=','anncicapi','config','secret','1353987rlAtxW','635MitCQD','getsign','Config','crypto-js','devices'];a10_0x46ed=function(){return _0x5d644e;};return a10_0x46ed();}var a10_0x3fe72c=a10_0x1e2d;(function(_0x17377a,_0x4743b8){var _0x1cf13a=a10_0x1e2d,_0x34f53e=_0x17377a();while(!![]){try{var _0x3c7264=parseInt(_0x1cf13a(0x207))/0x1+-parseInt(_0x1cf13a(0x1f4))/0x2*(parseInt(_0x1cf13a(0x21d))/0x3)+parseInt(_0x1cf13a(0x1f0))/0x4+parseInt(_0x1cf13a(0x208))/0x5*(parseInt(_0x1cf13a(0x1f7))/0x6)+parseInt(_0x1cf13a(0x1f8))/0x7+-parseInt(_0x1cf13a(0x21c))/0x8*(-parseInt(_0x1cf13a(0x1ed))/0x9)+parseInt(_0x1cf13a(0x220))/0xa*(-parseInt(_0x1cf13a(0x221))/0xb);if(_0x3c7264===_0x4743b8)break;else _0x34f53e['push'](_0x34f53e['shift']());}catch(_0x295441){_0x34f53e['push'](_0x34f53e['shift']());}}}(a10_0x46ed,0xafeed));function a10_0x1e2d(_0x4fadb4,_0x5d623e){var _0x46ed8f=a10_0x46ed();return a10_0x1e2d=function(_0x1e2d8b,_0x3006e4){_0x1e2d8b=_0x1e2d8b-0x1ed;var _0x17c411=_0x46ed8f[_0x1e2d8b];return _0x17c411;},a10_0x1e2d(_0x4fadb4,_0x5d623e);}var __decorate=this&&this['__decorate']||function(_0x52e4f4,_0x529af0,_0x3addcb,_0x14a60e){var _0xce1d1a=a10_0x1e2d,_0x18bd15=arguments[_0xce1d1a(0x1fa)],_0x1a4607=_0x18bd15<0x3?_0x529af0:_0x14a60e===null?_0x14a60e=Object[_0xce1d1a(0x218)](_0x529af0,_0x3addcb):_0x14a60e,_0x4856cd;if(typeof Reflect===_0xce1d1a(0x225)&&typeof Reflect[_0xce1d1a(0x1f9)]===_0xce1d1a(0x1f1))_0x1a4607=Reflect['decorate'](_0x52e4f4,_0x529af0,_0x3addcb,_0x14a60e);else{for(var _0x264e94=_0x52e4f4[_0xce1d1a(0x1fa)]-0x1;_0x264e94>=0x0;_0x264e94--)if(_0x4856cd=_0x52e4f4[_0x264e94])_0x1a4607=(_0x18bd15<0x3?_0x4856cd(_0x1a4607):_0x18bd15>0x3?_0x4856cd(_0x529af0,_0x3addcb,_0x1a4607):_0x4856cd(_0x529af0,_0x3addcb))||_0x1a4607;}return _0x18bd15>0x3&&_0x1a4607&&Object[_0xce1d1a(0x1fe)](_0x529af0,_0x3addcb,_0x1a4607),_0x1a4607;},__metadata=this&&this[a10_0x3fe72c(0x224)]||function(_0x488ebe,_0x3bc249){var _0x407fa7=a10_0x3fe72c;if(typeof Reflect===_0x407fa7(0x225)&&typeof Reflect['metadata']===_0x407fa7(0x1f1))return Reflect[_0x407fa7(0x21f)](_0x488ebe,_0x3bc249);};Object[a10_0x3fe72c(0x1fe)](exports,'__esModule',{'value':!![]}),exports['ApiService']=void 0x0;const crypto_js_1=require(a10_0x3fe72c(0x20b)),decorator_1=require('@midwayjs/decorator'),ApiError_1=require(a10_0x3fe72c(0x201));let ApiService=class ApiService{['password'](_0xa237f3){var _0x17b2d7=a10_0x3fe72c,_0x17d9f4;return _0xa237f3?(0x0,crypto_js_1[_0x17b2d7(0x216)])(_0xa237f3+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1[_0x17b2d7(0x216)])(_0xa237f3)[_0x17b2d7(0x219)]()+((_0x17d9f4=this['config'])===null||_0x17d9f4===void 0x0?void 0x0:_0x17d9f4[_0x17b2d7(0x200)]))['toString']())[_0x17b2d7(0x219)]():'';}[a10_0x3fe72c(0x215)](_0x578666,_0x3dd5f5,_0xb4f5bd=Date[a10_0x3fe72c(0x20d)]()){return{'Token':_0x578666,'Logintime':_0xb4f5bd,'Checkcode':this['checkcode'](_0x578666,_0x3dd5f5,_0xb4f5bd)};}['getsign'](_0x1997e2={}){var _0x336461=a10_0x3fe72c;const _0xad986c=[],_0x10d885=Object['fromEntries'](Object[_0x336461(0x21b)](_0x1997e2)[_0x336461(0x222)](_0x4cfada=>[_0x4cfada[0x0][_0x336461(0x223)](),_0x4cfada[0x1]]));for(let _0x26ab78 of[_0x336461(0x1f2),'requesttime','token',_0x336461(0x1f3),_0x336461(0x20f)]){if(typeof _0x10d885[_0x26ab78]==_0x336461(0x212))throw new AnnError(ApiError_1['ApiError'][_0x336461(0x1ef)],{'message':'缺少头信息:'+_0x26ab78});_0xad986c[_0x336461(0x217)](_0x26ab78+'='+_0x10d885[_0x26ab78]);}if(Math['abs'](_0x10d885[_0x336461(0x1ee)])-Date[_0x336461(0x20d)]()>this['config'][_0x336461(0x214)])throw new AnnError(ApiError_1[_0x336461(0x1fd)][_0x336461(0x1fb)]);if(!this['config'][_0x336461(0x20c)][_0x10d885[_0x336461(0x1f2)]]||!this[_0x336461(0x205)][_0x336461(0x20c)][_0x10d885[_0x336461(0x1f2)]][_0x336461(0x206)]||!this['config'][_0x336461(0x20c)][_0x10d885[_0x336461(0x1f2)]][_0x336461(0x20f)])throw new AnnError(ApiError_1[_0x336461(0x1fd)]['HEADERS_DEVICE']);if(_0x10d885['token']&&_0x10d885[_0x336461(0x20f)]!=this[_0x336461(0x20f)](_0x10d885[_0x336461(0x1ff)],_0x10d885['device'],_0x10d885['logintime']))throw new AnnError(ApiError_1[_0x336461(0x1fd)][_0x336461(0x21e)]);return _0xad986c[_0x336461(0x217)](_0x336461(0x203)+this[_0x336461(0x205)][_0x336461(0x20c)][_0x10d885['device']]['secret']),(0x0,crypto_js_1['MD5'])(_0xad986c[_0x336461(0x1f6)]()[_0x336461(0x21a)](''))[_0x336461(0x219)]();}[a10_0x3fe72c(0x20f)](_0x460d53,_0x4d1d89,_0x213cf5=Date[a10_0x3fe72c(0x20d)]()){var _0x4597ad=a10_0x3fe72c,_0x211f67,_0x6df86e,_0x26de0d;if(!((_0x211f67=this['config'])===null||_0x211f67===void 0x0?void 0x0:_0x211f67[_0x4597ad(0x20c)][_0x4d1d89])||!((_0x26de0d=(_0x6df86e=this[_0x4597ad(0x205)])===null||_0x6df86e===void 0x0?void 0x0:_0x6df86e[_0x4597ad(0x20c)][_0x4d1d89])===null||_0x26de0d===void 0x0?void 0x0:_0x26de0d[_0x4597ad(0x20f)]))throw new AnnError(ApiError_1[_0x4597ad(0x1fd)][_0x4597ad(0x1f5)]);return(0x0,crypto_js_1[_0x4597ad(0x216)])(_0x460d53+(0x0,crypto_js_1[_0x4597ad(0x216)])(_0x213cf5+this['config']['devices'][_0x4d1d89]['checkcode'])['toString']())['toString']();}[a10_0x3fe72c(0x20e)](_0x54c783={}){var _0x105af9=a10_0x3fe72c;const _0x4441c1=Object[_0x105af9(0x1fc)](Object[_0x105af9(0x21b)](_0x54c783)['map'](_0xc131cf=>[_0xc131cf[0x0][_0x105af9(0x223)](),_0xc131cf[0x1]]));if(!(_0x4441c1===null||_0x4441c1===void 0x0?void 0x0:_0x4441c1[_0x105af9(0x210)]))throw new AnnError(ApiError_1[_0x105af9(0x1fd)]['HEADERS_LACK'],{'message':'缺少头信息:signature'});if((_0x4441c1===null||_0x4441c1===void 0x0?void 0x0:_0x4441c1[_0x105af9(0x210)])!=this[_0x105af9(0x209)](_0x4441c1))throw new AnnError(ApiError_1[_0x105af9(0x1fd)]['HEADERS_SIGNATURE']);return!![];}};__decorate([(0x0,decorator_1[a10_0x3fe72c(0x20a)])(a10_0x3fe72c(0x204)),__metadata(a10_0x3fe72c(0x211),Object)],ApiService['prototype'],a10_0x3fe72c(0x205),void 0x0),ApiService=__decorate([(0x0,decorator_1['Provide'])(),(0x0,decorator_1['Scope'])(decorator_1[a10_0x3fe72c(0x202)]['Singleton'])],ApiService),exports[a10_0x3fe72c(0x213)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11_0x372bff=a11_0x3d92;(function(_0xd1651e,_0x20e509){const _0x4953c9=a11_0x3d92,_0x5c7314=_0xd1651e();while(!![]){try{const _0x468913=-parseInt(_0x4953c9(0x100))/0x1+-parseInt(_0x4953c9(0x110))/0x2+parseInt(_0x4953c9(0x129))/0x3*(parseInt(_0x4953c9(0x127))/0x4)+-parseInt(_0x4953c9(0x134))/0x5+parseInt(_0x4953c9(0x142))/0x6+-parseInt(_0x4953c9(0x13b))/0x7*(parseInt(_0x4953c9(0x12a))/0x8)+parseInt(_0x4953c9(0x113))/0x9*(parseInt(_0x4953c9(0x118))/0xa);if(_0x468913===_0x20e509)break;else _0x5c7314['push'](_0x5c7314['shift']());}catch(_0x326c10){_0x5c7314['push'](_0x5c7314['shift']());}}}(a11_0x30ec,0x45e19));function a11_0x30ec(){const _0x335509=['Provide','stringify','design:returntype','@midwayjs/core','cache-control','Param','__metadata','/apitest','path','request','prototype','method','config','563192IPTHdX','/index.html','design:type','36tDvEqE','routes','@midwayjs/decorator','decorate','content-type','1979470THaQrV','filepath','substring','push','ApitestService','readFileSync','summary','utf-8','Config','apitestmodule','ScopeEnum','ApitestStaticController','__decorate','../../public/','Environment','4ysxbpo','Request','1283748QplOJW','2143544KseOJu','Controller','/apiteststatic/*','isDevelopmentEnvironment','extname','../../public/index.html','__devices__','application/javascript;\x20charset=utf-8','design:paramtypes','object','1809305sMcswX','length','function','apidoc','prefix','metadata','existsSync','7BqJrCg','__apiList__','../helper/getRoutes','defineProperty','set','url','apitesthtml','1095030qyGeuj','route','Scope','join','Singleton','ctx','getRoutes','module','devices','__esModule','Get','replace','__param','MidwayEnvironmentService','anncicapi','apiteststatic','apitest','204576SxJGGm','Inject','/apiteststatic/'];a11_0x30ec=function(){return _0x335509;};return a11_0x30ec();}var __decorate=this&&this[a11_0x372bff(0x124)]||function(_0x56a226,_0x32049c,_0x4b9b89,_0x46b232){const _0x459508=a11_0x372bff;var _0x1c061c=arguments[_0x459508(0x135)],_0xcb1ade=_0x1c061c<0x3?_0x32049c:_0x46b232===null?_0x46b232=Object['getOwnPropertyDescriptor'](_0x32049c,_0x4b9b89):_0x46b232,_0x434fe4;if(typeof Reflect===_0x459508(0x133)&&typeof Reflect['decorate']==='function')_0xcb1ade=Reflect[_0x459508(0x116)](_0x56a226,_0x32049c,_0x4b9b89,_0x46b232);else{for(var _0x251d13=_0x56a226[_0x459508(0x135)]-0x1;_0x251d13>=0x0;_0x251d13--)if(_0x434fe4=_0x56a226[_0x251d13])_0xcb1ade=(_0x1c061c<0x3?_0x434fe4(_0xcb1ade):_0x1c061c>0x3?_0x434fe4(_0x32049c,_0x4b9b89,_0xcb1ade):_0x434fe4(_0x32049c,_0x4b9b89))||_0xcb1ade;}return _0x1c061c>0x3&&_0xcb1ade&&Object['defineProperty'](_0x32049c,_0x4b9b89,_0xcb1ade),_0xcb1ade;},__metadata=this&&this[a11_0x372bff(0x109)]||function(_0x337bff,_0x54deb5){const _0x2be181=a11_0x372bff;if(typeof Reflect===_0x2be181(0x133)&&typeof Reflect['metadata']===_0x2be181(0x136))return Reflect[_0x2be181(0x139)](_0x337bff,_0x54deb5);},__param=this&&this[a11_0x372bff(0x14e)]||function(_0x1ec48b,_0x2a9aae){return function(_0x47102d,_0x319905){_0x2a9aae(_0x47102d,_0x319905,_0x1ec48b);};};Object[a11_0x372bff(0x13e)](exports,a11_0x372bff(0x14b),{'value':!![]}),exports[a11_0x372bff(0x123)]=exports[a11_0x372bff(0x11c)]=void 0x0;const path_1=require(a11_0x372bff(0x10b)),fs_1=require('fs'),core_1=require(a11_0x372bff(0x106)),decorator_1=require(a11_0x372bff(0x115)),decorator_2=require(a11_0x372bff(0x115)),getRoutes_1=require(a11_0x372bff(0x13d));let ApitestService=class ApitestService{async[a11_0x372bff(0x137)](_0x41c29d){const _0x49bf2c=a11_0x372bff,_0x364aaa=(0x0,getRoutes_1[_0x49bf2c(0x148)])(_0x41c29d),_0x4959d9=[];for(let _0x2e4009 in _0x364aaa){for(let _0x1f28a3 in _0x364aaa[_0x2e4009][_0x49bf2c(0x114)]){let _0x31fed5=_0x364aaa[_0x2e4009][_0x49bf2c(0x114)][_0x1f28a3],_0x4e2584=[];for(let _0x409ac4 in _0x31fed5[_0x49bf2c(0x10c)]){_0x4e2584[_0x49bf2c(0x11b)](_0x31fed5[_0x49bf2c(0x10c)][_0x409ac4]);}_0x4959d9[_0x49bf2c(0x11b)]({'title':_0x364aaa[_0x2e4009][_0x49bf2c(0x11e)]+':'+_0x31fed5[_0x49bf2c(0x11e)],'prefix':_0x364aaa[_0x2e4009][_0x49bf2c(0x138)],'router':_0x31fed5[_0x49bf2c(0x143)],'method':_0x31fed5[_0x49bf2c(0x10e)],'describe':_0x31fed5['description']||'','filepath':_0x364aaa[_0x2e4009]['filepath']||'','request':_0x4e2584});}}const _0x5375f1=(0x0,path_1[_0x49bf2c(0x145)])(__dirname,_0x49bf2c(0x12f));return(0x0,fs_1['readFileSync'])(_0x5375f1,{'encoding':_0x49bf2c(0x11f)})['replace'](/__res__/g,_0x49bf2c(0x102))[_0x49bf2c(0x14d)](_0x49bf2c(0x13c),JSON[_0x49bf2c(0x104)](_0x4959d9))[_0x49bf2c(0x14d)](_0x49bf2c(0x130),JSON[_0x49bf2c(0x104)](this[_0x49bf2c(0x10f)][_0x49bf2c(0x14a)]));}};function a11_0x3d92(_0xd130be,_0x31eb9b){const _0x30ecf7=a11_0x30ec();return a11_0x3d92=function(_0x3d922e,_0x443c4){_0x3d922e=_0x3d922e-0xfe;let _0x51ccac=_0x30ecf7[_0x3d922e];return _0x51ccac;},a11_0x3d92(_0xd130be,_0x31eb9b);}__decorate([(0x0,decorator_2[a11_0x372bff(0x120)])(a11_0x372bff(0x150)),__metadata(a11_0x372bff(0x112),Object)],ApitestService['prototype'],a11_0x372bff(0x10f),void 0x0),ApitestService=__decorate([(0x0,decorator_1[a11_0x372bff(0x103)])('apitest'),(0x0,decorator_2['Scope'])(decorator_2[a11_0x372bff(0x122)][a11_0x372bff(0x146)])],ApitestService),exports[a11_0x372bff(0x11c)]=ApitestService;let ApitestStaticController=class ApitestStaticController{async[a11_0x372bff(0x141)](){const _0x25f393=a11_0x372bff;if(this[_0x25f393(0xff)]){const _0x4cbdae={'module':![]};return this['Environment'][_0x25f393(0x12d)]()&&(_0x4cbdae[_0x25f393(0x119)]=!![]),await this[_0x25f393(0x11c)][_0x25f393(0x137)](_0x4cbdae);}return'';}async[a11_0x372bff(0x121)](_0x52454c){const _0xb770d5=a11_0x372bff;if(this['apitest']){const _0x5658ba={'module':_0x52454c};return this[_0xb770d5(0x126)][_0xb770d5(0x12d)]()&&(_0x5658ba[_0xb770d5(0x119)]=!![]),await this[_0xb770d5(0x11c)][_0xb770d5(0x137)](_0x5658ba);}return'';}async[a11_0x372bff(0xfe)](){const _0x29ba3d=a11_0x372bff;if((0x0,path_1[_0x29ba3d(0x12e)])(this[_0x29ba3d(0x147)][_0x29ba3d(0x10c)]['url'])){var _0x54911f=(0x0,path_1[_0x29ba3d(0x145)])(__dirname,_0x29ba3d(0x125)+this[_0x29ba3d(0x147)][_0x29ba3d(0x10c)][_0x29ba3d(0x140)][_0x29ba3d(0x14d)](_0x29ba3d(0x102),'/'));if(_0x54911f[_0x29ba3d(0x11a)](_0x54911f[_0x29ba3d(0x135)]-0xb)!=_0x29ba3d(0x111)){this[_0x29ba3d(0x147)][_0x29ba3d(0x13f)](_0x29ba3d(0x107),'public,\x20max-age=604800');if((0x0,path_1[_0x29ba3d(0x12e)])(this[_0x29ba3d(0x147)]['request'][_0x29ba3d(0x140)])=='.js')this['ctx'][_0x29ba3d(0x13f)](_0x29ba3d(0x117),_0x29ba3d(0x131));else(0x0,path_1['extname'])(this[_0x29ba3d(0x147)][_0x29ba3d(0x10c)][_0x29ba3d(0x140)])=='.css'&&this[_0x29ba3d(0x147)][_0x29ba3d(0x13f)](_0x29ba3d(0x117),'text/css;\x20charset=utf-8');return(0x0,fs_1[_0x29ba3d(0x13a)])(_0x54911f)&&(0x0,fs_1[_0x29ba3d(0x11d)])(_0x54911f,{'encoding':'utf-8'});}}return'';}};__decorate([(0x0,decorator_2['Inject'])(),__metadata(a11_0x372bff(0x112),Object)],ApitestStaticController['prototype'],a11_0x372bff(0x147),void 0x0),__decorate([(0x0,decorator_2['Inject'])(),__metadata(a11_0x372bff(0x112),core_1[a11_0x372bff(0x14f)])],ApitestStaticController[a11_0x372bff(0x10d)],a11_0x372bff(0x126),void 0x0),__decorate([(0x0,decorator_2[a11_0x372bff(0x101)])(),__metadata(a11_0x372bff(0x112),ApitestService)],ApitestStaticController[a11_0x372bff(0x10d)],a11_0x372bff(0x11c),void 0x0),__decorate([(0x0,decorator_2['Config'])(a11_0x372bff(0xff)),__metadata(a11_0x372bff(0x112),Boolean)],ApitestStaticController[a11_0x372bff(0x10d)],a11_0x372bff(0xff),void 0x0),__decorate([(0x0,decorator_2[a11_0x372bff(0x120)])('anncicapi'),__metadata('design:type',Object)],ApitestStaticController[a11_0x372bff(0x10d)],'config',void 0x0),__decorate([(0x0,decorator_1[a11_0x372bff(0x14c)])(a11_0x372bff(0x10a)),__metadata(a11_0x372bff(0x112),Function),__metadata(a11_0x372bff(0x132),[]),__metadata(a11_0x372bff(0x105),Promise)],ApitestStaticController[a11_0x372bff(0x10d)],a11_0x372bff(0x141),null),__decorate([(0x0,decorator_1[a11_0x372bff(0x14c)])('/apitest-:module'),__param(0x0,(0x0,decorator_1[a11_0x372bff(0x108)])(a11_0x372bff(0x149))),__metadata(a11_0x372bff(0x112),Function),__metadata(a11_0x372bff(0x132),[String]),__metadata(a11_0x372bff(0x105),Promise)],ApitestStaticController['prototype'],a11_0x372bff(0x121),null),__decorate([(0x0,decorator_1[a11_0x372bff(0x14c)])(a11_0x372bff(0x12c)),__metadata('design:type',Function),__metadata(a11_0x372bff(0x132),[]),__metadata('design:returntype',Promise)],ApitestStaticController[a11_0x372bff(0x10d)],a11_0x372bff(0xfe),null),ApitestStaticController=__decorate([(0x0,decorator_1[a11_0x372bff(0x12b)])('/'),(0x0,decorator_2[a11_0x372bff(0x144)])(decorator_2[a11_0x372bff(0x122)][a11_0x372bff(0x128)])],ApitestStaticController),exports['ApitestStaticController']=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a12_0x3ff420=a12_0x13ff;(function(_0x27d4c6,_0x198e86){const _0x121c62=a12_0x13ff,_0x52586d=_0x27d4c6();while(!![]){try{const _0x1b5131=-parseInt(_0x121c62(0x111))/0x1*(parseInt(_0x121c62(0x13e))/0x2)+parseInt(_0x121c62(0x103))/0x3+-parseInt(_0x121c62(0x135))/0x4*(parseInt(_0x121c62(0x12a))/0x5)+parseInt(_0x121c62(0x136))/0x6+-parseInt(_0x121c62(0x118))/0x7*(-parseInt(_0x121c62(0x13d))/0x8)+-parseInt(_0x121c62(0x129))/0x9*(-parseInt(_0x121c62(0x12e))/0xa)+-parseInt(_0x121c62(0x104))/0xb*(parseInt(_0x121c62(0x116))/0xc);if(_0x1b5131===_0x198e86)break;else _0x52586d['push'](_0x52586d['shift']());}catch(_0x50e97f){_0x52586d['push'](_0x52586d['shift']());}}}(a12_0x26ef,0xb8bf3));function a12_0x13ff(_0x209b9d,_0x34ce0e){const _0x26efe6=a12_0x26ef();return a12_0x13ff=function(_0x13ff90,_0x1873d0){_0x13ff90=_0x13ff90-0xf8;let _0x37d75d=_0x26efe6[_0x13ff90];return _0x37d75d;},a12_0x13ff(_0x209b9d,_0x34ce0e);}function a12_0x26ef(){const _0x38040a=['getAppDir','app','getCell','worksheets','get','design:type','3910856VwCasC','587866EfUMGH','Singleton','getOwnPropertyDescriptor','public/xlsx','__decorate','Scope','addRow','mkdirSync','.xlsx','endsWith','writeFile','rowCount','3323931gZtGbb','11QgcduO','__metadata','\x20is\x20read\x20fail','getRow','existsSync','value','xlsx','header','function','__esModule','keys','substring','ScopeEnum','2WvUzci','readFile','/public/xlsx/','replace','frozen','12477684BSnoCV','col','7vQIRjb','getWorksheet','App','decorate','prototype','/public/xlsx','findRows','length','push','defineProperty','cellCount','handler','Workbook','metadata','export','ExcelService','key','6876999TcIVlA','192805mFNupR','toString','parse','Api\x20Excel\x20Error:\x20','10pjCGGv','@midwayjs/decorator','columns','object','Provide','koa-send','startsWith','40iiYYFn','2454366zpMoEb'];a12_0x26ef=function(){return _0x38040a;};return a12_0x26ef();}var __decorate=this&&this[a12_0x3ff420(0xfb)]||function(_0x41df8c,_0x295d80,_0x193c7c,_0x241906){const _0x57c545=a12_0x3ff420;var _0x42f5fe=arguments[_0x57c545(0x11f)],_0x27d714=_0x42f5fe<0x3?_0x295d80:_0x241906===null?_0x241906=Object[_0x57c545(0xf9)](_0x295d80,_0x193c7c):_0x241906,_0x210e3b;if(typeof Reflect===_0x57c545(0x131)&&typeof Reflect[_0x57c545(0x11b)]==='function')_0x27d714=Reflect[_0x57c545(0x11b)](_0x41df8c,_0x295d80,_0x193c7c,_0x241906);else{for(var _0x5d42e2=_0x41df8c[_0x57c545(0x11f)]-0x1;_0x5d42e2>=0x0;_0x5d42e2--)if(_0x210e3b=_0x41df8c[_0x5d42e2])_0x27d714=(_0x42f5fe<0x3?_0x210e3b(_0x27d714):_0x42f5fe>0x3?_0x210e3b(_0x295d80,_0x193c7c,_0x27d714):_0x210e3b(_0x295d80,_0x193c7c))||_0x27d714;}return _0x42f5fe>0x3&&_0x27d714&&Object[_0x57c545(0x121)](_0x295d80,_0x193c7c,_0x27d714),_0x27d714;},__metadata=this&&this[a12_0x3ff420(0x105)]||function(_0x251a2b,_0x325320){const _0x4427c5=a12_0x3ff420;if(typeof Reflect===_0x4427c5(0x131)&&typeof Reflect[_0x4427c5(0x125)]===_0x4427c5(0x10c))return Reflect[_0x4427c5(0x125)](_0x251a2b,_0x325320);};Object[a12_0x3ff420(0x121)](exports,a12_0x3ff420(0x10d),{'value':!![]}),exports[a12_0x3ff420(0x127)]=void 0x0;const fs=require('fs'),exceljs=require('exceljs'),koasend=require(a12_0x3ff420(0x133)),decorator_1=require(a12_0x3ff420(0x12f));let ExcelService=class ExcelService{async[a12_0x3ff420(0x12c)](_0xdae5ea,_0x3f4f9e,_0xdff67a=[0x0]){const _0x5c5a95=a12_0x3ff420;var _0x1fb01d,_0x6de3ed;const _0x27595a=new exceljs[(_0x5c5a95(0x124))](),_0x16ab33=[];let _0x4fe8cb=_0xdae5ea[_0x5c5a95(0x114)](/(\\|\/)/g,'/')[_0x5c5a95(0x114)](/\/{2,}/g,'/');!(_0x4fe8cb===null||_0x4fe8cb===void 0x0?void 0x0:_0x4fe8cb[_0x5c5a95(0x134)]('/'))&&(_0x4fe8cb=this[_0x5c5a95(0x138)]['getAppDir']()+'/'+_0x4fe8cb);try{await _0x27595a[_0x5c5a95(0x10a)][_0x5c5a95(0x112)](_0x4fe8cb);}catch(_0x1daf47){return console['log'](_0x5c5a95(0x12d)+_0x4fe8cb+_0x5c5a95(0x106)),_0x16ab33;}for(const _0x1cccc8 of _0xdff67a){const _0xca8de7=lodash['isNumber'](_0x1cccc8)?((_0x1fb01d=_0x27595a[_0x5c5a95(0x13a)])===null||_0x1fb01d===void 0x0?void 0x0:_0x1fb01d[_0x1cccc8])||undefined:_0x27595a[_0x5c5a95(0x119)](_0x1cccc8);if(_0xca8de7){var _0x5d2541=0x1;const _0x2a8abd=_0xca8de7[_0x5c5a95(0x107)](0x1),_0x8cd67d=await new Promise(_0x354e55=>{const _0x2c0813={};_0x2a8abd['eachCell']((_0x46e104,_0x293fc9)=>{const _0x596607=a12_0x13ff;for(const _0x26447f of _0x3f4f9e){if(_0x46e104[_0x596607(0x109)]==_0x26447f['header'])_0x5d2541=0x2,_0x2c0813[_0x26447f[_0x596607(0x128)]]={'header':_0x46e104['col'],'handler':_0x26447f[_0x596607(0x123)]};else{if(!_0x2c0813[_0x26447f[_0x596607(0x128)]])try{const _0x5c2370=_0x2a8abd[_0x596607(0x139)](_0x26447f[_0x596607(0x10b)]);_0x5c2370&&(_0x2c0813[_0x26447f['key']]={'header':_0x5c2370[_0x596607(0x117)],'handler':_0x26447f[_0x596607(0x123)]});}catch{}}}_0x2a8abd[_0x596607(0x122)]==_0x293fc9&&_0x354e55(_0x2c0813);});});for(const _0x428d59 of _0xca8de7[_0x5c5a95(0x11e)](_0x5d2541,_0xca8de7[_0x5c5a95(0x102)])){const _0x34d6d6={};for(const _0x14c248 in _0x8cd67d){_0x8cd67d[_0x14c248]['header']&&(typeof((_0x6de3ed=_0x8cd67d[_0x14c248])===null||_0x6de3ed===void 0x0?void 0x0:_0x6de3ed['handler'])==_0x5c5a95(0x10c)?_0x34d6d6[_0x14c248]=_0x8cd67d[_0x14c248][_0x5c5a95(0x123)](_0x428d59['getCell'](lodash['trim'](''+_0x8cd67d[_0x14c248][_0x5c5a95(0x10b)],'\x20'))[_0x5c5a95(0x12b)]()):_0x34d6d6[_0x14c248]=_0x428d59[_0x5c5a95(0x139)](_0x8cd67d[_0x14c248][_0x5c5a95(0x10b)])[_0x5c5a95(0x12b)]());}Object[_0x5c5a95(0x10e)](_0x34d6d6)['length']>0x0&&_0x16ab33[_0x5c5a95(0x120)](_0x34d6d6);}}}return _0x16ab33;}async[a12_0x3ff420(0x126)](_0x113b49,_0x519626,_0x9e5e79,_0x1864ac=a12_0x3ff420(0xfa)){const _0x16f432=a12_0x3ff420;var _0x5d835c,_0x48c753;const _0x320586=new exceljs['Workbook'](),_0x3bd157={},_0x28403e=[],_0x4c424b=_0x320586['addWorksheet']('Sheet\x201',{'views':[{'state':_0x16f432(0x115),'xSplit':0x1}]});for(const _0x196d74 in _0x519626){_0x3bd157[_0x519626[_0x196d74][_0x16f432(0x128)]]=_0x519626[_0x196d74][_0x16f432(0x10b)],_0x28403e[_0x16f432(0x120)]({'header':_0x519626[_0x196d74][_0x16f432(0x10b)],'key':(_0x5d835c=_0x519626[_0x196d74])===null||_0x5d835c===void 0x0?void 0x0:_0x5d835c['key'][_0x16f432(0x114)](/\./g,'_')});}_0x4c424b[_0x16f432(0x130)]=_0x28403e;for(const _0x14a57d of _0x9e5e79){const _0x3f93f1={};for(const _0x1846c3 in _0x519626){typeof((_0x48c753=_0x519626[_0x1846c3])===null||_0x48c753===void 0x0?void 0x0:_0x48c753[_0x16f432(0x123)])=='function'?_0x3f93f1[_0x519626[_0x1846c3][_0x16f432(0x128)][_0x16f432(0x114)](/\./g,'_')]=await _0x519626[_0x1846c3][_0x16f432(0x123)](_0x14a57d):_0x3f93f1[_0x519626[_0x1846c3][_0x16f432(0x128)][_0x16f432(0x114)](/\./g,'_')]=lodash[_0x16f432(0x13b)](_0x14a57d,_0x519626[_0x1846c3][_0x16f432(0x128)],'');}_0x4c424b[_0x16f432(0xfd)](_0x3f93f1);}let _0x11ff9f='';const _0x4c7ffd=_0x113b49+'-'+lodash['random'](0x2710,0x1869f)+_0x16f432(0xff);if(_0x1864ac&&_0x1864ac[_0x16f432(0x134)]('/'))_0x11ff9f=_0x1864ac+'/'+_0x4c7ffd;else _0x1864ac&&!_0x1864ac[_0x16f432(0x134)]('/')&&!_0x1864ac[_0x16f432(0x134)]('\x5c')?_0x11ff9f=this[_0x16f432(0x138)][_0x16f432(0x137)]()+'/'+_0x1864ac+'/'+_0x4c7ffd:_0x11ff9f=this[_0x16f432(0x138)][_0x16f432(0x137)]()+_0x16f432(0x11d);return(_0x11ff9f[_0x16f432(0x100)]('/')||_0x11ff9f[_0x16f432(0x100)]('\x5c'))&&(_0x11ff9f=_0x11ff9f[_0x16f432(0x10f)](0x0,_0x11ff9f[_0x16f432(0x11f)]-0x1)),_0x11ff9f=_0x11ff9f['replace'](/(\\|\/)/g,'/')[_0x16f432(0x114)](/\/{2,}/g,'/'),!fs[_0x16f432(0x108)](_0x11ff9f)&&fs[_0x16f432(0xfe)](_0x11ff9f,{'recursive':!![]}),await _0x320586[_0x16f432(0x10a)][_0x16f432(0x101)]((_0x11ff9f+'/'+_0x4c7ffd)['replace'](/(\\|\/)/g,'/')[_0x16f432(0x114)](/\/{2,}/g,'/')),{'filename':_0x4c7ffd,'filepath':_0x11ff9f};}async['download'](_0x145c0,_0xcc8d13){const _0x2e5595=a12_0x3ff420;await koasend(_0x145c0,_0x2e5595(0x113)+_0xcc8d13);}};__decorate([(0x0,decorator_1[a12_0x3ff420(0x11a)])(),__metadata(a12_0x3ff420(0x13c),Object)],ExcelService[a12_0x3ff420(0x11c)],a12_0x3ff420(0x138),void 0x0),ExcelService=__decorate([(0x0,decorator_1[a12_0x3ff420(0x132)])(),(0x0,decorator_1[a12_0x3ff420(0xfc)])(decorator_1[a12_0x3ff420(0x110)][a12_0x3ff420(0xf8)])],ExcelService),exports[a12_0x3ff420(0x127)]=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_0x4ed95e=a13_0xb576;function a13_0xb576(_0x5dfef8,_0x3df2b1){var _0x53e5a1=a13_0x53e5();return a13_0xb576=function(_0xb57691,_0x30a6d0){_0xb57691=_0xb57691-0x157;var _0x3f6c95=_0x53e5a1[_0xb57691];return _0x3f6c95;},a13_0xb576(_0x5dfef8,_0x3df2b1);}function a13_0x53e5(){var _0x5f4ffb=['2518uyilBf','ACTION_ROUTE_KEY','437KboSsh','anncic-api:apps:config','APPSCONFIG_KEY','674528dfXaAe','2198496KKgrew','defineProperty','365466NvcxZA','14SeGKhx','752vzvXZB','ACTION_KEY','AppsConfigTmp','31068cpJeHo','anncic-api:action:route','20kfTCkR','14659546UFzrZK','5110740YsEmxq'];a13_0x53e5=function(){return _0x5f4ffb;};return a13_0x53e5();}(function(_0x1c50df,_0x12ef94){var _0x1d89ca=a13_0xb576,_0x21f87d=_0x1c50df();while(!![]){try{var _0xac4383=-parseInt(_0x1d89ca(0x158))/0x1*(-parseInt(_0x1d89ca(0x168))/0x2)+-parseInt(_0x1d89ca(0x15c))/0x3+parseInt(_0x1d89ca(0x15b))/0x4*(-parseInt(_0x1d89ca(0x165))/0x5)+-parseInt(_0x1d89ca(0x15e))/0x6*(-parseInt(_0x1d89ca(0x15f))/0x7)+parseInt(_0x1d89ca(0x160))/0x8*(parseInt(_0x1d89ca(0x163))/0x9)+-parseInt(_0x1d89ca(0x167))/0xa+parseInt(_0x1d89ca(0x166))/0xb;if(_0xac4383===_0x12ef94)break;else _0x21f87d['push'](_0x21f87d['shift']());}catch(_0x4a5597){_0x21f87d['push'](_0x21f87d['shift']());}}}(a13_0x53e5,0x64479));Object[a13_0x4ed95e(0x15d)](exports,'__esModule',{'value':!![]}),exports[a13_0x4ed95e(0x162)]=exports['APPSCONFIG_KEY']=exports[a13_0x4ed95e(0x157)]=exports[a13_0x4ed95e(0x161)]=void 0x0,exports[a13_0x4ed95e(0x161)]='anncic-api:action',exports[a13_0x4ed95e(0x157)]=a13_0x4ed95e(0x164),exports[a13_0x4ed95e(0x15a)]=a13_0x4ed95e(0x159);class AppsConfigTmp{}exports[a13_0x4ed95e(0x162)]=AppsConfigTmp;
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a14_0x137c33=a14_0x361a;(function(_0x134915,_0xdbceec){var _0x52c8c6=a14_0x361a,_0x4b9a67=_0x134915();while(!![]){try{var _0x51fa71=parseInt(_0x52c8c6(0x19a))/0x1+-parseInt(_0x52c8c6(0x198))/0x2+parseInt(_0x52c8c6(0x19b))/0x3*(parseInt(_0x52c8c6(0x1b9))/0x4)+parseInt(_0x52c8c6(0x1a9))/0x5+-parseInt(_0x52c8c6(0x1ba))/0x6*(parseInt(_0x52c8c6(0x196))/0x7)+-parseInt(_0x52c8c6(0x1a8))/0x8+-parseInt(_0x52c8c6(0x1b3))/0x9*(-parseInt(_0x52c8c6(0x1a3))/0xa);if(_0x51fa71===_0xdbceec)break;else _0x4b9a67['push'](_0x4b9a67['shift']());}catch(_0x3533e6){_0x4b9a67['push'](_0x4b9a67['shift']());}}}(a14_0x5df1,0x395bf));var __decorate=this&&this[a14_0x137c33(0x1ae)]||function(_0x452083,_0x1e4799,_0x9af361,_0x7530f6){var _0x5b65ba=a14_0x137c33,_0x527953=arguments['length'],_0x2fe72a=_0x527953<0x3?_0x1e4799:_0x7530f6===null?_0x7530f6=Object[_0x5b65ba(0x19f)](_0x1e4799,_0x9af361):_0x7530f6,_0x2593df;if(typeof Reflect===_0x5b65ba(0x19d)&&typeof Reflect[_0x5b65ba(0x199)]===_0x5b65ba(0x1aa))_0x2fe72a=Reflect[_0x5b65ba(0x199)](_0x452083,_0x1e4799,_0x9af361,_0x7530f6);else{for(var _0x6a9632=_0x452083['length']-0x1;_0x6a9632>=0x0;_0x6a9632--)if(_0x2593df=_0x452083[_0x6a9632])_0x2fe72a=(_0x527953<0x3?_0x2593df(_0x2fe72a):_0x527953>0x3?_0x2593df(_0x1e4799,_0x9af361,_0x2fe72a):_0x2593df(_0x1e4799,_0x9af361))||_0x2fe72a;}return _0x527953>0x3&&_0x2fe72a&&Object[_0x5b65ba(0x1af)](_0x1e4799,_0x9af361,_0x2fe72a),_0x2fe72a;},__metadata=this&&this[a14_0x137c33(0x1a0)]||function(_0x1633b9,_0x507f4c){var _0x18ec51=a14_0x137c33;if(typeof Reflect==='object'&&typeof Reflect[_0x18ec51(0x1a1)]===_0x18ec51(0x1aa))return Reflect[_0x18ec51(0x1a1)](_0x1633b9,_0x507f4c);};Object['defineProperty'](exports,a14_0x137c33(0x19c),{'value':!![]}),exports[a14_0x137c33(0x1a2)]=void 0x0;const validator_1=require(a14_0x137c33(0x194));function a14_0x5df1(){var _0x4e80c7=['integer','string','__decorate','defineProperty','是否倒序','第一页为1,第二页为2','valid','9EngMbT','1:是;0:否','Rule','_page','prototype','min','974804WmJDID','622212QCkAxQ','@anncic-api/validator','number','28JaiREZ','design:type','402540OIUdsD','decorate','18803KeNHVA','3dzsrse','__esModule','object','_order','getOwnPropertyDescriptor','__metadata','metadata','PageDTO','4907710WnsgTd','_isreverse','trim','分页数量','RuleType','1222720Ynixly','1252930YHxhHn','function','排序方式'];a14_0x5df1=function(){return _0x4e80c7;};return a14_0x5df1();}function a14_0x361a(_0x596372,_0x29fd8d){var _0x5df129=a14_0x5df1();return a14_0x361a=function(_0x361a97,_0x307a9e){_0x361a97=_0x361a97-0x194;var _0x5dade6=_0x5df129[_0x361a97];return _0x5dade6;},a14_0x361a(_0x596372,_0x29fd8d);}class PageDTO{}__decorate([(0x0,validator_1[a14_0x137c33(0x1b5)])('分页',validator_1[a14_0x137c33(0x1a7)][a14_0x137c33(0x195)]()[a14_0x137c33(0x1ac)]()[a14_0x137c33(0x1b8)](0x1),a14_0x137c33(0x1b1)),__metadata(a14_0x137c33(0x197),Number)],PageDTO[a14_0x137c33(0x1b7)],a14_0x137c33(0x1b6),void 0x0),__decorate([(0x0,validator_1[a14_0x137c33(0x1b5)])(a14_0x137c33(0x1a6),validator_1[a14_0x137c33(0x1a7)][a14_0x137c33(0x195)]()[a14_0x137c33(0x1ac)]()['min'](0x1)),__metadata(a14_0x137c33(0x197),Number)],PageDTO['prototype'],'_size',void 0x0),__decorate([(0x0,validator_1[a14_0x137c33(0x1b5)])(a14_0x137c33(0x1ab),validator_1['RuleType'][a14_0x137c33(0x1ad)]()[a14_0x137c33(0x1a5)]()),__metadata('design:type',String)],PageDTO['prototype'],a14_0x137c33(0x19e),void 0x0),__decorate([(0x0,validator_1[a14_0x137c33(0x1b5)])(a14_0x137c33(0x1b0),validator_1[a14_0x137c33(0x1a7)]['number']()[a14_0x137c33(0x1ac)]()[a14_0x137c33(0x1b2)](0x0,0x1),a14_0x137c33(0x1b4)),__metadata(a14_0x137c33(0x197),Number)],PageDTO[a14_0x137c33(0x1b7)],a14_0x137c33(0x1a4),void 0x0),exports[a14_0x137c33(0x1a2)]=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.13",
|
|
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.13",
|
|
21
|
+
"@anncic-api/core": "^1.1.13",
|
|
22
|
+
"@anncic-api/event": "^1.1.13",
|
|
23
|
+
"@anncic-api/typeorm": "^1.1.13",
|
|
24
|
+
"@anncic-api/validator": "^1.1.13",
|
|
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.13",
|
|
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": "a0dfeba8612c37f13c4aa2f80dd718d761326c51"
|
|
45
45
|
}
|