anncic-api 1.0.11 → 1.0.12
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/getRoutes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.d.ts +2 -2
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x43578a=a0_0x5e55;function a0_0x1727(){var _0x11b68c=['zhiulanuiy7892387985hnoi','35230WCUiEw','42507cuYLkg','dhauo1234420123gg3234901','defineProperty','default','316064PsUwOO','150BDIsgz','5308436sesgMb','20555fEHDjG','appDir','6600ffoUjb','2SaSgZA','2690008qdZQsr','408XLlWpN','3991629gCABPc','/runtime/.upload','name'];a0_0x1727=function(){return _0x11b68c;};return a0_0x1727();}(function(_0x5f218c,_0x5d266b){var _0x423b08=a0_0x5e55,_0x3e0914=_0x5f218c();while(!![]){try{var _0x4ff83c=-parseInt(_0x423b08(0x131))/0x1+parseInt(_0x423b08(0x137))/0x2*(parseInt(_0x423b08(0x13a))/0x3)+parseInt(_0x423b08(0x138))/0x4+parseInt(_0x423b08(0x134))/0x5*(parseInt(_0x423b08(0x132))/0x6)+parseInt(_0x423b08(0x133))/0x7+parseInt(_0x423b08(0x139))/0x8*(parseInt(_0x423b08(0x12d))/0x9)+-parseInt(_0x423b08(0x12c))/0xa*(parseInt(_0x423b08(0x136))/0xb);if(_0x4ff83c===_0x5d266b)break;else _0x3e0914['push'](_0x3e0914['shift']());}catch(_0x1d3e7f){_0x3e0914['push'](_0x3e0914['shift']());}}}(a0_0x1727,0xa4d69));function a0_0x5e55(_0x8b06f,_0x37350f){var _0x172725=a0_0x1727();return a0_0x5e55=function(_0x5e55dc,_0x5943ed){_0x5e55dc=_0x5e55dc-0x12a;var _0x28e3cb=_0x172725[_0x5e55dc];return _0x28e3cb;},a0_0x5e55(_0x8b06f,_0x37350f);}Object[a0_0x43578a(0x12f)](exports,'__esModule',{'value':!![]}),exports[a0_0x43578a(0x130)]=_0x4aab9f=>{var _0x388419=a0_0x43578a;return{'apitest':!![],'keys':_0x4aab9f[_0x388419(0x12a)],'anncicapi':{'timeout':0x1388,'password':_0x388419(0x12b),'devices':{'DEFAULT':{'secret':'dhauo1234420123gg3234901','checkcode':_0x388419(0x12e)}}},'upload':{'tmpdir':_0x4aab9f[_0x388419(0x135)]+_0x388419(0x13b),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0xb6b2f2=a1_0x1480;function a1_0x1480(_0x57efb4,_0xf4c4d4){var _0x3b503c=a1_0x3b50();return a1_0x1480=function(_0x1480d6,_0x4f1751){_0x1480d6=_0x1480d6-0xf8;var _0x4d95c8=_0x3b503c[_0x1480d6];return _0x4d95c8;},a1_0x1480(_0x57efb4,_0xf4c4d4);}(function(_0x4d58e5,_0x5a1150){var _0x113af0=a1_0x1480,_0xc7640b=_0x4d58e5();while(!![]){try{var _0xd3179c=-parseInt(_0x113af0(0x106))/0x1*(-parseInt(_0x113af0(0x105))/0x2)+parseInt(_0x113af0(0xfd))/0x3*(parseInt(_0x113af0(0xf8))/0x4)+parseInt(_0x113af0(0xf9))/0x5*(parseInt(_0x113af0(0x100))/0x6)+parseInt(_0x113af0(0xfb))/0x7*(-parseInt(_0x113af0(0x101))/0x8)+-parseInt(_0x113af0(0x107))/0x9*(parseInt(_0x113af0(0x104))/0xa)+-parseInt(_0x113af0(0xfe))/0xb*(parseInt(_0x113af0(0xff))/0xc)+parseInt(_0x113af0(0x102))/0xd;if(_0xd3179c===_0x5a1150)break;else _0xc7640b['push'](_0xc7640b['shift']());}catch(_0x517491){_0xc7640b['push'](_0xc7640b['shift']());}}}(a1_0x3b50,0x1c84e));Object[a1_0xb6b2f2(0x103)](exports,a1_0xb6b2f2(0xfa),{'value':!![]}),exports[a1_0xb6b2f2(0xfc)]={'apitest':![],'anncicapi':{'timeout':0x1388}};function a1_0x3b50(){var _0x9aaf92=['154JBYlgr','1051tqNgFb','63IfSnNX','312796uPjDBY','70GakBng','__esModule','28sKzHdH','default','3XtXqAt','22QgrVKF','886308LkdxgA','71484tYmJZH','247992kQBjNW','1722149EnMNSv','defineProperty','99810BfFcUd'];a1_0x3b50=function(){return _0x9aaf92;};return a1_0x3b50();}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x476a5c=a2_0x1ed4;function a2_0x1ed4(_0x39083a,_0x2252b3){const _0x116d7c=a2_0x116d();return a2_0x1ed4=function(_0x1ed4a1,_0x58967c){_0x1ed4a1=_0x1ed4a1-0x16a;let _0x3da3d6=_0x116d7c[_0x1ed4a1];return _0x3da3d6;},a2_0x1ed4(_0x39083a,_0x2252b3);}(function(_0x2d382d,_0x55581b){const _0x331dc6=a2_0x1ed4,_0x52f6e7=_0x2d382d();while(!![]){try{const _0x1bf867=parseInt(_0x331dc6(0x1a5))/0x1+-parseInt(_0x331dc6(0x1a1))/0x2*(parseInt(_0x331dc6(0x1c2))/0x3)+parseInt(_0x331dc6(0x191))/0x4*(-parseInt(_0x331dc6(0x1ba))/0x5)+parseInt(_0x331dc6(0x177))/0x6*(-parseInt(_0x331dc6(0x1b7))/0x7)+parseInt(_0x331dc6(0x1c8))/0x8*(-parseInt(_0x331dc6(0x186))/0x9)+-parseInt(_0x331dc6(0x199))/0xa*(-parseInt(_0x331dc6(0x179))/0xb)+-parseInt(_0x331dc6(0x1a6))/0xc*(-parseInt(_0x331dc6(0x192))/0xd);if(_0x1bf867===_0x55581b)break;else _0x52f6e7['push'](_0x52f6e7['shift']());}catch(_0x26a90d){_0x52f6e7['push'](_0x52f6e7['shift']());}}}(a2_0x116d,0xddff4));function a2_0x116d(){const _0x25536d=['dirs','Inject','koa-bodyparser','useMiddleware','@anncic-api/typeorm','string','decorate','defaultsDeep','getConfiguration','@midwayjs/core','36hATZtQ','ApiService','1676653ITXRGu','MidwayApplicationManager','@anncic-api/core','tmpdir','existsSync','keys','@anncic-api/event','get','prototype','anncicapi','function','metadata','bodyXml','333njTJQv','device','ApiError','isArray','mkdirSync','getApplications','forEach','./config/config.default','Configuration','@midwayjs/static-file','CustomConfiguration','919452jOLnlO','2444RKWJjf','request','onReady','@anncic-api/validator','getOwnPropertyDescriptor','./config/config.production','environment','10hOIszN','defineProperties','DEFAULT','config','@midwayjs/koa','log','object','context','6XrQEXE','__esModule','design:type','ACTION_ROUTE_KEY','1688273Gvjnzm','84192pkcyae','key','anncic-apihelper','length','koa','REQUEST_OBJ_CTX_KEY','staticFile','devices','checksign','upload','headers','application','checkConfigKeys','hanlderApplications','decorator','beforeRoute','bodyParser','501263DqdXYV','defineProperty','anncic-api','5xwJfOM','filterConfig','_matchedRoute','@midwayjs/decorator','Anncic-api\x20static-file\x20:\x20mkdir\x20','MidwayEnvironmentService','input','body','566949FjYlLN','registerMethodHandler','apimit','dir','handlerActionRoute','@midwayjs/cross-domain','221392uxezFB','MidwayConfigService','query','MidwayDecoratorService','isString'];a2_0x116d=function(){return _0x25536d;};return a2_0x116d();}var __decorate=this&&this['__decorate']||function(_0x220746,_0x4aa6ac,_0xa0725f,_0x415acf){const _0xd9793c=a2_0x1ed4;var _0x545793=arguments[_0xd9793c(0x1a9)],_0x576e72=_0x545793<0x3?_0x4aa6ac:_0x415acf===null?_0x415acf=Object[_0xd9793c(0x196)](_0x4aa6ac,_0xa0725f):_0x415acf,_0x4f1f38;if(typeof Reflect===_0xd9793c(0x19f)&&typeof Reflect[_0xd9793c(0x173)]===_0xd9793c(0x183))_0x576e72=Reflect[_0xd9793c(0x173)](_0x220746,_0x4aa6ac,_0xa0725f,_0x415acf);else{for(var _0x2c0c77=_0x220746[_0xd9793c(0x1a9)]-0x1;_0x2c0c77>=0x0;_0x2c0c77--)if(_0x4f1f38=_0x220746[_0x2c0c77])_0x576e72=(_0x545793<0x3?_0x4f1f38(_0x576e72):_0x545793>0x3?_0x4f1f38(_0x4aa6ac,_0xa0725f,_0x576e72):_0x4f1f38(_0x4aa6ac,_0xa0725f))||_0x576e72;}return _0x545793>0x3&&_0x576e72&&Object[_0xd9793c(0x1b8)](_0x4aa6ac,_0xa0725f,_0x576e72),_0x576e72;},__metadata=this&&this['__metadata']||function(_0x1e88da,_0xb8a343){const _0x3a8109=a2_0x1ed4;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x3a8109(0x183))return Reflect[_0x3a8109(0x184)](_0x1e88da,_0xb8a343);};Object[a2_0x476a5c(0x1b8)](exports,a2_0x476a5c(0x1a2),{'value':!![]}),exports[a2_0x476a5c(0x190)]=void 0x0;const decorator_1=require(a2_0x476a5c(0x1bd)),core_1=require(a2_0x476a5c(0x176)),ApiError_1=require('./exception/ApiError'),ApiService_1=require('./service/ApiService'),action_1=require('./types/action'),fs=require('fs'),koa=require(a2_0x476a5c(0x19d)),i18n=require('@midwayjs/i18n'),task=require('@midwayjs/task'),upload=require('@midwayjs/upload'),staticFile=require(a2_0x476a5c(0x18f)),crossDomain=require(a2_0x476a5c(0x1c7)),bodyXml=require('koa-xml-body'),bodyParser=require(a2_0x476a5c(0x16f)),ConfigDefault=require(a2_0x476a5c(0x18d)),ConfigProduction=require(a2_0x476a5c(0x197)),anncic=require(a2_0x476a5c(0x17b)),anncicEvent=require(a2_0x476a5c(0x17f)),anncicTypeorm=require(a2_0x476a5c(0x171)),anncicValidator=require(a2_0x476a5c(0x195)),anncicHelper=require(a2_0x476a5c(0x1a8));let CustomConfiguration=class CustomConfiguration{async[a2_0x476a5c(0x194)](){const _0x308699=a2_0x476a5c;await this[_0x308699(0x1bb)](),await this[_0x308699(0x1b2)](),await this[_0x308699(0x1c6)](),await this['hanlderApplications']();}async[a2_0x476a5c(0x1b2)](){}async[a2_0x476a5c(0x1c6)](){const _0x385c77=a2_0x476a5c,_0x115332=this[_0x385c77(0x19c)][_0x385c77(0x175)]();this[_0x385c77(0x1b4)][_0x385c77(0x1c3)](action_1[_0x385c77(0x1a4)],_0x4de105=>{const _0xa93c6f=_0x4de105['metadata'];return{'before':async _0xfa4185=>{const _0x22554e=a2_0x1ed4;var _0x1b6de9,_0x183390,_0x46ce7b,_0x3bc937,_0x39e1b0;const _0x134ae1=(_0x1b6de9=_0xfa4185===null||_0xfa4185===void 0x0?void 0x0:_0xfa4185['target'])===null||_0x1b6de9===void 0x0?void 0x0:_0x1b6de9[core_1[_0x22554e(0x1ab)]];if(_0x134ae1){if((_0xa93c6f===null||_0xa93c6f===void 0x0?void 0x0:_0xa93c6f[_0x22554e(0x1c4)])&&!this[_0x22554e(0x178)][_0x22554e(0x1ae)]((_0x183390=_0x134ae1===null||_0x134ae1===void 0x0?void 0x0:_0x134ae1[_0x22554e(0x193)])===null||_0x183390===void 0x0?void 0x0:_0x183390[_0x22554e(0x1b0)]))throw new AnnError(ApiError_1[_0x22554e(0x188)]['HEADERS_SIGNATURE']);((_0x46ce7b=_0x134ae1[_0x22554e(0x1b0)])===null||_0x46ce7b===void 0x0?void 0x0:_0x46ce7b['device'])&&((_0x39e1b0=(_0x3bc937=_0x115332===null||_0x115332===void 0x0?void 0x0:_0x115332['anncicapi'])===null||_0x3bc937===void 0x0?void 0x0:_0x3bc937[_0x22554e(0x1ad)])===null||_0x39e1b0===void 0x0?void 0x0:_0x39e1b0[_0x134ae1[_0x22554e(0x1b0)]['device']])&&(typeof _0x115332[_0x22554e(0x182)][_0x22554e(0x1ad)][_0x134ae1[_0x22554e(0x1b0)][_0x22554e(0x187)]][_0x22554e(0x1b5)]=='function'&&await _0x115332['anncicapi'][_0x22554e(0x1ad)][_0x134ae1[_0x22554e(0x1b0)][_0x22554e(0x187)]]['beforeRoute']((_0x134ae1===null||_0x134ae1===void 0x0?void 0x0:_0x134ae1[_0x22554e(0x1bc)])||undefined,_0xa93c6f,_0x134ae1));}},'afterThrow':(_0x41515f,_0x3e6f6c)=>{throw _0x3e6f6c;}};});}async[a2_0x476a5c(0x1b3)](){const _0x18a084=a2_0x476a5c;this[_0x18a084(0x1b1)][_0x18a084(0x18b)]([_0x18a084(0x1aa)])[_0x18a084(0x18c)](_0x5a3a65=>{const _0x282b88=_0x18a084;_0x5a3a65[_0x282b88(0x170)](bodyXml(this['config']['getConfiguration'](_0x282b88(0x185)))),_0x5a3a65[_0x282b88(0x170)](bodyParser(this[_0x282b88(0x19c)][_0x282b88(0x175)](_0x282b88(0x1b6)))),(_0x5a3a65===null||_0x5a3a65===void 0x0?void 0x0:_0x5a3a65['context'])&&Object[_0x282b88(0x19a)](_0x5a3a65[_0x282b88(0x1a0)],{'ok':{'value':function(_0x5b0036,_0x45fd5e,_0x259b9e=0x0){return{'code':_0x259b9e,'data':_0x5b0036,'extra':_0x45fd5e};}},'err':{'value':function(_0xc72174,_0x2be8b6,_0x117c1d=0x1){return{'code':_0x117c1d,'extra':_0x2be8b6,'msg':_0xc72174};}},'input':{'value':function(_0x3cc95b,_0x2b749){const _0x120364=_0x282b88;var _0xbc1eb2;const _0x2e12f8=lodash[_0x120364(0x174)]({},this[_0x120364(0x193)][_0x120364(0x1c1)]||this[_0x120364(0x193)][((_0xbc1eb2=config===null||config===void 0x0?void 0x0:config[_0x120364(0x185)])===null||_0xbc1eb2===void 0x0?void 0x0:_0xbc1eb2[_0x120364(0x1a7)])||_0x120364(0x1c1)]||{},this[_0x120364(0x193)][_0x120364(0x16a)]||{});return _0x3cc95b?lodash[_0x120364(0x180)](_0x2e12f8,_0x3cc95b,_0x2b749):_0x2e12f8;}},'when':{'value':async function(_0x10d5f7,_0x4a67bd){const _0x3c13b1=_0x282b88,_0x150011=this[_0x3c13b1(0x1c0)](_0x10d5f7,null);if(!lodash['isNull'](_0x150011))return await _0x4a67bd(_0x150011);}},'only':{'value':function(_0x124635){const _0x24ca27=_0x282b88,_0x4730d3={};for(let _0x22ac04=0x0;_0x22ac04<_0x124635[_0x24ca27(0x1a9)];_0x22ac04++){lodash[_0x24ca27(0x189)](_0x124635[_0x22ac04])&&_0x124635[_0x22ac04][_0x24ca27(0x1a9)]>0x0&&lodash[_0x24ca27(0x16c)](_0x124635[_0x22ac04][0x0])&&(_0x4730d3[_0x124635[_0x22ac04][0x0]]=this[_0x24ca27(0x1c0)](_0x124635[_0x22ac04][0x0],_0x124635[_0x22ac04]['length']>0x1?_0x124635[_0x22ac04][0x1]:null));}return _0x4730d3;}}});});}async[a2_0x476a5c(0x1bb)](){const _0x4cc538=a2_0x476a5c;var _0x42f869,_0x4c8543,_0x2a69c6,_0x22e0f3,_0x327016,_0x3e038a;const _0x3da5b5=this[_0x4cc538(0x19c)]['getConfiguration']();((_0x4c8543=(_0x42f869=_0x3da5b5===null||_0x3da5b5===void 0x0?void 0x0:_0x3da5b5['anncicapi'])===null||_0x42f869===void 0x0?void 0x0:_0x42f869['devices'])===null||_0x4c8543===void 0x0?void 0x0:_0x4c8543[_0x4cc538(0x19b)])&&Object[_0x4cc538(0x17e)](_0x3da5b5[_0x4cc538(0x182)][_0x4cc538(0x1ad)])[_0x4cc538(0x1a9)]>0x1&&delete _0x3da5b5[_0x4cc538(0x182)]['devices']['DEFAULT'];if((_0x2a69c6=_0x3da5b5===null||_0x3da5b5===void 0x0?void 0x0:_0x3da5b5[_0x4cc538(0x1ac)])===null||_0x2a69c6===void 0x0?void 0x0:_0x2a69c6[_0x4cc538(0x16d)])for(const _0x220cef in _0x3da5b5[_0x4cc538(0x1ac)][_0x4cc538(0x16d)]){((_0x22e0f3=_0x3da5b5[_0x4cc538(0x1ac)][_0x4cc538(0x16d)][_0x220cef])===null||_0x22e0f3===void 0x0?void 0x0:_0x22e0f3['dir'])&&typeof((_0x327016=_0x3da5b5[_0x4cc538(0x1ac)][_0x4cc538(0x16d)][_0x220cef])===null||_0x327016===void 0x0?void 0x0:_0x327016[_0x4cc538(0x1c5)])==_0x4cc538(0x172)&&!fs['existsSync'](_0x3da5b5[_0x4cc538(0x1ac)]['dirs'][_0x220cef][_0x4cc538(0x1c5)])&&(fs['mkdirSync'](_0x3da5b5[_0x4cc538(0x1ac)]['dirs'][_0x220cef][_0x4cc538(0x1c5)],{'recursive':!![]}),console[_0x4cc538(0x19e)](_0x4cc538(0x1be)+_0x3da5b5[_0x4cc538(0x1ac)]['dirs'][_0x220cef]['dir']));}((_0x3e038a=_0x3da5b5===null||_0x3da5b5===void 0x0?void 0x0:_0x3da5b5[_0x4cc538(0x1af)])===null||_0x3e038a===void 0x0?void 0x0:_0x3e038a[_0x4cc538(0x17c)])&&!fs[_0x4cc538(0x17d)](_0x3da5b5[_0x4cc538(0x1af)][_0x4cc538(0x17c)])&&(fs[_0x4cc538(0x18a)](_0x3da5b5[_0x4cc538(0x1af)][_0x4cc538(0x17c)],{'recursive':!![]}),console[_0x4cc538(0x19e)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0x3da5b5[_0x4cc538(0x1af)][_0x4cc538(0x17c)])),this['config']['addObject'](_0x3da5b5);}};__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x476a5c(0x1a3),core_1[a2_0x476a5c(0x1c9)])],CustomConfiguration[a2_0x476a5c(0x181)],a2_0x476a5c(0x19c),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata('design:type',core_1[a2_0x476a5c(0x16b)])],CustomConfiguration[a2_0x476a5c(0x181)],'decorator',void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x476a5c(0x1a3),core_1[a2_0x476a5c(0x17a)])],CustomConfiguration[a2_0x476a5c(0x181)],'application',void 0x0),__decorate([(0x0,decorator_1[a2_0x476a5c(0x16e)])(),__metadata(a2_0x476a5c(0x1a3),core_1[a2_0x476a5c(0x1bf)])],CustomConfiguration[a2_0x476a5c(0x181)],a2_0x476a5c(0x198),void 0x0),__decorate([(0x0,decorator_1[a2_0x476a5c(0x16e)])(),__metadata(a2_0x476a5c(0x1a3),ApiService_1[a2_0x476a5c(0x178)])],CustomConfiguration[a2_0x476a5c(0x181)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x476a5c(0x18e)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x476a5c(0x1b9),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x476a5c(0x190)]=CustomConfiguration;
|
|
1
|
+
'use strict';const a2_0x57441f=a2_0x58a5;(function(_0x1ff280,_0x1b9ccf){const _0x4fccb9=a2_0x58a5,_0x4503ec=_0x1ff280();while(!![]){try{const _0x23c414=parseInt(_0x4fccb9(0x21a))/0x1*(-parseInt(_0x4fccb9(0x1e0))/0x2)+-parseInt(_0x4fccb9(0x20b))/0x3+parseInt(_0x4fccb9(0x1f0))/0x4*(parseInt(_0x4fccb9(0x204))/0x5)+parseInt(_0x4fccb9(0x21b))/0x6+-parseInt(_0x4fccb9(0x218))/0x7+parseInt(_0x4fccb9(0x1fa))/0x8+parseInt(_0x4fccb9(0x1e7))/0x9*(-parseInt(_0x4fccb9(0x223))/0xa);if(_0x23c414===_0x1b9ccf)break;else _0x4503ec['push'](_0x4503ec['shift']());}catch(_0x325d83){_0x4503ec['push'](_0x4503ec['shift']());}}}(a2_0x3165,0x51ecd));function a2_0x3165(){const _0x4459fe=['3997860hNErcT','DEFAULT','config','object','Inject','headers','ApiService','@midwayjs/koa','2250vaIzwj','isArray','bodyParser','prototype','application','device','getApplications','bodyXml','keys','query','isNull','existsSync','HEADERS_SIGNATURE','Configuration','__esModule','upload','decorate','staticFile','./exception/ApiError','checkConfigKeys','@midwayjs/decorator','28fqUJcM','anncicapi','devices','getConfiguration','dir','@midwayjs/upload','design:type','27198VECsWl','@midwayjs/core','@midwayjs/static-file','beforeRoute','function','filterConfig','defineProperties','tmpdir','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','207972TJtQcO','input','@midwayjs/task','@anncic-api/core','registerMethodHandler','apimit','dirs','handlerActionRoute','context','request','4540752zGRJvy','anncic-apihelper','koa-xml-body','koa-bodyparser','addObject','@anncic-api/validator','ACTION_ROUTE_KEY','environment','hanlderApplications','koa','45wfhPSt','log','CustomConfiguration','target','anncic-api','./types/action','__decorate','839250PiCFwu','length','defineProperty','isString','_matchedRoute','@midwayjs/cross-domain','@anncic-api/typeorm','mkdirSync','decorator','getOwnPropertyDescriptor','string','metadata','body','49308deoglo','useMiddleware','28538JxWuHI'];a2_0x3165=function(){return _0x4459fe;};return a2_0x3165();}function a2_0x58a5(_0x4a36ba,_0x3336b0){const _0x316599=a2_0x3165();return a2_0x58a5=function(_0x58a5dc,_0x4d6565){_0x58a5dc=_0x58a5dc-0x1e0;let _0xdff3d6=_0x316599[_0x58a5dc];return _0xdff3d6;},a2_0x58a5(_0x4a36ba,_0x3336b0);}var __decorate=this&&this[a2_0x57441f(0x20a)]||function(_0x32de1a,_0x2e621e,_0x115630,_0x16b3b4){const _0xc3dd2c=a2_0x57441f;var _0x432702=arguments[_0xc3dd2c(0x20c)],_0x281e50=_0x432702<0x3?_0x2e621e:_0x16b3b4===null?_0x16b3b4=Object[_0xc3dd2c(0x214)](_0x2e621e,_0x115630):_0x16b3b4,_0x175d4a;if(typeof Reflect===_0xc3dd2c(0x21e)&&typeof Reflect['decorate']===_0xc3dd2c(0x1eb))_0x281e50=Reflect[_0xc3dd2c(0x233)](_0x32de1a,_0x2e621e,_0x115630,_0x16b3b4);else{for(var _0x5ee745=_0x32de1a[_0xc3dd2c(0x20c)]-0x1;_0x5ee745>=0x0;_0x5ee745--)if(_0x175d4a=_0x32de1a[_0x5ee745])_0x281e50=(_0x432702<0x3?_0x175d4a(_0x281e50):_0x432702>0x3?_0x175d4a(_0x2e621e,_0x115630,_0x281e50):_0x175d4a(_0x2e621e,_0x115630))||_0x281e50;}return _0x432702>0x3&&_0x281e50&&Object[_0xc3dd2c(0x20d)](_0x2e621e,_0x115630,_0x281e50),_0x281e50;},__metadata=this&&this['__metadata']||function(_0x384845,_0x38ed32){const _0x5490c4=a2_0x57441f;if(typeof Reflect==='object'&&typeof Reflect[_0x5490c4(0x216)]===_0x5490c4(0x1eb))return Reflect[_0x5490c4(0x216)](_0x384845,_0x38ed32);};Object['defineProperty'](exports,a2_0x57441f(0x231),{'value':!![]}),exports[a2_0x57441f(0x206)]=void 0x0;const decorator_1=require(a2_0x57441f(0x237)),core_1=require(a2_0x57441f(0x1e8)),ApiError_1=require(a2_0x57441f(0x235)),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x57441f(0x209)),fs=require('fs'),koa=require(a2_0x57441f(0x222)),i18n=require('@midwayjs/i18n'),task=require(a2_0x57441f(0x1f2)),upload=require(a2_0x57441f(0x1e5)),staticFile=require(a2_0x57441f(0x1e9)),crossDomain=require(a2_0x57441f(0x210)),bodyXml=require(a2_0x57441f(0x1fc)),bodyParser=require(a2_0x57441f(0x1fd)),ConfigDefault=require('./config/config.default'),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x57441f(0x1f3)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x57441f(0x211)),anncicValidator=require(a2_0x57441f(0x1ff)),anncicHelper=require(a2_0x57441f(0x1fb));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x21f70c=a2_0x57441f;await this[_0x21f70c(0x1ec)](),await this[_0x21f70c(0x236)](),await this[_0x21f70c(0x1f7)](),await this[_0x21f70c(0x202)]();}async['checkConfigKeys'](){}async['handlerActionRoute'](){const _0x1045f2=a2_0x57441f,_0xc444db=this[_0x1045f2(0x21d)][_0x1045f2(0x1e3)]();this[_0x1045f2(0x213)][_0x1045f2(0x1f4)](action_1[_0x1045f2(0x200)],_0x567e4b=>{const _0x466d61=_0x1045f2,_0x386482=_0x567e4b[_0x466d61(0x216)];return{'before':async _0x1770fc=>{const _0x16bf52=_0x466d61;var _0x240d82,_0x173d21,_0x2a6727,_0x39a620,_0x1b903e;const _0x247d74=(_0x240d82=_0x1770fc===null||_0x1770fc===void 0x0?void 0x0:_0x1770fc[_0x16bf52(0x207)])===null||_0x240d82===void 0x0?void 0x0:_0x240d82[core_1['REQUEST_OBJ_CTX_KEY']];if(_0x247d74){if((_0x386482===null||_0x386482===void 0x0?void 0x0:_0x386482[_0x16bf52(0x1f5)])&&!this[_0x16bf52(0x221)]['checksign']((_0x173d21=_0x247d74===null||_0x247d74===void 0x0?void 0x0:_0x247d74[_0x16bf52(0x1f9)])===null||_0x173d21===void 0x0?void 0x0:_0x173d21[_0x16bf52(0x220)]))throw new AnnError(ApiError_1['ApiError'][_0x16bf52(0x22f)]);((_0x2a6727=_0x247d74[_0x16bf52(0x220)])===null||_0x2a6727===void 0x0?void 0x0:_0x2a6727['device'])&&((_0x1b903e=(_0x39a620=_0xc444db===null||_0xc444db===void 0x0?void 0x0:_0xc444db['anncicapi'])===null||_0x39a620===void 0x0?void 0x0:_0x39a620[_0x16bf52(0x1e2)])===null||_0x1b903e===void 0x0?void 0x0:_0x1b903e[_0x247d74[_0x16bf52(0x220)]['device']])&&(typeof _0xc444db['anncicapi'][_0x16bf52(0x1e2)][_0x247d74['headers'][_0x16bf52(0x228)]][_0x16bf52(0x1ea)]==_0x16bf52(0x1eb)&&await _0xc444db[_0x16bf52(0x1e1)][_0x16bf52(0x1e2)][_0x247d74[_0x16bf52(0x220)][_0x16bf52(0x228)]][_0x16bf52(0x1ea)]((_0x247d74===null||_0x247d74===void 0x0?void 0x0:_0x247d74[_0x16bf52(0x20f)])||undefined,_0x386482,_0x247d74));}},'afterThrow':(_0x1beb73,_0x163385)=>{throw _0x163385;}};});}async[a2_0x57441f(0x202)](){const _0x2d16d9=a2_0x57441f;this[_0x2d16d9(0x227)][_0x2d16d9(0x229)]([_0x2d16d9(0x203)])['forEach'](_0xd761c8=>{const _0x16f4f2=_0x2d16d9;_0xd761c8['useMiddleware'](bodyXml(this[_0x16f4f2(0x21d)][_0x16f4f2(0x1e3)](_0x16f4f2(0x22a)))),_0xd761c8[_0x16f4f2(0x219)](bodyParser(this[_0x16f4f2(0x21d)][_0x16f4f2(0x1e3)](_0x16f4f2(0x225)))),(_0xd761c8===null||_0xd761c8===void 0x0?void 0x0:_0xd761c8['context'])&&Object[_0x16f4f2(0x1ed)](_0xd761c8[_0x16f4f2(0x1f8)],{'ok':{'value':function(_0x48c4b2,_0x3e64d8,_0x51dbac=0x0){return{'code':_0x51dbac,'data':_0x48c4b2,'extra':_0x3e64d8};}},'err':{'value':function(_0x4fdd84,_0x2f0466,_0x5ba6f5=0x1){return{'code':_0x5ba6f5,'extra':_0x2f0466,'msg':_0x4fdd84};}},'input':{'value':function(_0x2d0f3a,_0x11c930){const _0x1617a1=_0x16f4f2;var _0x44c7e8;const _0x550f57=lodash['defaultsDeep']({},this[_0x1617a1(0x1f9)][_0x1617a1(0x217)]||this[_0x1617a1(0x1f9)][((_0x44c7e8=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x44c7e8===void 0x0?void 0x0:_0x44c7e8['key'])||_0x1617a1(0x217)]||{},this[_0x1617a1(0x1f9)][_0x1617a1(0x22c)]||{});return _0x2d0f3a?lodash['get'](_0x550f57,_0x2d0f3a,_0x11c930):_0x550f57;}},'when':{'value':async function(_0x2485e9,_0x3c1ad9){const _0x3e8a95=_0x16f4f2,_0x114f51=this[_0x3e8a95(0x1f1)](_0x2485e9,null);if(!lodash[_0x3e8a95(0x22d)](_0x114f51))return await _0x3c1ad9(_0x114f51);}},'only':{'value':function(_0x205414){const _0x4b03bd=_0x16f4f2,_0x198d93={};for(let _0x433b68=0x0;_0x433b68<_0x205414[_0x4b03bd(0x20c)];_0x433b68++){lodash[_0x4b03bd(0x224)](_0x205414[_0x433b68])&&_0x205414[_0x433b68][_0x4b03bd(0x20c)]>0x0&&lodash[_0x4b03bd(0x20e)](_0x205414[_0x433b68][0x0])&&(_0x198d93[_0x205414[_0x433b68][0x0]]=this[_0x4b03bd(0x1f1)](_0x205414[_0x433b68][0x0],_0x205414[_0x433b68][_0x4b03bd(0x20c)]>0x1?_0x205414[_0x433b68][0x1]:null));}return _0x198d93;}}});});}async['filterConfig'](){const _0x15f0b1=a2_0x57441f;var _0x1ea829,_0x53d2d1,_0x5fd638,_0x14c4fb,_0x38e164,_0x594a0e;const _0x4f7525=this[_0x15f0b1(0x21d)][_0x15f0b1(0x1e3)]();((_0x53d2d1=(_0x1ea829=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['anncicapi'])===null||_0x1ea829===void 0x0?void 0x0:_0x1ea829[_0x15f0b1(0x1e2)])===null||_0x53d2d1===void 0x0?void 0x0:_0x53d2d1[_0x15f0b1(0x21c)])&&Object[_0x15f0b1(0x22b)](_0x4f7525[_0x15f0b1(0x1e1)][_0x15f0b1(0x1e2)])[_0x15f0b1(0x20c)]>0x1&&delete _0x4f7525[_0x15f0b1(0x1e1)][_0x15f0b1(0x1e2)][_0x15f0b1(0x21c)];if((_0x5fd638=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['staticFile'])===null||_0x5fd638===void 0x0?void 0x0:_0x5fd638[_0x15f0b1(0x1f6)])for(const _0x4290c3 in _0x4f7525[_0x15f0b1(0x234)][_0x15f0b1(0x1f6)]){((_0x14c4fb=_0x4f7525['staticFile']['dirs'][_0x4290c3])===null||_0x14c4fb===void 0x0?void 0x0:_0x14c4fb[_0x15f0b1(0x1e4)])&&typeof((_0x38e164=_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3])===null||_0x38e164===void 0x0?void 0x0:_0x38e164['dir'])==_0x15f0b1(0x215)&&!fs['existsSync'](_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3][_0x15f0b1(0x1e4)])&&(fs[_0x15f0b1(0x212)](_0x4f7525[_0x15f0b1(0x234)][_0x15f0b1(0x1f6)][_0x4290c3]['dir'],{'recursive':!![]}),console['log']('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3][_0x15f0b1(0x1e4)]));}((_0x594a0e=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['upload'])===null||_0x594a0e===void 0x0?void 0x0:_0x594a0e[_0x15f0b1(0x1ee)])&&!fs[_0x15f0b1(0x22e)](_0x4f7525[_0x15f0b1(0x232)]['tmpdir'])&&(fs['mkdirSync'](_0x4f7525[_0x15f0b1(0x232)]['tmpdir'],{'recursive':!![]}),console[_0x15f0b1(0x205)](_0x15f0b1(0x1ef)+_0x4f7525[_0x15f0b1(0x232)][_0x15f0b1(0x1ee)])),this[_0x15f0b1(0x21d)][_0x15f0b1(0x1fe)](_0x4f7525);}};__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata('design:type',core_1['MidwayConfigService'])],CustomConfiguration[a2_0x57441f(0x226)],'config',void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayDecoratorService'])],CustomConfiguration['prototype'],a2_0x57441f(0x213),void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayApplicationManager'])],CustomConfiguration[a2_0x57441f(0x226)],'application',void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayEnvironmentService'])],CustomConfiguration[a2_0x57441f(0x226)],a2_0x57441f(0x201),void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),ApiService_1[a2_0x57441f(0x221)])],CustomConfiguration[a2_0x57441f(0x226)],a2_0x57441f(0x221),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x57441f(0x230)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x57441f(0x208),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x57441f(0x206)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a3_0x1f4e4f=a3_0x559d;function a3_0x559d(_0x49e52e,_0x422ca0){const _0xed51b9=a3_0xed51();return a3_0x559d=function(_0x559d3c,_0x5bc6e0){_0x559d3c=_0x559d3c-0x139;let _0x34096b=_0xed51b9[_0x559d3c];return _0x34096b;},a3_0x559d(_0x49e52e,_0x422ca0);}(function(_0x477b88,_0x1a3e3a){const _0x1724a6=a3_0x559d,_0x40425b=_0x477b88();while(!![]){try{const _0x44d4e5=parseInt(_0x1724a6(0x15e))/0x1*(parseInt(_0x1724a6(0x13a))/0x2)+parseInt(_0x1724a6(0x15d))/0x3*(-parseInt(_0x1724a6(0x162))/0x4)+-parseInt(_0x1724a6(0x139))/0x5*(parseInt(_0x1724a6(0x16c))/0x6)+-parseInt(_0x1724a6(0x149))/0x7+-parseInt(_0x1724a6(0x169))/0x8+-parseInt(_0x1724a6(0x16d))/0x9+parseInt(_0x1724a6(0x13b))/0xa;if(_0x44d4e5===_0x1a3e3a)break;else _0x40425b['push'](_0x40425b['shift']());}catch(_0x557c26){_0x40425b['push'](_0x40425b['shift']());}}}(a3_0xed51,0xd50f9));Object[a3_0x1f4e4f(0x155)](exports,'__esModule',{'value':!![]}),exports[a3_0x1f4e4f(0x14a)]=exports[a3_0x1f4e4f(0x140)]=void 0x0;const fs=require('fs'),decorator_1=require(a3_0x1f4e4f(0x15a)),action_1=require(a3_0x1f4e4f(0x14f));function Action(_0x50b153,_0x39d8c9,_0x3a179a={'middleware':[],'sensitive':!![]}){return _0x1923de=>{const _0x562531=a3_0x559d;_0x3a179a[_0x562531(0x16a)]=_0x39d8c9;const _0x20ba2c=parseRoute(_0x50b153);if(_0x20ba2c[_0x562531(0x164)]){_0x3a179a[_0x562531(0x157)]=_0x3a179a[_0x562531(0x157)]?'/'+_0x20ba2c[_0x562531(0x164)]+'/'+_0x3a179a[_0x562531(0x157)]:'/'+_0x20ba2c[_0x562531(0x150)];_0x20ba2c[_0x562531(0x157)]&&(_0x3a179a[_0x562531(0x157)]='/'+_0x20ba2c[_0x562531(0x157)]+'/'+_0x3a179a['prefix']);if(fs[_0x562531(0x159)](_0x20ba2c[_0x562531(0x153)]+_0x562531(0x142)+_0x20ba2c['module']+_0x562531(0x147)+(lodash['endsWith'](_0x20ba2c[_0x562531(0x15c)],'ts')?'ts':'js'))){const _0x14e09b=include(_0x20ba2c[_0x562531(0x153)]+_0x562531(0x142)+_0x20ba2c[_0x562531(0x164)]+'/config.'+(lodash['endsWith'](_0x20ba2c['filepath'],'ts')?'ts':'js'));if(_0x14e09b[_0x562531(0x15b)]&&lodash[_0x562531(0x160)](_0x14e09b[_0x562531(0x15b)])&&_0x14e09b[_0x562531(0x15b)][_0x562531(0x151)]>0x0)for(let _0x4bd456 in _0x14e09b[_0x562531(0x15b)]){_0x14e09b[_0x562531(0x13f)][_0x562531(0x14d)](_0x14e09b[_0x562531(0x15b)][_0x4bd456])==-0x1&&_0x3a179a[_0x562531(0x15b)][_0x562531(0x16b)](_0x14e09b[_0x562531(0x15b)][_0x4bd456]);}}_0x3a179a['prefix']=_0x3a179a['prefix'][_0x562531(0x161)]()[_0x562531(0x154)](/\/{2,}/g,'/'),(0x0,decorator_1['saveModule'])(action_1['ACTION_KEY'],_0x1923de),(0x0,decorator_1[_0x562531(0x13e)])(_0x3a179a[_0x562531(0x157)],_0x3a179a)(_0x1923de),(0x0,decorator_1[_0x562531(0x14b)])(action_1['ACTION_KEY'],{'prefix':_0x3a179a[_0x562531(0x157)],'pprefix':_0x20ba2c[_0x562531(0x157)],'module':_0x20ba2c[_0x562531(0x164)],'filepath':_0x20ba2c[_0x562531(0x15c)],'routerOptions':_0x3a179a},_0x1923de);}else _0x3a179a[_0x562531(0x157)]=_0x3a179a[_0x562531(0x157)]?'/'+_0x3a179a[_0x562531(0x157)]:'/'+_0x20ba2c[_0x562531(0x150)],_0x20ba2c[_0x562531(0x157)]&&(_0x3a179a[_0x562531(0x157)]='/'+_0x20ba2c[_0x562531(0x157)]+'/'+_0x3a179a[_0x562531(0x157)]),_0x3a179a[_0x562531(0x157)]=_0x3a179a[_0x562531(0x157)][_0x562531(0x161)]()[_0x562531(0x154)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x562531(0x166)])(action_1[_0x562531(0x158)],_0x1923de),(0x0,decorator_1['Controller'])(_0x3a179a[_0x562531(0x157)],_0x3a179a)(_0x1923de),(0x0,decorator_1['saveClassMetadata'])(action_1[_0x562531(0x158)],{'prefix':_0x3a179a['prefix'],'module':_0x20ba2c[_0x562531(0x164)],'pprefix':_0x20ba2c[_0x562531(0x157)],'filepath':_0x20ba2c['filepath'],'routerOptions':_0x3a179a},_0x1923de);};}exports[a3_0x1f4e4f(0x140)]=Action;function parseRoute(_0x353520){const _0x318a7f=a3_0x1f4e4f;_0x353520=_0x353520['replace'](/(\\|\/)/g,'/');const _0x5f3ba2=process[_0x318a7f(0x143)]()[_0x318a7f(0x154)](/(\\|\/)/g,'/'),_0xb14eb9=_0x353520[_0x318a7f(0x13d)](0x0,_0x5f3ba2[_0x318a7f(0x151)]+_0x353520['substring'](_0x5f3ba2[_0x318a7f(0x151)]+0x1)[_0x318a7f(0x14d)]('/')+0x1),_0x223f8f=_0x353520['substring'](_0xb14eb9[_0x318a7f(0x151)]+0x1)['replace'](/(\\|\/)/g,'/'),_0x4cd1bd={'route':'','prefix':![],'module':![],'rootpath':_0xb14eb9,'filepath':_0x223f8f};if(_0x223f8f[_0x318a7f(0x15f)](_0x318a7f(0x165))){const _0x21ee75=_0x223f8f[_0x318a7f(0x13d)](_0x318a7f(0x165)[_0x318a7f(0x151)])[_0x318a7f(0x163)]('/')[_0x318a7f(0x167)](_0x8002d6=>_0x8002d6&&_0x8002d6[_0x318a7f(0x145)]());return _0x21ee75[_0x318a7f(0x151)]>0x1&&(_0x4cd1bd[_0x318a7f(0x157)]=_0x21ee75[0x0][_0x318a7f(0x161)](),_0x21ee75[_0x318a7f(0x156)](0x0,0x1)),_0x4cd1bd['route']=('/'+_0x21ee75['join']('/'))[_0x318a7f(0x154)](/(\.ts|\.js)$/,'')[_0x318a7f(0x154)](/\/{2,}/g,'/')[_0x318a7f(0x148)](/[\/|A-Z]*[^A-Z]+/g)[_0x318a7f(0x144)]('-')[_0x318a7f(0x161)]()[_0x318a7f(0x154)](/\/\-/g,'/'),_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x152)](_0x318a7f(0x16e))&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)]['length']-0x7)),_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x152)](_0x318a7f(0x13c))&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x151)]-0xb)),_0x4cd1bd;}else{if(_0x223f8f[_0x318a7f(0x15f)](_0x318a7f(0x141))){const _0xaa042a=_0x223f8f[_0x318a7f(0x13d)](0x0,_0x223f8f[_0x318a7f(0x14d)](_0x318a7f(0x142))+0x5),_0x448dd2=_0x223f8f[_0x318a7f(0x13d)](_0xaa042a[_0x318a7f(0x151)]+0x1)[_0x318a7f(0x154)](/(\\|\/)/g,'/')['split']('/')[0x0];if(_0x223f8f[_0x318a7f(0x15f)](_0x318a7f(0x141)+_0x448dd2+_0x318a7f(0x14e))){const _0x55e04c=_0x223f8f[_0x318a7f(0x13d)]((_0xaa042a+'/'+_0x448dd2+_0x318a7f(0x14e))['length'])[_0x318a7f(0x163)]('/')['filter'](_0x164e5a=>_0x164e5a&&_0x164e5a[_0x318a7f(0x145)]());return _0x55e04c[_0x318a7f(0x151)]>0x1&&(_0x4cd1bd['prefix']=_0x55e04c[0x0][_0x318a7f(0x161)](),_0x55e04c[_0x318a7f(0x156)](0x0,0x1)),_0x4cd1bd[_0x318a7f(0x164)]=_0x448dd2,_0x4cd1bd['route']=('/'+_0x448dd2+'/'+_0x55e04c[_0x318a7f(0x144)]('/'))[_0x318a7f(0x154)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x318a7f(0x161)]()[_0x318a7f(0x154)](/\/\-/g,'/'),_0x4cd1bd[_0x318a7f(0x150)]['endsWith'](_0x318a7f(0x16e))&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x151)]-0x7)),_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x152)]('-controller')&&(_0x4cd1bd[_0x318a7f(0x150)]=_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x13d)](0x0,_0x4cd1bd[_0x318a7f(0x150)][_0x318a7f(0x151)]-0xb)),_0x4cd1bd;}throw new Error(_0x223f8f+_0x318a7f(0x146)+_0x448dd2+_0x318a7f(0x14c));}}throw new Error(_0x223f8f+_0x318a7f(0x168));}exports[a3_0x1f4e4f(0x14a)]=parseRoute;function a3_0xed51(){const _0x157a44=['\x20文件请放在apps/','/config.','match','3020675GOuSHb','parseRoute','saveClassMetadata','/controller/文件下','indexOf','/controller/','../types/action','route','length','endsWith','rootpath','replace','defineProperty','splice','prefix','ACTION_KEY','existsSync','@midwayjs/decorator','middleware','filepath','3wnHmzp','11mDdbpT','startsWith','isArray','toLowerCase','3357416tKuHaR','split','module','app/controller/','saveModule','filter','\x20文件请放在app/controller/文件下','559384Oksope','tagName','push','6QRSXGZ','12370923qgvXfI','-action','3010495aKoCVQ','44280ZLynMm','39466050UbLwPA','-controller','substring','Controller','middlewareIgnore','Action','apps/','/apps/','cwd','join','trim'];a3_0xed51=function(){return _0x157a44;};return a3_0xed51();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x4b838c=a4_0x5450;(function(_0xbc5cb,_0x78c050){const _0x3f86d1=a4_0x5450,_0x1f0ed6=_0xbc5cb();while(!![]){try{const _0x59d845=-parseInt(_0x3f86d1(0xb2))/0x1*(parseInt(_0x3f86d1(0xa8))/0x2)+-parseInt(_0x3f86d1(0xa5))/0x3*(parseInt(_0x3f86d1(0xbb))/0x4)+parseInt(_0x3f86d1(0xb7))/0x5+parseInt(_0x3f86d1(0xae))/0x6+-parseInt(_0x3f86d1(0xa7))/0x7+parseInt(_0x3f86d1(0xac))/0x8*(parseInt(_0x3f86d1(0xa1))/0x9)+-parseInt(_0x3f86d1(0xa4))/0xa*(-parseInt(_0x3f86d1(0xb1))/0xb);if(_0x59d845===_0x78c050)break;else _0x1f0ed6['push'](_0x1f0ed6['shift']());}catch(_0x9d1b25){_0x1f0ed6['push'](_0x1f0ed6['shift']());}}}(a4_0x2a08,0x6003e));function a4_0x5450(_0x53a6a6,_0x401bae){const _0x2a08fe=a4_0x2a08();return a4_0x5450=function(_0x545017,_0x2d3b8f){_0x545017=_0x545017-0x9f;let _0x324fd9=_0x2a08fe[_0x545017];return _0x324fd9;},a4_0x5450(_0x53a6a6,_0x401bae);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a4_0x4b838c(0xb9)]=void 0x0;function a4_0x2a08(){const _0x2d76de=['attachClassMetadata','5287247IkgyWM','28624GDFiJP','length','description','createCustomMethodDecorator','8GoLMMe','indexOf','3365766bJJhoG','middlewareIgnore','validate','2066702vWbVZv','4WAYWvO','Validator','toLowerCase','routerName','middleware','1025490vvZgvv','del','Api','utc','5156sCzGPC','apimit','ACTION_ROUTE_KEY','delete','5228217zmKpsz','../types/action','@midwayjs/decorator','20ZAQHMR','1203qQDVAB'];a4_0x2a08=function(){return _0x2d76de;};return a4_0x2a08();}const validator_1=require('@anncic-api/validator'),decorator_1=require(a4_0x4b838c(0xa3)),action_1=require(a4_0x4b838c(0xa2));function Api(_0x21e1e7,_0x1fd4ce='get',_0x253492='/',_0x83da44={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x259359,_0x1138cf,_0x6081b0)=>{const _0x5f364f=a4_0x5450;var _0x1a3a0d,_0x2784ee,_0x2d3710;!_0x83da44['middleware']&&(_0x83da44[_0x5f364f(0xb6)]=[]);!((_0x1a3a0d=_0x83da44===null||_0x83da44===void 0x0?void 0x0:_0x83da44['validate'])===null||_0x1a3a0d===void 0x0?void 0x0:_0x1a3a0d['validationOptions'])&&(_0x83da44[_0x5f364f(0xb0)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x5f364f(0xba)}});if(((_0x2784ee=_0x83da44===null||_0x83da44===void 0x0?void 0x0:_0x83da44['middleware'])===null||_0x2784ee===void 0x0?void 0x0:_0x2784ee[_0x5f364f(0xa9)])>0x0&&((_0x2d3710=_0x83da44===null||_0x83da44===void 0x0?void 0x0:_0x83da44[_0x5f364f(0xaf)])===null||_0x2d3710===void 0x0?void 0x0:_0x2d3710['length'])>0x0)for(let _0x26cf8f in _0x83da44[_0x5f364f(0xb6)]){_0x83da44[_0x5f364f(0xaf)][_0x5f364f(0xad)](_0x83da44[_0x5f364f(0xb6)][_0x26cf8f])!==-0x1&&(_0x83da44[_0x5f364f(0xb6)][_0x26cf8f]=null);}_0x83da44[_0x5f364f(0xb5)]=_0x21e1e7,(0x0,validator_1[_0x5f364f(0xb3)])(_0x83da44[_0x5f364f(0xb0)])(_0x259359,_0x1138cf,_0x6081b0),(0x0,decorator_1['RequestMapping'])(Object['assign'](_0x83da44,{'path':_0x253492,'requestMethod':(_0x1fd4ce==_0x5f364f(0xb8)?_0x5f364f(0xa0):_0x1fd4ce)[_0x5f364f(0xb4)]()}))(_0x259359,_0x1138cf,_0x6081b0),(0x0,decorator_1[_0x5f364f(0xa6)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x253492,'method':_0x1138cf,'apimit':_0x83da44['apimit'],'routerName':_0x83da44[_0x5f364f(0xb5)],'description':_0x83da44[_0x5f364f(0xaa)],'middleware':(_0x83da44['middleware']||[])['filter'](_0x5c9824=>!!_0x5c9824),'requestMethod':(_0x1fd4ce==_0x5f364f(0xb8)?'delete':_0x1fd4ce)[_0x5f364f(0xb4)]()},_0x259359),(0x0,decorator_1[_0x5f364f(0xab)])(action_1[_0x5f364f(0x9f)],{'path':_0x253492,'method':_0x1138cf,'apimit':_0x83da44[_0x5f364f(0xbc)],'routerName':_0x83da44[_0x5f364f(0xb5)],'description':_0x83da44['description'],'middleware':(_0x83da44[_0x5f364f(0xb6)]||[])['filter'](_0x228543=>!!_0x228543),'requestMethod':(_0x1fd4ce=='del'?_0x5f364f(0xa0):_0x1fd4ce)[_0x5f364f(0xb4)]()})(_0x259359,_0x1138cf,_0x6081b0);};}exports[a4_0x4b838c(0xb9)]=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a5_0x170acb=a5_0x69e1;function a5_0x69e1(_0x279e76,_0x484a28){const _0x4b5827=a5_0x4b58();return a5_0x69e1=function(_0x69e160,_0x1ded44){_0x69e160=_0x69e160-0x1d6;let _0x3d7452=_0x4b5827[_0x69e160];return _0x3d7452;},a5_0x69e1(_0x279e76,_0x484a28);}(function(_0x5214bb,_0x1adf60){const _0x5c800c=a5_0x69e1,_0x7da145=_0x5214bb();while(!![]){try{const _0x457626=-parseInt(_0x5c800c(0x1db))/0x1+parseInt(_0x5c800c(0x1d7))/0x2*(-parseInt(_0x5c800c(0x1e3))/0x3)+-parseInt(_0x5c800c(0x1ea))/0x4*(-parseInt(_0x5c800c(0x1e1))/0x5)+parseInt(_0x5c800c(0x1ef))/0x6+parseInt(_0x5c800c(0x1da))/0x7+parseInt(_0x5c800c(0x1f0))/0x8+-parseInt(_0x5c800c(0x1d8))/0x9*(parseInt(_0x5c800c(0x1dd))/0xa);if(_0x457626===_0x1adf60)break;else _0x7da145['push'](_0x7da145['shift']());}catch(_0x3c85c4){_0x7da145['push'](_0x7da145['shift']());}}}(a5_0x4b58,0xc9eb6));Object[a5_0x170acb(0x1de)](exports,'__esModule',{'value':!![]}),exports['Apitest']=void 0x0;const decorator_1=require('@midwayjs/decorator'),core_1=require('@midwayjs/core'),ApitestService_1=require(a5_0x170acb(0x1dc));function a5_0x4b58(){const _0x2a5560=['6483372JjQgMV','888403qlekaW','../service/ApitestService','10PGUMfO','defineProperty','apitest','app','5NkpFUm','get','647847AUpzXF','apidoc','RequestMapping','MidwayEnvironmentService','getApplicationContext','filepath','/apitest','5288236gEEuqc','ApitestService','isDevelopmentEnvironment','getConfig','value','6961818mWlIgi','5957880RwQHNC','getAsync','10YZkBYs','12222747hLmKby','REQUEST_OBJ_CTX_KEY'];a5_0x4b58=function(){return _0x2a5560;};return a5_0x4b58();}function Apitest(_0x27a640=a5_0x170acb(0x1e9),_0x160b45){return(_0x32c780,_0x471385,_0x266525)=>{const _0x27c248=a5_0x69e1;return(0x0,decorator_1[_0x27c248(0x1e5)])({'path':_0x27a640,'requestMethod':_0x27c248(0x1e2)})(_0x32c780,_0x471385,_0x266525),_0x266525[_0x27c248(0x1ee)]=async function(..._0x3d8c3b){const _0x8434d5=_0x27c248;var _0x333a1c;const _0xa1b0bb=(_0x333a1c=this[core_1[_0x8434d5(0x1d9)]])===null||_0x333a1c===void 0x0?void 0x0:_0x333a1c[_0x8434d5(0x1e0)];if(_0xa1b0bb&&_0xa1b0bb[_0x8434d5(0x1ed)](_0x8434d5(0x1df))){const _0x3d140d=await _0xa1b0bb[_0x8434d5(0x1e7)]()[_0x8434d5(0x1d6)](ApitestService_1[_0x8434d5(0x1eb)]),_0x43b9f3=await _0xa1b0bb[_0x8434d5(0x1e7)]()[_0x8434d5(0x1d6)](core_1[_0x8434d5(0x1e6)]);return _0x43b9f3[_0x8434d5(0x1ec)]()&&(_0x160b45[_0x8434d5(0x1e8)]=!![]),await _0x3d140d[_0x8434d5(0x1e4)](_0x160b45);}return'';},_0x266525;};}exports['Apitest']=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a7_0x3da15a=a7_0x540e;function a7_0xac98(){var _0x175293=['1260300jUiMPW','function','9032nKmHfe','1060234RqZQCL','decorate','HEADERS_LACK','HEADERS_CHECKCODE','2178396AQYpeq','36eHGbyC','TIMEOUT','__metadata','83708tAQkxh','ApiError','584280fOYCwE','156iUXVOW','请求头信息不完整','HEADERS_DEVICE','HEADERS_SIGNATURE','defineProperty','9620030kFdCui','object','metadata','7SPeNkw','design:type','length','__decorate'];a7_0xac98=function(){return _0x175293;};return a7_0xac98();}(function(_0x35d581,_0x1ed13d){var _0xc7f58e=a7_0x540e,_0x50e5bc=_0x35d581();while(!![]){try{var _0x438e29=-parseInt(_0xc7f58e(0x176))/0x1*(parseInt(_0xc7f58e(0x185))/0x2)+-parseInt(_0xc7f58e(0x188))/0x3*(parseInt(_0xc7f58e(0x17c))/0x4)+-parseInt(_0xc7f58e(0x17a))/0x5+parseInt(_0xc7f58e(0x181))/0x6+parseInt(_0xc7f58e(0x17d))/0x7+-parseInt(_0xc7f58e(0x187))/0x8*(parseInt(_0xc7f58e(0x182))/0x9)+parseInt(_0xc7f58e(0x173))/0xa;if(_0x438e29===_0x1ed13d)break;else _0x50e5bc['push'](_0x50e5bc['shift']());}catch(_0x276f74){_0x50e5bc['push'](_0x50e5bc['shift']());}}}(a7_0xac98,0x7f6d1));function a7_0x540e(_0x8aae57,_0x318575){var _0xac9876=a7_0xac98();return a7_0x540e=function(_0x540ee5,_0x33a19d){_0x540ee5=_0x540ee5-0x172;var _0x2dc990=_0xac9876[_0x540ee5];return _0x2dc990;},a7_0x540e(_0x8aae57,_0x318575);}var __decorate=this&&this[a7_0x3da15a(0x179)]||function(_0x32ab1b,_0x394b8e,_0x177b53,_0x302bb4){var _0x322777=a7_0x3da15a,_0x425faa=arguments[_0x322777(0x178)],_0x3e897b=_0x425faa<0x3?_0x394b8e:_0x302bb4===null?_0x302bb4=Object['getOwnPropertyDescriptor'](_0x394b8e,_0x177b53):_0x302bb4,_0x45ab0c;if(typeof Reflect===_0x322777(0x174)&&typeof Reflect[_0x322777(0x17e)]===_0x322777(0x17b))_0x3e897b=Reflect['decorate'](_0x32ab1b,_0x394b8e,_0x177b53,_0x302bb4);else{for(var _0x526f62=_0x32ab1b[_0x322777(0x178)]-0x1;_0x526f62>=0x0;_0x526f62--)if(_0x45ab0c=_0x32ab1b[_0x526f62])_0x3e897b=(_0x425faa<0x3?_0x45ab0c(_0x3e897b):_0x425faa>0x3?_0x45ab0c(_0x394b8e,_0x177b53,_0x3e897b):_0x45ab0c(_0x394b8e,_0x177b53))||_0x3e897b;}return _0x425faa>0x3&&_0x3e897b&&Object['defineProperty'](_0x394b8e,_0x177b53,_0x3e897b),_0x3e897b;},__metadata=this&&this[a7_0x3da15a(0x184)]||function(_0x678acc,_0x5e571c){var _0x5e7ac0=a7_0x3da15a;if(typeof Reflect==='object'&&typeof Reflect[_0x5e7ac0(0x175)]===_0x5e7ac0(0x17b))return Reflect['metadata'](_0x678acc,_0x5e571c);};Object[a7_0x3da15a(0x172)](exports,'__esModule',{'value':!![]}),exports[a7_0x3da15a(0x186)]=void 0x0;class ApiError{}ApiError['TIMEOUT']=0x18a89,ApiError[a7_0x3da15a(0x17f)]=0x18a8a,ApiError[a7_0x3da15a(0x18a)]=0x18a8b,ApiError[a7_0x3da15a(0x180)]=0x18a8c,ApiError[a7_0x3da15a(0x18b)]=0x18a8d,__decorate([AnnErrorMsg('网络繁忙,请稍后重试'),__metadata('design:type',Object)],ApiError,a7_0x3da15a(0x183),void 0x0),__decorate([AnnErrorMsg(a7_0x3da15a(0x189)),__metadata(a7_0x3da15a(0x177),Object)],ApiError,a7_0x3da15a(0x17f),void 0x0),__decorate([AnnErrorMsg('请使用正确的设备'),__metadata(a7_0x3da15a(0x177),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg('checkcode验证失败'),__metadata(a7_0x3da15a(0x177),Object)],ApiError,'HEADERS_CHECKCODE',void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a7_0x3da15a(0x177),Object)],ApiError,a7_0x3da15a(0x18b),void 0x0),exports['ApiError']=ApiError;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8_0x394f18=a8_0x2b22;function a8_0x179a(){const _0x5db1cf=['prefix','/static/apitest','INJECT_CUSTOM_PARAM','27256oAjLHK','@anncic-api/validator','push','isArray','metadata','RULES_KEY','8757AEGTHd','rules','1542000PHTgep','log','children','path','file','allow','1142515hkmdwD','method','length','key','4JJwRSa','noreq','tagName','@midwayjs/decorator','ACTION_KEY','args','query','min','items','flags.description','required','String','BODY','static/apitest','routes','propertyData','getClassMetadata','2288199doWhyW','文件上传-','body','../types/action','indexOf','name','split','function','filter','concat','QUERY','61538jooXUp','title','只允许:[','boolean','flags.presence','description','filepath','Object','14478450gLpxRn','iterator','replace','find','number','ACTION_ROUTE_KEY','defineProperty','describe','PARAM','parameterIndex','HEADERS','limit','getClassExtendedMetadata','request','summary','WEB_ROUTER_PARAM_KEY','30SDneId','File','routerName','FIELDS','string','805AcRRbd','module','routerOptions','__esModule','RouteParamTypes','getRoutes','startsWith','max','default','type','pprefix','Number','route','requestMethod','header','get'];a8_0x179a=function(){return _0x5db1cf;};return a8_0x179a();}(function(_0x53c255,_0x2db2b8){const _0x41fd3c=a8_0x2b22,_0x5b2e2e=_0x53c255();while(!![]){try{const _0x585696=parseInt(_0x41fd3c(0xbe))/0x1*(parseInt(_0x41fd3c(0x104))/0x2)+parseInt(_0x41fd3c(0xf9))/0x3+-parseInt(_0x41fd3c(0xe8))/0x4*(-parseInt(_0x41fd3c(0xe4))/0x5)+-parseInt(_0x41fd3c(0xde))/0x6+-parseInt(_0x41fd3c(0xc3))/0x7*(-parseInt(_0x41fd3c(0xd6))/0x8)+-parseInt(_0x41fd3c(0xdc))/0x9+-parseInt(_0x41fd3c(0x10c))/0xa;if(_0x585696===_0x2db2b8)break;else _0x5b2e2e['push'](_0x5b2e2e['shift']());}catch(_0x447cd6){_0x5b2e2e['push'](_0x5b2e2e['shift']());}}}(a8_0x179a,0x928e5));Object[a8_0x394f18(0x112)](exports,a8_0x394f18(0xc6),{'value':!![]}),exports[a8_0x394f18(0xc8)]=void 0x0;const lodash_1=require('lodash'),validator_1=require(a8_0x394f18(0xd7)),decorator_1=require(a8_0x394f18(0xeb)),decorator_2=require(a8_0x394f18(0xeb)),decorator_3=require(a8_0x394f18(0xeb)),action_1=require(a8_0x394f18(0xfc));function getRoutes(_0x4f7bff={'prefix':'/','module':![]}){const _0x1ddfb9=a8_0x394f18;var _0x582d50,_0x4e8122;const _0x2407bd=(0x0,decorator_3['listModule'])(action_1[_0x1ddfb9(0xec)]),_0x42d218={},_0x4da5cd=Array[_0x1ddfb9(0xd9)](_0x4f7bff[_0x1ddfb9(0x101)]||[])?_0x4f7bff[_0x1ddfb9(0x101)]||[]:[_0x4f7bff[_0x1ddfb9(0x101)]];_0x38db3c:for(const _0x35a884 of _0x2407bd){let _0x406358=(0x0,decorator_3['getClassMetadata'])(action_1[_0x1ddfb9(0xec)],_0x35a884),_0x14e341=(0x0,decorator_3[_0x1ddfb9(0xf8)])(action_1[_0x1ddfb9(0x111)],_0x35a884);if(_0x406358&&_0x14e341){let _0x19f0e0=_0x406358['prefix'],_0x4c075a={};if(_0x4f7bff[_0x1ddfb9(0xc4)]&&(0x0,lodash_1[_0x1ddfb9(0xd2)])(_0x406358,_0x1ddfb9(0xc4),![])!=_0x4f7bff[_0x1ddfb9(0xc4)])continue _0x38db3c;else{if(_0x4f7bff[_0x1ddfb9(0xc4)]===![]&&!!(0x0,lodash_1[_0x1ddfb9(0xd2)])(_0x406358,_0x1ddfb9(0xc4),null))continue _0x38db3c;}if(_0x4f7bff['prefix']&&!_0x19f0e0['startsWith'](_0x4f7bff['prefix']))continue _0x38db3c;_0x19f0e0!=='/'?(_0x4c075a[_0x1ddfb9(0xbc)]=(_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358['routerOptions'][_0x1ddfb9(0xea)])||(/^\//['test'](_0x19f0e0)?_0x19f0e0[_0x1ddfb9(0xff)]('/')[0x1]:_0x19f0e0),_0x4c075a[_0x1ddfb9(0x109)]=(_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358[_0x1ddfb9(0xc5)]['description'])||_0x4c075a[_0x1ddfb9(0xbc)],_0x4c075a[_0x1ddfb9(0xf6)]=[]):(_0x4c075a[_0x1ddfb9(0xbc)]=(_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358[_0x1ddfb9(0xc5)][_0x1ddfb9(0xea)])||'default',_0x4c075a['description']=(_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358[_0x1ddfb9(0xc5)][_0x1ddfb9(0x109)])||'',_0x4c075a['routes']=[]);_0x4f7bff[_0x1ddfb9(0x10a)]&&(_0x4c075a[_0x1ddfb9(0x10a)]=_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358[_0x1ddfb9(0x10a)]);(_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358[_0x1ddfb9(0xcd)])&&(_0x4c075a[_0x1ddfb9(0xd3)]=_0x406358[_0x1ddfb9(0xcd)]);(_0x406358===null||_0x406358===void 0x0?void 0x0:_0x406358[_0x1ddfb9(0xc4)])&&(_0x4c075a['module']=_0x406358[_0x1ddfb9(0xc4)]);let _0x42baea=(0x0,decorator_3[_0x1ddfb9(0xf8)])(decorator_2[_0x1ddfb9(0xd5)],_0x35a884)||{};if(typeof _0x14e341[Symbol[_0x1ddfb9(0x10d)]]===_0x1ddfb9(0x100))for(let _0x4b06ed of _0x14e341){let _0x4d3b7a={};_0x4d3b7a[_0x1ddfb9(0xe5)]=_0x4b06ed[_0x1ddfb9(0xd0)],_0x4d3b7a[_0x1ddfb9(0xcf)]=(_0x19f0e0+_0x4b06ed[_0x1ddfb9(0xe1)])[_0x1ddfb9(0x10e)](/\/{1,}/,'/'),_0x4d3b7a['summary']=(_0x4b06ed===null||_0x4b06ed===void 0x0?void 0x0:_0x4b06ed[_0x1ddfb9(0xc0)])||_0x4c075a[_0x1ddfb9(0xbc)]||_0x1ddfb9(0xcb),_0x4d3b7a[_0x1ddfb9(0x109)]=(_0x4b06ed===null||_0x4b06ed===void 0x0?void 0x0:_0x4b06ed[_0x1ddfb9(0x109)])||'',_0x4d3b7a[_0x1ddfb9(0xbb)]=[];if(!(0x0,lodash_1['startsWith'])(_0x4d3b7a[_0x1ddfb9(0xcf)],_0x1ddfb9(0xf5))&&!(0x0,lodash_1[_0x1ddfb9(0xc9)])(_0x4d3b7a[_0x1ddfb9(0xcf)],_0x1ddfb9(0xd4))&&_0x4da5cd[_0x1ddfb9(0xfd)](_0x4d3b7a[_0x1ddfb9(0xcf)])===-0x1){if(!(_0x4f7bff===null||_0x4f7bff===void 0x0?void 0x0:_0x4f7bff[_0x1ddfb9(0xe9)])){let _0x2bc36b=(0x0,decorator_3['getMethodParamTypes'])(new _0x35a884(),_0x4b06ed[_0x1ddfb9(0xe5)]);for(const _0x3d5a8 in _0x2bc36b){let _0x505266=(_0x582d50=_0x42baea[_0x4b06ed[_0x1ddfb9(0xe5)]])===null||_0x582d50===void 0x0?void 0x0:_0x582d50[_0x1ddfb9(0x10f)](_0x251f7c=>_0x251f7c[_0x1ddfb9(0x115)]==_0x3d5a8&&_0x251f7c[_0x1ddfb9(0xe7)]===decorator_2[_0x1ddfb9(0xbd)]&&(_0x251f7c===null||_0x251f7c===void 0x0?void 0x0:_0x251f7c[_0x1ddfb9(0xda)]));if(_0x505266===null||_0x505266===void 0x0?void 0x0:_0x505266['metadata']){let _0x1b090e=convertTypeToString(_0x505266[_0x1ddfb9(0xda)][_0x1ddfb9(0xcc)]||0x0);if([_0x1ddfb9(0xee),_0x1ddfb9(0xfb)][_0x1ddfb9(0xfd)](_0x1b090e)!=-0x1&&_0x505266[_0x1ddfb9(0xda)][_0x1ddfb9(0xf7)][_0x1ddfb9(0xfd)](':')==-0x1&&!_0x4d3b7a['request'][_0x1ddfb9(0x10f)](_0x20174c=>_0x20174c[_0x1ddfb9(0xe7)]==_0x505266['metadata'][_0x1ddfb9(0xf7)]))_0x4d3b7a[_0x1ddfb9(0xbb)][_0x1ddfb9(0xd8)]({'key':_0x505266[_0x1ddfb9(0xda)][_0x1ddfb9(0xf7)],'title':_0x505266['metadata'][_0x1ddfb9(0xf7)],'type':convertSchemaType(_0x2bc36b[_0x505266[_0x1ddfb9(0x115)]][_0x1ddfb9(0xfe)]),'required':![],'default':'','desc':''});else{if(_0x1b090e==_0x1ddfb9(0xe2)){let _0x3eb53a=((_0x4e8122=_0x505266===null||_0x505266===void 0x0?void 0x0:_0x505266['metadata'])===null||_0x4e8122===void 0x0?void 0x0:_0x4e8122[_0x1ddfb9(0xf7)])||_0x1ddfb9(0xe2);_0x3eb53a[_0x1ddfb9(0xfd)](':')==-0x1&&!_0x4d3b7a[_0x1ddfb9(0xbb)]['find'](_0x1e8c9a=>_0x1e8c9a[_0x1ddfb9(0xe7)]==_0x3eb53a&&_0x1e8c9a['type']==_0x1ddfb9(0xe2))&&_0x4d3b7a[_0x1ddfb9(0xbb)][_0x1ddfb9(0xd8)]({'key':_0x3eb53a,'title':_0x1ddfb9(0xfa)+_0x3eb53a,'type':_0x1ddfb9(0xe2),'required':!![],'default':'','desc':''});}}}else{const _0x4d036b=(0x0,decorator_3[_0x1ddfb9(0xba)])(validator_1[_0x1ddfb9(0xdb)],_0x2bc36b[_0x3d5a8]);_0x4d036b&&_0x4d3b7a[_0x1ddfb9(0xbb)]['push'](...getJoiRequest(_0x4d036b));}}}_0x4c075a[_0x1ddfb9(0xf6)]['push'](_0x4d3b7a);}}if(_0x4c075a[_0x1ddfb9(0xf6)]['length']>0x0){let _0x5b5eda=_0x42d218[_0x19f0e0];_0x5b5eda?(_0x5b5eda[_0x1ddfb9(0xbc)]!=_0x4c075a['summary']&&(_0x5b5eda['summary']=_0x5b5eda[_0x1ddfb9(0xbc)]+','+_0x4c075a[_0x1ddfb9(0xbc)]),_0x5b5eda[_0x1ddfb9(0x109)]!=_0x4c075a[_0x1ddfb9(0x109)]&&(_0x5b5eda[_0x1ddfb9(0x109)]=_0x5b5eda[_0x1ddfb9(0x109)]+','+_0x4c075a[_0x1ddfb9(0x109)]),_0x5b5eda[_0x1ddfb9(0xf6)]=_0x5b5eda[_0x1ddfb9(0xf6)][_0x1ddfb9(0x102)](_0x4c075a[_0x1ddfb9(0xf6)]),_0x42d218[_0x19f0e0]=_0x5b5eda):_0x42d218[_0x19f0e0]=_0x4c075a;}}}return _0x42d218;}function a8_0x2b22(_0x133891,_0x181903){const _0x179aa1=a8_0x179a();return a8_0x2b22=function(_0x2b2265,_0xde1ef1){_0x2b2265=_0x2b2265-0xb9;let _0x52f2fc=_0x179aa1[_0x2b2265];return _0x52f2fc;},a8_0x2b22(_0x133891,_0x181903);}exports[a8_0x394f18(0xc8)]=getRoutes;function getJoiRequest(_0x5741b3){const _0x42c431=a8_0x394f18,_0x42a897=[];for(let _0x2cce0e in _0x5741b3){const _0x227172={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x322dd0=typeof _0x5741b3[_0x2cce0e][_0x42c431(0x113)]==_0x42c431(0x100)?_0x5741b3[_0x2cce0e][_0x42c431(0x113)]():_0x5741b3[_0x2cce0e];_0x227172[_0x42c431(0xe7)]=_0x2cce0e,_0x227172['type']=_0x322dd0['type'],_0x227172[_0x42c431(0x105)]=(0x0,lodash_1[_0x42c431(0xd2)])(_0x322dd0,'flags.label',_0x2cce0e),_0x227172[_0x42c431(0xcb)]=(0x0,lodash_1[_0x42c431(0xd2)])(_0x322dd0,'flags.default',''),_0x227172[_0x42c431(0xf2)]=(0x0,lodash_1[_0x42c431(0xd2)])(_0x322dd0,_0x42c431(0x108),'')==_0x42c431(0xf2),_0x227172[_0x42c431(0x109)]=(0x0,lodash_1['get'])(_0x322dd0,_0x42c431(0xf1),'');if(_0x322dd0[_0x42c431(0xcc)]=='object')_0x227172[_0x42c431(0xe0)]=getJoiRequest(_0x322dd0['keys']);else _0x322dd0[_0x42c431(0xcc)]=='array'&&_0x322dd0[_0x42c431(0xf0)]&&Array[_0x42c431(0xd9)](_0x322dd0[_0x42c431(0xf0)])&&_0x322dd0[_0x42c431(0xf0)][0x0]&&console[_0x42c431(0xdf)](_0x2cce0e+'-array',_0x322dd0);_0x322dd0['allow']&&Array['isArray'](_0x322dd0[_0x42c431(0xe3)])&&_0x322dd0[_0x42c431(0xe3)][_0x42c431(0xe6)]>0x0&&(_0x227172[_0x42c431(0x109)]=_0x42c431(0x106)+_0x322dd0[_0x42c431(0xe3)]['join'](',')+'];'+_0x227172[_0x42c431(0x109)]);if(_0x227172[_0x42c431(0xe7)]&&_0x227172[_0x42c431(0xcc)]){const _0x284d00={};for(const _0x2b0de8 of _0x322dd0[_0x42c431(0xdd)]||[]){if(_0x2b0de8[_0x42c431(0xfe)]===_0x42c431(0xef)&&_0x2b0de8[_0x42c431(0xed)])_0x284d00[_0x42c431(0xef)]=_0x2b0de8['args'][_0x42c431(0xb9)];else _0x2b0de8['name']==='max'&&(_0x284d00[_0x42c431(0xca)]=_0x2b0de8[_0x42c431(0xed)][_0x42c431(0xb9)]);}_0x227172[_0x42c431(0xdd)]=_0x284d00;}_0x227172[_0x42c431(0xe7)]&&_0x227172[_0x42c431(0x105)]&&_0x42a897[_0x42c431(0xd8)](_0x227172);}return _0x42a897;}function convertSchemaType(_0x39b05a){const _0x38445a=a8_0x394f18;switch(_0x39b05a){case _0x38445a(0x10b):return'object';case'Boolean':return _0x38445a(0x107);case _0x38445a(0xce):return _0x38445a(0x110);case _0x38445a(0xf3):return _0x38445a(0xc2);case _0x38445a(0xbf):return'file';default:return _0x38445a(0xc2);}}function convertTypeToString(_0x159162){const _0x3c1ca8=a8_0x394f18;switch(_0x159162){case decorator_1[_0x3c1ca8(0xc7)][_0x3c1ca8(0x116)]:return _0x3c1ca8(0xd1);case decorator_1['RouteParamTypes'][_0x3c1ca8(0x103)]:return _0x3c1ca8(0xee);case decorator_1[_0x3c1ca8(0xc7)][_0x3c1ca8(0x114)]:return'path';case decorator_1['RouteParamTypes'][_0x3c1ca8(0xf4)]:return _0x3c1ca8(0xfb);case decorator_1[_0x3c1ca8(0xc7)][_0x3c1ca8(0xc1)]:case decorator_1[_0x3c1ca8(0xc7)]['FILESSTREAM']:case decorator_1[_0x3c1ca8(0xc7)]['FILESTREAM']:return'file';default:return _0x3c1ca8(0xd1);}}
|
|
1
|
+
'use strict';const a8_0xf3b986=a8_0x12f9;function a8_0x12f9(_0x3ac628,_0x4d798c){const _0xff10f1=a8_0xff10();return a8_0x12f9=function(_0x12f965,_0x28562f){_0x12f965=_0x12f965-0x173;let _0x20e7c9=_0xff10f1[_0x12f965];return _0x20e7c9;},a8_0x12f9(_0x3ac628,_0x4d798c);}(function(_0x1388d3,_0x2e5b26){const _0xdef9ff=a8_0x12f9,_0x383f18=_0x1388d3();while(!![]){try{const _0x130d2f=parseInt(_0xdef9ff(0x18c))/0x1*(parseInt(_0xdef9ff(0x1ac))/0x2)+parseInt(_0xdef9ff(0x1bf))/0x3*(parseInt(_0xdef9ff(0x184))/0x4)+parseInt(_0xdef9ff(0x1c5))/0x5*(-parseInt(_0xdef9ff(0x1b3))/0x6)+-parseInt(_0xdef9ff(0x1b6))/0x7+-parseInt(_0xdef9ff(0x194))/0x8*(parseInt(_0xdef9ff(0x1bd))/0x9)+parseInt(_0xdef9ff(0x1b8))/0xa*(-parseInt(_0xdef9ff(0x190))/0xb)+parseInt(_0xdef9ff(0x1cf))/0xc;if(_0x130d2f===_0x2e5b26)break;else _0x383f18['push'](_0x383f18['shift']());}catch(_0x36f731){_0x383f18['push'](_0x383f18['shift']());}}}(a8_0xff10,0x59ec1));Object['defineProperty'](exports,a8_0xf3b986(0x1d3),{'value':!![]}),exports[a8_0xf3b986(0x176)]=void 0x0;const lodash_1=require(a8_0xf3b986(0x1ab)),validator_1=require('@anncic-api/validator'),decorator_1=require(a8_0xf3b986(0x19e)),decorator_2=require(a8_0xf3b986(0x19e)),decorator_3=require(a8_0xf3b986(0x19e)),action_1=require('../types/action');function getRoutes(_0x2ded97={'prefix':'/','module':![]}){const _0x8bfa95=a8_0xf3b986;var _0x541775,_0x4eb886;const _0x4b6d33=(0x0,decorator_3[_0x8bfa95(0x175)])(action_1['ACTION_KEY']),_0x20c255={},_0x1bee3a=Array[_0x8bfa95(0x18f)](_0x2ded97['filter']||[])?_0x2ded97[_0x8bfa95(0x182)]||[]:[_0x2ded97['filter']];_0x38fcfb:for(const _0x58e466 of _0x4b6d33){let _0x1a78e7=(0x0,decorator_3[_0x8bfa95(0x1c1)])(action_1[_0x8bfa95(0x1cc)],_0x58e466),_0x287ef8=(0x0,decorator_3['getClassMetadata'])(action_1[_0x8bfa95(0x19d)],_0x58e466);if(_0x1a78e7&&_0x287ef8){let _0x4a3103=_0x1a78e7['prefix'],_0x28c74c={};if(_0x2ded97[_0x8bfa95(0x192)]&&(0x0,lodash_1[_0x8bfa95(0x196)])(_0x1a78e7,'module',![])!=_0x2ded97[_0x8bfa95(0x192)])continue _0x38fcfb;else{if(_0x2ded97[_0x8bfa95(0x192)]===![]&&!!(0x0,lodash_1[_0x8bfa95(0x196)])(_0x1a78e7,'module',null))continue _0x38fcfb;}if(_0x2ded97['prefix']&&!_0x4a3103[_0x8bfa95(0x19c)](_0x2ded97[_0x8bfa95(0x1aa)]))continue _0x38fcfb;_0x4a3103!=='/'?(_0x28c74c[_0x8bfa95(0x187)]=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)][_0x8bfa95(0x1af)])||(/^\//[_0x8bfa95(0x1cb)](_0x4a3103)?_0x4a3103[_0x8bfa95(0x1b7)]('/')[0x1]:_0x4a3103),_0x28c74c['description']=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)][_0x8bfa95(0x1a6)])||_0x28c74c[_0x8bfa95(0x187)],_0x28c74c[_0x8bfa95(0x1a8)]=[]):(_0x28c74c['summary']=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7['routerOptions'][_0x8bfa95(0x1af)])||_0x8bfa95(0x1bb),_0x28c74c[_0x8bfa95(0x1a6)]=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)]['description'])||'',_0x28c74c['routes']=[]);_0x2ded97[_0x8bfa95(0x1cd)]&&(_0x28c74c['filepath']=_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x1cd)]);(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7['pprefix'])&&(_0x28c74c[_0x8bfa95(0x1aa)]=_0x1a78e7[_0x8bfa95(0x188)]);(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x192)])&&(_0x28c74c[_0x8bfa95(0x192)]=_0x1a78e7['module']);let _0x5685b4=(0x0,decorator_3[_0x8bfa95(0x1c1)])(decorator_2['INJECT_CUSTOM_PARAM'],_0x58e466)||{};if(typeof _0x287ef8[Symbol[_0x8bfa95(0x197)]]===_0x8bfa95(0x1ba))for(let _0x2f3c8f of _0x287ef8){let _0x14fba4={};_0x14fba4[_0x8bfa95(0x1a2)]=_0x2f3c8f['requestMethod'],_0x14fba4['route']=(_0x4a3103+_0x2f3c8f['path'])[_0x8bfa95(0x18a)](/\/{1,}/,'/'),_0x14fba4[_0x8bfa95(0x187)]=(_0x2f3c8f===null||_0x2f3c8f===void 0x0?void 0x0:_0x2f3c8f[_0x8bfa95(0x1b4)])||_0x28c74c[_0x8bfa95(0x187)]||_0x8bfa95(0x1bb),_0x14fba4[_0x8bfa95(0x1a6)]=(_0x2f3c8f===null||_0x2f3c8f===void 0x0?void 0x0:_0x2f3c8f[_0x8bfa95(0x1a6)])||'',_0x14fba4['request']=[];if(!(0x0,lodash_1[_0x8bfa95(0x19c)])(_0x14fba4['route'],_0x8bfa95(0x1c6))&&!(0x0,lodash_1[_0x8bfa95(0x19c)])(_0x14fba4[_0x8bfa95(0x198)],'/static/apitest')&&_0x1bee3a[_0x8bfa95(0x1bc)](_0x14fba4[_0x8bfa95(0x198)])===-0x1){if(!(_0x2ded97===null||_0x2ded97===void 0x0?void 0x0:_0x2ded97['noreq'])){let _0x2898af=(0x0,decorator_3[_0x8bfa95(0x189)])(new _0x58e466(),_0x2f3c8f[_0x8bfa95(0x1a2)]);for(const _0x34bba5 in _0x2898af){let _0x407470=(_0x541775=_0x5685b4[_0x2f3c8f['method']])===null||_0x541775===void 0x0?void 0x0:_0x541775[_0x8bfa95(0x186)](_0x5d9914=>_0x5d9914[_0x8bfa95(0x1c3)]==_0x34bba5&&_0x5d9914['key']===decorator_2[_0x8bfa95(0x183)]&&(_0x5d9914===null||_0x5d9914===void 0x0?void 0x0:_0x5d9914[_0x8bfa95(0x18e)]));if(_0x407470===null||_0x407470===void 0x0?void 0x0:_0x407470[_0x8bfa95(0x18e)]){let _0x4c3ab4=convertTypeToString(_0x407470[_0x8bfa95(0x18e)]['type']||0x0);if([_0x8bfa95(0x177),_0x8bfa95(0x1c0)][_0x8bfa95(0x1bc)](_0x4c3ab4)!=-0x1&&_0x407470['metadata'][_0x8bfa95(0x17d)][_0x8bfa95(0x1bc)](':')==-0x1&&!_0x14fba4[_0x8bfa95(0x1ce)][_0x8bfa95(0x186)](_0x31d5fb=>_0x31d5fb[_0x8bfa95(0x181)]==_0x407470[_0x8bfa95(0x18e)][_0x8bfa95(0x17d)]))_0x14fba4['request']['push']({'key':_0x407470['metadata']['propertyData'],'title':_0x407470[_0x8bfa95(0x18e)][_0x8bfa95(0x17d)],'type':convertSchemaType(_0x2898af[_0x407470[_0x8bfa95(0x1c3)]][_0x8bfa95(0x17e)]),'required':![],'default':'','desc':''});else{if(_0x4c3ab4==_0x8bfa95(0x17c)){let _0xa2bcce=((_0x4eb886=_0x407470===null||_0x407470===void 0x0?void 0x0:_0x407470[_0x8bfa95(0x18e)])===null||_0x4eb886===void 0x0?void 0x0:_0x4eb886[_0x8bfa95(0x17d)])||_0x8bfa95(0x17c);_0xa2bcce[_0x8bfa95(0x1bc)](':')==-0x1&&!_0x14fba4['request'][_0x8bfa95(0x186)](_0x4616c9=>_0x4616c9[_0x8bfa95(0x181)]==_0xa2bcce&&_0x4616c9['type']==_0x8bfa95(0x17c))&&_0x14fba4[_0x8bfa95(0x1ce)]['push']({'key':_0xa2bcce,'title':_0x8bfa95(0x18b)+_0xa2bcce,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x39eb79=(0x0,decorator_3[_0x8bfa95(0x1a4)])(validator_1[_0x8bfa95(0x1a7)],_0x2898af[_0x34bba5]);_0x39eb79&&_0x14fba4['request'][_0x8bfa95(0x18d)](...getJoiRequest(_0x39eb79));}}}_0x28c74c[_0x8bfa95(0x1a8)]['push'](_0x14fba4);}}if(_0x28c74c[_0x8bfa95(0x1a8)][_0x8bfa95(0x19b)]>0x0){let _0x32b31f=_0x20c255[_0x4a3103];_0x32b31f?(_0x32b31f[_0x8bfa95(0x187)]!=_0x28c74c[_0x8bfa95(0x187)]&&(_0x32b31f[_0x8bfa95(0x187)]=_0x32b31f[_0x8bfa95(0x187)]+','+_0x28c74c[_0x8bfa95(0x187)]),_0x32b31f[_0x8bfa95(0x1a6)]!=_0x28c74c['description']&&(_0x32b31f['description']=_0x32b31f[_0x8bfa95(0x1a6)]+','+_0x28c74c['description']),_0x32b31f[_0x8bfa95(0x1a8)]=_0x32b31f[_0x8bfa95(0x1a8)][_0x8bfa95(0x1d2)](_0x28c74c['routes']),_0x20c255[_0x4a3103]=_0x32b31f):_0x20c255[_0x4a3103]=_0x28c74c;}}}return _0x20c255;}function a8_0xff10(){const _0x4394cf=['flags.description','file','propertyData','name','header','min','key','filter','WEB_ROUTER_PARAM_KEY','1684xWAwNm','QUERY','find','summary','pprefix','getMethodParamTypes','replace','文件上传-','79wJVTpp','push','metadata','isArray','11YnWaVT','Boolean','module','string','54096eGYxyr','Object','get','iterator','route','rules','log','length','startsWith','ACTION_ROUTE_KEY','@midwayjs/decorator','RouteParamTypes','required','allow','method','FIELDS','getClassExtendedMetadata','boolean','description','RULES_KEY','routes','HEADERS','prefix','lodash','10178DNOlQH','limit','Number','tagName','join','FILESTREAM','File','60zuFBBI','routerName','title','2637271yKGWzC','split','4377210GUjCNi','flags.default','function','default','indexOf','189DryTVg','object','1257RPfkly','body','getClassMetadata','args','parameterIndex','path','216305AoMYIt','static/apitest','keys','describe','type','FILESSTREAM','test','ACTION_KEY','filepath','request','14147724umaAnv','BODY','-array','concat','__esModule','routerOptions','max','listModule','getRoutes','query','只允许:[','flags.presence','items'];a8_0xff10=function(){return _0x4394cf;};return a8_0xff10();}exports[a8_0xf3b986(0x176)]=getRoutes;function getJoiRequest(_0x215576){const _0x38aca9=a8_0xf3b986,_0x47d43e=[];for(let _0x2cd126 in _0x215576){const _0x498f0c={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x5bb99a=typeof _0x215576[_0x2cd126][_0x38aca9(0x1c8)]=='function'?_0x215576[_0x2cd126][_0x38aca9(0x1c8)]():_0x215576[_0x2cd126];_0x498f0c[_0x38aca9(0x181)]=_0x2cd126,_0x498f0c['type']=_0x5bb99a['type'],_0x498f0c['title']=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,'flags.label',_0x2cd126),_0x498f0c[_0x38aca9(0x1bb)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x1b9),''),_0x498f0c[_0x38aca9(0x1a0)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x179),'')==_0x38aca9(0x1a0),_0x498f0c[_0x38aca9(0x1a6)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x17b),'');if(_0x5bb99a[_0x38aca9(0x1c9)]=='object')_0x498f0c['children']=getJoiRequest(_0x5bb99a[_0x38aca9(0x1c7)]);else _0x5bb99a['type']=='array'&&_0x5bb99a['items']&&Array[_0x38aca9(0x18f)](_0x5bb99a[_0x38aca9(0x17a)])&&_0x5bb99a[_0x38aca9(0x17a)][0x0]&&console[_0x38aca9(0x19a)](_0x2cd126+_0x38aca9(0x1d1),_0x5bb99a);_0x5bb99a['allow']&&Array[_0x38aca9(0x18f)](_0x5bb99a[_0x38aca9(0x1a1)])&&_0x5bb99a[_0x38aca9(0x1a1)][_0x38aca9(0x19b)]>0x0&&(_0x498f0c[_0x38aca9(0x1a6)]=_0x38aca9(0x178)+_0x5bb99a[_0x38aca9(0x1a1)][_0x38aca9(0x1b0)](',')+'];'+_0x498f0c[_0x38aca9(0x1a6)]);if(_0x498f0c[_0x38aca9(0x181)]&&_0x498f0c[_0x38aca9(0x1c9)]){const _0x5d57be={};for(const _0x29498f of _0x5bb99a[_0x38aca9(0x199)]||[]){if(_0x29498f['name']===_0x38aca9(0x180)&&_0x29498f[_0x38aca9(0x1c2)])_0x5d57be['min']=_0x29498f[_0x38aca9(0x1c2)][_0x38aca9(0x1ad)];else _0x29498f[_0x38aca9(0x17e)]===_0x38aca9(0x174)&&(_0x5d57be[_0x38aca9(0x174)]=_0x29498f[_0x38aca9(0x1c2)][_0x38aca9(0x1ad)]);}_0x498f0c['rules']=_0x5d57be;}_0x498f0c['key']&&_0x498f0c[_0x38aca9(0x1b5)]&&_0x47d43e[_0x38aca9(0x18d)](_0x498f0c);}return _0x47d43e;}function convertSchemaType(_0x5d78a7){const _0x3c0c7d=a8_0xf3b986;switch(_0x5d78a7){case _0x3c0c7d(0x195):return _0x3c0c7d(0x1be);case _0x3c0c7d(0x191):return _0x3c0c7d(0x1a5);case _0x3c0c7d(0x1ae):return'number';case'String':return _0x3c0c7d(0x193);case _0x3c0c7d(0x1b2):return'file';default:return _0x3c0c7d(0x193);}}function convertTypeToString(_0x5c7506){const _0x3f363a=a8_0xf3b986;switch(_0x5c7506){case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1a9)]:return _0x3f363a(0x17f);case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x185)]:return _0x3f363a(0x177);case decorator_1['RouteParamTypes']['PARAM']:return _0x3f363a(0x1c4);case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1d0)]:return'body';case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1a3)]:case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1ca)]:case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1b1)]:return _0x3f363a(0x17c);default:return'header';}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0xfd43cd=a9_0x1837;(function(_0x23d97f,_0xfc97d2){var _0x44ef8b=a9_0x1837,_0x4cfe52=_0x23d97f();while(!![]){try{var _0x4ab847=-parseInt(_0x44ef8b(0x1a4))/0x1*(parseInt(_0x44ef8b(0x1d8))/0x2)+-parseInt(_0x44ef8b(0x1d1))/0x3+-parseInt(_0x44ef8b(0x1d6))/0x4+parseInt(_0x44ef8b(0x1c3))/0x5*(parseInt(_0x44ef8b(0x1cc))/0x6)+parseInt(_0x44ef8b(0x1aa))/0x7+-parseInt(_0x44ef8b(0x1b0))/0x8+parseInt(_0x44ef8b(0x1d9))/0x9*(parseInt(_0x44ef8b(0x1c8))/0xa);if(_0x4ab847===_0xfc97d2)break;else _0x4cfe52['push'](_0x4cfe52['shift']());}catch(_0x5ae71b){_0x4cfe52['push'](_0x4cfe52['shift']());}}}(a9_0x5866,0xae2bc));function a9_0x1837(_0x6a8f80,_0x1c257a){var _0x586693=a9_0x5866();return a9_0x1837=function(_0x1837b4,_0x568e1c){_0x1837b4=_0x1837b4-0x1a2;var _0x490599=_0x586693[_0x1837b4];return _0x490599;},a9_0x1837(_0x6a8f80,_0x1c257a);}var __createBinding=this&&this[a9_0xfd43cd(0x1b4)]||(Object[a9_0xfd43cd(0x1ce)]?function(_0x45740d,_0x34850a,_0x4e3e57,_0x294640){var _0x4fa853=a9_0xfd43cd;if(_0x294640===undefined)_0x294640=_0x4e3e57;var _0x19f08a=Object[_0x4fa853(0x1b5)](_0x34850a,_0x4e3e57);(!_0x19f08a||('get'in _0x19f08a?!_0x34850a['__esModule']:_0x19f08a[_0x4fa853(0x1c6)]||_0x19f08a[_0x4fa853(0x1b3)]))&&(_0x19f08a={'enumerable':!![],'get':function(){return _0x34850a[_0x4e3e57];}}),Object[_0x4fa853(0x1a5)](_0x45740d,_0x294640,_0x19f08a);}:function(_0xbcae38,_0x1baaba,_0x2cc7af,_0x5ded20){if(_0x5ded20===undefined)_0x5ded20=_0x2cc7af;_0xbcae38[_0x5ded20]=_0x1baaba[_0x2cc7af];}),__exportStar=this&&this['__exportStar']||function(_0xa33689,_0x43fa11){var _0x491613=a9_0xfd43cd;for(var _0x5b68c8 in _0xa33689)if(_0x5b68c8!==_0x491613(0x1bf)&&!Object[_0x491613(0x1b8)]['hasOwnProperty'][_0x491613(0x1b7)](_0x43fa11,_0x5b68c8))__createBinding(_0x43fa11,_0xa33689,_0x5b68c8);};Object['defineProperty'](exports,a9_0xfd43cd(0x1cb),{'value':!![]}),exports['ScopeEnum']=exports[a9_0xfd43cd(0x1c2)]=exports[a9_0xfd43cd(0x1c4)]=exports['Provide']=exports[a9_0xfd43cd(0x1ae)]=exports[a9_0xfd43cd(0x1c9)]=exports['App']=exports['Init']=exports['Headers']=exports[a9_0xfd43cd(0x1c5)]=exports['Param']=exports[a9_0xfd43cd(0x1b1)]=exports[a9_0xfd43cd(0x1b2)]=exports['Files']=exports[a9_0xfd43cd(0x1d2)]=exports['Configuration']=exports[a9_0xfd43cd(0x1a6)]=exports[a9_0xfd43cd(0x1cd)]=exports[a9_0xfd43cd(0x1a7)]=exports[a9_0xfd43cd(0x1dd)]=exports[a9_0xfd43cd(0x1a3)]=exports['CacheService']=exports[a9_0xfd43cd(0x1db)]=exports['ApiError']=exports['Apitest']=exports['Action']=exports[a9_0xfd43cd(0x1a2)]=exports['getRoutes']=void 0x0,__exportStar(require(a9_0xfd43cd(0x1bc)),exports),__exportStar(require(a9_0xfd43cd(0x1b9)),exports);var getRoutes_1=require('./helper/getRoutes');Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1b6),{'enumerable':!![],'get':function(){var _0x5dc52e=a9_0xfd43cd;return getRoutes_1[_0x5dc52e(0x1b6)];}});var ActionApi_1=require(a9_0xfd43cd(0x1c1));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1a2),{'enumerable':!![],'get':function(){return ActionApi_1['Api'];}});var Action_1=require(a9_0xfd43cd(0x1d7));Object['defineProperty'](exports,a9_0xfd43cd(0x1bb),{'enumerable':!![],'get':function(){var _0x506d3f=a9_0xfd43cd;return Action_1[_0x506d3f(0x1bb)];}});var ActionApitest_1=require(a9_0xfd43cd(0x1be));Object[a9_0xfd43cd(0x1a5)](exports,'Apitest',{'enumerable':!![],'get':function(){return ActionApitest_1['Apitest'];}});var ApiError_1=require(a9_0xfd43cd(0x1af));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c7),{'enumerable':!![],'get':function(){var _0x3026de=a9_0xfd43cd;return ApiError_1[_0x3026de(0x1c7)];}});var task_1=require('@midwayjs/task');Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1db),{'enumerable':!![],'get':function(){return task_1['QueueService'];}});var cache_1=require(a9_0xfd43cd(0x1a8));Object['defineProperty'](exports,a9_0xfd43cd(0x1ac),{'enumerable':!![],'get':function(){return cache_1['CacheService'];}});var event_1=require(a9_0xfd43cd(0x1da));Object[a9_0xfd43cd(0x1a5)](exports,'EventService',{'enumerable':!![],'get':function(){var _0x556dc1=a9_0xfd43cd;return event_1[_0x556dc1(0x1a3)];}});var ApiService_1=require(a9_0xfd43cd(0x1d5));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1dd),{'enumerable':!![],'get':function(){return ApiService_1['ApiService'];}});var ExcelService_1=require(a9_0xfd43cd(0x1ab));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1a7),{'enumerable':!![],'get':function(){var _0x4f9522=a9_0xfd43cd;return ExcelService_1[_0x4f9522(0x1a7)];}});var validator_1=require('@anncic-api/validator');Object[a9_0xfd43cd(0x1a5)](exports,'ValidatorError',{'enumerable':!![],'get':function(){return validator_1['ValidatorError'];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1a6),{'enumerable':!![],'get':function(){return validator_1['ValidatorService'];}});var configuration_1=require(a9_0xfd43cd(0x1ba));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1ca),{'enumerable':!![],'get':function(){var _0x2bec80=a9_0xfd43cd;return configuration_1[_0x2bec80(0x1bd)];}});function a9_0x5866(){var _0x3f3c8b=['ValidatorError','create','Param','Provide','2291976FxHRXH','File','Files','Headers','./service/ApiService','1310676QxyRSY','./decorator/Action','32EShRAb','531eYETnJ','@anncic-api/event','QueueService','@midwayjs/decorator','ApiService','Api','EventService','68217siEDMK','defineProperty','ValidatorService','ExcelService','@anncic-api/cache','Init','9730119hHsBpH','./service/ExcelService','CacheService','App','Logger','./exception/ApiError','150712RZyrSc','Body','Fields','configurable','__createBinding','getOwnPropertyDescriptor','getRoutes','call','prototype','./service/ApitestService','./configuration','Action','./types/common','CustomConfiguration','./decorator/ActionApitest','default','ScopeEnum','./decorator/ActionApi','Scope','770285UeznTP','Inject','Query','writable','ApiError','154090hGdfDM','Config','Configuration','__esModule','24rPfHan'];a9_0x5866=function(){return _0x3f3c8b;};return a9_0x5866();}var decorator_1=require(a9_0xfd43cd(0x1dc));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1d2),{'enumerable':!![],'get':function(){var _0x36f97e=a9_0xfd43cd;return decorator_1[_0x36f97e(0x1d2)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1d3),{'enumerable':!![],'get':function(){return decorator_1['Files'];}}),Object[a9_0xfd43cd(0x1a5)](exports,'Fields',{'enumerable':!![],'get':function(){var _0xaa3df5=a9_0xfd43cd;return decorator_1[_0xaa3df5(0x1b2)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1b1),{'enumerable':!![],'get':function(){var _0x174267=a9_0xfd43cd;return decorator_1[_0x174267(0x1b1)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1cf),{'enumerable':!![],'get':function(){var _0xe8cea3=a9_0xfd43cd;return decorator_1[_0xe8cea3(0x1cf)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1c5),{'enumerable':!![],'get':function(){var _0xe0a7ce=a9_0xfd43cd;return decorator_1[_0xe0a7ce(0x1c5)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1d4),{'enumerable':!![],'get':function(){return decorator_1['Headers'];}}),Object[a9_0xfd43cd(0x1a5)](exports,'Init',{'enumerable':!![],'get':function(){var _0x2dba2d=a9_0xfd43cd;return decorator_1[_0x2dba2d(0x1a9)];}});var decorator_2=require(a9_0xfd43cd(0x1dc));Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1ad),{'enumerable':!![],'get':function(){var _0x231ff3=a9_0xfd43cd;return decorator_2[_0x231ff3(0x1ad)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c9),{'enumerable':!![],'get':function(){var _0x4a2b1c=a9_0xfd43cd;return decorator_2[_0x4a2b1c(0x1c9)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1ae),{'enumerable':!![],'get':function(){var _0x30641b=a9_0xfd43cd;return decorator_2[_0x30641b(0x1ae)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1d0),{'enumerable':!![],'get':function(){var _0x4c0742=a9_0xfd43cd;return decorator_2[_0x4c0742(0x1d0)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c4),{'enumerable':!![],'get':function(){var _0x327997=a9_0xfd43cd;return decorator_2[_0x327997(0x1c4)];}}),Object['defineProperty'](exports,a9_0xfd43cd(0x1c2),{'enumerable':!![],'get':function(){var _0x7cc147=a9_0xfd43cd;return decorator_2[_0x7cc147(0x1c2)];}}),Object[a9_0xfd43cd(0x1a5)](exports,a9_0xfd43cd(0x1c0),{'enumerable':!![],'get':function(){var _0x5c079e=a9_0xfd43cd;return decorator_2[_0x5c079e(0x1c0)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a10_0x19e652=a10_0x34eb;(function(_0x108c48,_0x45ae3a){var _0x32fdc8=a10_0x34eb,_0x6602ff=_0x108c48();while(!![]){try{var _0x2ff977=-parseInt(_0x32fdc8(0x92))/0x1*(parseInt(_0x32fdc8(0xa7))/0x2)+parseInt(_0x32fdc8(0x8d))/0x3*(-parseInt(_0x32fdc8(0x87))/0x4)+-parseInt(_0x32fdc8(0x97))/0x5+parseInt(_0x32fdc8(0xb3))/0x6+parseInt(_0x32fdc8(0x86))/0x7+parseInt(_0x32fdc8(0xb1))/0x8+parseInt(_0x32fdc8(0x91))/0x9;if(_0x2ff977===_0x45ae3a)break;else _0x6602ff['push'](_0x6602ff['shift']());}catch(_0x17eab0){_0x6602ff['push'](_0x6602ff['shift']());}}}(a10_0x2294,0x4b6df));var __decorate=this&&this[a10_0x19e652(0x8b)]||function(_0xafbfae,_0x489c84,_0x36aa33,_0x3d3477){var _0xc8c169=a10_0x19e652,_0x8d83f7=arguments[_0xc8c169(0xa0)],_0x443e5e=_0x8d83f7<0x3?_0x489c84:_0x3d3477===null?_0x3d3477=Object[_0xc8c169(0xad)](_0x489c84,_0x36aa33):_0x3d3477,_0x44762b;if(typeof Reflect===_0xc8c169(0xb8)&&typeof Reflect[_0xc8c169(0xac)]===_0xc8c169(0xa2))_0x443e5e=Reflect['decorate'](_0xafbfae,_0x489c84,_0x36aa33,_0x3d3477);else{for(var _0x17d5ed=_0xafbfae[_0xc8c169(0xa0)]-0x1;_0x17d5ed>=0x0;_0x17d5ed--)if(_0x44762b=_0xafbfae[_0x17d5ed])_0x443e5e=(_0x8d83f7<0x3?_0x44762b(_0x443e5e):_0x8d83f7>0x3?_0x44762b(_0x489c84,_0x36aa33,_0x443e5e):_0x44762b(_0x489c84,_0x36aa33))||_0x443e5e;}return _0x8d83f7>0x3&&_0x443e5e&&Object[_0xc8c169(0x9a)](_0x489c84,_0x36aa33,_0x443e5e),_0x443e5e;},__metadata=this&&this[a10_0x19e652(0x99)]||function(_0xc5b331,_0x4f1a51){var _0x39e8fc=a10_0x19e652;if(typeof Reflect===_0x39e8fc(0xb8)&&typeof Reflect[_0x39e8fc(0x9d)]===_0x39e8fc(0xa2))return Reflect['metadata'](_0xc5b331,_0x4f1a51);};Object[a10_0x19e652(0x9a)](exports,a10_0x19e652(0xb5),{'value':!![]}),exports[a10_0x19e652(0x90)]=void 0x0;function a10_0x34eb(_0x47e7fb,_0x41f2fb){var _0x22945c=a10_0x2294();return a10_0x34eb=function(_0x34eb53,_0x5d1ed8){_0x34eb53=_0x34eb53-0x82;var _0x268168=_0x22945c[_0x34eb53];return _0x268168;},a10_0x34eb(_0x47e7fb,_0x41f2fb);}const crypto_js_1=require(a10_0x19e652(0xaa)),decorator_1=require('@midwayjs/decorator'),ApiError_1=require(a10_0x19e652(0xb4));function a10_0x2294(){var _0x5ebee1=['push','password','object','Scope','entries','TIMEOUT','Singleton','sort','Provide','timeout','728539XCglJs','574532QXFFuF','config','signature','getcheck','__decorate','缺少头信息:signature','12nBwrkJ','map','ApiError','ApiService','11331558kzjUMc','3VPHmXp','toString','HEADERS_DEVICE','HEADERS_SIGNATURE','now','2262740rlyqYa','checksign','__metadata','defineProperty','HEADERS_LACK','getsign','metadata','checkcode','Config','length','devices','function','toLowerCase','token','join','design:type','106662kOKDuL','logintime','prototype','crypto-js','MD5','decorate','getOwnPropertyDescriptor','fromEntries','device','缺少头信息:','796376PtSoqP','undefined','200076oVYMfG','../exception/ApiError','__esModule'];a10_0x2294=function(){return _0x5ebee1;};return a10_0x2294();}let ApiService=class ApiService{[a10_0x19e652(0xb7)](_0x19393f){var _0x3b94ee=a10_0x19e652,_0x48d247;return _0x19393f?(0x0,crypto_js_1[_0x3b94ee(0xab)])(_0x19393f+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1[_0x3b94ee(0xab)])(_0x19393f)[_0x3b94ee(0x93)]()+((_0x48d247=this[_0x3b94ee(0x88)])===null||_0x48d247===void 0x0?void 0x0:_0x48d247[_0x3b94ee(0xb7)]))[_0x3b94ee(0x93)]())[_0x3b94ee(0x93)]():'';}[a10_0x19e652(0x8a)](_0x3fcd2c,_0x339493,_0x561669=Date[a10_0x19e652(0x96)]()){var _0x2d49e8=a10_0x19e652;return{'Token':_0x3fcd2c,'Logintime':_0x561669,'Checkcode':this[_0x2d49e8(0x9e)](_0x3fcd2c,_0x339493,_0x561669)};}[a10_0x19e652(0x9c)](_0x38c5e6={}){var _0x447e0b=a10_0x19e652;const _0x3c942f=[],_0x2042e1=Object[_0x447e0b(0xae)](Object[_0x447e0b(0xba)](_0x38c5e6)['map'](_0x1be6c0=>[_0x1be6c0[0x0]['toLowerCase'](),_0x1be6c0[0x1]]));for(let _0x4f3b3b of[_0x447e0b(0xaf),'requesttime',_0x447e0b(0xa4),_0x447e0b(0xa8),_0x447e0b(0x9e)]){if(typeof _0x2042e1[_0x4f3b3b]==_0x447e0b(0xb2))throw new AnnError(ApiError_1[_0x447e0b(0x8f)][_0x447e0b(0x9b)],{'message':_0x447e0b(0xb0)+_0x4f3b3b});_0x3c942f[_0x447e0b(0xb6)](_0x4f3b3b+'='+_0x2042e1[_0x4f3b3b]);}if(Math['abs'](_0x2042e1['requesttime'])-Date['now']()>this[_0x447e0b(0x88)][_0x447e0b(0x85)])throw new AnnError(ApiError_1[_0x447e0b(0x8f)][_0x447e0b(0xbb)]);if(!this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]]||!this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]]['secret']||!this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]][_0x447e0b(0x9e)])throw new AnnError(ApiError_1[_0x447e0b(0x8f)][_0x447e0b(0x94)]);if(_0x2042e1[_0x447e0b(0xa4)]&&_0x2042e1[_0x447e0b(0x9e)]!=this[_0x447e0b(0x9e)](_0x2042e1[_0x447e0b(0xa4)],_0x2042e1[_0x447e0b(0xaf)],_0x2042e1[_0x447e0b(0xa8)]))throw new AnnError(ApiError_1[_0x447e0b(0x8f)]['HEADERS_CHECKCODE']);return _0x3c942f['push']('secret='+this[_0x447e0b(0x88)][_0x447e0b(0xa1)][_0x2042e1[_0x447e0b(0xaf)]]['secret']),(0x0,crypto_js_1[_0x447e0b(0xab)])(_0x3c942f[_0x447e0b(0x83)]()[_0x447e0b(0xa5)](''))[_0x447e0b(0x93)]();}[a10_0x19e652(0x9e)](_0x12d222,_0x315d1c,_0x4f685f=Date[a10_0x19e652(0x96)]()){var _0xddfbb2=a10_0x19e652,_0x3e055e,_0x398cff,_0xc7c875;if(!((_0x3e055e=this[_0xddfbb2(0x88)])===null||_0x3e055e===void 0x0?void 0x0:_0x3e055e[_0xddfbb2(0xa1)][_0x315d1c])||!((_0xc7c875=(_0x398cff=this[_0xddfbb2(0x88)])===null||_0x398cff===void 0x0?void 0x0:_0x398cff[_0xddfbb2(0xa1)][_0x315d1c])===null||_0xc7c875===void 0x0?void 0x0:_0xc7c875[_0xddfbb2(0x9e)]))throw new AnnError(ApiError_1[_0xddfbb2(0x8f)][_0xddfbb2(0x94)]);return(0x0,crypto_js_1[_0xddfbb2(0xab)])(_0x12d222+(0x0,crypto_js_1[_0xddfbb2(0xab)])(_0x4f685f+this[_0xddfbb2(0x88)][_0xddfbb2(0xa1)][_0x315d1c][_0xddfbb2(0x9e)])['toString']())['toString']();}[a10_0x19e652(0x98)](_0x4e3203={}){var _0x59dd9b=a10_0x19e652;const _0x36634a=Object['fromEntries'](Object['entries'](_0x4e3203)[_0x59dd9b(0x8e)](_0x4d41e1=>[_0x4d41e1[0x0][_0x59dd9b(0xa3)](),_0x4d41e1[0x1]]));if(!(_0x36634a===null||_0x36634a===void 0x0?void 0x0:_0x36634a[_0x59dd9b(0x89)]))throw new AnnError(ApiError_1['ApiError'][_0x59dd9b(0x9b)],{'message':_0x59dd9b(0x8c)});if((_0x36634a===null||_0x36634a===void 0x0?void 0x0:_0x36634a[_0x59dd9b(0x89)])!=this[_0x59dd9b(0x9c)](_0x36634a))throw new AnnError(ApiError_1[_0x59dd9b(0x8f)][_0x59dd9b(0x95)]);return!![];}};__decorate([(0x0,decorator_1[a10_0x19e652(0x9f)])('anncicapi'),__metadata(a10_0x19e652(0xa6),Object)],ApiService[a10_0x19e652(0xa9)],a10_0x19e652(0x88),void 0x0),ApiService=__decorate([(0x0,decorator_1[a10_0x19e652(0x84)])(),(0x0,decorator_1[a10_0x19e652(0xb9)])(decorator_1['ScopeEnum'][a10_0x19e652(0x82)])],ApiService),exports['ApiService']=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11_0x42dc7b=a11_0x5341;function a11_0x5341(_0x5e35f8,_0x213a0d){const _0x5ce237=a11_0x5ce2();return a11_0x5341=function(_0x5341d1,_0x94c58c){_0x5341d1=_0x5341d1-0x142;let _0x3691f2=_0x5ce237[_0x5341d1];return _0x3691f2;},a11_0x5341(_0x5e35f8,_0x213a0d);}(function(_0x2d69bb,_0x1e1576){const _0x329667=a11_0x5341,_0x33dea6=_0x2d69bb();while(!![]){try{const _0x465db4=parseInt(_0x329667(0x15e))/0x1*(parseInt(_0x329667(0x154))/0x2)+-parseInt(_0x329667(0x18c))/0x3*(parseInt(_0x329667(0x184))/0x4)+-parseInt(_0x329667(0x148))/0x5+-parseInt(_0x329667(0x183))/0x6+parseInt(_0x329667(0x14e))/0x7*(-parseInt(_0x329667(0x159))/0x8)+-parseInt(_0x329667(0x168))/0x9+parseInt(_0x329667(0x15f))/0xa;if(_0x465db4===_0x1e1576)break;else _0x33dea6['push'](_0x33dea6['shift']());}catch(_0x291460){_0x33dea6['push'](_0x33dea6['shift']());}}}(a11_0x5ce2,0x856cc));var __decorate=this&&this[a11_0x42dc7b(0x145)]||function(_0x2ae53e,_0xb28340,_0x17f2ae,_0x520461){const _0x5c5f8c=a11_0x42dc7b;var _0x5a4a2e=arguments[_0x5c5f8c(0x170)],_0x14a9da=_0x5a4a2e<0x3?_0xb28340:_0x520461===null?_0x520461=Object[_0x5c5f8c(0x14b)](_0xb28340,_0x17f2ae):_0x520461,_0xb9f040;if(typeof Reflect===_0x5c5f8c(0x17c)&&typeof Reflect[_0x5c5f8c(0x143)]===_0x5c5f8c(0x18f))_0x14a9da=Reflect[_0x5c5f8c(0x143)](_0x2ae53e,_0xb28340,_0x17f2ae,_0x520461);else{for(var _0x4d6829=_0x2ae53e['length']-0x1;_0x4d6829>=0x0;_0x4d6829--)if(_0xb9f040=_0x2ae53e[_0x4d6829])_0x14a9da=(_0x5a4a2e<0x3?_0xb9f040(_0x14a9da):_0x5a4a2e>0x3?_0xb9f040(_0xb28340,_0x17f2ae,_0x14a9da):_0xb9f040(_0xb28340,_0x17f2ae))||_0x14a9da;}return _0x5a4a2e>0x3&&_0x14a9da&&Object[_0x5c5f8c(0x15c)](_0xb28340,_0x17f2ae,_0x14a9da),_0x14a9da;},__metadata=this&&this[a11_0x42dc7b(0x17d)]||function(_0x3ed288,_0x315b03){const _0x5abadc=a11_0x42dc7b;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x5abadc(0x18f))return Reflect['metadata'](_0x3ed288,_0x315b03);},__param=this&&this[a11_0x42dc7b(0x17e)]||function(_0x453eb1,_0x26ad04){return function(_0x5017b3,_0x2c9e64){_0x26ad04(_0x5017b3,_0x2c9e64,_0x453eb1);};};Object[a11_0x42dc7b(0x15c)](exports,'__esModule',{'value':!![]}),exports[a11_0x42dc7b(0x142)]=exports[a11_0x42dc7b(0x18b)]=void 0x0;const path_1=require('path'),fs_1=require('fs'),core_1=require(a11_0x42dc7b(0x16e)),decorator_1=require('@midwayjs/decorator'),decorator_2=require(a11_0x42dc7b(0x14c)),getRoutes_1=require(a11_0x42dc7b(0x17f));let ApitestService=class ApitestService{async['apidoc'](_0x7ccf9f){const _0x1e26a6=a11_0x42dc7b,_0x8458d3=(0x0,getRoutes_1[_0x1e26a6(0x165)])(_0x7ccf9f),_0x3a2cb7=[];for(let _0x431463 in _0x8458d3){for(let _0x388585 in _0x8458d3[_0x431463][_0x1e26a6(0x181)]){let _0x418a70=_0x8458d3[_0x431463][_0x1e26a6(0x181)][_0x388585],_0x34e82e=[];for(let _0x277d7d in _0x418a70['request']){_0x34e82e[_0x1e26a6(0x16f)](_0x418a70[_0x1e26a6(0x15a)][_0x277d7d]);}_0x3a2cb7[_0x1e26a6(0x16f)]({'title':_0x8458d3[_0x431463]['summary']+':'+_0x418a70['summary'],'prefix':_0x8458d3[_0x431463][_0x1e26a6(0x164)],'router':_0x418a70['route'],'method':_0x418a70[_0x1e26a6(0x16b)],'describe':_0x418a70[_0x1e26a6(0x14a)]||'','filepath':_0x8458d3[_0x431463]['filepath']||'','request':_0x34e82e});}}const _0x502aff=(0x0,path_1['join'])(__dirname,_0x1e26a6(0x146));return(0x0,fs_1[_0x1e26a6(0x18e)])(_0x502aff,{'encoding':_0x1e26a6(0x161)})[_0x1e26a6(0x14d)](/__res__/g,_0x1e26a6(0x158))[_0x1e26a6(0x14d)](_0x1e26a6(0x15d),JSON['stringify'](_0x3a2cb7))[_0x1e26a6(0x14d)](_0x1e26a6(0x150),JSON[_0x1e26a6(0x175)](this[_0x1e26a6(0x174)]['devices']));}};__decorate([(0x0,decorator_2[a11_0x42dc7b(0x176)])('anncicapi'),__metadata('design:type',Object)],ApitestService[a11_0x42dc7b(0x153)],'config',void 0x0),ApitestService=__decorate([(0x0,decorator_1[a11_0x42dc7b(0x160)])(a11_0x42dc7b(0x16c)),(0x0,decorator_2['Scope'])(decorator_2[a11_0x42dc7b(0x155)][a11_0x42dc7b(0x177)])],ApitestService),exports[a11_0x42dc7b(0x18b)]=ApitestService;function a11_0x5ce2(){const _0xf57ba0=['@midwayjs/core','push','length','/index.html','/apitest-:module','Environment','config','stringify','Config','Singleton','design:paramtypes','cache-control','module','apidoc','object','__metadata','__param','../helper/getRoutes','anncicapi','routes','public,\x20max-age=604800','3244086iBWPmU','4AwIgsE','design:type','design:returntype','.js','extname','apitesthtml','existsSync','ApitestService','2281746DWGqXk','Inject','readFileSync','function','ApitestStaticController','decorate','apitestmodule','__decorate','../../public/index.html','content-type','942510tucnmq','../../public/','description','getOwnPropertyDescriptor','@midwayjs/decorator','replace','133OCPIah','substring','__devices__','ctx','Get','prototype','8948yJfdKI','ScopeEnum','Param','filepath','/apiteststatic/','155352Jnfqfm','request','MidwayEnvironmentService','defineProperty','__apiList__','21YziCDW','30420040RwTvmC','Provide','utf-8','url','set','prefix','getRoutes','/apitest','text/css;\x20charset=utf-8','6576516OgiDXD','.css','isDevelopmentEnvironment','method','apitest','Controller'];a11_0x5ce2=function(){return _0xf57ba0;};return a11_0x5ce2();}let ApitestStaticController=class ApitestStaticController{async[a11_0x42dc7b(0x189)](){const _0x121779=a11_0x42dc7b;if(this['apitest']){const _0x40b4ef={'module':![]};return this[_0x121779(0x173)][_0x121779(0x16a)]()&&(_0x40b4ef[_0x121779(0x157)]=!![]),await this[_0x121779(0x18b)][_0x121779(0x17b)](_0x40b4ef);}return'';}async[a11_0x42dc7b(0x144)](_0x29a705){const _0x16075b=a11_0x42dc7b;if(this['apitest']){const _0x5ad1f4={'module':_0x29a705};return this[_0x16075b(0x173)]['isDevelopmentEnvironment']()&&(_0x5ad1f4[_0x16075b(0x157)]=!![]),await this[_0x16075b(0x18b)]['apidoc'](_0x5ad1f4);}return'';}async['apiteststatic'](){const _0x4d2487=a11_0x42dc7b;if((0x0,path_1['extname'])(this[_0x4d2487(0x151)][_0x4d2487(0x15a)]['url'])){var _0x108a80=(0x0,path_1['join'])(__dirname,_0x4d2487(0x149)+this['ctx'][_0x4d2487(0x15a)][_0x4d2487(0x162)][_0x4d2487(0x14d)]('/apiteststatic/','/'));if(_0x108a80[_0x4d2487(0x14f)](_0x108a80['length']-0xb)!=_0x4d2487(0x171)){this['ctx'][_0x4d2487(0x163)](_0x4d2487(0x179),_0x4d2487(0x182));if((0x0,path_1[_0x4d2487(0x188)])(this[_0x4d2487(0x151)][_0x4d2487(0x15a)][_0x4d2487(0x162)])==_0x4d2487(0x187))this[_0x4d2487(0x151)]['set']('content-type','application/javascript;\x20charset=utf-8');else(0x0,path_1['extname'])(this[_0x4d2487(0x151)][_0x4d2487(0x15a)][_0x4d2487(0x162)])==_0x4d2487(0x169)&&this['ctx'][_0x4d2487(0x163)](_0x4d2487(0x147),_0x4d2487(0x167));return(0x0,fs_1[_0x4d2487(0x18a)])(_0x108a80)&&(0x0,fs_1[_0x4d2487(0x18e)])(_0x108a80,{'encoding':_0x4d2487(0x161)});}}return'';}};__decorate([(0x0,decorator_2[a11_0x42dc7b(0x18d)])(),__metadata(a11_0x42dc7b(0x185),Object)],ApitestStaticController['prototype'],a11_0x42dc7b(0x151),void 0x0),__decorate([(0x0,decorator_2[a11_0x42dc7b(0x18d)])(),__metadata('design:type',core_1[a11_0x42dc7b(0x15b)])],ApitestStaticController[a11_0x42dc7b(0x153)],a11_0x42dc7b(0x173),void 0x0),__decorate([(0x0,decorator_2[a11_0x42dc7b(0x18d)])(),__metadata(a11_0x42dc7b(0x185),ApitestService)],ApitestStaticController[a11_0x42dc7b(0x153)],'ApitestService',void 0x0),__decorate([(0x0,decorator_2['Config'])('apitest'),__metadata(a11_0x42dc7b(0x185),Boolean)],ApitestStaticController['prototype'],a11_0x42dc7b(0x16c),void 0x0),__decorate([(0x0,decorator_2[a11_0x42dc7b(0x176)])(a11_0x42dc7b(0x180)),__metadata(a11_0x42dc7b(0x185),Object)],ApitestStaticController[a11_0x42dc7b(0x153)],a11_0x42dc7b(0x174),void 0x0),__decorate([(0x0,decorator_1[a11_0x42dc7b(0x152)])(a11_0x42dc7b(0x166)),__metadata(a11_0x42dc7b(0x185),Function),__metadata(a11_0x42dc7b(0x178),[]),__metadata(a11_0x42dc7b(0x186),Promise)],ApitestStaticController[a11_0x42dc7b(0x153)],'apitesthtml',null),__decorate([(0x0,decorator_1['Get'])(a11_0x42dc7b(0x172)),__param(0x0,(0x0,decorator_1[a11_0x42dc7b(0x156)])(a11_0x42dc7b(0x17a))),__metadata(a11_0x42dc7b(0x185),Function),__metadata(a11_0x42dc7b(0x178),[String]),__metadata(a11_0x42dc7b(0x186),Promise)],ApitestStaticController[a11_0x42dc7b(0x153)],'apitestmodule',null),__decorate([(0x0,decorator_1[a11_0x42dc7b(0x152)])('/apiteststatic/*'),__metadata('design:type',Function),__metadata(a11_0x42dc7b(0x178),[]),__metadata(a11_0x42dc7b(0x186),Promise)],ApitestStaticController[a11_0x42dc7b(0x153)],'apiteststatic',null),ApitestStaticController=__decorate([(0x0,decorator_1[a11_0x42dc7b(0x16d)])('/'),(0x0,decorator_2['Scope'])(decorator_2[a11_0x42dc7b(0x155)]['Request'])],ApitestStaticController),exports['ApitestStaticController']=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12_0x12321f=a12_0xb473;(function(_0x2c8449,_0x2de30d){const _0xc8b8cb=a12_0xb473,_0x1a9dc0=_0x2c8449();while(!![]){try{const _0x52fd1f=parseInt(_0xc8b8cb(0x18f))/0x1+parseInt(_0xc8b8cb(0x19b))/0x2+parseInt(_0xc8b8cb(0x167))/0x3+parseInt(_0xc8b8cb(0x161))/0x4*(-parseInt(_0xc8b8cb(0x181))/0x5)+-parseInt(_0xc8b8cb(0x17c))/0x6*(-parseInt(_0xc8b8cb(0x171))/0x7)+parseInt(_0xc8b8cb(0x168))/0x8+-parseInt(_0xc8b8cb(0x197))/0x9;if(_0x52fd1f===_0x2de30d)break;else _0x1a9dc0['push'](_0x1a9dc0['shift']());}catch(_0x50e905){_0x1a9dc0['push'](_0x1a9dc0['shift']());}}}(a12_0xd126,0xc4015));function a12_0xb473(_0x3549c9,_0x3c3eb8){const _0xd126b7=a12_0xd126();return a12_0xb473=function(_0xb4735e,_0xc4ff40){_0xb4735e=_0xb4735e-0x15e;let _0x5f3803=_0xd126b7[_0xb4735e];return _0x5f3803;},a12_0xb473(_0x3549c9,_0x3c3eb8);}var __decorate=this&&this[a12_0x12321f(0x174)]||function(_0x24d4ae,_0x232fc2,_0x179f9b,_0x2d71b8){const _0x585abb=a12_0x12321f;var _0x424645=arguments[_0x585abb(0x16f)],_0x5e2fc8=_0x424645<0x3?_0x232fc2:_0x2d71b8===null?_0x2d71b8=Object['getOwnPropertyDescriptor'](_0x232fc2,_0x179f9b):_0x2d71b8,_0x2ce3df;if(typeof Reflect===_0x585abb(0x18b)&&typeof Reflect['decorate']===_0x585abb(0x182))_0x5e2fc8=Reflect[_0x585abb(0x16a)](_0x24d4ae,_0x232fc2,_0x179f9b,_0x2d71b8);else{for(var _0x3c2ed0=_0x24d4ae['length']-0x1;_0x3c2ed0>=0x0;_0x3c2ed0--)if(_0x2ce3df=_0x24d4ae[_0x3c2ed0])_0x5e2fc8=(_0x424645<0x3?_0x2ce3df(_0x5e2fc8):_0x424645>0x3?_0x2ce3df(_0x232fc2,_0x179f9b,_0x5e2fc8):_0x2ce3df(_0x232fc2,_0x179f9b))||_0x5e2fc8;}return _0x424645>0x3&&_0x5e2fc8&&Object[_0x585abb(0x169)](_0x232fc2,_0x179f9b,_0x5e2fc8),_0x5e2fc8;},__metadata=this&&this[a12_0x12321f(0x18e)]||function(_0x3431fd,_0x336dc4){const _0xe0a68d=a12_0x12321f;if(typeof Reflect===_0xe0a68d(0x18b)&&typeof Reflect[_0xe0a68d(0x175)]===_0xe0a68d(0x182))return Reflect['metadata'](_0x3431fd,_0x336dc4);};Object[a12_0x12321f(0x169)](exports,a12_0x12321f(0x177),{'value':!![]}),exports[a12_0x12321f(0x193)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x12321f(0x188)),koasend=require(a12_0x12321f(0x198)),decorator_1=require(a12_0x12321f(0x19c));function a12_0xd126(){const _0x292bbd=['14943780pbUVpF','koa-send','log','app','1297394cvNvlO','@midwayjs/decorator','getRow','eachCell','header','132toIIFl','existsSync','random','toString','worksheets','handler','2114922VTkEyW','4126960aWOkxQ','defineProperty','decorate','Sheet\x201','getCell','frozen','columns','length','Scope','172802ilSZNT','Singleton','findRows','__decorate','metadata','\x20is\x20read\x20fail','__esModule','Api\x20Excel\x20Error:\x20','get','Workbook','col','234AIzqjJ','isNumber','replace','public/xlsx','startsWith','210505ejSEOJ','function','readFile','/public/xlsx/','prototype','App','substring','exceljs','getAppDir','endsWith','object','design:type','push','__metadata','1020295zaOYTd','ScopeEnum','value','xlsx','ExcelService','key','writeFile','mkdirSync'];a12_0xd126=function(){return _0x292bbd;};return a12_0xd126();}let ExcelService=class ExcelService{async['parse'](_0x38fc9d,_0x1a3b05,_0x704594=[0x0]){const _0x193408=a12_0x12321f;var _0x43332,_0x423da8;const _0x58d089=new exceljs[(_0x193408(0x17a))](),_0x2f92a1=[];let _0x2a53e7=_0x38fc9d[_0x193408(0x17e)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/');!(_0x2a53e7===null||_0x2a53e7===void 0x0?void 0x0:_0x2a53e7['startsWith']('/'))&&(_0x2a53e7=this[_0x193408(0x19a)][_0x193408(0x189)]()+'/'+_0x2a53e7);try{await _0x58d089[_0x193408(0x192)][_0x193408(0x183)](_0x2a53e7);}catch(_0x45391a){return console[_0x193408(0x199)](_0x193408(0x178)+_0x2a53e7+_0x193408(0x176)),_0x2f92a1;}for(const _0x1e4aec of _0x704594){const _0x1318ad=lodash[_0x193408(0x17d)](_0x1e4aec)?((_0x43332=_0x58d089[_0x193408(0x165)])===null||_0x43332===void 0x0?void 0x0:_0x43332[_0x1e4aec])||undefined:_0x58d089['getWorksheet'](_0x1e4aec);if(_0x1318ad){var _0x23124f=0x1;const _0x4fed4b=_0x1318ad[_0x193408(0x15e)](0x1),_0x4a5023=await new Promise(_0x5aa6a1=>{const _0x16850c=_0x193408,_0x4350a2={};_0x4fed4b[_0x16850c(0x15f)]((_0x472651,_0x36c357)=>{const _0x11dcad=_0x16850c;for(const _0x340b48 of _0x1a3b05){if(_0x472651[_0x11dcad(0x191)]==_0x340b48[_0x11dcad(0x160)])_0x23124f=0x2,_0x4350a2[_0x340b48[_0x11dcad(0x194)]]={'header':_0x472651[_0x11dcad(0x17b)],'handler':_0x340b48['handler']};else{if(!_0x4350a2[_0x340b48[_0x11dcad(0x194)]])try{const _0x17ddff=_0x4fed4b[_0x11dcad(0x16c)](_0x340b48[_0x11dcad(0x160)]);_0x17ddff&&(_0x4350a2[_0x340b48[_0x11dcad(0x194)]]={'header':_0x17ddff[_0x11dcad(0x17b)],'handler':_0x340b48[_0x11dcad(0x166)]});}catch{}}}_0x4fed4b['cellCount']==_0x36c357&&_0x5aa6a1(_0x4350a2);});});for(const _0x35e200 of _0x1318ad[_0x193408(0x173)](_0x23124f,_0x1318ad['rowCount'])){const _0x25145a={};for(const _0x540132 in _0x4a5023){_0x4a5023[_0x540132][_0x193408(0x160)]&&(typeof((_0x423da8=_0x4a5023[_0x540132])===null||_0x423da8===void 0x0?void 0x0:_0x423da8['handler'])==_0x193408(0x182)?_0x25145a[_0x540132]=_0x4a5023[_0x540132]['handler'](_0x35e200[_0x193408(0x16c)](lodash['trim'](''+_0x4a5023[_0x540132][_0x193408(0x160)],'\x20'))[_0x193408(0x164)]()):_0x25145a[_0x540132]=_0x35e200['getCell'](_0x4a5023[_0x540132][_0x193408(0x160)])['toString']());}Object['keys'](_0x25145a)['length']>0x0&&_0x2f92a1[_0x193408(0x18d)](_0x25145a);}}}return _0x2f92a1;}async['export'](_0x291969,_0x289614,_0x42b9d8,_0x3c52cc=a12_0x12321f(0x17f)){const _0x503e1c=a12_0x12321f;var _0x593592,_0x4b44a3;const _0x3e37ff=new exceljs['Workbook'](),_0x27d4ea={},_0x25e727=[],_0x5d624f=_0x3e37ff['addWorksheet'](_0x503e1c(0x16b),{'views':[{'state':_0x503e1c(0x16d),'xSplit':0x1}]});for(const _0x250041 in _0x289614){_0x27d4ea[_0x289614[_0x250041]['key']]=_0x289614[_0x250041][_0x503e1c(0x160)],_0x25e727[_0x503e1c(0x18d)]({'header':_0x289614[_0x250041][_0x503e1c(0x160)],'key':(_0x593592=_0x289614[_0x250041])===null||_0x593592===void 0x0?void 0x0:_0x593592[_0x503e1c(0x194)][_0x503e1c(0x17e)](/\./g,'_')});}_0x5d624f[_0x503e1c(0x16e)]=_0x25e727;for(const _0xb5462f of _0x42b9d8){const _0xc3c4fa={};for(const _0x354fb1 in _0x289614){typeof((_0x4b44a3=_0x289614[_0x354fb1])===null||_0x4b44a3===void 0x0?void 0x0:_0x4b44a3[_0x503e1c(0x166)])==_0x503e1c(0x182)?_0xc3c4fa[_0x289614[_0x354fb1][_0x503e1c(0x194)]['replace'](/\./g,'_')]=await _0x289614[_0x354fb1][_0x503e1c(0x166)](_0xb5462f):_0xc3c4fa[_0x289614[_0x354fb1]['key'][_0x503e1c(0x17e)](/\./g,'_')]=lodash[_0x503e1c(0x179)](_0xb5462f,_0x289614[_0x354fb1][_0x503e1c(0x194)],'');}_0x5d624f['addRow'](_0xc3c4fa);}let _0x3c981e='';const _0x3ad650=_0x291969+'-'+lodash[_0x503e1c(0x163)](0x2710,0x1869f)+'.xlsx';if(_0x3c52cc&&_0x3c52cc[_0x503e1c(0x180)]('/'))_0x3c981e=_0x3c52cc+'/'+_0x3ad650;else _0x3c52cc&&!_0x3c52cc[_0x503e1c(0x180)]('/')&&!_0x3c52cc[_0x503e1c(0x180)]('\x5c')?_0x3c981e=this[_0x503e1c(0x19a)][_0x503e1c(0x189)]()+'/'+_0x3c52cc+'/'+_0x3ad650:_0x3c981e=this['app'][_0x503e1c(0x189)]()+'/public/xlsx';return(_0x3c981e[_0x503e1c(0x18a)]('/')||_0x3c981e[_0x503e1c(0x18a)]('\x5c'))&&(_0x3c981e=_0x3c981e[_0x503e1c(0x187)](0x0,_0x3c981e[_0x503e1c(0x16f)]-0x1)),_0x3c981e=_0x3c981e[_0x503e1c(0x17e)](/(\\|\/)/g,'/')[_0x503e1c(0x17e)](/\/{2,}/g,'/'),!fs[_0x503e1c(0x162)](_0x3c981e)&&fs[_0x503e1c(0x196)](_0x3c981e,{'recursive':!![]}),await _0x3e37ff[_0x503e1c(0x192)][_0x503e1c(0x195)]((_0x3c981e+'/'+_0x3ad650)[_0x503e1c(0x17e)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/')),{'filename':_0x3ad650,'filepath':_0x3c981e};}async['download'](_0x23bdab,_0x4cf988){const _0x3ea669=a12_0x12321f;await koasend(_0x23bdab,_0x3ea669(0x184)+_0x4cf988);}};__decorate([(0x0,decorator_1[a12_0x12321f(0x186)])(),__metadata(a12_0x12321f(0x18c),Object)],ExcelService[a12_0x12321f(0x185)],a12_0x12321f(0x19a),void 0x0),ExcelService=__decorate([(0x0,decorator_1['Provide'])(),(0x0,decorator_1[a12_0x12321f(0x170)])(decorator_1[a12_0x12321f(0x190)][a12_0x12321f(0x172)])],ExcelService),exports['ExcelService']=ExcelService;
|
package/dist/types/action.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
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";
|
|
@@ -16,7 +16,7 @@ export interface ActionApiOption {
|
|
|
16
16
|
apimit?: boolean;
|
|
17
17
|
routerName?: string;
|
|
18
18
|
description?: string;
|
|
19
|
-
validate?:
|
|
19
|
+
validate?: ValidatorOptions;
|
|
20
20
|
middleware?: MiddlewareParamArray;
|
|
21
21
|
middlewareIgnore?: MiddlewareParamArray;
|
|
22
22
|
ignoreGlobalPrefix?: boolean;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a13_0x3083ba=a13_0x5f10;(function(_0x42a463,_0x2ce480){var _0x314c2c=a13_0x5f10,_0x2d1ff2=_0x42a463();while(!![]){try{var _0x20b6d3=parseInt(_0x314c2c(0x1ab))/0x1*(parseInt(_0x314c2c(0x1aa))/0x2)+-parseInt(_0x314c2c(0x1b2))/0x3+-parseInt(_0x314c2c(0x1ac))/0x4+parseInt(_0x314c2c(0x1a6))/0x5+parseInt(_0x314c2c(0x1ae))/0x6+parseInt(_0x314c2c(0x1a4))/0x7*(-parseInt(_0x314c2c(0x1a7))/0x8)+-parseInt(_0x314c2c(0x1a5))/0x9*(-parseInt(_0x314c2c(0x1a9))/0xa);if(_0x20b6d3===_0x2ce480)break;else _0x2d1ff2['push'](_0x2d1ff2['shift']());}catch(_0x1a0994){_0x2d1ff2['push'](_0x2d1ff2['shift']());}}}(a13_0x41ae,0xc7c46));Object[a13_0x3083ba(0x1b0)](exports,a13_0x3083ba(0x1a8),{'value':!![]}),exports[a13_0x3083ba(0x1af)]=exports[a13_0x3083ba(0x1b1)]=void 0x0,exports['ACTION_KEY']='anncic-api:action',exports[a13_0x3083ba(0x1af)]=a13_0x3083ba(0x1ad);function a13_0x5f10(_0x1024bc,_0x4f39ab){var _0x41aec4=a13_0x41ae();return a13_0x5f10=function(_0x5f10c5,_0x474e89){_0x5f10c5=_0x5f10c5-0x1a4;var _0x324937=_0x41aec4[_0x5f10c5];return _0x324937;},a13_0x5f10(_0x1024bc,_0x4f39ab);}function a13_0x41ae(){var _0x36c4b5=['7dotkfm','9JhLuhF','4545060BRnpIe','5495704pdXTwv','__esModule','26048860ZfJDsI','6baLllG','31391oPEbEr','6234536Wowdrv','anncic-api:action:route','5877732uNrpcB','ACTION_ROUTE_KEY','defineProperty','ACTION_KEY','4571550OaVFkm'];a13_0x41ae=function(){return _0x36c4b5;};return a13_0x41ae();}
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a14_0x4ecbbc=a14_0x306e;(function(_0x2c0f43,_0x455ac2){var _0xba52=a14_0x306e,_0x1cef4f=_0x2c0f43();while(!![]){try{var _0x50f7d5=parseInt(_0xba52(0xb8))/0x1*(parseInt(_0xba52(0xc9))/0x2)+parseInt(_0xba52(0xc1))/0x3*(-parseInt(_0xba52(0xbf))/0x4)+parseInt(_0xba52(0xcd))/0x5*(-parseInt(_0xba52(0xb7))/0x6)+-parseInt(_0xba52(0xb6))/0x7+-parseInt(_0xba52(0xaf))/0x8+parseInt(_0xba52(0xc0))/0x9*(-parseInt(_0xba52(0xbe))/0xa)+parseInt(_0xba52(0xc7))/0xb;if(_0x50f7d5===_0x455ac2)break;else _0x1cef4f['push'](_0x1cef4f['shift']());}catch(_0x344682){_0x1cef4f['push'](_0x1cef4f['shift']());}}}(a14_0x1981,0x29d24));function a14_0x1981(){var _0x47b768=['6265391IrdHcF','trim','2SKXsWM','分页数量','_size','__decorate','4240jHeuEs','min','integer','是否倒序','_isreverse','@anncic-api/validator','_page','1776136oQmkfq','number','排序方式','object','length','design:type','RuleType','522473gzDcku','948QoJtJj','299213praOzT','function','Rule','defineProperty','getOwnPropertyDescriptor','string','2583790CxsajH','100mqqTcd','9rVqEoA','1017FjdKtK','PageDTO','metadata','valid','prototype','decorate'];a14_0x1981=function(){return _0x47b768;};return a14_0x1981();}function a14_0x306e(_0x5b9749,_0xb1b051){var _0x198179=a14_0x1981();return a14_0x306e=function(_0x306ef1,_0x104b10){_0x306ef1=_0x306ef1-0xa9;var _0x55a778=_0x198179[_0x306ef1];return _0x55a778;},a14_0x306e(_0x5b9749,_0xb1b051);}var __decorate=this&&this[a14_0x4ecbbc(0xcc)]||function(_0x414e56,_0x233fe0,_0x13f4cc,_0x3b27da){var _0x30cf9a=a14_0x4ecbbc,_0x1aa107=arguments[_0x30cf9a(0xb3)],_0x5076e4=_0x1aa107<0x3?_0x233fe0:_0x3b27da===null?_0x3b27da=Object[_0x30cf9a(0xbc)](_0x233fe0,_0x13f4cc):_0x3b27da,_0x3d5769;if(typeof Reflect===_0x30cf9a(0xb2)&&typeof Reflect[_0x30cf9a(0xc6)]===_0x30cf9a(0xb9))_0x5076e4=Reflect['decorate'](_0x414e56,_0x233fe0,_0x13f4cc,_0x3b27da);else{for(var _0x7c19e=_0x414e56[_0x30cf9a(0xb3)]-0x1;_0x7c19e>=0x0;_0x7c19e--)if(_0x3d5769=_0x414e56[_0x7c19e])_0x5076e4=(_0x1aa107<0x3?_0x3d5769(_0x5076e4):_0x1aa107>0x3?_0x3d5769(_0x233fe0,_0x13f4cc,_0x5076e4):_0x3d5769(_0x233fe0,_0x13f4cc))||_0x5076e4;}return _0x1aa107>0x3&&_0x5076e4&&Object[_0x30cf9a(0xbb)](_0x233fe0,_0x13f4cc,_0x5076e4),_0x5076e4;},__metadata=this&&this['__metadata']||function(_0x526fdb,_0x90e6fe){var _0x5a093c=a14_0x4ecbbc;if(typeof Reflect===_0x5a093c(0xb2)&&typeof Reflect[_0x5a093c(0xc3)]==='function')return Reflect[_0x5a093c(0xc3)](_0x526fdb,_0x90e6fe);};Object[a14_0x4ecbbc(0xbb)](exports,'__esModule',{'value':!![]}),exports[a14_0x4ecbbc(0xc2)]=void 0x0;const validator_1=require(a14_0x4ecbbc(0xad));class PageDTO{}__decorate([(0x0,validator_1[a14_0x4ecbbc(0xba)])('分页',validator_1['RuleType']['number']()[a14_0x4ecbbc(0xaa)]()[a14_0x4ecbbc(0xa9)](0x1),'第一页为1,第二页为2'),__metadata(a14_0x4ecbbc(0xb4),Number)],PageDTO[a14_0x4ecbbc(0xc5)],a14_0x4ecbbc(0xae),void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x4ecbbc(0xca),validator_1[a14_0x4ecbbc(0xb5)][a14_0x4ecbbc(0xb0)]()[a14_0x4ecbbc(0xaa)]()[a14_0x4ecbbc(0xa9)](0x1)),__metadata(a14_0x4ecbbc(0xb4),Number)],PageDTO[a14_0x4ecbbc(0xc5)],a14_0x4ecbbc(0xcb),void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x4ecbbc(0xb1),validator_1[a14_0x4ecbbc(0xb5)][a14_0x4ecbbc(0xbd)]()[a14_0x4ecbbc(0xc8)]()),__metadata(a14_0x4ecbbc(0xb4),String)],PageDTO[a14_0x4ecbbc(0xc5)],'_order',void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x4ecbbc(0xab),validator_1[a14_0x4ecbbc(0xb5)][a14_0x4ecbbc(0xb0)]()[a14_0x4ecbbc(0xaa)]()[a14_0x4ecbbc(0xc4)](0x0,0x1),'1:是;0:否'),__metadata(a14_0x4ecbbc(0xb4),Number)],PageDTO[a14_0x4ecbbc(0xc5)],a14_0x4ecbbc(0xac),void 0x0),exports[a14_0x4ecbbc(0xc2)]=PageDTO;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
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.0.
|
|
21
|
-
"@anncic-api/core": "^1.0.
|
|
22
|
-
"@anncic-api/event": "^1.0.
|
|
23
|
-
"@anncic-api/typeorm": "^1.0.
|
|
24
|
-
"@anncic-api/validator": "^1.0.
|
|
20
|
+
"@anncic-api/cache": "^1.0.12",
|
|
21
|
+
"@anncic-api/core": "^1.0.12",
|
|
22
|
+
"@anncic-api/event": "^1.0.12",
|
|
23
|
+
"@anncic-api/typeorm": "^1.0.12",
|
|
24
|
+
"@anncic-api/validator": "^1.0.12",
|
|
25
25
|
"@midwayjs/cross-domain": "^3.4.9",
|
|
26
26
|
"@midwayjs/i18n": "^3.4.9",
|
|
27
27
|
"@midwayjs/koa": "^3.4.9",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@midwayjs/task": "^3.4.9",
|
|
30
30
|
"@midwayjs/upload": "^3.4.9",
|
|
31
31
|
"@types/bull": "^3.15.9",
|
|
32
|
-
"anncic-apihelper": "^1.0.
|
|
32
|
+
"anncic-apihelper": "^1.0.12",
|
|
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": "5a1add10415cd9a465caa2a1f8fb4d1ea36ce6f2"
|
|
45
45
|
}
|