anncic-api 1.3.1 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/config/config.production.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Action.js +1 -1
- package/dist/decorator/ActionApi.js +1 -1
- package/dist/decorator/ActionApitest.js +1 -1
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getAppsConfig.js +1 -1
- package/dist/helper/getRoutes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x19799e=a0_0x14bc;(function(_0x523210,_0x2ce99b){var _0x2bc353=a0_0x14bc,_0x2a35c5=_0x523210();while(!![]){try{var _0x55b02c=parseInt(_0x2bc353(0x103))/0x1*(-parseInt(_0x2bc353(0x108))/0x2)+-parseInt(_0x2bc353(0x107))/0x3+parseInt(_0x2bc353(0xfd))/0x4+parseInt(_0x2bc353(0x10b))/0x5+-parseInt(_0x2bc353(0x104))/0x6+parseInt(_0x2bc353(0xff))/0x7+-parseInt(_0x2bc353(0x109))/0x8*(-parseInt(_0x2bc353(0x102))/0x9);if(_0x55b02c===_0x2ce99b)break;else _0x2a35c5['push'](_0x2a35c5['shift']());}catch(_0x54b5bf){_0x2a35c5['push'](_0x2a35c5['shift']());}}}(a0_0xf7f0,0xb606d));function a0_0x14bc(_0x1d6ed4,_0x389294){var _0xf7f000=a0_0xf7f0();return a0_0x14bc=function(_0x14bcbe,_0x56a700){_0x14bcbe=_0x14bcbe-0xfc;var _0x192470=_0xf7f000[_0x14bcbe];return _0x192470;},a0_0x14bc(_0x1d6ed4,_0x389294);}Object[a0_0x19799e(0x101)](exports,a0_0x19799e(0x100),{'value':!![]}),exports[a0_0x19799e(0x10d)]=_0x1d2c4f=>{var _0x3d51e9=a0_0x19799e;return{'apitest':!![],'keys':_0x1d2c4f[_0x3d51e9(0x10c)],'anncicapi':{'timeout':0x1388,'password':_0x3d51e9(0xfc),'devices':{'DEFAULT':{'secret':_0x3d51e9(0x106),'checkcode':_0x3d51e9(0x106)}}},'bodyParser':{'enableTypes':['json','form',_0x3d51e9(0x10a),_0x3d51e9(0x105)],'formLimit':_0x3d51e9(0xfe),'jsonLimit':_0x3d51e9(0xfe),'textLimit':_0x3d51e9(0xfe),'xmlLimit':_0x3d51e9(0xfe)},'upload':{'tmpdir':_0x1d2c4f['appDir']+'/runtime/.upload','cleanTimeout':0x5265c00}};};function a0_0xf7f0(){var _0x53b95f=['__esModule','defineProperty','1036647eGmeNa','5854aKWnEA','5809086POVjOC','xml','dhauo1234420123gg3234901','3507828MJeTef','194LPRfJr','8nstqGb','text','6717080xZxjix','name','default','zhiulanuiy7892387985hnoi','4027372JnaCPk','20mb','6898038WxoydU'];a0_0xf7f0=function(){return _0x53b95f;};return a0_0xf7f0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a1_0x475c(_0x21a028,_0x417954){var _0x19cdc6=a1_0x19cd();return a1_0x475c=function(_0x475cec,_0x4d18d3){_0x475cec=_0x475cec-0x133;var _0x387f3f=_0x19cdc6[_0x475cec];return _0x387f3f;},a1_0x475c(_0x21a028,_0x417954);}var a1_0x26248e=a1_0x475c;(function(_0x283139,_0x43a10a){var _0x20fe7c=a1_0x475c,_0x1d3079=_0x283139();while(!![]){try{var _0x85a070=-parseInt(_0x20fe7c(0x13c))/0x1*(-parseInt(_0x20fe7c(0x137))/0x2)+parseInt(_0x20fe7c(0x135))/0x3+parseInt(_0x20fe7c(0x13d))/0x4+parseInt(_0x20fe7c(0x138))/0x5+-parseInt(_0x20fe7c(0x133))/0x6+parseInt(_0x20fe7c(0x13e))/0x7*(parseInt(_0x20fe7c(0x13b))/0x8)+parseInt(_0x20fe7c(0x139))/0x9*(-parseInt(_0x20fe7c(0x136))/0xa);if(_0x85a070===_0x43a10a)break;else _0x1d3079['push'](_0x1d3079['shift']());}catch(_0x934835){_0x1d3079['push'](_0x1d3079['shift']());}}}(a1_0x19cd,0x3ed68));function a1_0x19cd(){var _0x1bdf6b=['1113270qZYnFp','__esModule','426312MBsgaK','5453930LOISxW','15294xOsmUe','49245rSlASN','9TzHMeM','default','2222344ohifXB','48GpFKjB','766080NBQXAK','7rWoMKP'];a1_0x19cd=function(){return _0x1bdf6b;};return a1_0x19cd();}Object['defineProperty'](exports,a1_0x26248e(0x134),{'value':!![]}),exports[a1_0x26248e(0x13a)]={'apitest':![],'anncicapi':{'timeout':0x1388}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x34fb96=a2_0x429d;(function(_0x55a346,_0x232e62){const _0x4a31bd=a2_0x429d,_0x189d45=_0x55a346();while(!![]){try{const _0x1fe9db=parseInt(_0x4a31bd(0x7a))/0x1*(-parseInt(_0x4a31bd(0x84))/0x2)+parseInt(_0x4a31bd(0xc4))/0x3*(parseInt(_0x4a31bd(0x8d))/0x4)+-parseInt(_0x4a31bd(0xc5))/0x5*(parseInt(_0x4a31bd(0x78))/0x6)+parseInt(_0x4a31bd(0xce))/0x7+-parseInt(_0x4a31bd(0xa3))/0x8+parseInt(_0x4a31bd(0x98))/0x9*(-parseInt(_0x4a31bd(0x83))/0xa)+-parseInt(_0x4a31bd(0xc2))/0xb*(-parseInt(_0x4a31bd(0x80))/0xc);if(_0x1fe9db===_0x232e62)break;else _0x189d45['push'](_0x189d45['shift']());}catch(_0xa5754){_0x189d45['push'](_0x189d45['shift']());}}}(a2_0x7862,0xe6f9d));function a2_0x429d(_0x10411d,_0x5388d9){const _0x78624d=a2_0x7862();return a2_0x429d=function(_0x429db1,_0x393308){_0x429db1=_0x429db1-0x6d;let _0x572a34=_0x78624d[_0x429db1];return _0x572a34;},a2_0x429d(_0x10411d,_0x5388d9);}var __decorate=this&&this[a2_0x34fb96(0xba)]||function(_0x38d352,_0x5780e6,_0x506439,_0x354cc7){const _0x55bfd0=a2_0x34fb96;var _0x1d98c5=arguments[_0x55bfd0(0x73)],_0x3302f7=_0x1d98c5<0x3?_0x5780e6:_0x354cc7===null?_0x354cc7=Object[_0x55bfd0(0xbf)](_0x5780e6,_0x506439):_0x354cc7,_0x354b9e;if(typeof Reflect===_0x55bfd0(0xc0)&&typeof Reflect[_0x55bfd0(0xa9)]==='function')_0x3302f7=Reflect[_0x55bfd0(0xa9)](_0x38d352,_0x5780e6,_0x506439,_0x354cc7);else{for(var _0x3b394e=_0x38d352[_0x55bfd0(0x73)]-0x1;_0x3b394e>=0x0;_0x3b394e--)if(_0x354b9e=_0x38d352[_0x3b394e])_0x3302f7=(_0x1d98c5<0x3?_0x354b9e(_0x3302f7):_0x1d98c5>0x3?_0x354b9e(_0x5780e6,_0x506439,_0x3302f7):_0x354b9e(_0x5780e6,_0x506439))||_0x3302f7;}return _0x1d98c5>0x3&&_0x3302f7&&Object[_0x55bfd0(0x86)](_0x5780e6,_0x506439,_0x3302f7),_0x3302f7;},__metadata=this&&this[a2_0x34fb96(0xcf)]||function(_0x5ee13e,_0x2e9275){const _0x21e9b8=a2_0x34fb96;if(typeof Reflect===_0x21e9b8(0xc0)&&typeof Reflect[_0x21e9b8(0xc8)]===_0x21e9b8(0xcd))return Reflect[_0x21e9b8(0xc8)](_0x5ee13e,_0x2e9275);};Object['defineProperty'](exports,a2_0x34fb96(0xd0),{'value':!![]}),exports[a2_0x34fb96(0x9c)]=void 0x0;const core_1=require(a2_0x34fb96(0xbe)),core_2=require('@midwayjs/core'),ApiError_1=require(a2_0x34fb96(0x8b)),ApiService_1=require(a2_0x34fb96(0x8a)),action_1=require(a2_0x34fb96(0x8e)),fs=require('fs'),koa=require(a2_0x34fb96(0xb4)),i18n=require(a2_0x34fb96(0x7d)),upload=require('@midwayjs/upload'),staticFile=require(a2_0x34fb96(0x99)),crossDomain=require(a2_0x34fb96(0xc7)),ConfigDefault=require(a2_0x34fb96(0xaa)),ConfigProduction=require(a2_0x34fb96(0x97)),anncic=require(a2_0x34fb96(0x9d)),anncicCache=require(a2_0x34fb96(0xc6)),anncicEvent=require(a2_0x34fb96(0xae)),anncicTypeorm=require(a2_0x34fb96(0x87)),anncicValidator=require(a2_0x34fb96(0x77)),anncicHelper=require(a2_0x34fb96(0x90));let CustomConfiguration=class CustomConfiguration{async[a2_0x34fb96(0x95)](){const _0x430818=a2_0x34fb96;await this[_0x430818(0xb2)](),await this[_0x430818(0x76)](),await this[_0x430818(0x92)](),await this[_0x430818(0xbc)]();}async[a2_0x34fb96(0x76)](){}async[a2_0x34fb96(0x92)](){const _0xc0c44e=a2_0x34fb96,_0x126768=this[_0xc0c44e(0x9e)][_0xc0c44e(0xcc)]();this[_0xc0c44e(0xc1)][_0xc0c44e(0x96)](action_1['ACTION_ROUTE_KEY'],_0x11a6c6=>{const _0x2b53da=_0xc0c44e,_0x2d0ea9=_0x11a6c6[_0x2b53da(0xc8)];return{'before':async _0x1f1a9c=>{const _0x154f77=_0x2b53da;var _0x104719,_0x5b7de0;const _0x14a0d8=(_0x104719=_0x1f1a9c===null||_0x1f1a9c===void 0x0?void 0x0:_0x1f1a9c['target'])===null||_0x104719===void 0x0?void 0x0:_0x104719[core_2[_0x154f77(0x81)]];if(_0x14a0d8&&(_0x2d0ea9===null||_0x2d0ea9===void 0x0?void 0x0:_0x2d0ea9[_0x154f77(0x93)])){if(!this[_0x154f77(0xb5)][_0x154f77(0xcb)]((_0x5b7de0=_0x14a0d8===null||_0x14a0d8===void 0x0?void 0x0:_0x14a0d8[_0x154f77(0x85)])===null||_0x5b7de0===void 0x0?void 0x0:_0x5b7de0[_0x154f77(0xca)]))throw new AnnError(ApiError_1[_0x154f77(0x94)][_0x154f77(0xa4)]);}},'around':async _0xbf818=>{const _0x5e67dd=_0x2b53da;var _0x5d1beb,_0x20cf90,_0x40b3a9,_0x3e70ee,_0xb3b9c4;const _0x1ccd04=(_0x5d1beb=_0xbf818===null||_0xbf818===void 0x0?void 0x0:_0xbf818['target'])===null||_0x5d1beb===void 0x0?void 0x0:_0x5d1beb[core_2[_0x5e67dd(0x81)]];if(_0x1ccd04&&(_0x2d0ea9===null||_0x2d0ea9===void 0x0?void 0x0:_0x2d0ea9[_0x5e67dd(0x93)])){if(((_0x20cf90=_0x1ccd04['headers'])===null||_0x20cf90===void 0x0?void 0x0:_0x20cf90['device'])&&((_0xb3b9c4=(_0x3e70ee=(_0x40b3a9=_0x126768===null||_0x126768===void 0x0?void 0x0:_0x126768[_0x5e67dd(0x74)])===null||_0x40b3a9===void 0x0?void 0x0:_0x40b3a9[_0x5e67dd(0x7c)])===null||_0x3e70ee===void 0x0?void 0x0:_0x3e70ee[_0x1ccd04[_0x5e67dd(0xca)][_0x5e67dd(0xaf)]])===null||_0xb3b9c4===void 0x0?void 0x0:_0xb3b9c4[_0x5e67dd(0xd1)])){const _0x28a3d8=Array['isArray'](_0x126768[_0x5e67dd(0x74)][_0x5e67dd(0x7c)][_0x1ccd04[_0x5e67dd(0xca)][_0x5e67dd(0xaf)]]['intercept'])?_0x126768[_0x5e67dd(0x74)][_0x5e67dd(0x7c)][_0x1ccd04[_0x5e67dd(0xca)][_0x5e67dd(0xaf)]][_0x5e67dd(0xd1)]:[_0x126768['anncicapi'][_0x5e67dd(0x7c)][_0x1ccd04[_0x5e67dd(0xca)]['device']][_0x5e67dd(0xd1)]];for(const _0x305bff of _0x28a3d8){if(core_1[_0x5e67dd(0x91)][_0x5e67dd(0xbd)](_0x305bff)||typeof _0x305bff=='string'){const _0x334110=await _0x1ccd04[_0x5e67dd(0xa8)][_0x5e67dd(0xb8)](_0x305bff);typeof(_0x334110===null||_0x334110===void 0x0?void 0x0:_0x334110[_0x5e67dd(0xad)])==_0x5e67dd(0xcd)&&await _0x334110['handler'](typeof(_0x1ccd04===null||_0x1ccd04===void 0x0?void 0x0:_0x1ccd04[_0x5e67dd(0xc9)])=='string'&&(_0x1ccd04===null||_0x1ccd04===void 0x0?void 0x0:_0x1ccd04[_0x5e67dd(0x70)])?_0x1ccd04[_0x5e67dd(0xc9)][_0x5e67dd(0xb7)]()+'@'+(_0x1ccd04===null||_0x1ccd04===void 0x0?void 0x0:_0x1ccd04['_matchedRoute']):undefined,_0x1ccd04,_0x2d0ea9);}else core_1['Types'][_0x5e67dd(0xb1)](_0x305bff)&&await _0x305bff(typeof(_0x1ccd04===null||_0x1ccd04===void 0x0?void 0x0:_0x1ccd04[_0x5e67dd(0xc9)])==_0x5e67dd(0xb9)&&(_0x1ccd04===null||_0x1ccd04===void 0x0?void 0x0:_0x1ccd04[_0x5e67dd(0x70)])?_0x1ccd04[_0x5e67dd(0xc9)]['toLowerCase']()+'@'+(_0x1ccd04===null||_0x1ccd04===void 0x0?void 0x0:_0x1ccd04[_0x5e67dd(0x70)]):undefined,_0x1ccd04,_0x2d0ea9);}}}return await _0xbf818[_0x5e67dd(0xa2)](..._0xbf818['args']);},'afterThrow':(_0x198ac3,_0x57aed6)=>{throw _0x57aed6;}};});}async['hanlderApplications'](){const _0x4d91b6=a2_0x34fb96;this[_0x4d91b6(0x8f)][_0x4d91b6(0x89)](['koa'])[_0x4d91b6(0x9f)](_0x28b816=>{const _0x4626c5=_0x4d91b6;(_0x28b816===null||_0x28b816===void 0x0?void 0x0:_0x28b816[_0x4626c5(0x71)])&&Object['defineProperties'](_0x28b816['context'],{'ok':{'value':function(_0x193f65,_0x1bb7f2,_0x10cc02=0x0){return{'code':_0x10cc02,'data':_0x193f65,'extra':_0x1bb7f2};}},'input':{'value':function(_0x3cedeb,_0xa0501a){const _0x32ad8c=_0x4626c5;var _0x260a01;const _0x49dabb=lodash[_0x32ad8c(0x72)]({},this['request']['body']||this[_0x32ad8c(0x85)][((_0x260a01=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x260a01===void 0x0?void 0x0:_0x260a01[_0x32ad8c(0x9a)])||_0x32ad8c(0xab)]||{},this[_0x32ad8c(0x85)]['query']||{});return _0x3cedeb?lodash[_0x32ad8c(0x8c)](_0x49dabb,_0x3cedeb,_0xa0501a):_0x49dabb;}},'when':{'value':async function(_0x255fba,_0x7e5863){const _0x201205=this['input'](_0x255fba,null);if(!lodash['isNull'](_0x201205))return await _0x7e5863(_0x201205);}},'only':{'value':function(_0x54e605){const _0x39ea8f=_0x4626c5,_0x39b25d={};for(let _0x3405a5=0x0;_0x3405a5<_0x54e605[_0x39ea8f(0x73)];_0x3405a5++){lodash['isArray'](_0x54e605[_0x3405a5])&&_0x54e605[_0x3405a5]['length']>0x0&&lodash[_0x39ea8f(0x7e)](_0x54e605[_0x3405a5][0x0])&&(_0x39b25d[_0x54e605[_0x3405a5][0x0]]=this[_0x39ea8f(0xa0)](_0x54e605[_0x3405a5][0x0],_0x54e605[_0x3405a5][_0x39ea8f(0x73)]>0x1?_0x54e605[_0x3405a5][0x1]:null));}return _0x39b25d;}}});});}async['filterConfig'](){const _0x5804ee=a2_0x34fb96;var _0xd4547,_0x465cfe,_0x5c2b90,_0x24c0a5,_0x27af89,_0x17408a;const _0xda124c=this[_0x5804ee(0x9e)][_0x5804ee(0xcc)]();((_0x465cfe=(_0xd4547=_0xda124c===null||_0xda124c===void 0x0?void 0x0:_0xda124c[_0x5804ee(0x74)])===null||_0xd4547===void 0x0?void 0x0:_0xd4547[_0x5804ee(0x7c)])===null||_0x465cfe===void 0x0?void 0x0:_0x465cfe[_0x5804ee(0xb3)])&&Object[_0x5804ee(0x6f)](_0xda124c[_0x5804ee(0x74)][_0x5804ee(0x7c)])[_0x5804ee(0x73)]>0x1&&delete _0xda124c[_0x5804ee(0x74)]['devices'][_0x5804ee(0xb3)];if((_0x5c2b90=_0xda124c===null||_0xda124c===void 0x0?void 0x0:_0xda124c[_0x5804ee(0x82)])===null||_0x5c2b90===void 0x0?void 0x0:_0x5c2b90['dirs'])for(const _0x44c911 in _0xda124c[_0x5804ee(0x82)][_0x5804ee(0xa6)]){((_0x24c0a5=_0xda124c[_0x5804ee(0x82)][_0x5804ee(0xa6)][_0x44c911])===null||_0x24c0a5===void 0x0?void 0x0:_0x24c0a5[_0x5804ee(0x6e)])&&typeof((_0x27af89=_0xda124c[_0x5804ee(0x82)][_0x5804ee(0xa6)][_0x44c911])===null||_0x27af89===void 0x0?void 0x0:_0x27af89['dir'])==_0x5804ee(0xb9)&&!fs['existsSync'](_0xda124c['staticFile'][_0x5804ee(0xa6)][_0x44c911][_0x5804ee(0x6e)])&&(fs[_0x5804ee(0x7b)](_0xda124c[_0x5804ee(0x82)][_0x5804ee(0xa6)][_0x44c911][_0x5804ee(0x6e)],{'recursive':!![]}),console[_0x5804ee(0xa1)](_0x5804ee(0xb6)+_0xda124c[_0x5804ee(0x82)][_0x5804ee(0xa6)][_0x44c911][_0x5804ee(0x6e)]));}((_0x17408a=_0xda124c===null||_0xda124c===void 0x0?void 0x0:_0xda124c['upload'])===null||_0x17408a===void 0x0?void 0x0:_0x17408a['tmpdir'])&&!fs[_0x5804ee(0x9b)](_0xda124c[_0x5804ee(0x79)]['tmpdir'])&&(fs['mkdirSync'](_0xda124c[_0x5804ee(0x79)]['tmpdir'],{'recursive':!![]}),console[_0x5804ee(0xa1)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0xda124c[_0x5804ee(0x79)][_0x5804ee(0xac)])),this[_0x5804ee(0x9e)]['addObject'](_0xda124c);}};__decorate([(0x0,core_1[a2_0x34fb96(0x6d)])(),__metadata(a2_0x34fb96(0xa5),core_2['MidwayConfigService'])],CustomConfiguration['prototype'],a2_0x34fb96(0x9e),void 0x0),__decorate([(0x0,core_1[a2_0x34fb96(0x6d)])(),__metadata(a2_0x34fb96(0xa5),core_2[a2_0x34fb96(0x88)])],CustomConfiguration[a2_0x34fb96(0xc3)],a2_0x34fb96(0xc1),void 0x0),__decorate([(0x0,core_1[a2_0x34fb96(0x6d)])(),__metadata('design:type',core_2[a2_0x34fb96(0xa7)])],CustomConfiguration['prototype'],a2_0x34fb96(0x8f),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x34fb96(0xa5),core_2[a2_0x34fb96(0x7f)])],CustomConfiguration[a2_0x34fb96(0xc3)],a2_0x34fb96(0x75),void 0x0),__decorate([(0x0,core_1[a2_0x34fb96(0x6d)])(),__metadata(a2_0x34fb96(0xa5),ApiService_1[a2_0x34fb96(0xb5)])],CustomConfiguration[a2_0x34fb96(0xc3)],a2_0x34fb96(0xb5),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x34fb96(0xb0)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x34fb96(0xbb),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;function a2_0x7862(){const _0x154eea=['@anncic-api/event','device','Configuration','isFunction','filterConfig','DEFAULT','@midwayjs/koa','ApiService','Anncic-api\x20static-file\x20:\x20mkdir\x20','toLowerCase','getAsync','string','__decorate','anncic-api','hanlderApplications','isClass','@midwayjs/core','getOwnPropertyDescriptor','object','decorator','1063865YWgIMa','prototype','12qdOMWk','10665RQczRV','@anncic-api/cache','@midwayjs/cross-domain','metadata','method','headers','checksign','getConfiguration','function','665658llSsdz','__metadata','__esModule','intercept','Inject','dir','keys','_matchedRoute','context','defaultsDeep','length','anncicapi','environment','checkConfigKeys','@anncic-api/validator','4890sMHoHX','upload','75wLynJk','mkdirSync','devices','@midwayjs/i18n','isString','MidwayEnvironmentService','372rHBDON','REQUEST_OBJ_CTX_KEY','staticFile','342340ORIfuu','27038mRYMSJ','request','defineProperty','@anncic-api/typeorm','MidwayDecoratorService','getApplications','./service/ApiService','./exception/ApiError','get','1304068ATwgFz','./types/action','application','anncic-apihelper','Types','handlerActionRoute','apimit','ApiError','onReady','registerMethodHandler','./config/config.production','180awYyim','@midwayjs/static-file','key','existsSync','CustomConfiguration','@anncic-api/core','config','forEach','input','log','proceed','114000OSDmmc','HEADERS_SIGNATURE','design:type','dirs','MidwayApplicationManager','requestContext','decorate','./config/config.default','body','tmpdir','handler'];a2_0x7862=function(){return _0x154eea;};return a2_0x7862();}
|
|
1
|
+
'use strict';const a2_0x5044dc=a2_0x3537;(function(_0x4acf83,_0x5d53d1){const _0x1eb910=a2_0x3537,_0x35bd2a=_0x4acf83();while(!![]){try{const _0x5306fa=-parseInt(_0x1eb910(0xa4))/0x1*(parseInt(_0x1eb910(0xc0))/0x2)+-parseInt(_0x1eb910(0x9b))/0x3+-parseInt(_0x1eb910(0xb6))/0x4*(parseInt(_0x1eb910(0xb0))/0x5)+parseInt(_0x1eb910(0x80))/0x6+parseInt(_0x1eb910(0xb1))/0x7*(parseInt(_0x1eb910(0x7d))/0x8)+-parseInt(_0x1eb910(0x9e))/0x9*(parseInt(_0x1eb910(0x8f))/0xa)+-parseInt(_0x1eb910(0xb5))/0xb*(-parseInt(_0x1eb910(0x9f))/0xc);if(_0x5306fa===_0x5d53d1)break;else _0x35bd2a['push'](_0x35bd2a['shift']());}catch(_0x5eb21d){_0x35bd2a['push'](_0x35bd2a['shift']());}}}(a2_0x2683,0x61f34));function a2_0x2683(){const _0x35a055=['1538232PCuZEv','getOwnPropertyDescriptor','@midwayjs/i18n','getConfiguration','tmpdir','284215evCOlm','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','./types/action','@anncic-api/typeorm','./config/config.default','registerMethodHandler','hanlderApplications','defaultsDeep','input','REQUEST_OBJ_CTX_KEY','upload','keys','2423065jLxqBw','2735782qVTRrT','decorate','bodyXml','@anncic-api/cache','44jKaeUW','4maotrg','config','length','@midwayjs/cross-domain','ApiError','getApplications','prototype','application','Types','function','2mSbzsa','@anncic-api/event','isClass','args','method','MidwayDecoratorService','@midwayjs/core','@midwayjs/koa','@midwayjs/static-file','ApiService','_matchedRoute','MidwayConfigService','query','log','isArray','decorator','MidwayEnvironmentService','string','get','anncicapi','CustomConfiguration','requestContext','isString','body','apimit','isFunction','staticFile','MidwayApplicationManager','anncic-api','headers','mkdirSync','DEFAULT','16VebHEX','object','koa','4283070RlCSFK','target','handler','Inject','handlerActionRoute','dir','filterConfig','request','@anncic-api/validator','checkConfigKeys','addObject','defineProperty','dirs','./service/ApiService','design:type','1190VStOIU','intercept','key','forEach','toLowerCase','context','device','devices','Configuration','ACTION_ROUTE_KEY','existsSync','metadata','1749576ahGxmM','./exception/ApiError','defineProperties','19287LGrDwd'];a2_0x2683=function(){return _0x35a055;};return a2_0x2683();}function a2_0x3537(_0x37dbbb,_0x3e94be){const _0x26833e=a2_0x2683();return a2_0x3537=function(_0x35375d,_0x6ed615){_0x35375d=_0x35375d-0x77;let _0x4e6d7a=_0x26833e[_0x35375d];return _0x4e6d7a;},a2_0x3537(_0x37dbbb,_0x3e94be);}var __decorate=this&&this['__decorate']||function(_0x1e25b9,_0x21e802,_0x1a4225,_0x1be7c3){const _0x8d1102=a2_0x3537;var _0x3bcaca=arguments[_0x8d1102(0xb8)],_0x4b72ed=_0x3bcaca<0x3?_0x21e802:_0x1be7c3===null?_0x1be7c3=Object[_0x8d1102(0xa0)](_0x21e802,_0x1a4225):_0x1be7c3,_0x3b1050;if(typeof Reflect==='object'&&typeof Reflect[_0x8d1102(0xb2)]==='function')_0x4b72ed=Reflect[_0x8d1102(0xb2)](_0x1e25b9,_0x21e802,_0x1a4225,_0x1be7c3);else{for(var _0x1b20d9=_0x1e25b9['length']-0x1;_0x1b20d9>=0x0;_0x1b20d9--)if(_0x3b1050=_0x1e25b9[_0x1b20d9])_0x4b72ed=(_0x3bcaca<0x3?_0x3b1050(_0x4b72ed):_0x3bcaca>0x3?_0x3b1050(_0x21e802,_0x1a4225,_0x4b72ed):_0x3b1050(_0x21e802,_0x1a4225))||_0x4b72ed;}return _0x3bcaca>0x3&&_0x4b72ed&&Object[_0x8d1102(0x8b)](_0x21e802,_0x1a4225,_0x4b72ed),_0x4b72ed;},__metadata=this&&this['__metadata']||function(_0x5994f8,_0x292b1e){const _0x4b3c0d=a2_0x3537;if(typeof Reflect===_0x4b3c0d(0x7e)&&typeof Reflect[_0x4b3c0d(0x9a)]===_0x4b3c0d(0xbf))return Reflect['metadata'](_0x5994f8,_0x292b1e);};Object[a2_0x5044dc(0x8b)](exports,'__esModule',{'value':!![]}),exports[a2_0x5044dc(0xd4)]=void 0x0;const core_1=require(a2_0x5044dc(0xc6)),core_2=require(a2_0x5044dc(0xc6)),ApiError_1=require(a2_0x5044dc(0x9c)),ApiService_1=require(a2_0x5044dc(0x8d)),action_1=require(a2_0x5044dc(0xa6)),fs=require('fs'),koa=require(a2_0x5044dc(0xc7)),i18n=require(a2_0x5044dc(0xa1)),upload=require('@midwayjs/upload'),staticFile=require(a2_0x5044dc(0xc8)),crossDomain=require(a2_0x5044dc(0xb9)),ConfigDefault=require(a2_0x5044dc(0xa8)),ConfigProduction=require('./config/config.production'),anncic=require('@anncic-api/core'),anncicCache=require(a2_0x5044dc(0xb4)),anncicEvent=require(a2_0x5044dc(0xc1)),anncicTypeorm=require(a2_0x5044dc(0xa7)),anncicValidator=require(a2_0x5044dc(0x88)),anncicHelper=require('anncic-apihelper');let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x341dea=a2_0x5044dc;await this[_0x341dea(0x86)](),await this[_0x341dea(0x89)](),await this[_0x341dea(0x84)](),await this[_0x341dea(0xaa)]();}async[a2_0x5044dc(0x89)](){}async[a2_0x5044dc(0x84)](){const _0x56d088=a2_0x5044dc,_0x13dae2=this['config'][_0x56d088(0xa2)]();this[_0x56d088(0xcf)][_0x56d088(0xa9)](action_1[_0x56d088(0x98)],_0x241547=>{const _0x503c1c=_0x56d088,_0x35801c=_0x241547[_0x503c1c(0x9a)];return{'before':async _0x10909d=>{const _0x543764=_0x503c1c;var _0x1db274,_0x5c3a0d;const _0x48b552=(_0x1db274=_0x10909d===null||_0x10909d===void 0x0?void 0x0:_0x10909d[_0x543764(0x81)])===null||_0x1db274===void 0x0?void 0x0:_0x1db274[core_2[_0x543764(0xad)]];if(_0x48b552&&(_0x35801c===null||_0x35801c===void 0x0?void 0x0:_0x35801c[_0x543764(0xd8)])){if(!this[_0x543764(0xc9)]['checksign']((_0x5c3a0d=_0x48b552===null||_0x48b552===void 0x0?void 0x0:_0x48b552[_0x543764(0x87)])===null||_0x5c3a0d===void 0x0?void 0x0:_0x5c3a0d[_0x543764(0x7a)]))throw new AnnError(ApiError_1[_0x543764(0xba)]['HEADERS_SIGNATURE']);}},'around':async _0x1b09a0=>{const _0x160dbe=_0x503c1c;var _0x54434f,_0x5696a0,_0x2d1c3b,_0x2711a8,_0x24905b;const _0x3942b6=(_0x54434f=_0x1b09a0===null||_0x1b09a0===void 0x0?void 0x0:_0x1b09a0['target'])===null||_0x54434f===void 0x0?void 0x0:_0x54434f[core_2[_0x160dbe(0xad)]];if(_0x3942b6&&(_0x35801c===null||_0x35801c===void 0x0?void 0x0:_0x35801c['apimit'])){if(((_0x5696a0=_0x3942b6['headers'])===null||_0x5696a0===void 0x0?void 0x0:_0x5696a0[_0x160dbe(0x95)])&&((_0x24905b=(_0x2711a8=(_0x2d1c3b=_0x13dae2===null||_0x13dae2===void 0x0?void 0x0:_0x13dae2[_0x160dbe(0xd3)])===null||_0x2d1c3b===void 0x0?void 0x0:_0x2d1c3b['devices'])===null||_0x2711a8===void 0x0?void 0x0:_0x2711a8[_0x3942b6['headers'][_0x160dbe(0x95)]])===null||_0x24905b===void 0x0?void 0x0:_0x24905b[_0x160dbe(0x90)])){const _0x50bd81=Array[_0x160dbe(0xce)](_0x13dae2['anncicapi'][_0x160dbe(0x96)][_0x3942b6[_0x160dbe(0x7a)][_0x160dbe(0x95)]]['intercept'])?_0x13dae2['anncicapi'][_0x160dbe(0x96)][_0x3942b6[_0x160dbe(0x7a)][_0x160dbe(0x95)]]['intercept']:[_0x13dae2[_0x160dbe(0xd3)][_0x160dbe(0x96)][_0x3942b6[_0x160dbe(0x7a)]['device']][_0x160dbe(0x90)]];for(const _0x55db03 of _0x50bd81){if(core_1[_0x160dbe(0xbe)][_0x160dbe(0xc2)](_0x55db03)||typeof _0x55db03==_0x160dbe(0xd1)){const _0x1d3390=await _0x3942b6[_0x160dbe(0xd5)]['getAsync'](_0x55db03);typeof(_0x1d3390===null||_0x1d3390===void 0x0?void 0x0:_0x1d3390[_0x160dbe(0x82)])==_0x160dbe(0xbf)&&await _0x1d3390[_0x160dbe(0x82)](typeof(_0x3942b6===null||_0x3942b6===void 0x0?void 0x0:_0x3942b6[_0x160dbe(0xc4)])==_0x160dbe(0xd1)&&(_0x3942b6===null||_0x3942b6===void 0x0?void 0x0:_0x3942b6[_0x160dbe(0xca)])?_0x3942b6[_0x160dbe(0xc4)]['toLowerCase']()+'@'+(_0x3942b6===null||_0x3942b6===void 0x0?void 0x0:_0x3942b6[_0x160dbe(0xca)]):undefined,_0x3942b6,_0x35801c);}else core_1['Types'][_0x160dbe(0xd9)](_0x55db03)&&await _0x55db03(typeof(_0x3942b6===null||_0x3942b6===void 0x0?void 0x0:_0x3942b6[_0x160dbe(0xc4)])==_0x160dbe(0xd1)&&(_0x3942b6===null||_0x3942b6===void 0x0?void 0x0:_0x3942b6[_0x160dbe(0xca)])?_0x3942b6[_0x160dbe(0xc4)][_0x160dbe(0x93)]()+'@'+(_0x3942b6===null||_0x3942b6===void 0x0?void 0x0:_0x3942b6[_0x160dbe(0xca)]):undefined,_0x3942b6,_0x35801c);}}}return await _0x1b09a0['proceed'](..._0x1b09a0[_0x160dbe(0xc3)]);},'afterThrow':(_0x59b4d7,_0x596374)=>{throw _0x596374;}};});}async[a2_0x5044dc(0xaa)](){const _0x888fa3=a2_0x5044dc;this[_0x888fa3(0xbd)][_0x888fa3(0xbb)]([_0x888fa3(0x7f)])[_0x888fa3(0x92)](_0x5acca9=>{const _0x2492d0=_0x888fa3;(_0x5acca9===null||_0x5acca9===void 0x0?void 0x0:_0x5acca9['context'])&&Object[_0x2492d0(0x9d)](_0x5acca9[_0x2492d0(0x94)],{'ok':{'value':function(_0x2638b4,_0x285911,_0x40245d=0x0){return{'code':_0x40245d,'data':_0x2638b4,'extra':_0x285911};}},'input':{'value':function(_0x5a931f,_0x593eef){const _0x205ca9=_0x2492d0;var _0x3d2d20;const _0x6ef876=lodash[_0x205ca9(0xab)]({},this[_0x205ca9(0x87)][_0x205ca9(0xd7)]||this['request'][((_0x3d2d20=config===null||config===void 0x0?void 0x0:config[_0x205ca9(0xb3)])===null||_0x3d2d20===void 0x0?void 0x0:_0x3d2d20[_0x205ca9(0x91)])||_0x205ca9(0xd7)]||{},this[_0x205ca9(0x87)][_0x205ca9(0xcc)]||{});return _0x5a931f?lodash[_0x205ca9(0xd2)](_0x6ef876,_0x5a931f,_0x593eef):_0x6ef876;}},'when':{'value':async function(_0x2966bb,_0x5793e4){const _0x3da5fe=this['input'](_0x2966bb,null);if(!lodash['isNull'](_0x3da5fe))return await _0x5793e4(_0x3da5fe);}},'only':{'value':function(_0x223a1a){const _0x2fc521=_0x2492d0,_0x154027={};for(let _0x691ef9=0x0;_0x691ef9<_0x223a1a[_0x2fc521(0xb8)];_0x691ef9++){lodash[_0x2fc521(0xce)](_0x223a1a[_0x691ef9])&&_0x223a1a[_0x691ef9][_0x2fc521(0xb8)]>0x0&&lodash[_0x2fc521(0xd6)](_0x223a1a[_0x691ef9][0x0])&&(_0x154027[_0x223a1a[_0x691ef9][0x0]]=this[_0x2fc521(0xac)](_0x223a1a[_0x691ef9][0x0],_0x223a1a[_0x691ef9][_0x2fc521(0xb8)]>0x1?_0x223a1a[_0x691ef9][0x1]:null));}return _0x154027;}}});});}async[a2_0x5044dc(0x86)](){const _0x53fa89=a2_0x5044dc;var _0x2a9f09,_0x886f2a,_0x1cb334,_0x1faf09,_0x597ebe,_0x10d99f;const _0x4d7bcb=this['config'][_0x53fa89(0xa2)]();((_0x886f2a=(_0x2a9f09=_0x4d7bcb===null||_0x4d7bcb===void 0x0?void 0x0:_0x4d7bcb[_0x53fa89(0xd3)])===null||_0x2a9f09===void 0x0?void 0x0:_0x2a9f09[_0x53fa89(0x96)])===null||_0x886f2a===void 0x0?void 0x0:_0x886f2a[_0x53fa89(0x7c)])&&Object[_0x53fa89(0xaf)](_0x4d7bcb[_0x53fa89(0xd3)]['devices'])['length']>0x1&&delete _0x4d7bcb['anncicapi'][_0x53fa89(0x96)]['DEFAULT'];if((_0x1cb334=_0x4d7bcb===null||_0x4d7bcb===void 0x0?void 0x0:_0x4d7bcb[_0x53fa89(0x77)])===null||_0x1cb334===void 0x0?void 0x0:_0x1cb334[_0x53fa89(0x8c)])for(const _0x5b8917 in _0x4d7bcb[_0x53fa89(0x77)][_0x53fa89(0x8c)]){((_0x1faf09=_0x4d7bcb[_0x53fa89(0x77)][_0x53fa89(0x8c)][_0x5b8917])===null||_0x1faf09===void 0x0?void 0x0:_0x1faf09['dir'])&&typeof((_0x597ebe=_0x4d7bcb[_0x53fa89(0x77)][_0x53fa89(0x8c)][_0x5b8917])===null||_0x597ebe===void 0x0?void 0x0:_0x597ebe[_0x53fa89(0x85)])==_0x53fa89(0xd1)&&!fs[_0x53fa89(0x99)](_0x4d7bcb[_0x53fa89(0x77)][_0x53fa89(0x8c)][_0x5b8917][_0x53fa89(0x85)])&&(fs[_0x53fa89(0x7b)](_0x4d7bcb[_0x53fa89(0x77)][_0x53fa89(0x8c)][_0x5b8917][_0x53fa89(0x85)],{'recursive':!![]}),console[_0x53fa89(0xcd)]('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x4d7bcb['staticFile'][_0x53fa89(0x8c)][_0x5b8917][_0x53fa89(0x85)]));}((_0x10d99f=_0x4d7bcb===null||_0x4d7bcb===void 0x0?void 0x0:_0x4d7bcb[_0x53fa89(0xae)])===null||_0x10d99f===void 0x0?void 0x0:_0x10d99f[_0x53fa89(0xa3)])&&!fs[_0x53fa89(0x99)](_0x4d7bcb[_0x53fa89(0xae)][_0x53fa89(0xa3)])&&(fs[_0x53fa89(0x7b)](_0x4d7bcb[_0x53fa89(0xae)][_0x53fa89(0xa3)],{'recursive':!![]}),console[_0x53fa89(0xcd)](_0x53fa89(0xa5)+_0x4d7bcb[_0x53fa89(0xae)][_0x53fa89(0xa3)])),this[_0x53fa89(0xb7)][_0x53fa89(0x8a)](_0x4d7bcb);}};__decorate([(0x0,core_1[a2_0x5044dc(0x83)])(),__metadata(a2_0x5044dc(0x8e),core_2[a2_0x5044dc(0xcb)])],CustomConfiguration[a2_0x5044dc(0xbc)],a2_0x5044dc(0xb7),void 0x0),__decorate([(0x0,core_1[a2_0x5044dc(0x83)])(),__metadata(a2_0x5044dc(0x8e),core_2[a2_0x5044dc(0xc5)])],CustomConfiguration[a2_0x5044dc(0xbc)],a2_0x5044dc(0xcf),void 0x0),__decorate([(0x0,core_1[a2_0x5044dc(0x83)])(),__metadata(a2_0x5044dc(0x8e),core_2[a2_0x5044dc(0x78)])],CustomConfiguration['prototype'],'application',void 0x0),__decorate([(0x0,core_1[a2_0x5044dc(0x83)])(),__metadata('design:type',core_2[a2_0x5044dc(0xd0)])],CustomConfiguration[a2_0x5044dc(0xbc)],'environment',void 0x0),__decorate([(0x0,core_1[a2_0x5044dc(0x83)])(),__metadata(a2_0x5044dc(0x8e),ApiService_1[a2_0x5044dc(0xc9)])],CustomConfiguration['prototype'],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x5044dc(0x97)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x5044dc(0x79),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x5044dc(0xd4)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x37d6fa=a3_0x4cc4;(function(_0x36e558,_0x47740f){const _0x577201=a3_0x4cc4,_0x4f8a29=_0x36e558();while(!![]){try{const _0x41bf56=-parseInt(_0x577201(0x17f))/0x1+-parseInt(_0x577201(0x170))/0x2+parseInt(_0x577201(0x164))/0x3+parseInt(_0x577201(0x18b))/0x4+-parseInt(_0x577201(0x185))/0x5*(-parseInt(_0x577201(0x182))/0x6)+parseInt(_0x577201(0x16a))/0x7*(-parseInt(_0x577201(0x163))/0x8)+parseInt(_0x577201(0x17a))/0x9*(parseInt(_0x577201(0x18e))/0xa);if(_0x41bf56===_0x47740f)break;else _0x4f8a29['push'](_0x4f8a29['shift']());}catch(_0x4ecb5c){_0x4f8a29['push'](_0x4f8a29['shift']());}}}(a3_0x1ce0,0x573b3));function a3_0x1ce0(){const _0x588996=['split','middlewareIgnore','10vPxhVz','apps/','Action','saveModule','rootpath','middleware','defineProperty','app/controller/','@midwayjs/core','\x20文件请放在apps/','976snCTSF','1261257LPcBvT','parseRoute','saveClassMetadata','getClassMetadata','/controller/文件下','filter','8344IJfJIN','replace','-action','substring','-controller','join','744900rttaHg','indexOf','AppsConfigTmp','startsWith','isArray','toLowerCase','route','Controller','tagName','existsSync','3434013hDXKwG','match','length','prefix','/apps/','594388NKkBQT','/controller/','/config.','138iveLhU','module','ACTION_KEY','87555UVMEJH','filepath','APPSCONFIG_KEY','endsWith','trim','push','1059328jlXNvD'];a3_0x1ce0=function(){return _0x588996;};return a3_0x1ce0();}Object[a3_0x37d6fa(0x15f)](exports,'__esModule',{'value':!![]}),exports['parseRoute']=exports['Action']=void 0x0;const fs=require('fs'),core_1=require(a3_0x37d6fa(0x161)),action_1=require('../types/action');function a3_0x4cc4(_0x48ef0e,_0x19663f){const _0x1ce0b7=a3_0x1ce0();return a3_0x4cc4=function(_0x4cc4e5,_0x17c78f){_0x4cc4e5=_0x4cc4e5-0x15d;let _0x42b209=_0x1ce0b7[_0x4cc4e5];return _0x42b209;},a3_0x4cc4(_0x48ef0e,_0x19663f);}function Action(_0x3424ac,_0x463296,_0x5db956={'middleware':[],'sensitive':!![]}){return _0x5d49a1=>{const _0x4521c1=a3_0x4cc4;_0x5db956[_0x4521c1(0x178)]=_0x463296;const _0x2797d8=parseRoute(_0x3424ac);if(_0x2797d8['module']){_0x5db956[_0x4521c1(0x17d)]=_0x5db956[_0x4521c1(0x17d)]?'/'+_0x2797d8[_0x4521c1(0x183)]+'/'+_0x5db956[_0x4521c1(0x17d)]:'/'+_0x2797d8[_0x4521c1(0x176)];_0x2797d8[_0x4521c1(0x17d)]&&(_0x5db956[_0x4521c1(0x17d)]='/'+_0x2797d8[_0x4521c1(0x17d)]+'/'+_0x5db956[_0x4521c1(0x17d)]);if(fs[_0x4521c1(0x179)](_0x2797d8[_0x4521c1(0x15d)]+_0x4521c1(0x17e)+_0x2797d8[_0x4521c1(0x183)]+'/config.'+(lodash[_0x4521c1(0x188)](_0x2797d8[_0x4521c1(0x186)],'ts')?'ts':'js'))){const _0x51fb2a=include(_0x2797d8[_0x4521c1(0x15d)]+'/apps/'+_0x2797d8[_0x4521c1(0x183)]+_0x4521c1(0x181)+(lodash[_0x4521c1(0x188)](_0x2797d8[_0x4521c1(0x186)],'ts')?'ts':'js'));if(_0x51fb2a[_0x4521c1(0x15e)]&&lodash[_0x4521c1(0x174)](_0x51fb2a[_0x4521c1(0x15e)])&&_0x51fb2a[_0x4521c1(0x15e)][_0x4521c1(0x17c)]>0x0)for(let _0x2eced7 in _0x51fb2a[_0x4521c1(0x15e)]){_0x51fb2a[_0x4521c1(0x18d)][_0x4521c1(0x171)](_0x51fb2a[_0x4521c1(0x15e)][_0x2eced7])==-0x1&&_0x5db956[_0x4521c1(0x15e)][_0x4521c1(0x18a)](_0x51fb2a['middleware'][_0x2eced7]);}const _0x47a2e6=(0x0,core_1[_0x4521c1(0x167)])(action_1[_0x4521c1(0x187)],action_1[_0x4521c1(0x172)])||{};_0x47a2e6[''+_0x2797d8[_0x4521c1(0x183)]]=_0x51fb2a,(0x0,core_1[_0x4521c1(0x166)])(action_1[_0x4521c1(0x187)],_0x47a2e6,action_1[_0x4521c1(0x172)]);}_0x5db956['prefix']=_0x5db956[_0x4521c1(0x17d)][_0x4521c1(0x175)]()[_0x4521c1(0x16b)](/\/{2,}/g,'/'),(0x0,core_1['saveModule'])(action_1['ACTION_KEY'],_0x5d49a1),(0x0,core_1[_0x4521c1(0x177)])(_0x5db956[_0x4521c1(0x17d)],_0x5db956)(_0x5d49a1),(0x0,core_1[_0x4521c1(0x166)])(action_1['ACTION_KEY'],{'prefix':_0x5db956[_0x4521c1(0x17d)],'pprefix':_0x2797d8[_0x4521c1(0x17d)],'module':_0x2797d8[_0x4521c1(0x183)],'filepath':_0x2797d8[_0x4521c1(0x186)],'routerOptions':_0x5db956},_0x5d49a1);}else _0x5db956[_0x4521c1(0x17d)]=_0x5db956['prefix']?'/'+_0x5db956[_0x4521c1(0x17d)]:'/'+_0x2797d8[_0x4521c1(0x176)],_0x2797d8['prefix']&&(_0x5db956[_0x4521c1(0x17d)]='/'+_0x2797d8['prefix']+'/'+_0x5db956[_0x4521c1(0x17d)]),_0x5db956[_0x4521c1(0x17d)]=_0x5db956[_0x4521c1(0x17d)][_0x4521c1(0x175)]()[_0x4521c1(0x16b)](/\/{2,}/g,'/'),(0x0,core_1[_0x4521c1(0x191)])(action_1[_0x4521c1(0x184)],_0x5d49a1),(0x0,core_1['Controller'])(_0x5db956[_0x4521c1(0x17d)],_0x5db956)(_0x5d49a1),(0x0,core_1['saveClassMetadata'])(action_1['ACTION_KEY'],{'prefix':_0x5db956['prefix'],'module':_0x2797d8['module'],'pprefix':_0x2797d8[_0x4521c1(0x17d)],'filepath':_0x2797d8[_0x4521c1(0x186)],'routerOptions':_0x5db956},_0x5d49a1);};}exports[a3_0x37d6fa(0x190)]=Action;function parseRoute(_0x3eed6f){const _0x2a84a5=a3_0x37d6fa;_0x3eed6f=_0x3eed6f[_0x2a84a5(0x16b)](/(\\|\/)/g,'/');const _0x42e3b5=process['cwd']()[_0x2a84a5(0x16b)](/(\\|\/)/g,'/'),_0x181c1e=_0x3eed6f[_0x2a84a5(0x16d)](0x0,_0x42e3b5['length']+_0x3eed6f[_0x2a84a5(0x16d)](_0x42e3b5[_0x2a84a5(0x17c)]+0x1)[_0x2a84a5(0x171)]('/')+0x1),_0x493ea9=_0x3eed6f[_0x2a84a5(0x16d)](_0x181c1e[_0x2a84a5(0x17c)]+0x1)[_0x2a84a5(0x16b)](/(\\|\/)/g,'/'),_0x199c70={'route':'','prefix':![],'module':![],'rootpath':_0x181c1e,'filepath':_0x493ea9};if(_0x493ea9['startsWith'](_0x2a84a5(0x160))){const _0x3f49b8=_0x493ea9[_0x2a84a5(0x16d)](_0x2a84a5(0x160)['length'])[_0x2a84a5(0x18c)]('/')[_0x2a84a5(0x169)](_0x17db03=>_0x17db03&&_0x17db03[_0x2a84a5(0x189)]());return _0x3f49b8[_0x2a84a5(0x17c)]>0x1&&(_0x199c70[_0x2a84a5(0x17d)]=_0x3f49b8[0x0][_0x2a84a5(0x175)](),_0x3f49b8['splice'](0x0,0x1)),_0x199c70['route']=('/'+_0x3f49b8['join']('/'))['replace'](/(\.ts|\.js)$/,'')[_0x2a84a5(0x16b)](/\/{2,}/g,'/')[_0x2a84a5(0x17b)](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x2a84a5(0x175)]()[_0x2a84a5(0x16b)](/\/\-/g,'/'),_0x199c70[_0x2a84a5(0x176)][_0x2a84a5(0x188)](_0x2a84a5(0x16c))&&(_0x199c70[_0x2a84a5(0x176)]=_0x199c70['route']['substring'](0x0,_0x199c70[_0x2a84a5(0x176)][_0x2a84a5(0x17c)]-0x7)),_0x199c70['route']['endsWith'](_0x2a84a5(0x16e))&&(_0x199c70[_0x2a84a5(0x176)]=_0x199c70['route'][_0x2a84a5(0x16d)](0x0,_0x199c70[_0x2a84a5(0x176)][_0x2a84a5(0x17c)]-0xb)),_0x199c70;}else{if(_0x493ea9[_0x2a84a5(0x173)](_0x2a84a5(0x18f))){const _0x2aced9=_0x493ea9[_0x2a84a5(0x16d)](0x0,_0x493ea9['indexOf'](_0x2a84a5(0x17e))+0x5),_0x34661d=_0x493ea9[_0x2a84a5(0x16d)](_0x2aced9[_0x2a84a5(0x17c)]+0x1)[_0x2a84a5(0x16b)](/(\\|\/)/g,'/')[_0x2a84a5(0x18c)]('/')[0x0];if(_0x493ea9['startsWith']('apps/'+_0x34661d+'/controller/')){const _0x272fc3=_0x493ea9[_0x2a84a5(0x16d)]((_0x2aced9+'/'+_0x34661d+_0x2a84a5(0x180))['length'])[_0x2a84a5(0x18c)]('/')[_0x2a84a5(0x169)](_0x317aec=>_0x317aec&&_0x317aec['trim']());return _0x272fc3[_0x2a84a5(0x17c)]>0x1&&(_0x199c70[_0x2a84a5(0x17d)]=_0x272fc3[0x0]['toLowerCase'](),_0x272fc3['splice'](0x0,0x1)),_0x199c70[_0x2a84a5(0x183)]=_0x34661d,_0x199c70[_0x2a84a5(0x176)]=('/'+_0x34661d+'/'+_0x272fc3['join']('/'))['replace'](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x2a84a5(0x16f)]('-')[_0x2a84a5(0x175)]()[_0x2a84a5(0x16b)](/\/\-/g,'/'),_0x199c70[_0x2a84a5(0x176)][_0x2a84a5(0x188)](_0x2a84a5(0x16c))&&(_0x199c70[_0x2a84a5(0x176)]=_0x199c70[_0x2a84a5(0x176)]['substring'](0x0,_0x199c70[_0x2a84a5(0x176)][_0x2a84a5(0x17c)]-0x7)),_0x199c70[_0x2a84a5(0x176)]['endsWith'](_0x2a84a5(0x16e))&&(_0x199c70[_0x2a84a5(0x176)]=_0x199c70[_0x2a84a5(0x176)][_0x2a84a5(0x16d)](0x0,_0x199c70['route'][_0x2a84a5(0x17c)]-0xb)),_0x199c70;}throw new Error(_0x493ea9+_0x2a84a5(0x162)+_0x34661d+_0x2a84a5(0x168));}}throw new Error(_0x493ea9+'\x20文件请放在app/controller/文件下');}exports[a3_0x37d6fa(0x165)]=parseRoute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x46071c=a4_0x4b09;(function(_0x3755a9,_0x38fbe3){const _0x505ed4=a4_0x4b09,_0x261af5=_0x3755a9();while(!![]){try{const _0x256a01=-parseInt(_0x505ed4(0x17c))/0x1*(-parseInt(_0x505ed4(0x177))/0x2)+-parseInt(_0x505ed4(0x175))/0x3*(-parseInt(_0x505ed4(0x178))/0x4)+-parseInt(_0x505ed4(0x17f))/0x5+-parseInt(_0x505ed4(0x191))/0x6+parseInt(_0x505ed4(0x184))/0x7*(parseInt(_0x505ed4(0x17b))/0x8)+-parseInt(_0x505ed4(0x176))/0x9*(-parseInt(_0x505ed4(0x171))/0xa)+parseInt(_0x505ed4(0x193))/0xb*(parseInt(_0x505ed4(0x181))/0xc);if(_0x256a01===_0x38fbe3)break;else _0x261af5['push'](_0x261af5['shift']());}catch(_0x3a9b00){_0x261af5['push'](_0x261af5['shift']());}}}(a4_0x2346,0x6a3f9));function a4_0x2346(){const _0x2bc4bc=['assign','defineProperty','description','../types/action','validationOptions','toLowerCase','3049056gfnsSt','RequestMapping','180345OITSmH','attachClassMetadata','delete','6735170TSvFPV','apimit','routerName','middlewareIgnore','204JCfckK','9pdtZZI','38ilqpFg','868NJrHyy','filter','del','2106920GvWnDl','3760KMKKrh','__esModule','Api','1546195syXmvc','get','168mhBTJt','middleware','string','7UXampM','createCustomMethodDecorator','ACTION_ROUTE_KEY','validate','@midwayjs/core','Validator','indexOf'];a4_0x2346=function(){return _0x2bc4bc;};return a4_0x2346();}Object[a4_0x46071c(0x18c)](exports,a4_0x46071c(0x17d),{'value':!![]}),exports['Api']=void 0x0;function a4_0x4b09(_0x2ce67a,_0x23a1bb){const _0x234623=a4_0x2346();return a4_0x4b09=function(_0x4b09e8,_0x4fd30e){_0x4b09e8=_0x4b09e8-0x170;let _0x198f23=_0x234623[_0x4b09e8];return _0x198f23;},a4_0x4b09(_0x2ce67a,_0x23a1bb);}const validator_1=require('@anncic-api/validator'),core_1=require(a4_0x46071c(0x188)),action_1=require(a4_0x46071c(0x18e));function Api(_0x2fd931,_0x50f0d5=a4_0x46071c(0x180),_0x1cd252='/',_0x27b6a9={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x459931,_0x248f61,_0x1f9177)=>{const _0x5f2631=a4_0x4b09;var _0x2189fe,_0x30338b,_0x34749e;!_0x27b6a9[_0x5f2631(0x182)]&&(_0x27b6a9[_0x5f2631(0x182)]=[]);!((_0x2189fe=_0x27b6a9===null||_0x27b6a9===void 0x0?void 0x0:_0x27b6a9['validate'])===null||_0x2189fe===void 0x0?void 0x0:_0x2189fe[_0x5f2631(0x18f)])&&(_0x27b6a9[_0x5f2631(0x187)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x5f2631(0x183)}});if(((_0x30338b=_0x27b6a9===null||_0x27b6a9===void 0x0?void 0x0:_0x27b6a9[_0x5f2631(0x182)])===null||_0x30338b===void 0x0?void 0x0:_0x30338b['length'])>0x0&&((_0x34749e=_0x27b6a9===null||_0x27b6a9===void 0x0?void 0x0:_0x27b6a9['middlewareIgnore'])===null||_0x34749e===void 0x0?void 0x0:_0x34749e['length'])>0x0)for(let _0x5de7ee in _0x27b6a9[_0x5f2631(0x182)]){_0x27b6a9[_0x5f2631(0x174)][_0x5f2631(0x18a)](_0x27b6a9[_0x5f2631(0x182)][_0x5de7ee])!==-0x1&&(_0x27b6a9[_0x5f2631(0x182)][_0x5de7ee]=null);}_0x27b6a9[_0x5f2631(0x173)]=_0x2fd931,(0x0,validator_1[_0x5f2631(0x189)])(_0x27b6a9[_0x5f2631(0x187)])(_0x459931,_0x248f61,_0x1f9177),(0x0,core_1[_0x5f2631(0x192)])(Object[_0x5f2631(0x18b)](_0x27b6a9,{'path':_0x1cd252,'requestMethod':(_0x50f0d5==_0x5f2631(0x17a)?'delete':_0x50f0d5)['toLowerCase']()}))(_0x459931,_0x248f61,_0x1f9177),(0x0,core_1[_0x5f2631(0x194)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x1cd252,'method':_0x248f61,'apimit':_0x27b6a9[_0x5f2631(0x172)],'routerName':_0x27b6a9[_0x5f2631(0x173)],'description':_0x27b6a9[_0x5f2631(0x18d)],'middleware':(_0x27b6a9[_0x5f2631(0x182)]||[])['filter'](_0x46d340=>!!_0x46d340),'requestMethod':(_0x50f0d5==_0x5f2631(0x17a)?_0x5f2631(0x170):_0x50f0d5)[_0x5f2631(0x190)]()},_0x459931),(0x0,core_1[_0x5f2631(0x185)])(action_1[_0x5f2631(0x186)],{'path':_0x1cd252,'method':_0x248f61,'apimit':_0x27b6a9[_0x5f2631(0x172)],'routerName':_0x27b6a9[_0x5f2631(0x173)],'description':_0x27b6a9['description'],'middleware':(_0x27b6a9[_0x5f2631(0x182)]||[])[_0x5f2631(0x179)](_0xb112e3=>!!_0xb112e3),'requestMethod':(_0x50f0d5==_0x5f2631(0x17a)?_0x5f2631(0x170):_0x50f0d5)[_0x5f2631(0x190)]()})(_0x459931,_0x248f61,_0x1f9177);};}exports[a4_0x46071c(0x17e)]=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a5_0x501e(_0x3e7350,_0x2c0a1e){const _0x3d7b47=a5_0x3d7b();return a5_0x501e=function(_0x501edf,_0x2ae7aa){_0x501edf=_0x501edf-0x1ad;let _0x2116a8=_0x3d7b47[_0x501edf];return _0x2116a8;},a5_0x501e(_0x3e7350,_0x2c0a1e);}const a5_0x36e6f1=a5_0x501e;(function(_0x5750c2,_0x14364f){const _0x6861db=a5_0x501e,_0x36182d=_0x5750c2();while(!![]){try{const _0x4f2433=parseInt(_0x6861db(0x1b3))/0x1+-parseInt(_0x6861db(0x1b8))/0x2*(-parseInt(_0x6861db(0x1ae))/0x3)+-parseInt(_0x6861db(0x1b7))/0x4*(parseInt(_0x6861db(0x1b5))/0x5)+-parseInt(_0x6861db(0x1bb))/0x6+parseInt(_0x6861db(0x1af))/0x7+-parseInt(_0x6861db(0x1b1))/0x8+parseInt(_0x6861db(0x1c1))/0x9*(parseInt(_0x6861db(0x1b6))/0xa);if(_0x4f2433===_0x14364f)break;else _0x36182d['push'](_0x36182d['shift']());}catch(_0x2f9c2d){_0x36182d['push'](_0x36182d['shift']());}}}(a5_0x3d7b,0x90fc4));Object[a5_0x36e6f1(0x1ad)](exports,a5_0x36e6f1(0x1bf),{'value':!![]}),exports['Apitest']=void 0x0;function a5_0x3d7b(){const _0x1b53ef=['8478992yOYbSw','value','710279QhcJQb','app','1661005rsOLty','9050NAKTqc','4NUvlKE','2818bHaLHb','getConfig','apidoc','5704440iBIoUt','apitest','ApitestService','Apitest','__esModule','getApplicationContext','4554BkriZS','MidwayEnvironmentService','RequestMapping','REQUEST_OBJ_CTX_KEY','defineProperty','1413WfJbkB','7733789ByYckp','getAsync'];a5_0x3d7b=function(){return _0x1b53ef;};return a5_0x3d7b();}const core_1=require('@midwayjs/core'),ApitestService_1=require('../service/ApitestService');function Apitest(_0x59d262='/apitest',_0x1929cc){return(_0x37234a,_0xa9c5e2,_0x4cabff)=>{const _0x74c8bc=a5_0x501e;return(0x0,core_1[_0x74c8bc(0x1c3)])({'path':_0x59d262,'requestMethod':'get'})(_0x37234a,_0xa9c5e2,_0x4cabff),_0x4cabff[_0x74c8bc(0x1b2)]=async function(..._0x18fc2a){const _0xd154d2=_0x74c8bc;var _0x29a674;const _0x231420=(_0x29a674=this[core_1[_0xd154d2(0x1c4)]])===null||_0x29a674===void 0x0?void 0x0:_0x29a674[_0xd154d2(0x1b4)];if(_0x231420&&_0x231420[_0xd154d2(0x1b9)](_0xd154d2(0x1bc))){const _0x13e15a=await _0x231420[_0xd154d2(0x1c0)]()[_0xd154d2(0x1b0)](ApitestService_1[_0xd154d2(0x1bd)]),_0x3186db=await _0x231420['getApplicationContext']()['getAsync'](core_1[_0xd154d2(0x1c2)]);return _0x3186db['isDevelopmentEnvironment']()&&(_0x1929cc['filepath']=!![]),await _0x13e15a[_0xd154d2(0x1ba)](_0x1929cc);}return'';},_0x4cabff;};}exports[a5_0x36e6f1(0x1be)]=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a6_0x4621(){var _0x30b30c=['design:type','验证失败,请重新登录','8fogHcf','5441870qPuxyV','function','HEADERS_SIGNATURE','2540736Mdtbsn','__metadata','defineProperty','ApiError','2210607SRdpMC','__decorate','TIMEOUT','decorate','HEADERS_DEVICE','6104930kAsJFB','object','87KaOgos','813457yeSQQi','网络繁忙,请稍后重试','HEADERS_LACK','2332884FJRXxv','请使用正确的设备','284OlvyYw','length','HEADERS_CHECKCODE','__esModule'];a6_0x4621=function(){return _0x30b30c;};return a6_0x4621();}var a6_0x456bb8=a6_0x5478;function a6_0x5478(_0x14ddd5,_0x1d2977){var _0x4621cb=a6_0x4621();return a6_0x5478=function(_0x5478c5,_0xbe99ff){_0x5478c5=_0x5478c5-0x17b;var _0x810bcb=_0x4621cb[_0x5478c5];return _0x810bcb;},a6_0x5478(_0x14ddd5,_0x1d2977);}(function(_0x3f23ce,_0x6e420c){var _0x25f196=a6_0x5478,_0x18f148=_0x3f23ce();while(!![]){try{var _0x3fafe5=parseInt(_0x25f196(0x183))/0x1+parseInt(_0x25f196(0x192))/0x2+-parseInt(_0x25f196(0x182))/0x3*(parseInt(_0x25f196(0x188))/0x4)+-parseInt(_0x25f196(0x180))/0x5+parseInt(_0x25f196(0x186))/0x6+-parseInt(_0x25f196(0x18f))/0x7+-parseInt(_0x25f196(0x18e))/0x8*(-parseInt(_0x25f196(0x17b))/0x9);if(_0x3fafe5===_0x6e420c)break;else _0x18f148['push'](_0x18f148['shift']());}catch(_0x341b28){_0x18f148['push'](_0x18f148['shift']());}}}(a6_0x4621,0xaf3ef));var __decorate=this&&this[a6_0x456bb8(0x17c)]||function(_0x5814fa,_0x55b03f,_0x17d419,_0x443b40){var _0x431209=a6_0x456bb8,_0x318533=arguments[_0x431209(0x189)],_0x4207c3=_0x318533<0x3?_0x55b03f:_0x443b40===null?_0x443b40=Object['getOwnPropertyDescriptor'](_0x55b03f,_0x17d419):_0x443b40,_0x2a0a78;if(typeof Reflect===_0x431209(0x181)&&typeof Reflect[_0x431209(0x17e)]===_0x431209(0x190))_0x4207c3=Reflect[_0x431209(0x17e)](_0x5814fa,_0x55b03f,_0x17d419,_0x443b40);else{for(var _0x2eacd9=_0x5814fa[_0x431209(0x189)]-0x1;_0x2eacd9>=0x0;_0x2eacd9--)if(_0x2a0a78=_0x5814fa[_0x2eacd9])_0x4207c3=(_0x318533<0x3?_0x2a0a78(_0x4207c3):_0x318533>0x3?_0x2a0a78(_0x55b03f,_0x17d419,_0x4207c3):_0x2a0a78(_0x55b03f,_0x17d419))||_0x4207c3;}return _0x318533>0x3&&_0x4207c3&&Object[_0x431209(0x194)](_0x55b03f,_0x17d419,_0x4207c3),_0x4207c3;},__metadata=this&&this[a6_0x456bb8(0x193)]||function(_0x2dbe79,_0x2a0011){var _0x5d0ccb=a6_0x456bb8;if(typeof Reflect===_0x5d0ccb(0x181)&&typeof Reflect['metadata']==='function')return Reflect['metadata'](_0x2dbe79,_0x2a0011);};Object[a6_0x456bb8(0x194)](exports,a6_0x456bb8(0x18b),{'value':!![]}),exports[a6_0x456bb8(0x195)]=void 0x0;class ApiError{}ApiError[a6_0x456bb8(0x17d)]=0x3d7e31,ApiError['HEADERS_LACK']=0x3d7e32,ApiError['HEADERS_DEVICE']=0x3d7e33,ApiError[a6_0x456bb8(0x18a)]=0x3d7e34,ApiError['HEADERS_SIGNATURE']=0x3d7e35,__decorate([AnnErrorMsg(a6_0x456bb8(0x184)),__metadata(a6_0x456bb8(0x18c),Object)],ApiError,a6_0x456bb8(0x17d),void 0x0),__decorate([AnnErrorMsg('请求头信息不完整'),__metadata(a6_0x456bb8(0x18c),Object)],ApiError,a6_0x456bb8(0x185),void 0x0),__decorate([AnnErrorMsg(a6_0x456bb8(0x187)),__metadata(a6_0x456bb8(0x18c),Object)],ApiError,a6_0x456bb8(0x17f),void 0x0),__decorate([AnnErrorMsg(a6_0x456bb8(0x18d)),__metadata(a6_0x456bb8(0x18c),Object)],ApiError,'HEADERS_CHECKCODE',void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a6_0x456bb8(0x18c),Object)],ApiError,a6_0x456bb8(0x191),void 0x0),exports[a6_0x456bb8(0x195)]=ApiError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a7_0x1a0e(_0x3069f5,_0x492ae1){const _0x2da870=a7_0x2da8();return a7_0x1a0e=function(_0x1a0eff,_0x21b8c9){_0x1a0eff=_0x1a0eff-0x121;let _0xe60626=_0x2da870[_0x1a0eff];return _0xe60626;},a7_0x1a0e(_0x3069f5,_0x492ae1);}const a7_0x3a8780=a7_0x1a0e;(function(_0x32e9ab,_0x23e2d8){const _0xec3e36=a7_0x1a0e,_0x490fe2=_0x32e9ab();while(!![]){try{const _0x2403ac=-parseInt(_0xec3e36(0x130))/0x1+parseInt(_0xec3e36(0x129))/0x2+-parseInt(_0xec3e36(0x128))/0x3*(-parseInt(_0xec3e36(0x12a))/0x4)+parseInt(_0xec3e36(0x122))/0x5*(-parseInt(_0xec3e36(0x126))/0x6)+parseInt(_0xec3e36(0x125))/0x7+-parseInt(_0xec3e36(0x12f))/0x8+parseInt(_0xec3e36(0x12d))/0x9;if(_0x2403ac===_0x23e2d8)break;else _0x490fe2['push'](_0x490fe2['shift']());}catch(_0x58c92e){_0x490fe2['push'](_0x490fe2['shift']());}}}(a7_0x2da8,0x51ce6));function a7_0x2da8(){const _0x3a7e3b=['296875rAIpoP','__esModule','18455gFrjBi','get','AppsConfigTmp','1263878jFJgpL','1002ioFcSx','getClassMetadata','6zaQmOv','674744ubJgSL','338524BWFDkq','getAppsConfig','@midwayjs/core','5602041rlRjgZ','APPSCONFIG_KEY','490296PomPyW'];a7_0x2da8=function(){return _0x3a7e3b;};return a7_0x2da8();}Object['defineProperty'](exports,a7_0x3a8780(0x121),{'value':!![]}),exports[a7_0x3a8780(0x12b)]=void 0x0;const core_1=require(a7_0x3a8780(0x12c)),action_1=require('../types/action');function getAppsConfig(_0x32020e){const _0x10f70c=a7_0x3a8780,_0x273bb7=(0x0,core_1[_0x10f70c(0x127)])(action_1[_0x10f70c(0x12e)],action_1[_0x10f70c(0x124)])||{};return _0x32020e?lodash[_0x10f70c(0x123)](_0x273bb7,_0x32020e):_0x273bb7;}exports[a7_0x3a8780(0x12b)]=getAppsConfig;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a8_0x187a(_0x42758f,_0x116095){const _0x28bb38=a8_0x28bb();return a8_0x187a=function(_0x187aa7,_0x2bd314){_0x187aa7=_0x187aa7-0x145;let _0x2589ba=_0x28bb38[_0x187aa7];return _0x2589ba;},a8_0x187a(_0x42758f,_0x116095);}const a8_0x43e050=a8_0x187a;(function(_0x12d448,_0x419e12){const _0x2558a6=a8_0x187a,_0x5402c8=_0x12d448();while(!![]){try{const _0x17160b=-parseInt(_0x2558a6(0x168))/0x1+-parseInt(_0x2558a6(0x14c))/0x2+parseInt(_0x2558a6(0x165))/0x3*(-parseInt(_0x2558a6(0x174))/0x4)+-parseInt(_0x2558a6(0x16c))/0x5*(parseInt(_0x2558a6(0x19b))/0x6)+parseInt(_0x2558a6(0x183))/0x7*(parseInt(_0x2558a6(0x151))/0x8)+parseInt(_0x2558a6(0x173))/0x9*(-parseInt(_0x2558a6(0x16e))/0xa)+parseInt(_0x2558a6(0x176))/0xb;if(_0x17160b===_0x419e12)break;else _0x5402c8['push'](_0x5402c8['shift']());}catch(_0x2a5c93){_0x5402c8['push'](_0x5402c8['shift']());}}}(a8_0x28bb,0x98d5d));Object[a8_0x43e050(0x15d)](exports,a8_0x43e050(0x148),{'value':!![]}),exports[a8_0x43e050(0x18c)]=void 0x0;function a8_0x28bb(){const _0x23e069=['split','summary','routerOptions','WEB_ROUTER_PARAM_KEY','file','FILESTREAM','HEADERS','976955kcvFTN','flags.description','description','FIELDS','query','getClassExtendedMetadata','tagName','get','filepath','getRoutes','allow','listModule','RULES_KEY','limit','push','title','body','items','function','startsWith','@anncic-api/validator','只允许:[','string','routes','150324vDqRHl','prefix','path','object','文件上传-','lodash','length','test','boolean','route','metadata','children','__esModule','ACTION_ROUTE_KEY','module','Object','1186678mRpLiD','flags.default','method','File','default','24fHUiNU','request','type','Number','describe','name','flags.label','propertyData','indexOf','routerName','ACTION_KEY','concat','defineProperty','filter','getMethodParamTypes','RouteParamTypes','pprefix','getClassMetadata','required','static/apitest','15VNgZhn','key','@midwayjs/core','25524eAcWZM','String','join','parameterIndex','205nvHgUO','header','1420rnmWbJ','iterator','find','/static/apitest','replace','25101XnLqpp','5484ESqjEV','noreq','24819168Dqyabe','rules','-array','args','max','requestMethod'];a8_0x28bb=function(){return _0x23e069;};return a8_0x28bb();}const lodash_1=require(a8_0x43e050(0x1a0)),validator_1=require(a8_0x43e050(0x197)),core_1=require('@midwayjs/core'),core_2=require(a8_0x43e050(0x167)),core_3=require(a8_0x43e050(0x167)),action_1=require('../types/action');function getRoutes(_0x3663e1={'prefix':'/','module':![]}){const _0x26cd68=a8_0x43e050;var _0xd78c0d,_0x27302d;const _0x3dbc4c=(0x0,core_3[_0x26cd68(0x18e)])(action_1[_0x26cd68(0x15b)]),_0x359bb5={},_0x793bf5=Array['isArray'](_0x3663e1['filter']||[])?_0x3663e1['filter']||[]:[_0x3663e1[_0x26cd68(0x15e)]];_0x29599a:for(const _0x44745f of _0x3dbc4c){let _0x10178a=(0x0,core_3[_0x26cd68(0x162)])(action_1[_0x26cd68(0x15b)],_0x44745f),_0x56fbf1=(0x0,core_3[_0x26cd68(0x162)])(action_1[_0x26cd68(0x149)],_0x44745f);if(_0x10178a&&_0x56fbf1){let _0x178dbf=_0x10178a['prefix'],_0x483d2f={};if(_0x3663e1['module']&&(0x0,lodash_1['get'])(_0x10178a,_0x26cd68(0x14a),![])!=_0x3663e1[_0x26cd68(0x14a)])continue _0x29599a;else{if(_0x3663e1[_0x26cd68(0x14a)]===![]&&!!(0x0,lodash_1[_0x26cd68(0x18a)])(_0x10178a,_0x26cd68(0x14a),null))continue _0x29599a;}if(_0x3663e1[_0x26cd68(0x19c)]&&!_0x178dbf['startsWith'](_0x3663e1[_0x26cd68(0x19c)]))continue _0x29599a;_0x178dbf!=='/'?(_0x483d2f[_0x26cd68(0x17d)]=(_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a[_0x26cd68(0x17e)][_0x26cd68(0x189)])||(/^\//[_0x26cd68(0x1a2)](_0x178dbf)?_0x178dbf[_0x26cd68(0x17c)]('/')[0x1]:_0x178dbf),_0x483d2f['description']=(_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a[_0x26cd68(0x17e)][_0x26cd68(0x185)])||_0x483d2f[_0x26cd68(0x17d)],_0x483d2f[_0x26cd68(0x19a)]=[]):(_0x483d2f[_0x26cd68(0x17d)]=(_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a[_0x26cd68(0x17e)][_0x26cd68(0x189)])||'default',_0x483d2f[_0x26cd68(0x185)]=(_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a[_0x26cd68(0x17e)]['description'])||'',_0x483d2f[_0x26cd68(0x19a)]=[]);_0x3663e1[_0x26cd68(0x18b)]&&(_0x483d2f[_0x26cd68(0x18b)]=_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a[_0x26cd68(0x18b)]);(_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a[_0x26cd68(0x161)])&&(_0x483d2f[_0x26cd68(0x19c)]=_0x10178a[_0x26cd68(0x161)]);(_0x10178a===null||_0x10178a===void 0x0?void 0x0:_0x10178a['module'])&&(_0x483d2f[_0x26cd68(0x14a)]=_0x10178a[_0x26cd68(0x14a)]);let _0x2a1b49=(0x0,core_3[_0x26cd68(0x162)])(core_2['INJECT_CUSTOM_PARAM'],_0x44745f)||{};if(typeof _0x56fbf1[Symbol[_0x26cd68(0x16f)]]===_0x26cd68(0x195))for(let _0x28ae99 of _0x56fbf1){let _0x38fd22={};_0x38fd22[_0x26cd68(0x14e)]=_0x28ae99[_0x26cd68(0x17b)],_0x38fd22[_0x26cd68(0x145)]=(_0x178dbf+_0x28ae99[_0x26cd68(0x19d)])[_0x26cd68(0x172)](/\/{1,}/,'/'),_0x38fd22['summary']=(_0x28ae99===null||_0x28ae99===void 0x0?void 0x0:_0x28ae99[_0x26cd68(0x15a)])||_0x483d2f[_0x26cd68(0x17d)]||'default',_0x38fd22[_0x26cd68(0x185)]=(_0x28ae99===null||_0x28ae99===void 0x0?void 0x0:_0x28ae99[_0x26cd68(0x185)])||'',_0x38fd22[_0x26cd68(0x152)]=[];if(!(0x0,lodash_1[_0x26cd68(0x196)])(_0x38fd22[_0x26cd68(0x145)],_0x26cd68(0x164))&&!(0x0,lodash_1[_0x26cd68(0x196)])(_0x38fd22[_0x26cd68(0x145)],_0x26cd68(0x171))&&_0x793bf5[_0x26cd68(0x159)](_0x38fd22[_0x26cd68(0x145)])===-0x1){if(!(_0x3663e1===null||_0x3663e1===void 0x0?void 0x0:_0x3663e1[_0x26cd68(0x175)])){let _0xd74d6f=(0x0,core_3[_0x26cd68(0x15f)])(new _0x44745f(),_0x28ae99['method']);for(const _0x96c0e0 in _0xd74d6f){let _0x429809=(_0xd78c0d=_0x2a1b49[_0x28ae99[_0x26cd68(0x14e)]])===null||_0xd78c0d===void 0x0?void 0x0:_0xd78c0d[_0x26cd68(0x170)](_0x5bb0b5=>_0x5bb0b5['parameterIndex']==_0x96c0e0&&_0x5bb0b5[_0x26cd68(0x166)]===core_2[_0x26cd68(0x17f)]&&(_0x5bb0b5===null||_0x5bb0b5===void 0x0?void 0x0:_0x5bb0b5[_0x26cd68(0x146)]));if(_0x429809===null||_0x429809===void 0x0?void 0x0:_0x429809[_0x26cd68(0x146)]){let _0x57a224=convertTypeToString(_0x429809['metadata']['type']||0x0);if([_0x26cd68(0x187),_0x26cd68(0x193)][_0x26cd68(0x159)](_0x57a224)!=-0x1&&_0x429809[_0x26cd68(0x146)]['propertyData']['indexOf'](':')==-0x1&&!_0x38fd22[_0x26cd68(0x152)][_0x26cd68(0x170)](_0x53f33f=>_0x53f33f[_0x26cd68(0x166)]==_0x429809[_0x26cd68(0x146)][_0x26cd68(0x158)]))_0x38fd22['request']['push']({'key':_0x429809[_0x26cd68(0x146)]['propertyData'],'title':_0x429809[_0x26cd68(0x146)][_0x26cd68(0x158)],'type':convertSchemaType(_0xd74d6f[_0x429809[_0x26cd68(0x16b)]][_0x26cd68(0x156)]),'required':![],'default':'','desc':''});else{if(_0x57a224=='file'){let _0x372456=((_0x27302d=_0x429809===null||_0x429809===void 0x0?void 0x0:_0x429809['metadata'])===null||_0x27302d===void 0x0?void 0x0:_0x27302d['propertyData'])||_0x26cd68(0x180);_0x372456[_0x26cd68(0x159)](':')==-0x1&&!_0x38fd22[_0x26cd68(0x152)]['find'](_0x4f594d=>_0x4f594d[_0x26cd68(0x166)]==_0x372456&&_0x4f594d[_0x26cd68(0x153)]==_0x26cd68(0x180))&&_0x38fd22[_0x26cd68(0x152)]['push']({'key':_0x372456,'title':_0x26cd68(0x19f)+_0x372456,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x281b6a=(0x0,core_3[_0x26cd68(0x188)])(validator_1[_0x26cd68(0x18f)],_0xd74d6f[_0x96c0e0]);_0x281b6a&&_0x38fd22[_0x26cd68(0x152)][_0x26cd68(0x191)](...getJoiRequest(_0x281b6a));}}}_0x483d2f[_0x26cd68(0x19a)][_0x26cd68(0x191)](_0x38fd22);}}if(_0x483d2f[_0x26cd68(0x19a)][_0x26cd68(0x1a1)]>0x0){let _0xeafa66=_0x359bb5[_0x178dbf];_0xeafa66?(_0xeafa66[_0x26cd68(0x17d)]!=_0x483d2f[_0x26cd68(0x17d)]&&(_0xeafa66['summary']=_0xeafa66[_0x26cd68(0x17d)]+','+_0x483d2f[_0x26cd68(0x17d)]),_0xeafa66[_0x26cd68(0x185)]!=_0x483d2f[_0x26cd68(0x185)]&&(_0xeafa66[_0x26cd68(0x185)]=_0xeafa66[_0x26cd68(0x185)]+','+_0x483d2f[_0x26cd68(0x185)]),_0xeafa66[_0x26cd68(0x19a)]=_0xeafa66[_0x26cd68(0x19a)][_0x26cd68(0x15c)](_0x483d2f[_0x26cd68(0x19a)]),_0x359bb5[_0x178dbf]=_0xeafa66):_0x359bb5[_0x178dbf]=_0x483d2f;}}}return _0x359bb5;}exports['getRoutes']=getRoutes;function getJoiRequest(_0x15f02b){const _0x3d8a77=a8_0x43e050,_0x1de5b6=[];for(let _0x1f9bee in _0x15f02b){const _0x4bf2b6={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x4a4c49=typeof _0x15f02b[_0x1f9bee][_0x3d8a77(0x155)]==_0x3d8a77(0x195)?_0x15f02b[_0x1f9bee][_0x3d8a77(0x155)]():_0x15f02b[_0x1f9bee];_0x4bf2b6[_0x3d8a77(0x166)]=_0x1f9bee,_0x4bf2b6[_0x3d8a77(0x153)]=_0x4a4c49['type'],_0x4bf2b6[_0x3d8a77(0x192)]=(0x0,lodash_1[_0x3d8a77(0x18a)])(_0x4a4c49,_0x3d8a77(0x157),_0x1f9bee),_0x4bf2b6[_0x3d8a77(0x150)]=(0x0,lodash_1[_0x3d8a77(0x18a)])(_0x4a4c49,_0x3d8a77(0x14d),''),_0x4bf2b6['required']=(0x0,lodash_1['get'])(_0x4a4c49,'flags.presence','')==_0x3d8a77(0x163),_0x4bf2b6['description']=(0x0,lodash_1[_0x3d8a77(0x18a)])(_0x4a4c49,_0x3d8a77(0x184),'');if(_0x4a4c49[_0x3d8a77(0x153)]==_0x3d8a77(0x19e))_0x4bf2b6[_0x3d8a77(0x147)]=getJoiRequest(_0x4a4c49['keys']);else _0x4a4c49['type']=='array'&&_0x4a4c49[_0x3d8a77(0x194)]&&Array['isArray'](_0x4a4c49['items'])&&_0x4a4c49[_0x3d8a77(0x194)][0x0]&&console['log'](_0x1f9bee+_0x3d8a77(0x178),_0x4a4c49);_0x4a4c49[_0x3d8a77(0x18d)]&&Array['isArray'](_0x4a4c49[_0x3d8a77(0x18d)])&&_0x4a4c49['allow']['length']>0x0&&(_0x4bf2b6[_0x3d8a77(0x185)]=_0x3d8a77(0x198)+_0x4a4c49[_0x3d8a77(0x18d)][_0x3d8a77(0x16a)](',')+'];'+_0x4bf2b6[_0x3d8a77(0x185)]);if(_0x4bf2b6['key']&&_0x4bf2b6[_0x3d8a77(0x153)]){const _0x35ab78={};for(const _0x3cd4f7 of _0x4a4c49[_0x3d8a77(0x177)]||[]){if(_0x3cd4f7['name']==='min'&&_0x3cd4f7[_0x3d8a77(0x179)])_0x35ab78['min']=_0x3cd4f7[_0x3d8a77(0x179)]['limit'];else _0x3cd4f7[_0x3d8a77(0x156)]==='max'&&(_0x35ab78[_0x3d8a77(0x17a)]=_0x3cd4f7['args'][_0x3d8a77(0x190)]);}_0x4bf2b6[_0x3d8a77(0x177)]=_0x35ab78;}_0x4bf2b6[_0x3d8a77(0x166)]&&_0x4bf2b6[_0x3d8a77(0x192)]&&_0x1de5b6['push'](_0x4bf2b6);}return _0x1de5b6;}function convertSchemaType(_0x1e8afe){const _0x5079c4=a8_0x43e050;switch(_0x1e8afe){case _0x5079c4(0x14b):return _0x5079c4(0x19e);case'Boolean':return _0x5079c4(0x1a3);case _0x5079c4(0x154):return'number';case _0x5079c4(0x169):return _0x5079c4(0x199);case _0x5079c4(0x14f):return _0x5079c4(0x180);default:return _0x5079c4(0x199);}}function convertTypeToString(_0x21172d){const _0x570e85=a8_0x43e050;switch(_0x21172d){case core_1[_0x570e85(0x160)][_0x570e85(0x182)]:return'header';case core_1['RouteParamTypes']['QUERY']:return _0x570e85(0x187);case core_1[_0x570e85(0x160)]['PARAM']:return'path';case core_1['RouteParamTypes']['BODY']:return _0x570e85(0x193);case core_1[_0x570e85(0x160)][_0x570e85(0x186)]:case core_1['RouteParamTypes']['FILESSTREAM']:case core_1[_0x570e85(0x160)][_0x570e85(0x181)]:return _0x570e85(0x180);default:return _0x570e85(0x16d);}}
|
|
1
|
+
'use strict';function a8_0x484f(){const _0x2c079a=['routes','HEADERS','iterator','1338690IhxCJl','flags.presence','10beeRsn','log','6588307WlJjNz','/static/apitest','file','@midwayjs/core','routerOptions','type','join','concat','只允许:[','flags.label','tagName','metadata','args','noreq','4mynDMg','key','flags.default','length','QUERY','query','getMethodParamTypes','allow','WEB_ROUTER_PARAM_KEY','220350VVLaIP','prefix','path','push','body','isArray','RouteParamTypes','RULES_KEY','filter','4579167kgqpEW','number','@anncic-api/validator','lodash','../types/action','parameterIndex','method','FILESSTREAM','FILESTREAM','string','requestMethod','-array','216615kjuWcc','280958OVFSeu','name','文件上传-','request','defineProperty','listModule','description','boolean','header','startsWith','object','Object','replace','indexOf','Boolean','88NvXOaG','function','title','getClassExtendedMetadata','filepath','split','summary','module','20Hegwmy','3694851KWUpYh','describe','array','routerName','getClassMetadata','ACTION_ROUTE_KEY','INJECT_CUSTOM_PARAM','PARAM','children','limit','default','getRoutes','items','String','get','Number','pprefix','propertyData','max','min','test','find','required','static/apitest','route'];a8_0x484f=function(){return _0x2c079a;};return a8_0x484f();}const a8_0x4edd4b=a8_0x340d;(function(_0x456904,_0x29b7d8){const _0x496e4d=a8_0x340d,_0x74ce1e=_0x456904();while(!![]){try{const _0xecb541=parseInt(_0x496e4d(0x168))/0x1+-parseInt(_0x496e4d(0x19c))/0x2+-parseInt(_0x496e4d(0x1c0))/0x3*(-parseInt(_0x496e4d(0x1ae))/0x4)+-parseInt(_0x496e4d(0x19e))/0x5*(-parseInt(_0x496e4d(0x1b7))/0x6)+parseInt(_0x496e4d(0x167))/0x7*(parseInt(_0x496e4d(0x177))/0x8)+parseInt(_0x496e4d(0x180))/0x9+-parseInt(_0x496e4d(0x17f))/0xa*(parseInt(_0x496e4d(0x1a0))/0xb);if(_0xecb541===_0x29b7d8)break;else _0x74ce1e['push'](_0x74ce1e['shift']());}catch(_0x469895){_0x74ce1e['push'](_0x74ce1e['shift']());}}}(a8_0x484f,0xbaa60));Object[a8_0x4edd4b(0x16c)](exports,'__esModule',{'value':!![]}),exports[a8_0x4edd4b(0x18b)]=void 0x0;const lodash_1=require(a8_0x4edd4b(0x1c3)),validator_1=require(a8_0x4edd4b(0x1c2)),core_1=require(a8_0x4edd4b(0x1a3)),core_2=require(a8_0x4edd4b(0x1a3)),core_3=require('@midwayjs/core'),action_1=require(a8_0x4edd4b(0x15f));function getRoutes(_0x38fff0={'prefix':'/','module':![]}){const _0x1d5a94=a8_0x4edd4b;var _0x5a5ae4,_0x44f4f8;const _0x59f4c6=(0x0,core_3[_0x1d5a94(0x16d)])(action_1['ACTION_KEY']),_0x33577e={},_0x3e2169=Array['isArray'](_0x38fff0[_0x1d5a94(0x1bf)]||[])?_0x38fff0[_0x1d5a94(0x1bf)]||[]:[_0x38fff0[_0x1d5a94(0x1bf)]];_0x66c07d:for(const _0x50f5b7 of _0x59f4c6){let _0xbe35e0=(0x0,core_3['getClassMetadata'])(action_1['ACTION_KEY'],_0x50f5b7),_0x19c445=(0x0,core_3[_0x1d5a94(0x184)])(action_1[_0x1d5a94(0x185)],_0x50f5b7);if(_0xbe35e0&&_0x19c445){let _0x405f9f=_0xbe35e0[_0x1d5a94(0x1b8)],_0x12d78c={};if(_0x38fff0[_0x1d5a94(0x17e)]&&(0x0,lodash_1[_0x1d5a94(0x18e)])(_0xbe35e0,_0x1d5a94(0x17e),![])!=_0x38fff0[_0x1d5a94(0x17e)])continue _0x66c07d;else{if(_0x38fff0[_0x1d5a94(0x17e)]===![]&&!!(0x0,lodash_1[_0x1d5a94(0x18e)])(_0xbe35e0,'module',null))continue _0x66c07d;}if(_0x38fff0['prefix']&&!_0x405f9f[_0x1d5a94(0x171)](_0x38fff0[_0x1d5a94(0x1b8)]))continue _0x66c07d;_0x405f9f!=='/'?(_0x12d78c['summary']=(_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0[_0x1d5a94(0x1a4)][_0x1d5a94(0x1aa)])||(/^\//[_0x1d5a94(0x194)](_0x405f9f)?_0x405f9f[_0x1d5a94(0x17c)]('/')[0x1]:_0x405f9f),_0x12d78c[_0x1d5a94(0x16e)]=(_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0[_0x1d5a94(0x1a4)][_0x1d5a94(0x16e)])||_0x12d78c[_0x1d5a94(0x17d)],_0x12d78c[_0x1d5a94(0x199)]=[]):(_0x12d78c[_0x1d5a94(0x17d)]=(_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0[_0x1d5a94(0x1a4)][_0x1d5a94(0x1aa)])||_0x1d5a94(0x18a),_0x12d78c[_0x1d5a94(0x16e)]=(_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0['routerOptions'][_0x1d5a94(0x16e)])||'',_0x12d78c['routes']=[]);_0x38fff0[_0x1d5a94(0x17b)]&&(_0x12d78c[_0x1d5a94(0x17b)]=_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0[_0x1d5a94(0x17b)]);(_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0[_0x1d5a94(0x190)])&&(_0x12d78c[_0x1d5a94(0x1b8)]=_0xbe35e0['pprefix']);(_0xbe35e0===null||_0xbe35e0===void 0x0?void 0x0:_0xbe35e0[_0x1d5a94(0x17e)])&&(_0x12d78c[_0x1d5a94(0x17e)]=_0xbe35e0[_0x1d5a94(0x17e)]);let _0x4c4a67=(0x0,core_3[_0x1d5a94(0x184)])(core_2[_0x1d5a94(0x186)],_0x50f5b7)||{};if(typeof _0x19c445[Symbol[_0x1d5a94(0x19b)]]==='function')for(let _0x56bcb6 of _0x19c445){let _0x27b1c1={};_0x27b1c1['method']=_0x56bcb6[_0x1d5a94(0x165)],_0x27b1c1[_0x1d5a94(0x198)]=(_0x405f9f+_0x56bcb6['path'])[_0x1d5a94(0x174)](/\/{1,}/,'/'),_0x27b1c1[_0x1d5a94(0x17d)]=(_0x56bcb6===null||_0x56bcb6===void 0x0?void 0x0:_0x56bcb6[_0x1d5a94(0x183)])||_0x12d78c[_0x1d5a94(0x17d)]||_0x1d5a94(0x18a),_0x27b1c1[_0x1d5a94(0x16e)]=(_0x56bcb6===null||_0x56bcb6===void 0x0?void 0x0:_0x56bcb6[_0x1d5a94(0x16e)])||'',_0x27b1c1['request']=[];if(!(0x0,lodash_1['startsWith'])(_0x27b1c1['route'],_0x1d5a94(0x197))&&!(0x0,lodash_1[_0x1d5a94(0x171)])(_0x27b1c1[_0x1d5a94(0x198)],_0x1d5a94(0x1a1))&&_0x3e2169['indexOf'](_0x27b1c1['route'])===-0x1){if(!(_0x38fff0===null||_0x38fff0===void 0x0?void 0x0:_0x38fff0[_0x1d5a94(0x1ad)])){let _0x3777da=(0x0,core_3[_0x1d5a94(0x1b4)])(new _0x50f5b7(),_0x56bcb6[_0x1d5a94(0x161)]);for(const _0x4a1ed5 in _0x3777da){let _0x1009c1=(_0x5a5ae4=_0x4c4a67[_0x56bcb6['method']])===null||_0x5a5ae4===void 0x0?void 0x0:_0x5a5ae4[_0x1d5a94(0x195)](_0x41e570=>_0x41e570[_0x1d5a94(0x160)]==_0x4a1ed5&&_0x41e570[_0x1d5a94(0x1af)]===core_2[_0x1d5a94(0x1b6)]&&(_0x41e570===null||_0x41e570===void 0x0?void 0x0:_0x41e570['metadata']));if(_0x1009c1===null||_0x1009c1===void 0x0?void 0x0:_0x1009c1[_0x1d5a94(0x1ab)]){let _0x538e74=convertTypeToString(_0x1009c1[_0x1d5a94(0x1ab)][_0x1d5a94(0x1a5)]||0x0);if([_0x1d5a94(0x1b3),_0x1d5a94(0x1bb)][_0x1d5a94(0x175)](_0x538e74)!=-0x1&&_0x1009c1[_0x1d5a94(0x1ab)][_0x1d5a94(0x191)][_0x1d5a94(0x175)](':')==-0x1&&!_0x27b1c1[_0x1d5a94(0x16b)][_0x1d5a94(0x195)](_0x34548a=>_0x34548a[_0x1d5a94(0x1af)]==_0x1009c1[_0x1d5a94(0x1ab)][_0x1d5a94(0x191)]))_0x27b1c1['request'][_0x1d5a94(0x1ba)]({'key':_0x1009c1[_0x1d5a94(0x1ab)][_0x1d5a94(0x191)],'title':_0x1009c1[_0x1d5a94(0x1ab)][_0x1d5a94(0x191)],'type':convertSchemaType(_0x3777da[_0x1009c1['parameterIndex']][_0x1d5a94(0x169)]),'required':![],'default':'','desc':''});else{if(_0x538e74==_0x1d5a94(0x1a2)){let _0x5a4808=((_0x44f4f8=_0x1009c1===null||_0x1009c1===void 0x0?void 0x0:_0x1009c1[_0x1d5a94(0x1ab)])===null||_0x44f4f8===void 0x0?void 0x0:_0x44f4f8[_0x1d5a94(0x191)])||_0x1d5a94(0x1a2);_0x5a4808['indexOf'](':')==-0x1&&!_0x27b1c1[_0x1d5a94(0x16b)]['find'](_0x15fbc5=>_0x15fbc5[_0x1d5a94(0x1af)]==_0x5a4808&&_0x15fbc5['type']==_0x1d5a94(0x1a2))&&_0x27b1c1[_0x1d5a94(0x16b)][_0x1d5a94(0x1ba)]({'key':_0x5a4808,'title':_0x1d5a94(0x16a)+_0x5a4808,'type':_0x1d5a94(0x1a2),'required':!![],'default':'','desc':''});}}}else{const _0x13094f=(0x0,core_3[_0x1d5a94(0x17a)])(validator_1[_0x1d5a94(0x1be)],_0x3777da[_0x4a1ed5]);_0x13094f&&_0x27b1c1['request']['push'](...getJoiRequest(_0x13094f));}}}_0x12d78c[_0x1d5a94(0x199)][_0x1d5a94(0x1ba)](_0x27b1c1);}}if(_0x12d78c[_0x1d5a94(0x199)]['length']>0x0){let _0x18f045=_0x33577e[_0x405f9f];_0x18f045?(_0x18f045[_0x1d5a94(0x17d)]!=_0x12d78c[_0x1d5a94(0x17d)]&&(_0x18f045[_0x1d5a94(0x17d)]=_0x18f045['summary']+','+_0x12d78c['summary']),_0x18f045[_0x1d5a94(0x16e)]!=_0x12d78c[_0x1d5a94(0x16e)]&&(_0x18f045[_0x1d5a94(0x16e)]=_0x18f045[_0x1d5a94(0x16e)]+','+_0x12d78c[_0x1d5a94(0x16e)]),_0x18f045[_0x1d5a94(0x199)]=_0x18f045[_0x1d5a94(0x199)][_0x1d5a94(0x1a7)](_0x12d78c[_0x1d5a94(0x199)]),_0x33577e[_0x405f9f]=_0x18f045):_0x33577e[_0x405f9f]=_0x12d78c;}}}return _0x33577e;}exports['getRoutes']=getRoutes;function getJoiRequest(_0x173236){const _0x37ff5c=a8_0x4edd4b,_0x238dbe=[];for(let _0x28bb54 in _0x173236){const _0x5b0ee4={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x44a57e=typeof _0x173236[_0x28bb54][_0x37ff5c(0x181)]==_0x37ff5c(0x178)?_0x173236[_0x28bb54]['describe']():_0x173236[_0x28bb54];_0x5b0ee4[_0x37ff5c(0x1af)]=_0x28bb54,_0x5b0ee4[_0x37ff5c(0x1a5)]=_0x44a57e[_0x37ff5c(0x1a5)],_0x5b0ee4[_0x37ff5c(0x179)]=(0x0,lodash_1[_0x37ff5c(0x18e)])(_0x44a57e,_0x37ff5c(0x1a9),_0x28bb54),_0x5b0ee4['default']=(0x0,lodash_1[_0x37ff5c(0x18e)])(_0x44a57e,_0x37ff5c(0x1b0),''),_0x5b0ee4[_0x37ff5c(0x196)]=(0x0,lodash_1[_0x37ff5c(0x18e)])(_0x44a57e,_0x37ff5c(0x19d),'')==_0x37ff5c(0x196),_0x5b0ee4[_0x37ff5c(0x16e)]=(0x0,lodash_1[_0x37ff5c(0x18e)])(_0x44a57e,'flags.description','');if(_0x44a57e[_0x37ff5c(0x1a5)]==_0x37ff5c(0x172))_0x5b0ee4[_0x37ff5c(0x188)]=getJoiRequest(_0x44a57e['keys']);else _0x44a57e[_0x37ff5c(0x1a5)]==_0x37ff5c(0x182)&&_0x44a57e[_0x37ff5c(0x18c)]&&Array[_0x37ff5c(0x1bc)](_0x44a57e[_0x37ff5c(0x18c)])&&_0x44a57e[_0x37ff5c(0x18c)][0x0]&&console[_0x37ff5c(0x19f)](_0x28bb54+_0x37ff5c(0x166),_0x44a57e);_0x44a57e[_0x37ff5c(0x1b5)]&&Array['isArray'](_0x44a57e[_0x37ff5c(0x1b5)])&&_0x44a57e[_0x37ff5c(0x1b5)][_0x37ff5c(0x1b1)]>0x0&&(_0x5b0ee4['description']=_0x37ff5c(0x1a8)+_0x44a57e[_0x37ff5c(0x1b5)][_0x37ff5c(0x1a6)](',')+'];'+_0x5b0ee4['description']);if(_0x5b0ee4['key']&&_0x5b0ee4[_0x37ff5c(0x1a5)]){const _0x425d79={};for(const _0x401082 of _0x44a57e['rules']||[]){if(_0x401082[_0x37ff5c(0x169)]===_0x37ff5c(0x193)&&_0x401082['args'])_0x425d79['min']=_0x401082['args'][_0x37ff5c(0x189)];else _0x401082['name']===_0x37ff5c(0x192)&&(_0x425d79[_0x37ff5c(0x192)]=_0x401082[_0x37ff5c(0x1ac)][_0x37ff5c(0x189)]);}_0x5b0ee4['rules']=_0x425d79;}_0x5b0ee4[_0x37ff5c(0x1af)]&&_0x5b0ee4[_0x37ff5c(0x179)]&&_0x238dbe['push'](_0x5b0ee4);}return _0x238dbe;}function convertSchemaType(_0x15a197){const _0x1166e0=a8_0x4edd4b;switch(_0x15a197){case _0x1166e0(0x173):return'object';case _0x1166e0(0x176):return _0x1166e0(0x16f);case _0x1166e0(0x18f):return _0x1166e0(0x1c1);case _0x1166e0(0x18d):return _0x1166e0(0x164);case'File':return _0x1166e0(0x1a2);default:return _0x1166e0(0x164);}}function a8_0x340d(_0x5b6dda,_0x58cf06){const _0x484f05=a8_0x484f();return a8_0x340d=function(_0x340d9a,_0x513ba9){_0x340d9a=_0x340d9a-0x15f;let _0xaed6dc=_0x484f05[_0x340d9a];return _0xaed6dc;},a8_0x340d(_0x5b6dda,_0x58cf06);}function convertTypeToString(_0x5d60dc){const _0x2458dd=a8_0x4edd4b;switch(_0x5d60dc){case core_1[_0x2458dd(0x1bd)][_0x2458dd(0x19a)]:return _0x2458dd(0x170);case core_1['RouteParamTypes'][_0x2458dd(0x1b2)]:return'query';case core_1[_0x2458dd(0x1bd)][_0x2458dd(0x187)]:return _0x2458dd(0x1b9);case core_1[_0x2458dd(0x1bd)]['BODY']:return'body';case core_1['RouteParamTypes']['FIELDS']:case core_1[_0x2458dd(0x1bd)][_0x2458dd(0x162)]:case core_1['RouteParamTypes'][_0x2458dd(0x163)]:return _0x2458dd(0x1a2);default:return'header';}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0x1df53a=a9_0x1c2a;(function(_0x364b7c,_0x5bcbc7){var _0x1ffd8f=a9_0x1c2a,_0x268905=_0x364b7c();while(!![]){try{var _0x3b8a8a=-parseInt(_0x1ffd8f(0x119))/0x1*(parseInt(_0x1ffd8f(0x127))/0x2)+parseInt(_0x1ffd8f(0x130))/0x3+-parseInt(_0x1ffd8f(0x11d))/0x4*(-parseInt(_0x1ffd8f(0xf1))/0x5)+parseInt(_0x1ffd8f(0x10f))/0x6*(-parseInt(_0x1ffd8f(0x10e))/0x7)+-parseInt(_0x1ffd8f(0x12f))/0x8*(parseInt(_0x1ffd8f(0xfb))/0x9)+parseInt(_0x1ffd8f(0xf9))/0xa*(parseInt(_0x1ffd8f(0x125))/0xb)+parseInt(_0x1ffd8f(0x124))/0xc*(parseInt(_0x1ffd8f(0x11a))/0xd);if(_0x3b8a8a===_0x5bcbc7)break;else _0x268905['push'](_0x268905['shift']());}catch(_0x96a5b5){_0x268905['push'](_0x268905['shift']());}}}(a9_0x30ee,0xa2f8a));var __createBinding=this&&this[a9_0x1df53a(0x114)]||(Object['create']?function(_0x44f47f,_0x379c5f,_0x459063,_0x1dca0b){var _0xcc6a5a=a9_0x1df53a;if(_0x1dca0b===undefined)_0x1dca0b=_0x459063;var _0x4b0162=Object[_0xcc6a5a(0xf3)](_0x379c5f,_0x459063);(!_0x4b0162||(_0xcc6a5a(0x126)in _0x4b0162?!_0x379c5f['__esModule']:_0x4b0162[_0xcc6a5a(0xfc)]||_0x4b0162[_0xcc6a5a(0xf4)]))&&(_0x4b0162={'enumerable':!![],'get':function(){return _0x379c5f[_0x459063];}}),Object['defineProperty'](_0x44f47f,_0x1dca0b,_0x4b0162);}:function(_0xfd1001,_0x486f3c,_0x57e704,_0x19fedb){if(_0x19fedb===undefined)_0x19fedb=_0x57e704;_0xfd1001[_0x19fedb]=_0x486f3c[_0x57e704];}),__exportStar=this&&this[a9_0x1df53a(0xf0)]||function(_0x1b9855,_0x50c952){var _0x39686e=a9_0x1df53a;for(var _0x1a0604 in _0x1b9855)if(_0x1a0604!==_0x39686e(0x12e)&&!Object[_0x39686e(0x108)][_0x39686e(0x123)][_0x39686e(0x12b)](_0x50c952,_0x1a0604))__createBinding(_0x50c952,_0x1b9855,_0x1a0604);};Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x121),{'value':!![]}),exports['getAppsConfig']=exports['ScopeEnum']=exports[a9_0x1df53a(0x10d)]=exports['Inject']=exports[a9_0x1df53a(0x122)]=exports[a9_0x1df53a(0x12c)]=exports[a9_0x1df53a(0x116)]=exports['App']=exports[a9_0x1df53a(0x110)]=exports[a9_0x1df53a(0x100)]=exports[a9_0x1df53a(0x102)]=exports['Param']=exports[a9_0x1df53a(0xf7)]=exports[a9_0x1df53a(0xf8)]=exports[a9_0x1df53a(0x11e)]=exports[a9_0x1df53a(0x11f)]=exports[a9_0x1df53a(0x111)]=exports[a9_0x1df53a(0x117)]=exports['ValidatorError']=exports['ExcelService']=exports['ApiService']=exports[a9_0x1df53a(0x115)]=exports[a9_0x1df53a(0x128)]=exports[a9_0x1df53a(0x11b)]=exports[a9_0x1df53a(0xf6)]=exports[a9_0x1df53a(0x10a)]=exports[a9_0x1df53a(0xff)]=exports[a9_0x1df53a(0x118)]=void 0x0;const getAppsConfig_1=require(a9_0x1df53a(0x112));Object[a9_0x1df53a(0x120)](exports,'getAppsConfig',{'enumerable':!![],'get':function(){return getAppsConfig_1['getAppsConfig'];}}),__exportStar(require(a9_0x1df53a(0x10b)),exports),__exportStar(require(a9_0x1df53a(0x107)),exports);var ActionApi_1=require(a9_0x1df53a(0x10c));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x118),{'enumerable':!![],'get':function(){var _0x95744a=a9_0x1df53a;return ActionApi_1[_0x95744a(0x118)];}});var Action_1=require(a9_0x1df53a(0x113));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0xff),{'enumerable':!![],'get':function(){var _0x32e0ca=a9_0x1df53a;return Action_1[_0x32e0ca(0xff)];}});var ActionApitest_1=require(a9_0x1df53a(0xf2));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x10a),{'enumerable':!![],'get':function(){var _0x3243f5=a9_0x1df53a;return ActionApitest_1[_0x3243f5(0x10a)];}});var getRoutes_1=require('./helper/getRoutes');Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0xf6),{'enumerable':!![],'get':function(){var _0x30b0c4=a9_0x1df53a;return getRoutes_1[_0x30b0c4(0xf6)];}});var ApiError_1=require(a9_0x1df53a(0x109));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x11b),{'enumerable':!![],'get':function(){var _0x180f7f=a9_0x1df53a;return ApiError_1[_0x180f7f(0x11b)];}});var cache_1=require(a9_0x1df53a(0xfe));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x128),{'enumerable':!![],'get':function(){var _0x398e4d=a9_0x1df53a;return cache_1[_0x398e4d(0x128)];}});var event_1=require('@anncic-api/event');Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x115),{'enumerable':!![],'get':function(){var _0x94905c=a9_0x1df53a;return event_1[_0x94905c(0x115)];}});var ApiService_1=require(a9_0x1df53a(0x129));Object['defineProperty'](exports,a9_0x1df53a(0x105),{'enumerable':!![],'get':function(){var _0x2e654a=a9_0x1df53a;return ApiService_1[_0x2e654a(0x105)];}});function a9_0x30ee(){var _0x15bc63=['Apitest','./types/common','./decorator/ActionApi','Scope','1099HarqBT','2598LlmDAS','Init','Configuration','./helper/getAppsConfig','./decorator/Action','__createBinding','EventService','Config','ValidatorService','Api','3DGONwU','13GkSEyF','ApiError','./service/ExcelService','4TiARMz','Files','File','defineProperty','__esModule','Provide','hasOwnProperty','2310636jlzSRL','253mIbnpP','get','353446brRoLg','CacheService','./service/ApiService','@midwayjs/core','call','Logger','./configuration','default','24BXnVHo','387600JFHNmY','__exportStar','32645vjKIEY','./decorator/ActionApitest','getOwnPropertyDescriptor','configurable','Inject','getRoutes','Body','Fields','444030XfKaJc','getAppsConfig','251613BJnHhD','writable','Param','@anncic-api/cache','Action','Headers','ScopeEnum','Query','App','ExcelService','ApiService','ValidatorError','./service/ApitestService','prototype','./exception/ApiError'];a9_0x30ee=function(){return _0x15bc63;};return a9_0x30ee();}function a9_0x1c2a(_0x1eab4f,_0x360ca7){var _0x30ee62=a9_0x30ee();return a9_0x1c2a=function(_0x1c2a71,_0xd57f47){_0x1c2a71=_0x1c2a71-0xf0;var _0x58b908=_0x30ee62[_0x1c2a71];return _0x58b908;},a9_0x1c2a(_0x1eab4f,_0x360ca7);}var ExcelService_1=require(a9_0x1df53a(0x11c));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x104),{'enumerable':!![],'get':function(){var _0x242b2a=a9_0x1df53a;return ExcelService_1[_0x242b2a(0x104)];}});var validator_1=require('@anncic-api/validator');Object['defineProperty'](exports,a9_0x1df53a(0x106),{'enumerable':!![],'get':function(){return validator_1['ValidatorError'];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x117),{'enumerable':!![],'get':function(){var _0x45fdeb=a9_0x1df53a;return validator_1[_0x45fdeb(0x117)];}});var configuration_1=require(a9_0x1df53a(0x12d));Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x111),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var core_1=require('@midwayjs/core');Object['defineProperty'](exports,a9_0x1df53a(0x11f),{'enumerable':!![],'get':function(){var _0x48ead9=a9_0x1df53a;return core_1[_0x48ead9(0x11f)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x11e),{'enumerable':!![],'get':function(){var _0x1f672c=a9_0x1df53a;return core_1[_0x1f672c(0x11e)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0xf8),{'enumerable':!![],'get':function(){var _0x30ad9e=a9_0x1df53a;return core_1[_0x30ad9e(0xf8)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0xf7),{'enumerable':!![],'get':function(){var _0x547923=a9_0x1df53a;return core_1[_0x547923(0xf7)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0xfd),{'enumerable':!![],'get':function(){var _0x548e00=a9_0x1df53a;return core_1[_0x548e00(0xfd)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x102),{'enumerable':!![],'get':function(){var _0xe55809=a9_0x1df53a;return core_1[_0xe55809(0x102)];}}),Object[a9_0x1df53a(0x120)](exports,'Headers',{'enumerable':!![],'get':function(){var _0x2c90e0=a9_0x1df53a;return core_1[_0x2c90e0(0x100)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x110),{'enumerable':!![],'get':function(){var _0x3c0e1c=a9_0x1df53a;return core_1[_0x3c0e1c(0x110)];}});var core_2=require(a9_0x1df53a(0x12a));Object['defineProperty'](exports,a9_0x1df53a(0x103),{'enumerable':!![],'get':function(){var _0x4359fb=a9_0x1df53a;return core_2[_0x4359fb(0x103)];}}),Object['defineProperty'](exports,a9_0x1df53a(0x116),{'enumerable':!![],'get':function(){var _0x2a759f=a9_0x1df53a;return core_2[_0x2a759f(0x116)];}}),Object[a9_0x1df53a(0x120)](exports,'Logger',{'enumerable':!![],'get':function(){var _0x41e5b7=a9_0x1df53a;return core_2[_0x41e5b7(0x12c)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x122),{'enumerable':!![],'get':function(){var _0x501447=a9_0x1df53a;return core_2[_0x501447(0x122)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0xf5),{'enumerable':!![],'get':function(){return core_2['Inject'];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x10d),{'enumerable':!![],'get':function(){var _0x351066=a9_0x1df53a;return core_2[_0x351066(0x10d)];}}),Object[a9_0x1df53a(0x120)](exports,a9_0x1df53a(0x101),{'enumerable':!![],'get':function(){var _0x265312=a9_0x1df53a;return core_2[_0x265312(0x101)];}}),global['getAppsConfig']=getAppsConfig_1[a9_0x1df53a(0xfa)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a10_0x4a9916=a10_0x2543;(function(_0xc97d45,_0x4e1d2a){var _0x111311=a10_0x2543,_0x5bfe74=_0xc97d45();while(!![]){try{var _0x573c59=parseInt(_0x111311(0x1e9))/0x1+-parseInt(_0x111311(0x1e4))/0x2*(parseInt(_0x111311(0x219))/0x3)+parseInt(_0x111311(0x1ea))/0x4+parseInt(_0x111311(0x1ff))/0x5+parseInt(_0x111311(0x208))/0x6*(parseInt(_0x111311(0x1ef))/0x7)+parseInt(_0x111311(0x202))/0x8*(parseInt(_0x111311(0x1f0))/0x9)+parseInt(_0x111311(0x1e0))/0xa*(-parseInt(_0x111311(0x203))/0xb);if(_0x573c59===_0x4e1d2a)break;else _0x5bfe74['push'](_0x5bfe74['shift']());}catch(_0x5d1140){_0x5bfe74['push'](_0x5bfe74['shift']());}}}(a10_0xb494,0x9687e));function a10_0xb494(){var _0x4b9270=['function','devices','timeout','Scope','now','defineProperty','getsign','fromEntries','1518425SFKQoS','__esModule','HEADERS_CHECKCODE','103288KCLWAG','49533EoJybq','HEADERS_SIGNATURE','TIMEOUT','abs','map','6CKdGPD','toString','MD5','config','device','logintime','ApiError','password','decorate','requesttime','signature','prototype','ApiService','../exception/ApiError','secret','缺少头信息:signature','length','153351nvYqQy','push','HEADERS_DEVICE','6510vbIkGj','getcheck','toLowerCase','anncicapi','6hJvWUj','checkcode','ScopeEnum','Provide','metadata','1030034mYJVDq','3912888VmcEQJ','object','sort','HEADERS_LACK','缺少头信息:','3038161BjsZtw','666wlzUMq','Config','entries','Singleton','__metadata','token','crypto-js'];a10_0xb494=function(){return _0x4b9270;};return a10_0xb494();}function a10_0x2543(_0x20e920,_0x2bfb4b){var _0xb494f7=a10_0xb494();return a10_0x2543=function(_0x2543e9,_0x5e19b0){_0x2543e9=_0x2543e9-0x1e0;var _0xc28262=_0xb494f7[_0x2543e9];return _0xc28262;},a10_0x2543(_0x20e920,_0x2bfb4b);}var __decorate=this&&this['__decorate']||function(_0x120c6b,_0x5ba38d,_0x1ad882,_0x16e589){var _0x3aca2e=a10_0x2543,_0x9d9d22=arguments[_0x3aca2e(0x218)],_0x543927=_0x9d9d22<0x3?_0x5ba38d:_0x16e589===null?_0x16e589=Object['getOwnPropertyDescriptor'](_0x5ba38d,_0x1ad882):_0x16e589,_0x590e1e;if(typeof Reflect===_0x3aca2e(0x1eb)&&typeof Reflect[_0x3aca2e(0x210)]===_0x3aca2e(0x1f7))_0x543927=Reflect[_0x3aca2e(0x210)](_0x120c6b,_0x5ba38d,_0x1ad882,_0x16e589);else{for(var _0x45156f=_0x120c6b['length']-0x1;_0x45156f>=0x0;_0x45156f--)if(_0x590e1e=_0x120c6b[_0x45156f])_0x543927=(_0x9d9d22<0x3?_0x590e1e(_0x543927):_0x9d9d22>0x3?_0x590e1e(_0x5ba38d,_0x1ad882,_0x543927):_0x590e1e(_0x5ba38d,_0x1ad882))||_0x543927;}return _0x9d9d22>0x3&&_0x543927&&Object[_0x3aca2e(0x1fc)](_0x5ba38d,_0x1ad882,_0x543927),_0x543927;},__metadata=this&&this[a10_0x4a9916(0x1f4)]||function(_0x35e4cc,_0x541f4c){var _0x3f0109=a10_0x4a9916;if(typeof Reflect===_0x3f0109(0x1eb)&&typeof Reflect[_0x3f0109(0x1e8)]==='function')return Reflect[_0x3f0109(0x1e8)](_0x35e4cc,_0x541f4c);};Object[a10_0x4a9916(0x1fc)](exports,a10_0x4a9916(0x200),{'value':!![]}),exports[a10_0x4a9916(0x214)]=void 0x0;const crypto_js_1=require(a10_0x4a9916(0x1f6)),core_1=require('@midwayjs/core'),ApiError_1=require(a10_0x4a9916(0x215));let ApiService=class ApiService{[a10_0x4a9916(0x20f)](_0x1500b6){var _0x53c309=a10_0x4a9916,_0x5268c5;return _0x1500b6?(0x0,crypto_js_1[_0x53c309(0x20a)])(_0x1500b6+(0x0,crypto_js_1[_0x53c309(0x20a)])((0x0,crypto_js_1[_0x53c309(0x20a)])(_0x1500b6)[_0x53c309(0x209)]()+((_0x5268c5=this[_0x53c309(0x20b)])===null||_0x5268c5===void 0x0?void 0x0:_0x5268c5[_0x53c309(0x20f)]))['toString']())['toString']():'';}[a10_0x4a9916(0x1e1)](_0x288c5e,_0x2bcf47,_0x522227=Date['now']()){var _0x96acb=a10_0x4a9916;return{'Token':_0x288c5e,'Logintime':_0x522227,'Checkcode':this[_0x96acb(0x1e5)](_0x288c5e,_0x2bcf47,_0x522227)};}['getsign'](_0x51244b={}){var _0x49d1e4=a10_0x4a9916;const _0x894fe2=[],_0x3505e4=Object[_0x49d1e4(0x1fe)](Object['entries'](_0x51244b)[_0x49d1e4(0x207)](_0x5116b7=>[_0x5116b7[0x0]['toLowerCase'](),_0x5116b7[0x1]]));for(let _0x4fddac of[_0x49d1e4(0x20c),_0x49d1e4(0x211),_0x49d1e4(0x1f5),'logintime',_0x49d1e4(0x1e5)]){if(typeof _0x3505e4[_0x4fddac]=='undefined')throw new AnnError(ApiError_1[_0x49d1e4(0x20e)]['HEADERS_LACK'],{'message':_0x49d1e4(0x1ee)+_0x4fddac});_0x894fe2[_0x49d1e4(0x21a)](_0x4fddac+'='+_0x3505e4[_0x4fddac]);}if(Math[_0x49d1e4(0x206)](_0x3505e4[_0x49d1e4(0x211)])-Date[_0x49d1e4(0x1fb)]()>this[_0x49d1e4(0x20b)][_0x49d1e4(0x1f9)])throw new AnnError(ApiError_1['ApiError'][_0x49d1e4(0x205)]);if(!this[_0x49d1e4(0x20b)][_0x49d1e4(0x1f8)][_0x3505e4[_0x49d1e4(0x20c)]]||!this[_0x49d1e4(0x20b)]['devices'][_0x3505e4[_0x49d1e4(0x20c)]]['secret']||!this['config']['devices'][_0x3505e4[_0x49d1e4(0x20c)]]['checkcode'])throw new AnnError(ApiError_1['ApiError'][_0x49d1e4(0x21b)]);if(_0x3505e4['token']&&_0x3505e4[_0x49d1e4(0x1e5)]!=this[_0x49d1e4(0x1e5)](_0x3505e4[_0x49d1e4(0x1f5)],_0x3505e4[_0x49d1e4(0x20c)],_0x3505e4[_0x49d1e4(0x20d)]))throw new AnnError(ApiError_1['ApiError'][_0x49d1e4(0x201)]);return _0x894fe2[_0x49d1e4(0x21a)]('secret='+this[_0x49d1e4(0x20b)]['devices'][_0x3505e4['device']][_0x49d1e4(0x216)]),(0x0,crypto_js_1[_0x49d1e4(0x20a)])(_0x894fe2[_0x49d1e4(0x1ec)]()['join'](''))['toString']();}['checkcode'](_0x39b0b3,_0x14cb7b,_0x3ac3f9=Date[a10_0x4a9916(0x1fb)]()){var _0x22ac71=a10_0x4a9916,_0x25ecc1,_0x194de7,_0x2dd20b;if(!((_0x25ecc1=this[_0x22ac71(0x20b)])===null||_0x25ecc1===void 0x0?void 0x0:_0x25ecc1['devices'][_0x14cb7b])||!((_0x2dd20b=(_0x194de7=this[_0x22ac71(0x20b)])===null||_0x194de7===void 0x0?void 0x0:_0x194de7[_0x22ac71(0x1f8)][_0x14cb7b])===null||_0x2dd20b===void 0x0?void 0x0:_0x2dd20b[_0x22ac71(0x1e5)]))throw new AnnError(ApiError_1[_0x22ac71(0x20e)]['HEADERS_DEVICE']);return(0x0,crypto_js_1['MD5'])(_0x39b0b3+(0x0,crypto_js_1[_0x22ac71(0x20a)])(_0x3ac3f9+this[_0x22ac71(0x20b)][_0x22ac71(0x1f8)][_0x14cb7b][_0x22ac71(0x1e5)])['toString']())[_0x22ac71(0x209)]();}['checksign'](_0x563808={}){var _0x2860ff=a10_0x4a9916;const _0xa109a0=Object[_0x2860ff(0x1fe)](Object[_0x2860ff(0x1f2)](_0x563808)[_0x2860ff(0x207)](_0x1c7443=>[_0x1c7443[0x0][_0x2860ff(0x1e2)](),_0x1c7443[0x1]]));if(!(_0xa109a0===null||_0xa109a0===void 0x0?void 0x0:_0xa109a0[_0x2860ff(0x212)]))throw new AnnError(ApiError_1[_0x2860ff(0x20e)][_0x2860ff(0x1ed)],{'message':_0x2860ff(0x217)});if((_0xa109a0===null||_0xa109a0===void 0x0?void 0x0:_0xa109a0['signature'])!=this[_0x2860ff(0x1fd)](_0xa109a0))throw new AnnError(ApiError_1[_0x2860ff(0x20e)][_0x2860ff(0x204)]);return!![];}};__decorate([(0x0,core_1[a10_0x4a9916(0x1f1)])(a10_0x4a9916(0x1e3)),__metadata('design:type',Object)],ApiService[a10_0x4a9916(0x213)],a10_0x4a9916(0x20b),void 0x0),ApiService=__decorate([(0x0,core_1[a10_0x4a9916(0x1e7)])(),(0x0,core_1[a10_0x4a9916(0x1fa)])(core_1[a10_0x4a9916(0x1e6)][a10_0x4a9916(0x1f3)])],ApiService),exports[a10_0x4a9916(0x214)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a11_0x3d9c(_0xf48411,_0x33f19f){const _0x29fde9=a11_0x29fd();return a11_0x3d9c=function(_0x3d9cc5,_0x69506d){_0x3d9cc5=_0x3d9cc5-0x15f;let _0x4b4b96=_0x29fde9[_0x3d9cc5];return _0x4b4b96;},a11_0x3d9c(_0xf48411,_0x33f19f);}const a11_0x22292c=a11_0x3d9c;function a11_0x29fd(){const _0x432254=['summary','MidwayEnvironmentService','readFileSync','content-type','Inject','29128YrSMSF','apidoc','5mZBrcz','Singleton','text/css;\x20charset=utf-8','set','length','Param','existsSync','8YjAgUa','public,\x20max-age=604800','__apiList__','apitestmodule','prototype','url','@midwayjs/core','ApitestStaticController','metadata','design:type','Scope','__param','/index.html','path','/apitest','ApitestService','../../public/','Provide','apiteststatic','368837iSvjAi','64452EctIcH','cache-control','../helper/getRoutes','13062KrOtXX','Get','filepath','/apiteststatic/*','routes','apitesthtml','substring','225157gEBPrU','join','devices','design:paramtypes','../../public/index.html','__devices__','ScopeEnum','request','utf-8','__metadata','extname','apitest','anncicapi','getRoutes','isDevelopmentEnvironment','682023crxwRi','Request','replace','design:returntype','.js','object','Environment','defineProperty','description','Controller','2558034njIOHo','__decorate','Config','function','ctx','route','config','/apiteststatic/'];a11_0x29fd=function(){return _0x432254;};return a11_0x29fd();}(function(_0x55bd98,_0x1c3b3f){const _0x11d1bb=a11_0x3d9c,_0x1f876f=_0x55bd98();while(!![]){try{const _0x42dcb4=parseInt(_0x11d1bb(0x1a0))/0x1+parseInt(_0x11d1bb(0x196))/0x2+parseInt(_0x11d1bb(0x162))/0x3+-parseInt(_0x11d1bb(0x179))/0x4*(-parseInt(_0x11d1bb(0x17b))/0x5)+parseInt(_0x11d1bb(0x199))/0x6+-parseInt(_0x11d1bb(0x195))/0x7*(parseInt(_0x11d1bb(0x182))/0x8)+-parseInt(_0x11d1bb(0x16c))/0x9;if(_0x42dcb4===_0x1c3b3f)break;else _0x1f876f['push'](_0x1f876f['shift']());}catch(_0xa07884){_0x1f876f['push'](_0x1f876f['shift']());}}}(a11_0x29fd,0x26652));var __decorate=this&&this[a11_0x22292c(0x16d)]||function(_0x271f3c,_0x9c6cc,_0xfb02a1,_0x35f0ea){const _0x51a997=a11_0x22292c;var _0x5c99fb=arguments[_0x51a997(0x17f)],_0x2687f6=_0x5c99fb<0x3?_0x9c6cc:_0x35f0ea===null?_0x35f0ea=Object['getOwnPropertyDescriptor'](_0x9c6cc,_0xfb02a1):_0x35f0ea,_0x1f812e;if(typeof Reflect===_0x51a997(0x167)&&typeof Reflect['decorate']==='function')_0x2687f6=Reflect['decorate'](_0x271f3c,_0x9c6cc,_0xfb02a1,_0x35f0ea);else{for(var _0x2ade4d=_0x271f3c[_0x51a997(0x17f)]-0x1;_0x2ade4d>=0x0;_0x2ade4d--)if(_0x1f812e=_0x271f3c[_0x2ade4d])_0x2687f6=(_0x5c99fb<0x3?_0x1f812e(_0x2687f6):_0x5c99fb>0x3?_0x1f812e(_0x9c6cc,_0xfb02a1,_0x2687f6):_0x1f812e(_0x9c6cc,_0xfb02a1))||_0x2687f6;}return _0x5c99fb>0x3&&_0x2687f6&&Object[_0x51a997(0x169)](_0x9c6cc,_0xfb02a1,_0x2687f6),_0x2687f6;},__metadata=this&&this[a11_0x22292c(0x1a9)]||function(_0x1016e0,_0x12250d){const _0x5041eb=a11_0x22292c;if(typeof Reflect===_0x5041eb(0x167)&&typeof Reflect[_0x5041eb(0x18a)]===_0x5041eb(0x16f))return Reflect[_0x5041eb(0x18a)](_0x1016e0,_0x12250d);},__param=this&&this[a11_0x22292c(0x18d)]||function(_0x1cce18,_0x1deb5d){return function(_0xa6f81,_0x5efc0e){_0x1deb5d(_0xa6f81,_0x5efc0e,_0x1cce18);};};Object[a11_0x22292c(0x169)](exports,'__esModule',{'value':!![]}),exports[a11_0x22292c(0x189)]=exports[a11_0x22292c(0x191)]=void 0x0;const path_1=require(a11_0x22292c(0x18f)),fs_1=require('fs'),core_1=require('@midwayjs/core'),core_2=require(a11_0x22292c(0x188)),core_3=require(a11_0x22292c(0x188)),getRoutes_1=require(a11_0x22292c(0x198));let ApitestService=class ApitestService{async[a11_0x22292c(0x17a)](_0x3c229d){const _0x4f8239=a11_0x22292c,_0x6a6b5d=(0x0,getRoutes_1[_0x4f8239(0x160)])(_0x3c229d),_0x3676dd=[];for(let _0xcd30cb in _0x6a6b5d){for(let _0x186679 in _0x6a6b5d[_0xcd30cb]['routes']){let _0x3acdbf=_0x6a6b5d[_0xcd30cb][_0x4f8239(0x19d)][_0x186679],_0x3b6e67=[];for(let _0x5037dd in _0x3acdbf[_0x4f8239(0x1a7)]){_0x3b6e67['push'](_0x3acdbf[_0x4f8239(0x1a7)][_0x5037dd]);}_0x3676dd['push']({'title':_0x6a6b5d[_0xcd30cb][_0x4f8239(0x174)]+':'+_0x3acdbf[_0x4f8239(0x174)],'prefix':_0x6a6b5d[_0xcd30cb]['prefix'],'router':_0x3acdbf[_0x4f8239(0x171)],'method':_0x3acdbf['method'],'describe':_0x3acdbf[_0x4f8239(0x16a)]||'','filepath':_0x6a6b5d[_0xcd30cb]['filepath']||'','request':_0x3b6e67});}}const _0x5db00a=(0x0,path_1[_0x4f8239(0x1a1)])(__dirname,_0x4f8239(0x1a4));return(0x0,fs_1[_0x4f8239(0x176)])(_0x5db00a,{'encoding':_0x4f8239(0x1a8)})[_0x4f8239(0x164)](/__res__/g,_0x4f8239(0x173))['replace'](_0x4f8239(0x184),JSON['stringify'](_0x3676dd))['replace'](_0x4f8239(0x1a5),JSON['stringify'](this[_0x4f8239(0x172)][_0x4f8239(0x1a2)]));}};__decorate([(0x0,core_3[a11_0x22292c(0x16e)])(a11_0x22292c(0x15f)),__metadata('design:type',Object)],ApitestService[a11_0x22292c(0x186)],'config',void 0x0),ApitestService=__decorate([(0x0,core_2[a11_0x22292c(0x193)])('apitest'),(0x0,core_3['Scope'])(core_3[a11_0x22292c(0x1a6)][a11_0x22292c(0x17c)])],ApitestService),exports[a11_0x22292c(0x191)]=ApitestService;let ApitestStaticController=class ApitestStaticController{async[a11_0x22292c(0x19e)](){const _0x4026f4=a11_0x22292c;if(this[_0x4026f4(0x1ab)]){const _0x141c0f={'module':![]};return this[_0x4026f4(0x168)][_0x4026f4(0x161)]()&&(_0x141c0f[_0x4026f4(0x19b)]=!![]),await this[_0x4026f4(0x191)][_0x4026f4(0x17a)](_0x141c0f);}return'';}async[a11_0x22292c(0x185)](_0x5253cf){const _0x3f0ef6=a11_0x22292c;if(this[_0x3f0ef6(0x1ab)]){const _0x5cbb4f={'module':_0x5253cf};return this[_0x3f0ef6(0x168)][_0x3f0ef6(0x161)]()&&(_0x5cbb4f[_0x3f0ef6(0x19b)]=!![]),await this[_0x3f0ef6(0x191)]['apidoc'](_0x5cbb4f);}return'';}async['apiteststatic'](){const _0x2691d5=a11_0x22292c;if((0x0,path_1[_0x2691d5(0x1aa)])(this[_0x2691d5(0x170)][_0x2691d5(0x1a7)][_0x2691d5(0x187)])){var _0xd993fc=(0x0,path_1[_0x2691d5(0x1a1)])(__dirname,_0x2691d5(0x192)+this['ctx']['request'][_0x2691d5(0x187)]['replace']('/apiteststatic/','/'));if(_0xd993fc[_0x2691d5(0x19f)](_0xd993fc[_0x2691d5(0x17f)]-0xb)!=_0x2691d5(0x18e)){this['ctx'][_0x2691d5(0x17e)](_0x2691d5(0x197),_0x2691d5(0x183));if((0x0,path_1[_0x2691d5(0x1aa)])(this[_0x2691d5(0x170)][_0x2691d5(0x1a7)][_0x2691d5(0x187)])==_0x2691d5(0x166))this[_0x2691d5(0x170)][_0x2691d5(0x17e)](_0x2691d5(0x177),'application/javascript;\x20charset=utf-8');else(0x0,path_1[_0x2691d5(0x1aa)])(this[_0x2691d5(0x170)]['request'][_0x2691d5(0x187)])=='.css'&&this[_0x2691d5(0x170)][_0x2691d5(0x17e)](_0x2691d5(0x177),_0x2691d5(0x17d));return(0x0,fs_1[_0x2691d5(0x181)])(_0xd993fc)&&(0x0,fs_1[_0x2691d5(0x176)])(_0xd993fc,{'encoding':_0x2691d5(0x1a8)});}}return'';}};__decorate([(0x0,core_3[a11_0x22292c(0x178)])(),__metadata(a11_0x22292c(0x18b),Object)],ApitestStaticController[a11_0x22292c(0x186)],'ctx',void 0x0),__decorate([(0x0,core_3[a11_0x22292c(0x178)])(),__metadata(a11_0x22292c(0x18b),core_1[a11_0x22292c(0x175)])],ApitestStaticController[a11_0x22292c(0x186)],a11_0x22292c(0x168),void 0x0),__decorate([(0x0,core_3[a11_0x22292c(0x178)])(),__metadata('design:type',ApitestService)],ApitestStaticController[a11_0x22292c(0x186)],'ApitestService',void 0x0),__decorate([(0x0,core_3[a11_0x22292c(0x16e)])(a11_0x22292c(0x1ab)),__metadata('design:type',Boolean)],ApitestStaticController['prototype'],a11_0x22292c(0x1ab),void 0x0),__decorate([(0x0,core_3[a11_0x22292c(0x16e)])('anncicapi'),__metadata(a11_0x22292c(0x18b),Object)],ApitestStaticController['prototype'],a11_0x22292c(0x172),void 0x0),__decorate([(0x0,core_2[a11_0x22292c(0x19a)])(a11_0x22292c(0x190)),__metadata(a11_0x22292c(0x18b),Function),__metadata(a11_0x22292c(0x1a3),[]),__metadata(a11_0x22292c(0x165),Promise)],ApitestStaticController[a11_0x22292c(0x186)],'apitesthtml',null),__decorate([(0x0,core_2['Get'])('/apitest-:module'),__param(0x0,(0x0,core_2[a11_0x22292c(0x180)])('module')),__metadata(a11_0x22292c(0x18b),Function),__metadata('design:paramtypes',[String]),__metadata(a11_0x22292c(0x165),Promise)],ApitestStaticController[a11_0x22292c(0x186)],a11_0x22292c(0x185),null),__decorate([(0x0,core_2[a11_0x22292c(0x19a)])(a11_0x22292c(0x19c)),__metadata(a11_0x22292c(0x18b),Function),__metadata(a11_0x22292c(0x1a3),[]),__metadata('design:returntype',Promise)],ApitestStaticController['prototype'],a11_0x22292c(0x194),null),ApitestStaticController=__decorate([(0x0,core_2[a11_0x22292c(0x16b)])('/'),(0x0,core_3[a11_0x22292c(0x18c)])(core_3['ScopeEnum'][a11_0x22292c(0x163)])],ApitestStaticController),exports[a11_0x22292c(0x189)]=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12_0x4ee22b=a12_0x3c3b;function a12_0x3c3b(_0x34d886,_0x4e8ec8){const _0x48a76f=a12_0x48a7();return a12_0x3c3b=function(_0x3c3be7,_0x4f9a71){_0x3c3be7=_0x3c3be7-0x141;let _0x2ec709=_0x48a76f[_0x3c3be7];return _0x2ec709;},a12_0x3c3b(_0x34d886,_0x4e8ec8);}(function(_0x4d05df,_0x5b088b){const _0x2e79a1=a12_0x3c3b,_0x44ca35=_0x4d05df();while(!![]){try{const _0xb843c4=parseInt(_0x2e79a1(0x143))/0x1*(-parseInt(_0x2e79a1(0x141))/0x2)+-parseInt(_0x2e79a1(0x16f))/0x3*(-parseInt(_0x2e79a1(0x164))/0x4)+parseInt(_0x2e79a1(0x14d))/0x5*(-parseInt(_0x2e79a1(0x150))/0x6)+-parseInt(_0x2e79a1(0x174))/0x7+-parseInt(_0x2e79a1(0x175))/0x8*(-parseInt(_0x2e79a1(0x158))/0x9)+parseInt(_0x2e79a1(0x16b))/0xa+-parseInt(_0x2e79a1(0x179))/0xb*(parseInt(_0x2e79a1(0x15d))/0xc);if(_0xb843c4===_0x5b088b)break;else _0x44ca35['push'](_0x44ca35['shift']());}catch(_0x12539a){_0x44ca35['push'](_0x44ca35['shift']());}}}(a12_0x48a7,0x34920));var __decorate=this&&this[a12_0x4ee22b(0x17d)]||function(_0xa6b9fe,_0x11efa4,_0x1271f1,_0xcd58c1){const _0x3d22c2=a12_0x4ee22b;var _0x187547=arguments[_0x3d22c2(0x14b)],_0x14c929=_0x187547<0x3?_0x11efa4:_0xcd58c1===null?_0xcd58c1=Object[_0x3d22c2(0x178)](_0x11efa4,_0x1271f1):_0xcd58c1,_0x31f0fb;if(typeof Reflect===_0x3d22c2(0x145)&&typeof Reflect[_0x3d22c2(0x16a)]===_0x3d22c2(0x15b))_0x14c929=Reflect[_0x3d22c2(0x16a)](_0xa6b9fe,_0x11efa4,_0x1271f1,_0xcd58c1);else{for(var _0x2d0b4f=_0xa6b9fe[_0x3d22c2(0x14b)]-0x1;_0x2d0b4f>=0x0;_0x2d0b4f--)if(_0x31f0fb=_0xa6b9fe[_0x2d0b4f])_0x14c929=(_0x187547<0x3?_0x31f0fb(_0x14c929):_0x187547>0x3?_0x31f0fb(_0x11efa4,_0x1271f1,_0x14c929):_0x31f0fb(_0x11efa4,_0x1271f1))||_0x14c929;}return _0x187547>0x3&&_0x14c929&&Object['defineProperty'](_0x11efa4,_0x1271f1,_0x14c929),_0x14c929;},__metadata=this&&this[a12_0x4ee22b(0x17a)]||function(_0x2cdb77,_0x2dee1a){const _0x4e31fa=a12_0x4ee22b;if(typeof Reflect==='object'&&typeof Reflect[_0x4e31fa(0x173)]==='function')return Reflect['metadata'](_0x2cdb77,_0x2dee1a);};Object[a12_0x4ee22b(0x14c)](exports,'__esModule',{'value':!![]}),exports[a12_0x4ee22b(0x177)]=void 0x0;function a12_0x48a7(){const _0x182287=['metadata','2213603EuIEHy','485928gDsJbe','existsSync','ExcelService','getOwnPropertyDescriptor','11MGVrVx','__metadata','model','prototype','__decorate','writeFile','handler','startsWith','parse','50OdifYu','addRow','4364FOWWCi','getWorksheet','object','Workbook','mkdirSync','replace','Sheet\x201','App','length','defineProperty','59315FNmufi','random','eachCell','78DvTBmr','endsWith','substring','log','key','value','isNumber','app','63kIRKDq','@midwayjs/core','getRow','function','columns','3980244GopgKC','.xlsx','getAppDir','toString','xlsx','readFile','keys','190192iAxZFd','col','koa-send','Provide','\x20is\x20read\x20fail','push','decorate','3685400cYtRrN','ScopeEnum','addWorksheet','header','21oOsvdO','getCell','Scope','export'];a12_0x48a7=function(){return _0x182287;};return a12_0x48a7();}const fs=require('fs'),exceljs=require('exceljs'),koasend=require(a12_0x4ee22b(0x166)),core_1=require(a12_0x4ee22b(0x159));let ExcelService=class ExcelService{async[a12_0x4ee22b(0x181)](_0x5b64a0,_0x6cfa98,_0x141e69=[0x0]){const _0x3c450f=a12_0x4ee22b;var _0x4dcadc,_0x5e7a69;const _0x46bba9=new exceljs['Workbook'](),_0x52cf9a=[];let _0xd85636=_0x5b64a0[_0x3c450f(0x148)](/(\\|\/)/g,'/')[_0x3c450f(0x148)](/\/{2,}/g,'/');!(_0xd85636===null||_0xd85636===void 0x0?void 0x0:_0xd85636[_0x3c450f(0x180)]('/'))&&(_0xd85636=this[_0x3c450f(0x157)][_0x3c450f(0x15f)]()+'/'+_0xd85636);try{await _0x46bba9['xlsx'][_0x3c450f(0x162)](_0xd85636);}catch(_0x27d436){return console[_0x3c450f(0x153)]('Api\x20Excel\x20Error:\x20'+_0xd85636+_0x3c450f(0x168)),_0x52cf9a;}for(const _0x298105 of _0x141e69){const _0x308a33=lodash[_0x3c450f(0x156)](_0x298105)?((_0x4dcadc=_0x46bba9['worksheets'])===null||_0x4dcadc===void 0x0?void 0x0:_0x4dcadc[_0x298105])||undefined:_0x46bba9[_0x3c450f(0x144)](_0x298105);if(_0x308a33){var _0x1fe137=0x1;const _0x337025=_0x308a33[_0x3c450f(0x15a)](0x1),_0x28c5bc=await new Promise(_0x531c72=>{const _0x2fe8b3=_0x3c450f,_0x10cdf4={};_0x337025[_0x2fe8b3(0x14f)]((_0x177555,_0x36951d)=>{const _0x5bdc18=_0x2fe8b3;for(const _0x3f08e3 of _0x6cfa98){if(_0x177555[_0x5bdc18(0x155)]==_0x3f08e3['header'])_0x1fe137=0x2,_0x10cdf4[_0x3f08e3[_0x5bdc18(0x154)]]={'header':_0x177555[_0x5bdc18(0x165)],'handler':_0x3f08e3[_0x5bdc18(0x17f)]};else{if(!_0x10cdf4[_0x3f08e3[_0x5bdc18(0x154)]])try{const _0x3e7110=_0x337025[_0x5bdc18(0x170)](_0x3f08e3[_0x5bdc18(0x16e)]);_0x3e7110&&(_0x10cdf4[_0x3f08e3['key']]={'header':_0x3e7110[_0x5bdc18(0x165)],'handler':_0x3f08e3['handler']});}catch{}}}_0x337025['cellCount']==_0x36951d&&_0x531c72(_0x10cdf4);});});for(const _0xe8b5a0 of _0x308a33['findRows'](_0x1fe137,_0x308a33['rowCount'])){const _0x302af2={};for(const _0x14be6c in _0x28c5bc){if(_0x28c5bc[_0x14be6c][_0x3c450f(0x16e)]){const _0x2d3b60=_0xe8b5a0['getCell'](_0x28c5bc[_0x14be6c][_0x3c450f(0x16e)]);typeof((_0x5e7a69=_0x28c5bc[_0x14be6c])===null||_0x5e7a69===void 0x0?void 0x0:_0x5e7a69['handler'])=='function'?_0x302af2[_0x14be6c]=await _0x28c5bc[_0x14be6c]['handler']((_0x2d3b60===null||_0x2d3b60===void 0x0?void 0x0:_0x2d3b60['toString']())||'',_0x2d3b60[_0x3c450f(0x17b)]):_0x302af2[_0x14be6c]=(_0x2d3b60===null||_0x2d3b60===void 0x0?void 0x0:_0x2d3b60[_0x3c450f(0x160)]())||'';}}Object[_0x3c450f(0x163)](_0x302af2)['length']>0x0&&_0x52cf9a[_0x3c450f(0x169)](_0x302af2);}}}return _0x52cf9a;}async[a12_0x4ee22b(0x172)](_0xf2fd1b,_0x5bb7ab,_0x105c89,_0x370ef7='public/xlsx'){const _0x582b5f=a12_0x4ee22b;var _0x53f4bc,_0x384f0d;const _0x412af4=new exceljs[(_0x582b5f(0x146))](),_0x3ed947={},_0x53c957=[],_0x4db586=_0x412af4[_0x582b5f(0x16d)](_0x582b5f(0x149),{'views':[{'state':'frozen','xSplit':0x1}]});for(const _0x5ea4b4 in _0x5bb7ab){_0x3ed947[_0x5bb7ab[_0x5ea4b4][_0x582b5f(0x154)]]=_0x5bb7ab[_0x5ea4b4][_0x582b5f(0x16e)],_0x53c957['push']({'header':_0x5bb7ab[_0x5ea4b4]['header'],'key':(_0x53f4bc=_0x5bb7ab[_0x5ea4b4])===null||_0x53f4bc===void 0x0?void 0x0:_0x53f4bc[_0x582b5f(0x154)][_0x582b5f(0x148)](/\./g,'_')});}_0x4db586[_0x582b5f(0x15c)]=_0x53c957;for(const _0x2c01fa of _0x105c89){const _0x32e948={};for(const _0x35d9d9 in _0x5bb7ab){typeof((_0x384f0d=_0x5bb7ab[_0x35d9d9])===null||_0x384f0d===void 0x0?void 0x0:_0x384f0d[_0x582b5f(0x17f)])=='function'?_0x32e948[_0x5bb7ab[_0x35d9d9][_0x582b5f(0x154)][_0x582b5f(0x148)](/\./g,'_')]=await _0x5bb7ab[_0x35d9d9][_0x582b5f(0x17f)](_0x2c01fa):_0x32e948[_0x5bb7ab[_0x35d9d9][_0x582b5f(0x154)][_0x582b5f(0x148)](/\./g,'_')]=lodash['get'](_0x2c01fa,_0x5bb7ab[_0x35d9d9]['key'],'');}_0x4db586[_0x582b5f(0x142)](_0x32e948);}let _0x2e62ba='';const _0x47f4e9=_0xf2fd1b+'-'+lodash[_0x582b5f(0x14e)](0x2710,0x1869f)+_0x582b5f(0x15e);if(_0x370ef7&&_0x370ef7[_0x582b5f(0x180)]('/'))_0x2e62ba=''+_0x370ef7;else _0x370ef7&&!_0x370ef7[_0x582b5f(0x180)]('/')&&!_0x370ef7[_0x582b5f(0x180)]('\x5c')?_0x2e62ba=this[_0x582b5f(0x157)]['getAppDir']()+'/'+_0x370ef7:_0x2e62ba=this[_0x582b5f(0x157)][_0x582b5f(0x15f)]()+'/public/xlsx';return(_0x2e62ba[_0x582b5f(0x151)]('/')||_0x2e62ba[_0x582b5f(0x151)]('\x5c'))&&(_0x2e62ba=_0x2e62ba['substring'](0x0,_0x2e62ba[_0x582b5f(0x14b)]-0x1)),_0x2e62ba=_0x2e62ba[_0x582b5f(0x148)](/(\\|\/)/g,'/')[_0x582b5f(0x148)](/\/{2,}/g,'/'),!fs[_0x582b5f(0x176)](_0x2e62ba)&&fs[_0x582b5f(0x147)](_0x2e62ba,{'recursive':!![]}),await _0x412af4[_0x582b5f(0x161)][_0x582b5f(0x17e)]((_0x2e62ba+'/'+_0x47f4e9)[_0x582b5f(0x148)](/(\\|\/)/g,'/')[_0x582b5f(0x148)](/\/{2,}/g,'/')),{'filename':_0x47f4e9,'filepath':(_0x2e62ba[_0x582b5f(0x152)]((''+this[_0x582b5f(0x157)][_0x582b5f(0x15f)]())['length'])+'/'+_0x47f4e9)[_0x582b5f(0x148)](/(\\|\/)/g,'/')[_0x582b5f(0x148)](/\/{2,}/g,'/')};}async['download'](_0x31335a,_0x4c1728){return await koasend(_0x31335a,''+_0x4c1728);}};__decorate([(0x0,core_1[a12_0x4ee22b(0x14a)])(),__metadata('design:type',Object)],ExcelService[a12_0x4ee22b(0x17c)],a12_0x4ee22b(0x157),void 0x0),ExcelService=__decorate([(0x0,core_1[a12_0x4ee22b(0x167)])(),(0x0,core_1[a12_0x4ee22b(0x171)])(core_1[a12_0x4ee22b(0x16c)]['Singleton'])],ExcelService),exports[a12_0x4ee22b(0x177)]=ExcelService;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a13_0x4e78e1=a13_0x51ae;(function(_0x55ea40,_0x3f7da2){var _0x129de2=a13_0x51ae,_0x469a49=_0x55ea40();while(!![]){try{var _0x3da715=parseInt(_0x129de2(0x176))/0x1*(parseInt(_0x129de2(0x17f))/0x2)+-parseInt(_0x129de2(0x177))/0x3*(parseInt(_0x129de2(0x17a))/0x4)+parseInt(_0x129de2(0x17c))/0x5*(-parseInt(_0x129de2(0x181))/0x6)+-parseInt(_0x129de2(0x179))/0x7+-parseInt(_0x129de2(0x180))/0x8+parseInt(_0x129de2(0x17b))/0x9+parseInt(_0x129de2(0x178))/0xa;if(_0x3da715===_0x3f7da2)break;else _0x469a49['push'](_0x469a49['shift']());}catch(_0x336d12){_0x469a49['push'](_0x469a49['shift']());}}}(a13_0x16ad,0xb298a));function a13_0x51ae(_0x3bbad5,_0x199293){var _0x16adc4=a13_0x16ad();return a13_0x51ae=function(_0x51ae76,_0x3dba61){_0x51ae76=_0x51ae76-0x173;var _0x1c10df=_0x16adc4[_0x51ae76];return _0x1c10df;},a13_0x51ae(_0x3bbad5,_0x199293);}Object[a13_0x4e78e1(0x17e)](exports,'__esModule',{'value':!![]}),exports['AppsConfigTmp']=exports[a13_0x4e78e1(0x17d)]=exports['ACTION_ROUTE_KEY']=exports[a13_0x4e78e1(0x174)]=void 0x0,exports['ACTION_KEY']=a13_0x4e78e1(0x182),exports['ACTION_ROUTE_KEY']=a13_0x4e78e1(0x175),exports[a13_0x4e78e1(0x17d)]=a13_0x4e78e1(0x173);function a13_0x16ad(){var _0x1ccc43=['4287880RuPZex','43878LzOTjW','anncic-api:action','anncic-api:apps:config','ACTION_KEY','anncic-api:action:route','2527GpQAWM','1308381UOMVco','16538460EVtMnq','6001422UVLOTX','8XfZbbG','8224506OkqNAt','610IirHKH','APPSCONFIG_KEY','defineProperty','1046BbYmUx'];a13_0x16ad=function(){return _0x1ccc43;};return a13_0x16ad();}class AppsConfigTmp{}exports['AppsConfigTmp']=AppsConfigTmp;
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a14_0xd1c54c=a14_0x2406;(function(_0x40eeff,_0x50a263){var _0x4f0210=a14_0x2406,_0x17b079=_0x40eeff();while(!![]){try{var _0x4fc537=parseInt(_0x4f0210(0xb6))/0x1*(-parseInt(_0x4f0210(0xc3))/0x2)+parseInt(_0x4f0210(0xc4))/0x3*(parseInt(_0x4f0210(0xc6))/0x4)+-parseInt(_0x4f0210(0xd5))/0x5*(-parseInt(_0x4f0210(0xd2))/0x6)+parseInt(_0x4f0210(0xc9))/0x7*(-parseInt(_0x4f0210(0xbc))/0x8)+parseInt(_0x4f0210(0xda))/0x9+-parseInt(_0x4f0210(0xbe))/0xa*(parseInt(_0x4f0210(0xcc))/0xb)+parseInt(_0x4f0210(0xcb))/0xc;if(_0x4fc537===_0x50a263)break;else _0x17b079['push'](_0x17b079['shift']());}catch(_0x56e164){_0x17b079['push'](_0x17b079['shift']());}}}(a14_0x4d98,0xd5576));var __decorate=this&&this[a14_0xd1c54c(0xd4)]||function(_0x174ab7,_0x20a4b4,_0x4d2f8f,_0x25558b){var _0x57cb8f=a14_0xd1c54c,_0x55c466=arguments[_0x57cb8f(0xb7)],_0x53709c=_0x55c466<0x3?_0x20a4b4:_0x25558b===null?_0x25558b=Object[_0x57cb8f(0xb9)](_0x20a4b4,_0x4d2f8f):_0x25558b,_0x35a14c;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x57cb8f(0xd0))_0x53709c=Reflect[_0x57cb8f(0xbd)](_0x174ab7,_0x20a4b4,_0x4d2f8f,_0x25558b);else{for(var _0x141ffd=_0x174ab7[_0x57cb8f(0xb7)]-0x1;_0x141ffd>=0x0;_0x141ffd--)if(_0x35a14c=_0x174ab7[_0x141ffd])_0x53709c=(_0x55c466<0x3?_0x35a14c(_0x53709c):_0x55c466>0x3?_0x35a14c(_0x20a4b4,_0x4d2f8f,_0x53709c):_0x35a14c(_0x20a4b4,_0x4d2f8f))||_0x53709c;}return _0x55c466>0x3&&_0x53709c&&Object[_0x57cb8f(0xb4)](_0x20a4b4,_0x4d2f8f,_0x53709c),_0x53709c;},__metadata=this&&this[a14_0xd1c54c(0xd8)]||function(_0x4a8b0d,_0x3b1e07){var _0x361bb2=a14_0xd1c54c;if(typeof Reflect===_0x361bb2(0xb8)&&typeof Reflect['metadata']===_0x361bb2(0xd0))return Reflect['metadata'](_0x4a8b0d,_0x3b1e07);};function a14_0x2406(_0x4321f4,_0x5d5659){var _0x4d9842=a14_0x4d98();return a14_0x2406=function(_0x24060e,_0x39b181){_0x24060e=_0x24060e-0xb4;var _0x23690a=_0x4d9842[_0x24060e];return _0x23690a;},a14_0x2406(_0x4321f4,_0x5d5659);}Object[a14_0xd1c54c(0xb4)](exports,a14_0xd1c54c(0xcd),{'value':!![]}),exports[a14_0xd1c54c(0xd3)]=void 0x0;const validator_1=require(a14_0xd1c54c(0xca));function a14_0x4d98(){var _0x2b572d=['min','prototype','91752xNUFkz','decorate','158540UhOhYJ','integer','number','valid','_size','85506TVMGkJ','15pNoYLr','Rule','697256OigBzz','排序方式','_page','1015WtZeQk','@anncic-api/validator','14208300dPjMNA','1144Qolrzo','__esModule','1:是;0:否','_isreverse','function','第一页为1,第二页为2','12ibUrCQ','PageDTO','__decorate','2373530xYcwnK','trim','design:type','__metadata','RuleType','14858487qQyPaH','string','defineProperty','分页数量','11ErqyAJ','length','object','getOwnPropertyDescriptor'];a14_0x4d98=function(){return _0x2b572d;};return a14_0x4d98();}class PageDTO{}__decorate([(0x0,validator_1[a14_0xd1c54c(0xc5)])('分页',validator_1[a14_0xd1c54c(0xd9)][a14_0xd1c54c(0xc0)]()['integer']()[a14_0xd1c54c(0xba)](0x1),a14_0xd1c54c(0xd1)),__metadata(a14_0xd1c54c(0xd7),Number)],PageDTO[a14_0xd1c54c(0xbb)],a14_0xd1c54c(0xc8),void 0x0),__decorate([(0x0,validator_1[a14_0xd1c54c(0xc5)])(a14_0xd1c54c(0xb5),validator_1['RuleType'][a14_0xd1c54c(0xc0)]()[a14_0xd1c54c(0xbf)]()[a14_0xd1c54c(0xba)](0x1)),__metadata('design:type',Number)],PageDTO[a14_0xd1c54c(0xbb)],a14_0xd1c54c(0xc2),void 0x0),__decorate([(0x0,validator_1[a14_0xd1c54c(0xc5)])(a14_0xd1c54c(0xc7),validator_1[a14_0xd1c54c(0xd9)][a14_0xd1c54c(0xdb)]()[a14_0xd1c54c(0xd6)]()),__metadata(a14_0xd1c54c(0xd7),String)],PageDTO['prototype'],'_order',void 0x0),__decorate([(0x0,validator_1[a14_0xd1c54c(0xc5)])('是否倒序',validator_1[a14_0xd1c54c(0xd9)]['number']()[a14_0xd1c54c(0xbf)]()[a14_0xd1c54c(0xc1)](0x0,0x1),a14_0xd1c54c(0xce)),__metadata(a14_0xd1c54c(0xd7),Number)],PageDTO[a14_0xd1c54c(0xbb)],a14_0xd1c54c(0xcf),void 0x0),exports[a14_0xd1c54c(0xd3)]=PageDTO;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/cache": "^1.3.
|
|
21
|
-
"@anncic-api/core": "^1.3.
|
|
22
|
-
"@anncic-api/event": "^1.3.
|
|
23
|
-
"@anncic-api/typeorm": "^1.3.
|
|
24
|
-
"@anncic-api/validator": "^1.3.
|
|
20
|
+
"@anncic-api/cache": "^1.3.3",
|
|
21
|
+
"@anncic-api/core": "^1.3.3",
|
|
22
|
+
"@anncic-api/event": "^1.3.3",
|
|
23
|
+
"@anncic-api/typeorm": "^1.3.3",
|
|
24
|
+
"@anncic-api/validator": "^1.3.3",
|
|
25
25
|
"@midwayjs/cross-domain": "^3.7.1",
|
|
26
26
|
"@midwayjs/i18n": "^3.7.1",
|
|
27
27
|
"@midwayjs/koa": "^3.7.1",
|
|
28
28
|
"@midwayjs/static-file": "^3.7.1",
|
|
29
29
|
"@midwayjs/upload": "^3.7.1",
|
|
30
|
-
"anncic-apihelper": "^1.3.
|
|
30
|
+
"anncic-apihelper": "^1.3.3",
|
|
31
31
|
"exceljs": "^4.3.0",
|
|
32
32
|
"koa-send": "^5.0.1",
|
|
33
33
|
"urllib": "^3.3.0"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"javascript-obfuscator": "2.19.0",
|
|
38
38
|
"typescript": "^4.8.4"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "15a2ece72c95e9bfc2370a2f235841cef7bd3524"
|
|
41
41
|
}
|