anncic-api 1.3.18 → 1.3.20
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 +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a0_0x39ec(){var _0x440dee=['385390KMnjjd','3531168MjDFVn','dhauo1234420123gg3234901','161410iMngAG','/runtime/.upload','__esModule','zhiulanuiy7892387985hnoi','115608nMxEzZ','appDir','text','6GBruCH','561285gVtrOd','77FZpDno','name','defineProperty','xml','20mb','2339470yMgPRx','form','45kKfOYw','12496ktekjp'];a0_0x39ec=function(){return _0x440dee;};return a0_0x39ec();}function a0_0x5275(_0x52703d,_0x34820f){var _0x39ecb9=a0_0x39ec();return a0_0x5275=function(_0x527586,_0x187a4c){_0x527586=_0x527586-0x1a0;var _0x3ba658=_0x39ecb9[_0x527586];return _0x3ba658;},a0_0x5275(_0x52703d,_0x34820f);}var a0_0x2d24e8=a0_0x5275;(function(_0x4165e5,_0x36a7ff){var _0x187bcb=a0_0x5275,_0x2cfa48=_0x4165e5();while(!![]){try{var _0x42e796=-parseInt(_0x187bcb(0x1b2))/0x1*(-parseInt(_0x187bcb(0x1ab))/0x2)+-parseInt(_0x187bcb(0x1b3))/0x3+parseInt(_0x187bcb(0x1a7))/0x4+-parseInt(_0x187bcb(0x1a4))/0x5+-parseInt(_0x187bcb(0x1af))/0x6*(parseInt(_0x187bcb(0x1b4))/0x7)+parseInt(_0x187bcb(0x1a9))/0x8+-parseInt(_0x187bcb(0x1a6))/0x9*(-parseInt(_0x187bcb(0x1a8))/0xa);if(_0x42e796===_0x36a7ff)break;else _0x2cfa48['push'](_0x2cfa48['shift']());}catch(_0x830e5a){_0x2cfa48['push'](_0x2cfa48['shift']());}}}(a0_0x39ec,0x3e22c));Object[a0_0x2d24e8(0x1a1)](exports,a0_0x2d24e8(0x1ad),{'value':!![]}),exports['default']=_0x5c318f=>{var _0x5039e5=a0_0x2d24e8;return{'apitest':!![],'keys':_0x5c318f[_0x5039e5(0x1a0)],'anncicapi':{'timeout':0x1388,'password':_0x5039e5(0x1ae),'devices':{'DEFAULT':{'secret':_0x5039e5(0x1aa),'checkcode':_0x5039e5(0x1aa)}}},'bodyParser':{'enableTypes':['json',_0x5039e5(0x1a5),_0x5039e5(0x1b1),_0x5039e5(0x1a2)],'formLimit':_0x5039e5(0x1a3),'jsonLimit':'20mb','textLimit':'20mb','xmlLimit':_0x5039e5(0x1a3)},'upload':{'tmpdir':_0x5c318f[_0x5039e5(0x1b0)]+_0x5039e5(0x1ac),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a1_0x3e2b(){var _0x38ab5c=['490QQwjYs','__esModule','6417605eoLmEw','40764735rXWNXz','533130JTstjl','553wxAHkc','146079SXzCMK','defineProperty','default','4ktvRNk','152384jYuiuS','317759nhgoVC','1057599LEgCTm','4nCnUGu'];a1_0x3e2b=function(){return _0x38ab5c;};return a1_0x3e2b();}var a1_0x30e953=a1_0x22c6;(function(_0xe18458,_0x925af8){var _0x4ec462=a1_0x22c6,_0x32e23c=_0xe18458();while(!![]){try{var _0x17a9b0=parseInt(_0x4ec462(0xf0))/0x1*(parseInt(_0x4ec462(0xf2))/0x2)+parseInt(_0x4ec462(0xf1))/0x3+-parseInt(_0x4ec462(0xee))/0x4*(-parseInt(_0x4ec462(0xf5))/0x5)+-parseInt(_0x4ec462(0xf7))/0x6+-parseInt(_0x4ec462(0xf8))/0x7*(-parseInt(_0x4ec462(0xef))/0x8)+parseInt(_0x4ec462(0xf9))/0x9*(parseInt(_0x4ec462(0xf3))/0xa)+-parseInt(_0x4ec462(0xf6))/0xb;if(_0x17a9b0===_0x925af8)break;else _0x32e23c['push'](_0x32e23c['shift']());}catch(_0x34ed3c){_0x32e23c['push'](_0x32e23c['shift']());}}}(a1_0x3e2b,0xbdaef));function a1_0x22c6(_0x4e7fb7,_0x17ceee){var _0x3e2b38=a1_0x3e2b();return a1_0x22c6=function(_0x22c634,_0x587bc2){_0x22c634=_0x22c634-0xec;var _0x261fcf=_0x3e2b38[_0x22c634];return _0x261fcf;},a1_0x22c6(_0x4e7fb7,_0x17ceee);}Object[a1_0x30e953(0xec)](exports,a1_0x30e953(0xf4),{'value':!![]}),exports[a1_0x30e953(0xed)]={'apitest':![],'anncicapi':{'timeout':0x1388}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x53ae14=a2_0x13d2;(function(_0x1e0f63,_0x515f68){const _0x380b83=a2_0x13d2,_0x2df326=_0x1e0f63();while(!![]){try{const _0x3419e3=-parseInt(_0x380b83(0xa0))/0x1*(-parseInt(_0x380b83(0x97))/0x2)+parseInt(_0x380b83(0xb2))/0x3+-parseInt(_0x380b83(0xce))/0x4*(-parseInt(_0x380b83(0xd1))/0x5)+parseInt(_0x380b83(0xaf))/0x6*(parseInt(_0x380b83(0xa3))/0x7)+parseInt(_0x380b83(0xdd))/0x8*(-parseInt(_0x380b83(0x9e))/0x9)+-parseInt(_0x380b83(0xc7))/0xa+-parseInt(_0x380b83(0xcc))/0xb;if(_0x3419e3===_0x515f68)break;else _0x2df326['push'](_0x2df326['shift']());}catch(_0x16efb3){_0x2df326['push'](_0x2df326['shift']());}}}(a2_0x5450,0x4edc9));var __decorate=this&&this[a2_0x53ae14(0x88)]||function(_0x14cee1,_0x423083,_0x528287,_0x9d2499){const _0x1beac3=a2_0x53ae14;var _0x485671=arguments[_0x1beac3(0x92)],_0x46d41b=_0x485671<0x3?_0x423083:_0x9d2499===null?_0x9d2499=Object['getOwnPropertyDescriptor'](_0x423083,_0x528287):_0x9d2499,_0xf5bfff;if(typeof Reflect===_0x1beac3(0xba)&&typeof Reflect['decorate']===_0x1beac3(0xc1))_0x46d41b=Reflect['decorate'](_0x14cee1,_0x423083,_0x528287,_0x9d2499);else{for(var _0x39adc2=_0x14cee1['length']-0x1;_0x39adc2>=0x0;_0x39adc2--)if(_0xf5bfff=_0x14cee1[_0x39adc2])_0x46d41b=(_0x485671<0x3?_0xf5bfff(_0x46d41b):_0x485671>0x3?_0xf5bfff(_0x423083,_0x528287,_0x46d41b):_0xf5bfff(_0x423083,_0x528287))||_0x46d41b;}return _0x485671>0x3&&_0x46d41b&&Object[_0x1beac3(0xbb)](_0x423083,_0x528287,_0x46d41b),_0x46d41b;},__metadata=this&&this[a2_0x53ae14(0x9b)]||function(_0x205c9d,_0x4f5bf7){const _0x1c7c06=a2_0x53ae14;if(typeof Reflect===_0x1c7c06(0xba)&&typeof Reflect[_0x1c7c06(0x9f)]===_0x1c7c06(0xc1))return Reflect[_0x1c7c06(0x9f)](_0x205c9d,_0x4f5bf7);};Object[a2_0x53ae14(0xbb)](exports,'__esModule',{'value':!![]}),exports[a2_0x53ae14(0x8a)]=void 0x0;const core_1=require(a2_0x53ae14(0xad)),core_2=require('@midwayjs/core'),ApiError_1=require(a2_0x53ae14(0xda)),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x53ae14(0xa5)),fs=require('fs'),koa=require(a2_0x53ae14(0xd4)),i18n=require('@midwayjs/i18n'),upload=require(a2_0x53ae14(0xde)),staticFile=require(a2_0x53ae14(0xc9)),crossDomain=require(a2_0x53ae14(0xb1)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0x53ae14(0x8d)),anncic=require('@anncic-api/core'),anncicCache=require(a2_0x53ae14(0xb7)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require('@anncic-api/typeorm'),anncicValidator=require(a2_0x53ae14(0x81)),anncicHelper=require(a2_0x53ae14(0xaa));function a2_0x13d2(_0x2ca97e,_0x598837){const _0x54507d=a2_0x5450();return a2_0x13d2=function(_0x13d22f,_0x340302){_0x13d22f=_0x13d22f-0x81;let _0x418180=_0x54507d[_0x13d22f];return _0x418180;},a2_0x13d2(_0x2ca97e,_0x598837);}let CustomConfiguration=class CustomConfiguration{async[a2_0x53ae14(0x8b)](){const _0x2d3474=a2_0x53ae14;await this[_0x2d3474(0x9c)](),await this[_0x2d3474(0xbc)](),await this[_0x2d3474(0x86)](),await this[_0x2d3474(0xcb)]();}async[a2_0x53ae14(0xbc)](){}async['handlerActionRoute'](){const _0x5d83c7=a2_0x53ae14,_0x204ac6=this[_0x5d83c7(0xd6)]['getConfiguration']();this['decorator'][_0x5d83c7(0x96)](action_1['ACTION_ROUTE_KEY'],_0x546dfa=>{const _0x30675a=_0x5d83c7,_0x19ad7d=_0x546dfa[_0x30675a(0x9f)];return{'before':async _0x10e168=>{const _0x341947=_0x30675a;var _0x5605fa,_0xcd8a0d;const _0x2fd36e=(_0x5605fa=_0x10e168===null||_0x10e168===void 0x0?void 0x0:_0x10e168[_0x341947(0xbe)])===null||_0x5605fa===void 0x0?void 0x0:_0x5605fa[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x2fd36e&&(_0x19ad7d===null||_0x19ad7d===void 0x0?void 0x0:_0x19ad7d[_0x341947(0x89)])){if(!this['ApiService']['checksign']((_0xcd8a0d=_0x2fd36e===null||_0x2fd36e===void 0x0?void 0x0:_0x2fd36e[_0x341947(0xc8)])===null||_0xcd8a0d===void 0x0?void 0x0:_0xcd8a0d[_0x341947(0x83)]))throw new AnnError(ApiError_1[_0x341947(0xa8)][_0x341947(0xa7)]);}},'around':async _0x3fd5a5=>{const _0x14e573=_0x30675a;var _0x16a684,_0x2dc31b,_0x50f2e3,_0x58d57c,_0x50ff56;const _0x1197a7=(_0x16a684=_0x3fd5a5===null||_0x3fd5a5===void 0x0?void 0x0:_0x3fd5a5[_0x14e573(0xbe)])===null||_0x16a684===void 0x0?void 0x0:_0x16a684[core_2[_0x14e573(0xcf)]];if(_0x1197a7&&(_0x19ad7d===null||_0x19ad7d===void 0x0?void 0x0:_0x19ad7d[_0x14e573(0x89)])){if(((_0x2dc31b=_0x1197a7[_0x14e573(0x83)])===null||_0x2dc31b===void 0x0?void 0x0:_0x2dc31b['device'])&&((_0x50ff56=(_0x58d57c=(_0x50f2e3=_0x204ac6===null||_0x204ac6===void 0x0?void 0x0:_0x204ac6[_0x14e573(0x8e)])===null||_0x50f2e3===void 0x0?void 0x0:_0x50f2e3[_0x14e573(0xc5)])===null||_0x58d57c===void 0x0?void 0x0:_0x58d57c[_0x1197a7['headers'][_0x14e573(0x82)]])===null||_0x50ff56===void 0x0?void 0x0:_0x50ff56[_0x14e573(0xd2)])){const _0x33f55c=Array[_0x14e573(0xa4)](_0x204ac6[_0x14e573(0x8e)][_0x14e573(0xc5)][_0x1197a7['headers']['device']]['intercept'])?_0x204ac6[_0x14e573(0x8e)]['devices'][_0x1197a7[_0x14e573(0x83)][_0x14e573(0x82)]][_0x14e573(0xd2)]:[_0x204ac6['anncicapi'][_0x14e573(0xc5)][_0x1197a7[_0x14e573(0x83)][_0x14e573(0x82)]][_0x14e573(0xd2)]];for(const _0x20f51c of _0x33f55c){if(core_1[_0x14e573(0x85)]['isClass'](_0x20f51c)||typeof _0x20f51c==_0x14e573(0xae)){const _0x410f94=await _0x1197a7[_0x14e573(0x84)][_0x14e573(0x93)](_0x20f51c);typeof(_0x410f94===null||_0x410f94===void 0x0?void 0x0:_0x410f94[_0x14e573(0xbd)])=='function'&&await _0x410f94['handler'](typeof(_0x1197a7===null||_0x1197a7===void 0x0?void 0x0:_0x1197a7[_0x14e573(0x8f)])==_0x14e573(0xae)&&(_0x1197a7===null||_0x1197a7===void 0x0?void 0x0:_0x1197a7[_0x14e573(0xb8)])?_0x1197a7[_0x14e573(0x8f)][_0x14e573(0xc6)]()+'@'+(_0x1197a7===null||_0x1197a7===void 0x0?void 0x0:_0x1197a7[_0x14e573(0xb8)]):undefined,_0x1197a7,_0x19ad7d);}else core_1[_0x14e573(0x85)][_0x14e573(0xa9)](_0x20f51c)&&await _0x20f51c(typeof(_0x1197a7===null||_0x1197a7===void 0x0?void 0x0:_0x1197a7[_0x14e573(0x8f)])==_0x14e573(0xae)&&(_0x1197a7===null||_0x1197a7===void 0x0?void 0x0:_0x1197a7[_0x14e573(0xb8)])?_0x1197a7[_0x14e573(0x8f)]['toLowerCase']()+'@'+(_0x1197a7===null||_0x1197a7===void 0x0?void 0x0:_0x1197a7['_matchedRoute']):undefined,_0x1197a7,_0x19ad7d);}}}return await _0x3fd5a5['proceed'](..._0x3fd5a5[_0x14e573(0xa2)]);},'afterThrow':(_0x3bc0d0,_0x2f8f37)=>{throw _0x2f8f37;}};});}async[a2_0x53ae14(0xcb)](){const _0x32db57=a2_0x53ae14;this[_0x32db57(0xa6)]['getApplications']([_0x32db57(0x9a)])[_0x32db57(0x9d)](_0x517de8=>{const _0x1308ee=_0x32db57;(_0x517de8===null||_0x517de8===void 0x0?void 0x0:_0x517de8['context'])&&Object[_0x1308ee(0xc3)](_0x517de8[_0x1308ee(0xdc)],{'ok':{'value':function(_0x583b05,_0x1905c4,_0x2a3ea2=0x0){return{'code':_0x2a3ea2,'data':_0x583b05,'extra':_0x1905c4};}},'input':{'value':function(_0x355e9f,_0x31dc0e){const _0x8e455d=_0x1308ee;var _0x5573b5;const _0x4f834c=lodash['defaultsDeep']({},this['request'][_0x8e455d(0xc4)]||this[_0x8e455d(0xc8)][((_0x5573b5=config===null||config===void 0x0?void 0x0:config[_0x8e455d(0xb0)])===null||_0x5573b5===void 0x0?void 0x0:_0x5573b5[_0x8e455d(0xbf)])||'body']||{},this[_0x8e455d(0xc8)]['query']||{});return _0x355e9f?lodash[_0x8e455d(0xca)](_0x4f834c,_0x355e9f,_0x31dc0e):_0x4f834c;}},'when':{'value':async function(_0x2a5045,_0x4f298e){const _0x1e3dcf=_0x1308ee,_0x1e04ca=this[_0x1e3dcf(0xb4)](_0x2a5045,null);if(!lodash[_0x1e3dcf(0x98)](_0x1e04ca))return await _0x4f298e(_0x1e04ca);}},'only':{'value':function(_0xacc08a){const _0x38e983=_0x1308ee,_0x15f32f={};for(let _0x86ddc8=0x0;_0x86ddc8<_0xacc08a[_0x38e983(0x92)];_0x86ddc8++){lodash[_0x38e983(0xa4)](_0xacc08a[_0x86ddc8])&&_0xacc08a[_0x86ddc8]['length']>0x0&&lodash['isString'](_0xacc08a[_0x86ddc8][0x0])&&(_0x15f32f[_0xacc08a[_0x86ddc8][0x0]]=this[_0x38e983(0xb4)](_0xacc08a[_0x86ddc8][0x0],_0xacc08a[_0x86ddc8][_0x38e983(0x92)]>0x1?_0xacc08a[_0x86ddc8][0x1]:null));}return _0x15f32f;}}});});}async['filterConfig'](){const _0x2434e5=a2_0x53ae14;var _0x468291,_0x3ac4a0,_0x170a5a,_0x47d08c,_0x24a09d,_0x4ebc65;const _0xed009e=this[_0x2434e5(0xd6)][_0x2434e5(0xb6)]();((_0x3ac4a0=(_0x468291=_0xed009e===null||_0xed009e===void 0x0?void 0x0:_0xed009e[_0x2434e5(0x8e)])===null||_0x468291===void 0x0?void 0x0:_0x468291['devices'])===null||_0x3ac4a0===void 0x0?void 0x0:_0x3ac4a0['DEFAULT'])&&Object[_0x2434e5(0xb5)](_0xed009e['anncicapi'][_0x2434e5(0xc5)])[_0x2434e5(0x92)]>0x1&&delete _0xed009e[_0x2434e5(0x8e)][_0x2434e5(0xc5)][_0x2434e5(0xc2)];if((_0x170a5a=_0xed009e===null||_0xed009e===void 0x0?void 0x0:_0xed009e[_0x2434e5(0x8c)])===null||_0x170a5a===void 0x0?void 0x0:_0x170a5a[_0x2434e5(0xab)])for(const _0x512649 in _0xed009e[_0x2434e5(0x8c)]['dirs']){((_0x47d08c=_0xed009e[_0x2434e5(0x8c)][_0x2434e5(0xab)][_0x512649])===null||_0x47d08c===void 0x0?void 0x0:_0x47d08c['dir'])&&typeof((_0x24a09d=_0xed009e[_0x2434e5(0x8c)][_0x2434e5(0xab)][_0x512649])===null||_0x24a09d===void 0x0?void 0x0:_0x24a09d[_0x2434e5(0xd9)])==_0x2434e5(0xae)&&!fs[_0x2434e5(0x90)](_0xed009e[_0x2434e5(0x8c)]['dirs'][_0x512649][_0x2434e5(0xd9)])&&(fs[_0x2434e5(0xc0)](_0xed009e[_0x2434e5(0x8c)]['dirs'][_0x512649][_0x2434e5(0xd9)],{'recursive':!![]}),console['log'](_0x2434e5(0x87)+_0xed009e[_0x2434e5(0x8c)][_0x2434e5(0xab)][_0x512649][_0x2434e5(0xd9)]));}((_0x4ebc65=_0xed009e===null||_0xed009e===void 0x0?void 0x0:_0xed009e['upload'])===null||_0x4ebc65===void 0x0?void 0x0:_0x4ebc65['tmpdir'])&&!fs[_0x2434e5(0x90)](_0xed009e['upload'][_0x2434e5(0x95)])&&(fs[_0x2434e5(0xc0)](_0xed009e[_0x2434e5(0xd8)][_0x2434e5(0x95)],{'recursive':!![]}),console[_0x2434e5(0xd7)](_0x2434e5(0x91)+_0xed009e[_0x2434e5(0xd8)][_0x2434e5(0x95)])),this[_0x2434e5(0xd6)][_0x2434e5(0x94)](_0xed009e);}};function a2_0x5450(){const _0x262486=['getAsync','addObject','tmpdir','registerMethodHandler','5914CxtYgm','isNull','design:type','koa','__metadata','filterConfig','forEach','1239129WJDYwT','metadata','85TMorqM','MidwayConfigService','args','3856664eDRYDu','isArray','./types/action','application','HEADERS_SIGNATURE','ApiError','isFunction','anncic-apihelper','dirs','prototype','@midwayjs/core','string','6CSEChC','bodyXml','@midwayjs/cross-domain','1015191JIfrOs','Configuration','input','keys','getConfiguration','@anncic-api/cache','_matchedRoute','Inject','object','defineProperty','checkConfigKeys','handler','target','key','mkdirSync','function','DEFAULT','defineProperties','body','devices','toLowerCase','1741910VofrxL','request','@midwayjs/static-file','get','hanlderApplications','12021713KwDxnP','decorator','2108yhtWwu','REQUEST_OBJ_CTX_KEY','ApiService','5570RvgIrw','intercept','anncic-api','@midwayjs/koa','MidwayDecoratorService','config','log','upload','dir','./exception/ApiError','MidwayApplicationManager','context','8nyfuDN','@midwayjs/upload','@anncic-api/validator','device','headers','requestContext','Types','handlerActionRoute','Anncic-api\x20static-file\x20:\x20mkdir\x20','__decorate','apimit','CustomConfiguration','onReady','staticFile','./config/config.production','anncicapi','method','existsSync','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','length'];a2_0x5450=function(){return _0x262486;};return a2_0x5450();}__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x53ae14(0x99),core_2[a2_0x53ae14(0xa1)])],CustomConfiguration['prototype'],a2_0x53ae14(0xd6),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x53ae14(0x99),core_2[a2_0x53ae14(0xd5)])],CustomConfiguration['prototype'],a2_0x53ae14(0xcd),void 0x0),__decorate([(0x0,core_1[a2_0x53ae14(0xb9)])(),__metadata(a2_0x53ae14(0x99),core_2[a2_0x53ae14(0xdb)])],CustomConfiguration[a2_0x53ae14(0xac)],a2_0x53ae14(0xa6),void 0x0),__decorate([(0x0,core_1[a2_0x53ae14(0xb9)])(),__metadata('design:type',core_2['MidwayEnvironmentService'])],CustomConfiguration[a2_0x53ae14(0xac)],'environment',void 0x0),__decorate([(0x0,core_1[a2_0x53ae14(0xb9)])(),__metadata(a2_0x53ae14(0x99),ApiService_1[a2_0x53ae14(0xd0)])],CustomConfiguration[a2_0x53ae14(0xac)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x53ae14(0xb3)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x53ae14(0xd3),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x53ae14(0x8a)]=CustomConfiguration;
|
|
1
|
+
'use strict';const a2_0x20ac80=a2_0x4c5d;(function(_0x3d01ab,_0x1348cb){const _0x56be2a=a2_0x4c5d,_0x17de75=_0x3d01ab();while(!![]){try{const _0x3a1300=-parseInt(_0x56be2a(0xe6))/0x1+-parseInt(_0x56be2a(0xe8))/0x2+-parseInt(_0x56be2a(0x12a))/0x3*(parseInt(_0x56be2a(0x110))/0x4)+-parseInt(_0x56be2a(0x140))/0x5*(-parseInt(_0x56be2a(0x119))/0x6)+-parseInt(_0x56be2a(0x10f))/0x7*(parseInt(_0x56be2a(0x124))/0x8)+-parseInt(_0x56be2a(0x101))/0x9+parseInt(_0x56be2a(0x134))/0xa*(parseInt(_0x56be2a(0xfb))/0xb);if(_0x3a1300===_0x1348cb)break;else _0x17de75['push'](_0x17de75['shift']());}catch(_0x3fc9ac){_0x17de75['push'](_0x17de75['shift']());}}}(a2_0x331f,0x4a559));var __decorate=this&&this['__decorate']||function(_0x427656,_0xa5db10,_0x395c9a,_0x8a1a86){const _0x350200=a2_0x4c5d;var _0x5bd14b=arguments[_0x350200(0xf3)],_0x399de6=_0x5bd14b<0x3?_0xa5db10:_0x8a1a86===null?_0x8a1a86=Object[_0x350200(0x115)](_0xa5db10,_0x395c9a):_0x8a1a86,_0x4e1131;if(typeof Reflect===_0x350200(0x10e)&&typeof Reflect[_0x350200(0x127)]===_0x350200(0x13b))_0x399de6=Reflect[_0x350200(0x127)](_0x427656,_0xa5db10,_0x395c9a,_0x8a1a86);else{for(var _0x388e3b=_0x427656[_0x350200(0xf3)]-0x1;_0x388e3b>=0x0;_0x388e3b--)if(_0x4e1131=_0x427656[_0x388e3b])_0x399de6=(_0x5bd14b<0x3?_0x4e1131(_0x399de6):_0x5bd14b>0x3?_0x4e1131(_0xa5db10,_0x395c9a,_0x399de6):_0x4e1131(_0xa5db10,_0x395c9a))||_0x399de6;}return _0x5bd14b>0x3&&_0x399de6&&Object['defineProperty'](_0xa5db10,_0x395c9a,_0x399de6),_0x399de6;},__metadata=this&&this[a2_0x20ac80(0xe5)]||function(_0x116a36,_0x10a48e){const _0x483386=a2_0x20ac80;if(typeof Reflect==='object'&&typeof Reflect['metadata']==='function')return Reflect[_0x483386(0x11b)](_0x116a36,_0x10a48e);};function a2_0x4c5d(_0x467555,_0x836032){const _0x331fa6=a2_0x331f();return a2_0x4c5d=function(_0x4c5df4,_0x3f3590){_0x4c5df4=_0x4c5df4-0xe3;let _0x5dc07d=_0x331fa6[_0x4c5df4];return _0x5dc07d;},a2_0x4c5d(_0x467555,_0x836032);}Object[a2_0x20ac80(0x109)](exports,'__esModule',{'value':!![]}),exports[a2_0x20ac80(0xf2)]=void 0x0;const core_1=require('@midwayjs/core'),core_2=require('@midwayjs/core'),ApiError_1=require('./exception/ApiError'),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x20ac80(0x12e)),fs=require('fs'),koa=require('@midwayjs/koa'),i18n=require(a2_0x20ac80(0xf5)),upload=require('@midwayjs/upload'),staticFile=require(a2_0x20ac80(0x12d)),crossDomain=require(a2_0x20ac80(0x112)),ConfigDefault=require(a2_0x20ac80(0xfd)),ConfigProduction=require(a2_0x20ac80(0x100)),anncic=require(a2_0x20ac80(0xf4)),anncicCache=require(a2_0x20ac80(0x11d)),anncicEvent=require(a2_0x20ac80(0x125)),anncicTypeorm=require(a2_0x20ac80(0xec)),anncicValidator=require(a2_0x20ac80(0x121)),anncicHelper=require(a2_0x20ac80(0x139));let CustomConfiguration=class CustomConfiguration{async[a2_0x20ac80(0xf6)](){const _0x3ec50c=a2_0x20ac80;await this[_0x3ec50c(0x114)](),await this['checkConfigKeys'](),await this['handlerActionRoute'](),await this[_0x3ec50c(0x107)]();}async[a2_0x20ac80(0x13c)](){}async[a2_0x20ac80(0x118)](){const _0x42202e=a2_0x20ac80,_0xdee3c2=this['config'][_0x42202e(0x104)]();this['decorator'][_0x42202e(0xee)](action_1['ACTION_ROUTE_KEY'],_0x2ae8d0=>{const _0x13fdcb=_0x2ae8d0['metadata'];return{'before':async _0x52a3db=>{const _0x8c1cb4=a2_0x4c5d;var _0x429305,_0x5785c4;const _0x476810=(_0x429305=_0x52a3db===null||_0x52a3db===void 0x0?void 0x0:_0x52a3db['target'])===null||_0x429305===void 0x0?void 0x0:_0x429305[core_2[_0x8c1cb4(0x105)]];if(_0x476810&&(_0x13fdcb===null||_0x13fdcb===void 0x0?void 0x0:_0x13fdcb[_0x8c1cb4(0x130)])){if(!this[_0x8c1cb4(0x138)][_0x8c1cb4(0x126)]((_0x5785c4=_0x476810===null||_0x476810===void 0x0?void 0x0:_0x476810['request'])===null||_0x5785c4===void 0x0?void 0x0:_0x5785c4[_0x8c1cb4(0x102)]))throw new AnnError(ApiError_1[_0x8c1cb4(0x120)][_0x8c1cb4(0xf0)]);}},'around':async _0x117a7d=>{const _0xcd2d56=a2_0x4c5d;var _0x45b53b,_0x5b32fc,_0x3f92af,_0x454872,_0x4cee7a;const _0x135439=(_0x45b53b=_0x117a7d===null||_0x117a7d===void 0x0?void 0x0:_0x117a7d[_0xcd2d56(0x123)])===null||_0x45b53b===void 0x0?void 0x0:_0x45b53b[core_2[_0xcd2d56(0x105)]];if(_0x135439&&(_0x13fdcb===null||_0x13fdcb===void 0x0?void 0x0:_0x13fdcb[_0xcd2d56(0x130)])){if(((_0x5b32fc=_0x135439[_0xcd2d56(0x102)])===null||_0x5b32fc===void 0x0?void 0x0:_0x5b32fc[_0xcd2d56(0xe4)])&&((_0x4cee7a=(_0x454872=(_0x3f92af=_0xdee3c2===null||_0xdee3c2===void 0x0?void 0x0:_0xdee3c2[_0xcd2d56(0x136)])===null||_0x3f92af===void 0x0?void 0x0:_0x3f92af[_0xcd2d56(0x122)])===null||_0x454872===void 0x0?void 0x0:_0x454872[_0x135439['headers'][_0xcd2d56(0xe4)]])===null||_0x4cee7a===void 0x0?void 0x0:_0x4cee7a[_0xcd2d56(0x116)])){const _0x3c1d80=Array[_0xcd2d56(0xe7)](_0xdee3c2[_0xcd2d56(0x136)][_0xcd2d56(0x122)][_0x135439[_0xcd2d56(0x102)]['device']][_0xcd2d56(0x116)])?_0xdee3c2[_0xcd2d56(0x136)][_0xcd2d56(0x122)][_0x135439[_0xcd2d56(0x102)][_0xcd2d56(0xe4)]][_0xcd2d56(0x116)]:[_0xdee3c2[_0xcd2d56(0x136)]['devices'][_0x135439['headers']['device']][_0xcd2d56(0x116)]];for(const _0x23378f of _0x3c1d80){if(core_1[_0xcd2d56(0x113)][_0xcd2d56(0x129)](_0x23378f)||typeof _0x23378f==_0xcd2d56(0x142)){const _0x28ea36=await _0x135439[_0xcd2d56(0x13e)][_0xcd2d56(0x12b)](_0x23378f);typeof(_0x28ea36===null||_0x28ea36===void 0x0?void 0x0:_0x28ea36[_0xcd2d56(0x137)])=='function'&&await _0x28ea36['handler'](typeof(_0x135439===null||_0x135439===void 0x0?void 0x0:_0x135439['method'])==_0xcd2d56(0x142)&&(_0x135439===null||_0x135439===void 0x0?void 0x0:_0x135439[_0xcd2d56(0x131)])?_0x135439[_0xcd2d56(0x11f)][_0xcd2d56(0xe9)]()+'@'+(_0x135439===null||_0x135439===void 0x0?void 0x0:_0x135439[_0xcd2d56(0x131)]):undefined,_0x135439,_0x13fdcb);}else core_1['Types'][_0xcd2d56(0x10c)](_0x23378f)&&await _0x23378f(typeof(_0x135439===null||_0x135439===void 0x0?void 0x0:_0x135439[_0xcd2d56(0x11f)])==_0xcd2d56(0x142)&&(_0x135439===null||_0x135439===void 0x0?void 0x0:_0x135439[_0xcd2d56(0x131)])?_0x135439['method'][_0xcd2d56(0xe9)]()+'@'+(_0x135439===null||_0x135439===void 0x0?void 0x0:_0x135439[_0xcd2d56(0x131)]):undefined,_0x135439,_0x13fdcb);}}}return await _0x117a7d[_0xcd2d56(0xf8)](..._0x117a7d[_0xcd2d56(0x143)]);},'afterThrow':(_0x176559,_0x3bc35a)=>{throw _0x3bc35a;}};});}async[a2_0x20ac80(0x107)](){const _0x11dc66=a2_0x20ac80;this['application'][_0x11dc66(0xed)]([_0x11dc66(0x108)])['forEach'](_0x31495d=>{const _0x30e10d=_0x11dc66;(_0x31495d===null||_0x31495d===void 0x0?void 0x0:_0x31495d[_0x30e10d(0x11e)])&&Object[_0x30e10d(0xe3)](_0x31495d[_0x30e10d(0x11e)],{'ok':{'value':function(_0x494c7a,_0x3fb1d0,_0x2517eb=0x0){return{'code':_0x2517eb,'data':_0x494c7a,'extra':_0x3fb1d0};}},'input':{'value':function(_0x1adafd,_0x2f4321){const _0x55388a=_0x30e10d;var _0x4371ed;const _0xb69034=lodash['defaultsDeep']({},this[_0x55388a(0xff)][_0x55388a(0x11c)]||this['request'][((_0x4371ed=config===null||config===void 0x0?void 0x0:config[_0x55388a(0x13d)])===null||_0x4371ed===void 0x0?void 0x0:_0x4371ed[_0x55388a(0x10d)])||_0x55388a(0x11c)]||{},this['request']['query']||{});return _0x1adafd?lodash[_0x55388a(0xea)](_0xb69034,_0x1adafd,_0x2f4321):_0xb69034;}},'when':{'value':async function(_0xd48e68,_0xb6ce74){const _0x30318e=_0x30e10d,_0xcef317=this[_0x30318e(0x132)](_0xd48e68,null);if(!lodash[_0x30318e(0xf7)](_0xcef317))return await _0xb6ce74(_0xcef317);}},'only':{'value':function(_0x5cdea3){const _0xbd29be=_0x30e10d,_0x300679={};for(let _0x1bcd72=0x0;_0x1bcd72<_0x5cdea3[_0xbd29be(0xf3)];_0x1bcd72++){lodash[_0xbd29be(0xe7)](_0x5cdea3[_0x1bcd72])&&_0x5cdea3[_0x1bcd72]['length']>0x0&&lodash['isString'](_0x5cdea3[_0x1bcd72][0x0])&&(_0x300679[_0x5cdea3[_0x1bcd72][0x0]]=this[_0xbd29be(0x132)](_0x5cdea3[_0x1bcd72][0x0],_0x5cdea3[_0x1bcd72]['length']>0x1?_0x5cdea3[_0x1bcd72][0x1]:null));}return _0x300679;}}});});}async[a2_0x20ac80(0x114)](){const _0x9bcc83=a2_0x20ac80;var _0x23b74e,_0x135c0b,_0x55f6df,_0x5880d5,_0xc54820,_0x41eb8f;const _0x2eda3e=this['config'][_0x9bcc83(0x104)]();((_0x135c0b=(_0x23b74e=_0x2eda3e===null||_0x2eda3e===void 0x0?void 0x0:_0x2eda3e[_0x9bcc83(0x136)])===null||_0x23b74e===void 0x0?void 0x0:_0x23b74e[_0x9bcc83(0x122)])===null||_0x135c0b===void 0x0?void 0x0:_0x135c0b['DEFAULT'])&&Object[_0x9bcc83(0xfc)](_0x2eda3e['anncicapi'][_0x9bcc83(0x122)])['length']>0x1&&delete _0x2eda3e[_0x9bcc83(0x136)][_0x9bcc83(0x122)][_0x9bcc83(0x13f)];if((_0x55f6df=_0x2eda3e===null||_0x2eda3e===void 0x0?void 0x0:_0x2eda3e['staticFile'])===null||_0x55f6df===void 0x0?void 0x0:_0x55f6df['dirs'])for(const _0x415e65 in _0x2eda3e[_0x9bcc83(0xeb)][_0x9bcc83(0x117)]){((_0x5880d5=_0x2eda3e[_0x9bcc83(0xeb)][_0x9bcc83(0x117)][_0x415e65])===null||_0x5880d5===void 0x0?void 0x0:_0x5880d5[_0x9bcc83(0x106)])&&typeof((_0xc54820=_0x2eda3e[_0x9bcc83(0xeb)][_0x9bcc83(0x117)][_0x415e65])===null||_0xc54820===void 0x0?void 0x0:_0xc54820[_0x9bcc83(0x106)])==_0x9bcc83(0x142)&&!fs[_0x9bcc83(0x11a)](_0x2eda3e[_0x9bcc83(0xeb)]['dirs'][_0x415e65][_0x9bcc83(0x106)])&&(fs[_0x9bcc83(0xf1)](_0x2eda3e[_0x9bcc83(0xeb)][_0x9bcc83(0x117)][_0x415e65][_0x9bcc83(0x106)],{'recursive':!![]}),console['log']('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x2eda3e[_0x9bcc83(0xeb)]['dirs'][_0x415e65][_0x9bcc83(0x106)]));}((_0x41eb8f=_0x2eda3e===null||_0x2eda3e===void 0x0?void 0x0:_0x2eda3e[_0x9bcc83(0x12c)])===null||_0x41eb8f===void 0x0?void 0x0:_0x41eb8f[_0x9bcc83(0xf9)])&&!fs[_0x9bcc83(0x11a)](_0x2eda3e['upload'][_0x9bcc83(0xf9)])&&(fs[_0x9bcc83(0xf1)](_0x2eda3e[_0x9bcc83(0x12c)][_0x9bcc83(0xf9)],{'recursive':!![]}),console[_0x9bcc83(0xfa)](_0x9bcc83(0x133)+_0x2eda3e[_0x9bcc83(0x12c)][_0x9bcc83(0xf9)])),this['config'][_0x9bcc83(0xef)](_0x2eda3e);}};function a2_0x331f(){const _0x4307d4=['defineProperty','MidwayEnvironmentService','MidwayDecoratorService','isFunction','key','object','7BYMQSo','913372nehbAu','Configuration','@midwayjs/cross-domain','Types','filterConfig','getOwnPropertyDescriptor','intercept','dirs','handlerActionRoute','3144090vlxYzh','existsSync','metadata','body','@anncic-api/cache','context','method','ApiError','@anncic-api/validator','devices','target','3988408BejSfq','@anncic-api/event','checksign','decorate','prototype','isClass','3fufpGV','getAsync','upload','@midwayjs/static-file','./types/action','MidwayApplicationManager','apimit','_matchedRoute','input','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','50EnqJnG','environment','anncicapi','handler','ApiService','anncic-apihelper','design:type','function','checkConfigKeys','bodyXml','requestContext','DEFAULT','5GZGGgT','anncic-api','string','args','defineProperties','device','__metadata','575865xkGIVr','isArray','363606WivSBL','toLowerCase','get','staticFile','@anncic-api/typeorm','getApplications','registerMethodHandler','addObject','HEADERS_SIGNATURE','mkdirSync','CustomConfiguration','length','@anncic-api/core','@midwayjs/i18n','onReady','isNull','proceed','tmpdir','log','2933073ydZXZV','keys','./config/config.default','Inject','request','./config/config.production','613755bkLlyI','headers','application','getConfiguration','REQUEST_OBJ_CTX_KEY','dir','hanlderApplications','koa'];a2_0x331f=function(){return _0x4307d4;};return a2_0x331f();}__decorate([(0x0,core_1[a2_0x20ac80(0xfe)])(),__metadata('design:type',core_2['MidwayConfigService'])],CustomConfiguration['prototype'],'config',void 0x0),__decorate([(0x0,core_1[a2_0x20ac80(0xfe)])(),__metadata(a2_0x20ac80(0x13a),core_2[a2_0x20ac80(0x10b)])],CustomConfiguration['prototype'],'decorator',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x20ac80(0x13a),core_2[a2_0x20ac80(0x12f)])],CustomConfiguration['prototype'],a2_0x20ac80(0x103),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x20ac80(0x13a),core_2[a2_0x20ac80(0x10a)])],CustomConfiguration[a2_0x20ac80(0x128)],a2_0x20ac80(0x135),void 0x0),__decorate([(0x0,core_1[a2_0x20ac80(0xfe)])(),__metadata(a2_0x20ac80(0x13a),ApiService_1[a2_0x20ac80(0x138)])],CustomConfiguration[a2_0x20ac80(0x128)],a2_0x20ac80(0x138),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x20ac80(0x111)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x20ac80(0x141),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x20ac80(0xf2)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a3_0x22fa(){const _0x56b199=['-controller','middlewareIgnore','/apps/','length','toLowerCase','parseRoute','app/controller/','9713nLdZHB','454472HxpoPH','existsSync','10ORwVer','filepath','/controller/','defineProperty','Controller','cwd','3EBiYwB','replace','route','middleware','prefix','join','3130eaTVyf','trim','2YkEMup','98ULXuig','module','5299970HsUanG','-action','\x20文件请放在app/controller/文件下','startsWith','APPSCONFIG_KEY','160290fSnuwq','../types/action','substring','AppsConfigTmp','saveModule','indexOf','/controller/文件下','apps/','getClassMetadata','12555HyllBP','saveClassMetadata','filter','split','72hZUDDv','541362RaqrTE','Action','__esModule','ACTION_KEY','splice','rootpath','219504EXiOin','endsWith'];a3_0x22fa=function(){return _0x56b199;};return a3_0x22fa();}const a3_0x88bb1f=a3_0x52a3;(function(_0x91fa36,_0x486f40){const _0x2726ea=a3_0x52a3,_0x844deb=_0x91fa36();while(!![]){try{const _0x672ed=-parseInt(_0x2726ea(0x196))/0x1*(-parseInt(_0x2726ea(0x19e))/0x2)+-parseInt(_0x2726ea(0x18e))/0x3*(parseInt(_0x2726ea(0x186))/0x4)+-parseInt(_0x2726ea(0x188))/0x5*(parseInt(_0x2726ea(0x1ac))/0x6)+-parseInt(_0x2726ea(0x197))/0x7*(-parseInt(_0x2726ea(0x1b2))/0x8)+-parseInt(_0x2726ea(0x1a7))/0x9*(-parseInt(_0x2726ea(0x194))/0xa)+parseInt(_0x2726ea(0x185))/0xb*(-parseInt(_0x2726ea(0x1ab))/0xc)+-parseInt(_0x2726ea(0x199))/0xd;if(_0x672ed===_0x486f40)break;else _0x844deb['push'](_0x844deb['shift']());}catch(_0xb111d0){_0x844deb['push'](_0x844deb['shift']());}}}(a3_0x22fa,0x42e4d));Object[a3_0x88bb1f(0x18b)](exports,a3_0x88bb1f(0x1ae),{'value':!![]}),exports[a3_0x88bb1f(0x183)]=exports[a3_0x88bb1f(0x1ad)]=void 0x0;const fs=require('fs'),core_1=require('@midwayjs/core'),action_1=require(a3_0x88bb1f(0x19f));function Action(_0x3bac30,_0x19a37e,_0x163a8d={'middleware':[],'sensitive':!![]}){return _0x2bc3fc=>{const _0x3088ad=a3_0x52a3;_0x163a8d['tagName']=_0x19a37e;const _0x18f07b=parseRoute(_0x3bac30);if(_0x18f07b['module']){_0x163a8d[_0x3088ad(0x192)]=_0x163a8d[_0x3088ad(0x192)]?'/'+_0x18f07b['module']+'/'+_0x163a8d[_0x3088ad(0x192)]:'/'+_0x18f07b[_0x3088ad(0x190)];_0x18f07b[_0x3088ad(0x192)]&&(_0x163a8d[_0x3088ad(0x192)]='/'+_0x18f07b[_0x3088ad(0x192)]+'/'+_0x163a8d['prefix']);if(fs[_0x3088ad(0x187)](_0x18f07b[_0x3088ad(0x1b1)]+'/apps/'+_0x18f07b[_0x3088ad(0x198)]+'/config.'+(lodash[_0x3088ad(0x1b3)](_0x18f07b['filepath'],'ts')?'ts':'js'))){const _0x3e35a7=include(_0x18f07b[_0x3088ad(0x1b1)]+_0x3088ad(0x1b6)+_0x18f07b[_0x3088ad(0x198)]+'/config.'+(lodash[_0x3088ad(0x1b3)](_0x18f07b[_0x3088ad(0x189)],'ts')?'ts':'js'));if(_0x3e35a7['middleware']&&lodash['isArray'](_0x3e35a7[_0x3088ad(0x191)])&&_0x3e35a7[_0x3088ad(0x191)]['length']>0x0)for(let _0x92ba91 in _0x3e35a7[_0x3088ad(0x191)]){_0x3e35a7[_0x3088ad(0x1b5)][_0x3088ad(0x1a3)](_0x3e35a7['middleware'][_0x92ba91])==-0x1&&_0x163a8d[_0x3088ad(0x191)]['push'](_0x3e35a7[_0x3088ad(0x191)][_0x92ba91]);}const _0x35018e=(0x0,core_1[_0x3088ad(0x1a6)])(action_1[_0x3088ad(0x19d)],action_1[_0x3088ad(0x1a1)])||{};_0x35018e[''+_0x18f07b[_0x3088ad(0x198)]]=_0x3e35a7,(0x0,core_1[_0x3088ad(0x1a8)])(action_1[_0x3088ad(0x19d)],_0x35018e,action_1[_0x3088ad(0x1a1)]);}_0x163a8d[_0x3088ad(0x192)]=_0x163a8d[_0x3088ad(0x192)]['toLowerCase']()[_0x3088ad(0x18f)](/\/{2,}/g,'/'),(0x0,core_1[_0x3088ad(0x1a2)])(action_1['ACTION_KEY'],_0x2bc3fc),(0x0,core_1['Controller'])(_0x163a8d['prefix'],_0x163a8d)(_0x2bc3fc),(0x0,core_1['saveClassMetadata'])(action_1[_0x3088ad(0x1af)],{'prefix':_0x163a8d['prefix'],'pprefix':_0x18f07b['prefix'],'module':_0x18f07b['module'],'filepath':_0x18f07b[_0x3088ad(0x189)],'routerOptions':_0x163a8d},_0x2bc3fc);}else _0x163a8d['prefix']=_0x163a8d[_0x3088ad(0x192)]?'/'+_0x163a8d[_0x3088ad(0x192)]:'/'+_0x18f07b[_0x3088ad(0x190)],_0x18f07b['prefix']&&(_0x163a8d['prefix']='/'+_0x18f07b['prefix']+'/'+_0x163a8d[_0x3088ad(0x192)]),_0x163a8d[_0x3088ad(0x192)]=_0x163a8d[_0x3088ad(0x192)]['toLowerCase']()[_0x3088ad(0x18f)](/\/{2,}/g,'/'),(0x0,core_1[_0x3088ad(0x1a2)])(action_1[_0x3088ad(0x1af)],_0x2bc3fc),(0x0,core_1[_0x3088ad(0x18c)])(_0x163a8d[_0x3088ad(0x192)],_0x163a8d)(_0x2bc3fc),(0x0,core_1[_0x3088ad(0x1a8)])(action_1[_0x3088ad(0x1af)],{'prefix':_0x163a8d['prefix'],'module':_0x18f07b[_0x3088ad(0x198)],'pprefix':_0x18f07b['prefix'],'filepath':_0x18f07b['filepath'],'routerOptions':_0x163a8d},_0x2bc3fc);};}exports['Action']=Action;function a3_0x52a3(_0x37f0af,_0x2e1f3e){const _0x22fa6d=a3_0x22fa();return a3_0x52a3=function(_0x52a316,_0x6cd8d3){_0x52a316=_0x52a316-0x181;let _0x5ac010=_0x22fa6d[_0x52a316];return _0x5ac010;},a3_0x52a3(_0x37f0af,_0x2e1f3e);}function parseRoute(_0x243fdd){const _0x5b47fc=a3_0x88bb1f;_0x243fdd=_0x243fdd[_0x5b47fc(0x18f)](/(\\|\/)/g,'/');const _0x17015f=process[_0x5b47fc(0x18d)]()[_0x5b47fc(0x18f)](/(\\|\/)/g,'/'),_0x53e236=_0x243fdd[_0x5b47fc(0x1a0)](0x0,_0x17015f['length']+_0x243fdd['substring'](_0x17015f['length']+0x1)[_0x5b47fc(0x1a3)]('/')+0x1),_0x421300=_0x243fdd[_0x5b47fc(0x1a0)](_0x53e236[_0x5b47fc(0x181)]+0x1)[_0x5b47fc(0x18f)](/(\\|\/)/g,'/'),_0x16386a={'route':'','prefix':![],'module':![],'rootpath':_0x53e236,'filepath':_0x421300};if(_0x421300[_0x5b47fc(0x19c)](_0x5b47fc(0x184))){const _0x3aa7bc=_0x421300[_0x5b47fc(0x1a0)](_0x5b47fc(0x184)[_0x5b47fc(0x181)])[_0x5b47fc(0x1aa)]('/')[_0x5b47fc(0x1a9)](_0x5259a8=>_0x5259a8&&_0x5259a8['trim']());return _0x3aa7bc[_0x5b47fc(0x181)]>0x1&&(_0x16386a[_0x5b47fc(0x192)]=_0x3aa7bc[0x0][_0x5b47fc(0x182)](),_0x3aa7bc[_0x5b47fc(0x1b0)](0x0,0x1)),_0x16386a['route']=('/'+_0x3aa7bc[_0x5b47fc(0x193)]('/'))[_0x5b47fc(0x18f)](/(\.ts|\.js)$/,'')[_0x5b47fc(0x18f)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x5b47fc(0x193)]('-')[_0x5b47fc(0x182)]()[_0x5b47fc(0x18f)](/\/\-/g,'/'),_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x1b3)](_0x5b47fc(0x19a))&&(_0x16386a[_0x5b47fc(0x190)]=_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x1a0)](0x0,_0x16386a[_0x5b47fc(0x190)]['length']-0x7)),_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x1b3)]('-controller')&&(_0x16386a[_0x5b47fc(0x190)]=_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x1a0)](0x0,_0x16386a['route'][_0x5b47fc(0x181)]-0xb)),_0x16386a;}else{if(_0x421300[_0x5b47fc(0x19c)](_0x5b47fc(0x1a5))){const _0x29ada8=_0x421300[_0x5b47fc(0x1a0)](0x0,_0x421300[_0x5b47fc(0x1a3)](_0x5b47fc(0x1b6))+0x5),_0x2b6787=_0x421300['substring'](_0x29ada8[_0x5b47fc(0x181)]+0x1)['replace'](/(\\|\/)/g,'/')['split']('/')[0x0];if(_0x421300[_0x5b47fc(0x19c)]('apps/'+_0x2b6787+'/controller/')){const _0xe4158b=_0x421300['substring']((_0x29ada8+'/'+_0x2b6787+_0x5b47fc(0x18a))[_0x5b47fc(0x181)])[_0x5b47fc(0x1aa)]('/')[_0x5b47fc(0x1a9)](_0x3da306=>_0x3da306&&_0x3da306[_0x5b47fc(0x195)]());return _0xe4158b['length']>0x1&&(_0x16386a[_0x5b47fc(0x192)]=_0xe4158b[0x0][_0x5b47fc(0x182)](),_0xe4158b[_0x5b47fc(0x1b0)](0x0,0x1)),_0x16386a[_0x5b47fc(0x198)]=_0x2b6787,_0x16386a[_0x5b47fc(0x190)]=('/'+_0x2b6787+'/'+_0xe4158b[_0x5b47fc(0x193)]('/'))[_0x5b47fc(0x18f)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x5b47fc(0x193)]('-')['toLowerCase']()[_0x5b47fc(0x18f)](/\/\-/g,'/'),_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x1b3)]('-action')&&(_0x16386a[_0x5b47fc(0x190)]=_0x16386a[_0x5b47fc(0x190)]['substring'](0x0,_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x181)]-0x7)),_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x1b3)](_0x5b47fc(0x1b4))&&(_0x16386a[_0x5b47fc(0x190)]=_0x16386a[_0x5b47fc(0x190)]['substring'](0x0,_0x16386a[_0x5b47fc(0x190)][_0x5b47fc(0x181)]-0xb)),_0x16386a;}throw new Error(_0x421300+'\x20文件请放在apps/'+_0x2b6787+_0x5b47fc(0x1a4));}}throw new Error(_0x421300+_0x5b47fc(0x19b));}exports[a3_0x88bb1f(0x183)]=parseRoute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x1ed308=a4_0x3d22;(function(_0x263687,_0x39eb0e){const _0xd38e0a=a4_0x3d22,_0x275c4a=_0x263687();while(!![]){try{const _0x14ea7f=-parseInt(_0xd38e0a(0xa0))/0x1*(-parseInt(_0xd38e0a(0x87))/0x2)+-parseInt(_0xd38e0a(0x9f))/0x3+parseInt(_0xd38e0a(0x9a))/0x4+parseInt(_0xd38e0a(0x8c))/0x5+parseInt(_0xd38e0a(0x96))/0x6+parseInt(_0xd38e0a(0x9e))/0x7+-parseInt(_0xd38e0a(0x97))/0x8;if(_0x14ea7f===_0x39eb0e)break;else _0x275c4a['push'](_0x275c4a['shift']());}catch(_0x128ba0){_0x275c4a['push'](_0x275c4a['shift']());}}}(a4_0x3bc2,0x39764));function a4_0x3bc2(){const _0x153d2d=['1169KVBWuR','../types/action','apimit','defineProperty','description','attachClassMetadata','routerName','RequestMapping','422GmIZgY','Api','length','__esModule','validationOptions','1141715yCgOWD','indexOf','filter','toLowerCase','middlewareIgnore','Validator','assign','@midwayjs/core','ACTION_ROUTE_KEY','delete','1762656hUzaoF','4741368SHKxou','validate','get','1252212WTOtQj','middleware','string','del','98308DoJREF','803520ujsRuM'];a4_0x3bc2=function(){return _0x153d2d;};return a4_0x3bc2();}function a4_0x3d22(_0x559f4e,_0x9e9e01){const _0x3bc228=a4_0x3bc2();return a4_0x3d22=function(_0x3d22ea,_0x3fa5cb){_0x3d22ea=_0x3d22ea-0x82;let _0x3178ed=_0x3bc228[_0x3d22ea];return _0x3178ed;},a4_0x3d22(_0x559f4e,_0x9e9e01);}Object[a4_0x1ed308(0x82)](exports,a4_0x1ed308(0x8a),{'value':!![]}),exports[a4_0x1ed308(0x88)]=void 0x0;const validator_1=require('@anncic-api/validator'),core_1=require(a4_0x1ed308(0x93)),action_1=require(a4_0x1ed308(0xa1));function Api(_0x373ad8,_0x181488=a4_0x1ed308(0x99),_0x393cfa='/',_0x40f423={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x104240,_0x209590,_0x3142a2)=>{const _0x38b691=a4_0x3d22;var _0x3f5451,_0x40e2fd,_0x318553;!_0x40f423[_0x38b691(0x9b)]&&(_0x40f423['middleware']=[]);!((_0x3f5451=_0x40f423===null||_0x40f423===void 0x0?void 0x0:_0x40f423[_0x38b691(0x98)])===null||_0x3f5451===void 0x0?void 0x0:_0x3f5451[_0x38b691(0x8b)])&&(_0x40f423[_0x38b691(0x98)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x38b691(0x9c)}});if(((_0x40e2fd=_0x40f423===null||_0x40f423===void 0x0?void 0x0:_0x40f423[_0x38b691(0x9b)])===null||_0x40e2fd===void 0x0?void 0x0:_0x40e2fd['length'])>0x0&&((_0x318553=_0x40f423===null||_0x40f423===void 0x0?void 0x0:_0x40f423[_0x38b691(0x90)])===null||_0x318553===void 0x0?void 0x0:_0x318553[_0x38b691(0x89)])>0x0)for(let _0x2690ca in _0x40f423[_0x38b691(0x9b)]){_0x40f423['middlewareIgnore'][_0x38b691(0x8d)](_0x40f423[_0x38b691(0x9b)][_0x2690ca])!==-0x1&&(_0x40f423[_0x38b691(0x9b)][_0x2690ca]=null);}_0x40f423['routerName']=_0x373ad8,(0x0,validator_1[_0x38b691(0x91)])(_0x40f423['validate'])(_0x104240,_0x209590,_0x3142a2),(0x0,core_1[_0x38b691(0x86)])(Object[_0x38b691(0x92)](_0x40f423,{'path':_0x393cfa,'requestMethod':(_0x181488=='del'?_0x38b691(0x95):_0x181488)[_0x38b691(0x8f)]()}))(_0x104240,_0x209590,_0x3142a2),(0x0,core_1[_0x38b691(0x84)])(action_1[_0x38b691(0x94)],{'path':_0x393cfa,'method':_0x209590,'apimit':_0x40f423['apimit'],'routerName':_0x40f423[_0x38b691(0x85)],'description':_0x40f423[_0x38b691(0x83)],'middleware':(_0x40f423[_0x38b691(0x9b)]||[])[_0x38b691(0x8e)](_0x259905=>!!_0x259905),'requestMethod':(_0x181488==_0x38b691(0x9d)?_0x38b691(0x95):_0x181488)[_0x38b691(0x8f)]()},_0x104240),(0x0,core_1['createCustomMethodDecorator'])(action_1['ACTION_ROUTE_KEY'],{'path':_0x393cfa,'method':_0x209590,'apimit':_0x40f423[_0x38b691(0xa2)],'routerName':_0x40f423['routerName'],'description':_0x40f423['description'],'middleware':(_0x40f423[_0x38b691(0x9b)]||[])[_0x38b691(0x8e)](_0x577d8d=>!!_0x577d8d),'requestMethod':(_0x181488==_0x38b691(0x9d)?_0x38b691(0x95):_0x181488)[_0x38b691(0x8f)]()})(_0x104240,_0x209590,_0x3142a2);};}exports['Api']=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5_0x595afb=a5_0x5df6;(function(_0xc038cc,_0x3d842e){const _0x3d888b=a5_0x5df6,_0x30ff6d=_0xc038cc();while(!![]){try{const _0xf9e9fe=parseInt(_0x3d888b(0x10b))/0x1*(-parseInt(_0x3d888b(0x11a))/0x2)+parseInt(_0x3d888b(0x107))/0x3*(-parseInt(_0x3d888b(0x111))/0x4)+parseInt(_0x3d888b(0x118))/0x5*(-parseInt(_0x3d888b(0x117))/0x6)+parseInt(_0x3d888b(0x106))/0x7*(parseInt(_0x3d888b(0x108))/0x8)+-parseInt(_0x3d888b(0x11b))/0x9*(-parseInt(_0x3d888b(0x109))/0xa)+parseInt(_0x3d888b(0x115))/0xb*(-parseInt(_0x3d888b(0x10a))/0xc)+parseInt(_0x3d888b(0x105))/0xd;if(_0xf9e9fe===_0x3d842e)break;else _0x30ff6d['push'](_0x30ff6d['shift']());}catch(_0x106df8){_0x30ff6d['push'](_0x30ff6d['shift']());}}}(a5_0xd578,0x41722));Object['defineProperty'](exports,a5_0x595afb(0x113),{'value':!![]}),exports[a5_0x595afb(0x119)]=void 0x0;function a5_0xd578(){const _0x50e078=['../service/ApitestService','filepath','ApitestService','@midwayjs/core','5472298iGkeDY','392224QsJmyt','147qqoIGz','8cfMUrg','10EUFjWB','1438500KUDPuf','88981QxCbkF','REQUEST_OBJ_CTX_KEY','/apitest','apitest','getApplicationContext','getAsync','25852AFDYkg','get','__esModule','RequestMapping','11ToaadH','getConfig','38370viOcJN','10yuzrHf','Apitest','2vkOQyG','2964789NJMcQv'];a5_0xd578=function(){return _0x50e078;};return a5_0xd578();}const core_1=require(a5_0x595afb(0x104)),ApitestService_1=require(a5_0x595afb(0x101));function Apitest(_0x3fb256=a5_0x595afb(0x10d),_0x37573b){return(_0x61f56d,_0x3476ff,_0x2d1613)=>{const _0x48435d=a5_0x5df6;return(0x0,core_1[_0x48435d(0x114)])({'path':_0x3fb256,'requestMethod':_0x48435d(0x112)})(_0x61f56d,_0x3476ff,_0x2d1613),_0x2d1613['value']=async function(..._0x2d80ef){const _0x307b5b=_0x48435d;var _0x5944f7;const _0x173138=(_0x5944f7=this[core_1[_0x307b5b(0x10c)]])===null||_0x5944f7===void 0x0?void 0x0:_0x5944f7['app'];if(_0x173138&&_0x173138[_0x307b5b(0x116)](_0x307b5b(0x10e))){const _0x5a5a9a=await _0x173138['getApplicationContext']()[_0x307b5b(0x110)](ApitestService_1[_0x307b5b(0x103)]),_0x3a9e02=await _0x173138[_0x307b5b(0x10f)]()[_0x307b5b(0x110)](core_1['MidwayEnvironmentService']);return _0x3a9e02['isDevelopmentEnvironment']()&&(_0x37573b[_0x307b5b(0x102)]=!![]),await _0x5a5a9a['apidoc'](_0x37573b);}return'';},_0x2d1613;};}function a5_0x5df6(_0x26b2b0,_0x3b381f){const _0xd57887=a5_0xd578();return a5_0x5df6=function(_0x5df6e3,_0x3c4eb4){_0x5df6e3=_0x5df6e3-0x101;let _0x1d015d=_0xd57887[_0x5df6e3];return _0x1d015d;},a5_0x5df6(_0x26b2b0,_0x3b381f);}exports[a5_0x595afb(0x119)]=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a6_0xfe921d=a6_0xa40b;(function(_0x5083b4,_0x34ea5a){var _0x40b0a4=a6_0xa40b,_0xf6b72=_0x5083b4();while(!![]){try{var _0x5d9c71=parseInt(_0x40b0a4(0x11c))/0x1*(-parseInt(_0x40b0a4(0x114))/0x2)+parseInt(_0x40b0a4(0x125))/0x3*(parseInt(_0x40b0a4(0x115))/0x4)+-parseInt(_0x40b0a4(0x10b))/0x5+parseInt(_0x40b0a4(0x116))/0x6*(parseInt(_0x40b0a4(0x10a))/0x7)+parseInt(_0x40b0a4(0x110))/0x8+parseInt(_0x40b0a4(0x117))/0x9+parseInt(_0x40b0a4(0x123))/0xa*(-parseInt(_0x40b0a4(0x119))/0xb);if(_0x5d9c71===_0x34ea5a)break;else _0xf6b72['push'](_0xf6b72['shift']());}catch(_0x569919){_0xf6b72['push'](_0xf6b72['shift']());}}}(a6_0x566d,0x7f83e));var __decorate=this&&this['__decorate']||function(_0x55c2f5,_0x244bc6,_0xb06043,_0x28dc9d){var _0x3d385f=a6_0xa40b,_0x393c2d=arguments[_0x3d385f(0x120)],_0x190d52=_0x393c2d<0x3?_0x244bc6:_0x28dc9d===null?_0x28dc9d=Object[_0x3d385f(0x127)](_0x244bc6,_0xb06043):_0x28dc9d,_0x32356c;if(typeof Reflect==='object'&&typeof Reflect[_0x3d385f(0x111)]===_0x3d385f(0x118))_0x190d52=Reflect[_0x3d385f(0x111)](_0x55c2f5,_0x244bc6,_0xb06043,_0x28dc9d);else{for(var _0x55a379=_0x55c2f5['length']-0x1;_0x55a379>=0x0;_0x55a379--)if(_0x32356c=_0x55c2f5[_0x55a379])_0x190d52=(_0x393c2d<0x3?_0x32356c(_0x190d52):_0x393c2d>0x3?_0x32356c(_0x244bc6,_0xb06043,_0x190d52):_0x32356c(_0x244bc6,_0xb06043))||_0x190d52;}return _0x393c2d>0x3&&_0x190d52&&Object[_0x3d385f(0x10f)](_0x244bc6,_0xb06043,_0x190d52),_0x190d52;},__metadata=this&&this[a6_0xfe921d(0x10d)]||function(_0x137866,_0xe52587){var _0x3fce29=a6_0xfe921d;if(typeof Reflect===_0x3fce29(0x11d)&&typeof Reflect['metadata']===_0x3fce29(0x118))return Reflect[_0x3fce29(0x112)](_0x137866,_0xe52587);};function a6_0x566d(){var _0x34fe94=['__metadata','ApiError','defineProperty','477888LkjgmV','decorate','metadata','__esModule','24158aatzfL','8zUOnbI','42TApDvb','6192315EqiiZL','function','781PTAzvn','design:type','HEADERS_CHECKCODE','55ULKwgD','object','HEADERS_SIGNATURE','HEADERS_DEVICE','length','请求头信息不完整','验证失败,请重新登录','98930edBcXU','请使用正确的设备','513063NZLnuW','TIMEOUT','getOwnPropertyDescriptor','HEADERS_LACK','957677LroAat','792200dIbAhz','网络繁忙,请稍后重试'];a6_0x566d=function(){return _0x34fe94;};return a6_0x566d();}Object[a6_0xfe921d(0x10f)](exports,a6_0xfe921d(0x113),{'value':!![]}),exports[a6_0xfe921d(0x10e)]=void 0x0;function a6_0xa40b(_0x52790a,_0x1b9e41){var _0x566d29=a6_0x566d();return a6_0xa40b=function(_0xa40b17,_0x50a617){_0xa40b17=_0xa40b17-0x109;var _0x3c4363=_0x566d29[_0xa40b17];return _0x3c4363;},a6_0xa40b(_0x52790a,_0x1b9e41);}class ApiError{}ApiError[a6_0xfe921d(0x126)]=0x3d7e31,ApiError[a6_0xfe921d(0x109)]=0x3d7e32,ApiError[a6_0xfe921d(0x11f)]=0x3d7e33,ApiError[a6_0xfe921d(0x11b)]=0x3d7e34,ApiError['HEADERS_SIGNATURE']=0x3d7e35,__decorate([AnnErrorMsg(a6_0xfe921d(0x10c)),__metadata(a6_0xfe921d(0x11a),Object)],ApiError,a6_0xfe921d(0x126),void 0x0),__decorate([AnnErrorMsg(a6_0xfe921d(0x121)),__metadata(a6_0xfe921d(0x11a),Object)],ApiError,'HEADERS_LACK',void 0x0),__decorate([AnnErrorMsg(a6_0xfe921d(0x124)),__metadata(a6_0xfe921d(0x11a),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg(a6_0xfe921d(0x122)),__metadata(a6_0xfe921d(0x11a),Object)],ApiError,a6_0xfe921d(0x11b),void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a6_0xfe921d(0x11a),Object)],ApiError,a6_0xfe921d(0x11e),void 0x0),exports['ApiError']=ApiError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7_0x161b36=a7_0x27a7;(function(_0x6e35cb,_0x3c72ff){const _0x3ba5c6=a7_0x27a7,_0x5ec400=_0x6e35cb();while(!![]){try{const _0x325d36=parseInt(_0x3ba5c6(0x1fb))/0x1*(parseInt(_0x3ba5c6(0x1f1))/0x2)+parseInt(_0x3ba5c6(0x1f9))/0x3*(-parseInt(_0x3ba5c6(0x1ef))/0x4)+-parseInt(_0x3ba5c6(0x1fa))/0x5+-parseInt(_0x3ba5c6(0x1ee))/0x6*(-parseInt(_0x3ba5c6(0x1f6))/0x7)+parseInt(_0x3ba5c6(0x1f5))/0x8+-parseInt(_0x3ba5c6(0x1f8))/0x9*(parseInt(_0x3ba5c6(0x1ed))/0xa)+parseInt(_0x3ba5c6(0x1eb))/0xb*(parseInt(_0x3ba5c6(0x1ea))/0xc);if(_0x325d36===_0x3c72ff)break;else _0x5ec400['push'](_0x5ec400['shift']());}catch(_0x117ee3){_0x5ec400['push'](_0x5ec400['shift']());}}}(a7_0x1732,0xaaa73));Object[a7_0x161b36(0x1f0)](exports,a7_0x161b36(0x1e7),{'value':!![]}),exports['getAppsConfig']=void 0x0;function a7_0x1732(){const _0x1682b2=['386MLCmgW','__esModule','@midwayjs/core','getAppsConfig','2407644uKzmwS','44EEDNXT','getClassMetadata','3975390YCeHlo','1547466GkRVJW','8lGxoFP','defineProperty','3254vumIFj','../types/action','AppsConfigTmp','get','4007984IbymSf','35itgNvd','APPSCONFIG_KEY','27cEEDRP','401559nDsslz','5309025HifBdg'];a7_0x1732=function(){return _0x1682b2;};return a7_0x1732();}const core_1=require(a7_0x161b36(0x1e8)),action_1=require(a7_0x161b36(0x1f2));function getAppsConfig(_0x332168){const _0x1c1805=a7_0x161b36,_0x37e239=(0x0,core_1[_0x1c1805(0x1ec)])(action_1[_0x1c1805(0x1f7)],action_1[_0x1c1805(0x1f3)])||{};return _0x332168?lodash[_0x1c1805(0x1f4)](_0x37e239,_0x332168):_0x37e239;}function a7_0x27a7(_0x175769,_0x3af82e){const _0x1732f4=a7_0x1732();return a7_0x27a7=function(_0x27a71d,_0x55a7af){_0x27a71d=_0x27a71d-0x1e7;let _0x1da628=_0x1732f4[_0x27a71d];return _0x1da628;},a7_0x27a7(_0x175769,_0x3af82e);}exports[a7_0x161b36(0x1e9)]=getAppsConfig;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8_0x474479=a8_0x214e;(function(_0x282acb,_0xb66ff2){const _0x17e130=a8_0x214e,_0x20b494=_0x282acb();while(!![]){try{const _0x3f5991=-parseInt(_0x17e130(0x158))/0x1*(parseInt(_0x17e130(0x179))/0x2)+-parseInt(_0x17e130(0x14c))/0x3*(parseInt(_0x17e130(0x14e))/0x4)+parseInt(_0x17e130(0x152))/0x5*(-parseInt(_0x17e130(0x19a))/0x6)+-parseInt(_0x17e130(0x165))/0x7+-parseInt(_0x17e130(0x156))/0x8*(-parseInt(_0x17e130(0x19c))/0x9)+parseInt(_0x17e130(0x15a))/0xa+parseInt(_0x17e130(0x155))/0xb;if(_0x3f5991===_0xb66ff2)break;else _0x20b494['push'](_0x20b494['shift']());}catch(_0x4a8c0a){_0x20b494['push'](_0x20b494['shift']());}}}(a8_0x4b9b,0x4ab81));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['getRoutes']=void 0x0;const lodash_1=require(a8_0x474479(0x191)),validator_1=require('@anncic-api/validator'),core_1=require(a8_0x474479(0x16e)),core_2=require('@midwayjs/core'),core_3=require(a8_0x474479(0x16e)),action_1=require('../types/action');function a8_0x4b9b(){const _0x67e098=['indexOf','find','summary','BODY','ACTION_ROUTE_KEY','ACTION_KEY','log','get','items','header','30645mrVasP','rules','88YBehTM','limit','-array','getClassMetadata','133005fDxBJa','module','file','4679620RKfcSj','16pNCWUO','required','3yLPgrs','route','2734210cAyMHb','parameterIndex','文件上传-','test','RULES_KEY','routerOptions','title','只允许:[','args','RouteParamTypes','describe','1470280vZsGwn','FIELDS','tagName','key','function','boolean','replace','flags.default','requestMethod','@midwayjs/core','FILESSTREAM','routes','iterator','FILESTREAM','min','split','keys','filepath','isArray','HEADERS','12812GCsxqP','getClassExtendedMetadata','join','object','prefix','flags.presence','startsWith','allow','description','noreq','Object','body','concat','name','flags.description','String','request','flags.label','metadata','type','children','filter','/static/apitest','pprefix','lodash','path','array','static/apitest','push','string','default','length','method','84ApRBlm','propertyData','1951245WcrObu','Number'];a8_0x4b9b=function(){return _0x67e098;};return a8_0x4b9b();}function getRoutes(_0x432ddf={'prefix':'/','module':![]}){const _0x1eda27=a8_0x474479;var _0x50318e,_0x50813a;const _0x5e8818=(0x0,core_3['listModule'])(action_1[_0x1eda27(0x1a3)]),_0x3b6e09={},_0x22a0ec=Array[_0x1eda27(0x177)](_0x432ddf[_0x1eda27(0x18e)]||[])?_0x432ddf['filter']||[]:[_0x432ddf[_0x1eda27(0x18e)]];_0x2736cb:for(const _0x467ff4 of _0x5e8818){let _0x5748e5=(0x0,core_3[_0x1eda27(0x151)])(action_1[_0x1eda27(0x1a3)],_0x467ff4),_0x2242ae=(0x0,core_3[_0x1eda27(0x151)])(action_1[_0x1eda27(0x1a2)],_0x467ff4);if(_0x5748e5&&_0x2242ae){let _0x1d03b1=_0x5748e5[_0x1eda27(0x17d)],_0x55e21c={};if(_0x432ddf[_0x1eda27(0x153)]&&(0x0,lodash_1[_0x1eda27(0x1a5)])(_0x5748e5,_0x1eda27(0x153),![])!=_0x432ddf['module'])continue _0x2736cb;else{if(_0x432ddf[_0x1eda27(0x153)]===![]&&!!(0x0,lodash_1['get'])(_0x5748e5,_0x1eda27(0x153),null))continue _0x2736cb;}if(_0x432ddf['prefix']&&!_0x1d03b1[_0x1eda27(0x17f)](_0x432ddf['prefix']))continue _0x2736cb;_0x1d03b1!=='/'?(_0x55e21c['summary']=(_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5['routerOptions']['tagName'])||(/^\//[_0x1eda27(0x15d)](_0x1d03b1)?_0x1d03b1[_0x1eda27(0x174)]('/')[0x1]:_0x1d03b1),_0x55e21c[_0x1eda27(0x181)]=(_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5[_0x1eda27(0x15f)]['description'])||_0x55e21c[_0x1eda27(0x1a0)],_0x55e21c[_0x1eda27(0x170)]=[]):(_0x55e21c[_0x1eda27(0x1a0)]=(_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5[_0x1eda27(0x15f)][_0x1eda27(0x167)])||_0x1eda27(0x197),_0x55e21c[_0x1eda27(0x181)]=(_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5['routerOptions'][_0x1eda27(0x181)])||'',_0x55e21c[_0x1eda27(0x170)]=[]);_0x432ddf[_0x1eda27(0x176)]&&(_0x55e21c[_0x1eda27(0x176)]=_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5['filepath']);(_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5[_0x1eda27(0x190)])&&(_0x55e21c['prefix']=_0x5748e5[_0x1eda27(0x190)]);(_0x5748e5===null||_0x5748e5===void 0x0?void 0x0:_0x5748e5[_0x1eda27(0x153)])&&(_0x55e21c[_0x1eda27(0x153)]=_0x5748e5[_0x1eda27(0x153)]);let _0x1423e8=(0x0,core_3[_0x1eda27(0x151)])(core_2['INJECT_CUSTOM_PARAM'],_0x467ff4)||{};if(typeof _0x2242ae[Symbol[_0x1eda27(0x171)]]===_0x1eda27(0x169))for(let _0x1f8c71 of _0x2242ae){let _0x270d0e={};_0x270d0e[_0x1eda27(0x199)]=_0x1f8c71[_0x1eda27(0x16d)],_0x270d0e[_0x1eda27(0x159)]=(_0x1d03b1+_0x1f8c71[_0x1eda27(0x192)])[_0x1eda27(0x16b)](/\/{1,}/,'/'),_0x270d0e[_0x1eda27(0x1a0)]=(_0x1f8c71===null||_0x1f8c71===void 0x0?void 0x0:_0x1f8c71['routerName'])||_0x55e21c[_0x1eda27(0x1a0)]||_0x1eda27(0x197),_0x270d0e['description']=(_0x1f8c71===null||_0x1f8c71===void 0x0?void 0x0:_0x1f8c71['description'])||'',_0x270d0e['request']=[];if(!(0x0,lodash_1[_0x1eda27(0x17f)])(_0x270d0e[_0x1eda27(0x159)],_0x1eda27(0x194))&&!(0x0,lodash_1[_0x1eda27(0x17f)])(_0x270d0e[_0x1eda27(0x159)],_0x1eda27(0x18f))&&_0x22a0ec['indexOf'](_0x270d0e[_0x1eda27(0x159)])===-0x1){if(!(_0x432ddf===null||_0x432ddf===void 0x0?void 0x0:_0x432ddf[_0x1eda27(0x182)])){let _0x260be1=(0x0,core_3['getMethodParamTypes'])(new _0x467ff4(),_0x1f8c71[_0x1eda27(0x199)]);for(const _0x33ed84 in _0x260be1){let _0x4bfa9b=(_0x50318e=_0x1423e8[_0x1f8c71[_0x1eda27(0x199)]])===null||_0x50318e===void 0x0?void 0x0:_0x50318e[_0x1eda27(0x19f)](_0x1ef340=>_0x1ef340[_0x1eda27(0x15b)]==_0x33ed84&&_0x1ef340[_0x1eda27(0x168)]===core_2['WEB_ROUTER_PARAM_KEY']&&(_0x1ef340===null||_0x1ef340===void 0x0?void 0x0:_0x1ef340[_0x1eda27(0x18b)]));if(_0x4bfa9b===null||_0x4bfa9b===void 0x0?void 0x0:_0x4bfa9b[_0x1eda27(0x18b)]){let _0x14b089=convertTypeToString(_0x4bfa9b['metadata'][_0x1eda27(0x18c)]||0x0);if(['query',_0x1eda27(0x184)][_0x1eda27(0x19e)](_0x14b089)!=-0x1&&_0x4bfa9b[_0x1eda27(0x18b)][_0x1eda27(0x19b)][_0x1eda27(0x19e)](':')==-0x1&&!_0x270d0e[_0x1eda27(0x189)][_0x1eda27(0x19f)](_0x92c616=>_0x92c616[_0x1eda27(0x168)]==_0x4bfa9b[_0x1eda27(0x18b)][_0x1eda27(0x19b)]))_0x270d0e['request'][_0x1eda27(0x195)]({'key':_0x4bfa9b[_0x1eda27(0x18b)][_0x1eda27(0x19b)],'title':_0x4bfa9b['metadata'][_0x1eda27(0x19b)],'type':convertSchemaType(_0x260be1[_0x4bfa9b[_0x1eda27(0x15b)]][_0x1eda27(0x186)]),'required':![],'default':'','desc':''});else{if(_0x14b089=='file'){let _0xfea949=((_0x50813a=_0x4bfa9b===null||_0x4bfa9b===void 0x0?void 0x0:_0x4bfa9b['metadata'])===null||_0x50813a===void 0x0?void 0x0:_0x50813a[_0x1eda27(0x19b)])||_0x1eda27(0x154);_0xfea949[_0x1eda27(0x19e)](':')==-0x1&&!_0x270d0e[_0x1eda27(0x189)][_0x1eda27(0x19f)](_0x573a92=>_0x573a92[_0x1eda27(0x168)]==_0xfea949&&_0x573a92[_0x1eda27(0x18c)]==_0x1eda27(0x154))&&_0x270d0e['request'][_0x1eda27(0x195)]({'key':_0xfea949,'title':_0x1eda27(0x15c)+_0xfea949,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x14177e=(0x0,core_3[_0x1eda27(0x17a)])(validator_1[_0x1eda27(0x15e)],_0x260be1[_0x33ed84]);_0x14177e&&_0x270d0e[_0x1eda27(0x189)][_0x1eda27(0x195)](...getJoiRequest(_0x14177e));}}}_0x55e21c[_0x1eda27(0x170)]['push'](_0x270d0e);}}if(_0x55e21c[_0x1eda27(0x170)][_0x1eda27(0x198)]>0x0){let _0x6e4f2f=_0x3b6e09[_0x1d03b1];_0x6e4f2f?(_0x6e4f2f['summary']!=_0x55e21c[_0x1eda27(0x1a0)]&&(_0x6e4f2f[_0x1eda27(0x1a0)]=_0x6e4f2f[_0x1eda27(0x1a0)]+','+_0x55e21c[_0x1eda27(0x1a0)]),_0x6e4f2f[_0x1eda27(0x181)]!=_0x55e21c[_0x1eda27(0x181)]&&(_0x6e4f2f['description']=_0x6e4f2f[_0x1eda27(0x181)]+','+_0x55e21c['description']),_0x6e4f2f[_0x1eda27(0x170)]=_0x6e4f2f['routes'][_0x1eda27(0x185)](_0x55e21c[_0x1eda27(0x170)]),_0x3b6e09[_0x1d03b1]=_0x6e4f2f):_0x3b6e09[_0x1d03b1]=_0x55e21c;}}}return _0x3b6e09;}exports['getRoutes']=getRoutes;function getJoiRequest(_0x2664bd){const _0x1e3d98=a8_0x474479,_0x41a5a9=[];for(let _0x17f302 in _0x2664bd){const _0x1d66cd={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x4f8385=typeof _0x2664bd[_0x17f302][_0x1e3d98(0x164)]==_0x1e3d98(0x169)?_0x2664bd[_0x17f302][_0x1e3d98(0x164)]():_0x2664bd[_0x17f302];_0x1d66cd[_0x1e3d98(0x168)]=_0x17f302,_0x1d66cd[_0x1e3d98(0x18c)]=_0x4f8385[_0x1e3d98(0x18c)],_0x1d66cd[_0x1e3d98(0x160)]=(0x0,lodash_1['get'])(_0x4f8385,_0x1e3d98(0x18a),_0x17f302),_0x1d66cd[_0x1e3d98(0x197)]=(0x0,lodash_1[_0x1e3d98(0x1a5)])(_0x4f8385,_0x1e3d98(0x16c),''),_0x1d66cd['required']=(0x0,lodash_1[_0x1e3d98(0x1a5)])(_0x4f8385,_0x1e3d98(0x17e),'')==_0x1e3d98(0x157),_0x1d66cd['description']=(0x0,lodash_1[_0x1e3d98(0x1a5)])(_0x4f8385,_0x1e3d98(0x187),'');if(_0x4f8385['type']==_0x1e3d98(0x17c))_0x1d66cd[_0x1e3d98(0x18d)]=getJoiRequest(_0x4f8385[_0x1e3d98(0x175)]);else _0x4f8385[_0x1e3d98(0x18c)]==_0x1e3d98(0x193)&&_0x4f8385['items']&&Array[_0x1e3d98(0x177)](_0x4f8385[_0x1e3d98(0x14a)])&&_0x4f8385[_0x1e3d98(0x14a)][0x0]&&console[_0x1e3d98(0x1a4)](_0x17f302+_0x1e3d98(0x150),_0x4f8385);_0x4f8385[_0x1e3d98(0x180)]&&Array[_0x1e3d98(0x177)](_0x4f8385[_0x1e3d98(0x180)])&&_0x4f8385['allow'][_0x1e3d98(0x198)]>0x0&&(_0x1d66cd[_0x1e3d98(0x181)]=_0x1e3d98(0x161)+_0x4f8385[_0x1e3d98(0x180)][_0x1e3d98(0x17b)](',')+'];'+_0x1d66cd[_0x1e3d98(0x181)]);if(_0x1d66cd[_0x1e3d98(0x168)]&&_0x1d66cd[_0x1e3d98(0x18c)]){const _0x25913f={};for(const _0x24a8a3 of _0x4f8385[_0x1e3d98(0x14d)]||[]){if(_0x24a8a3[_0x1e3d98(0x186)]==='min'&&_0x24a8a3[_0x1e3d98(0x162)])_0x25913f[_0x1e3d98(0x173)]=_0x24a8a3[_0x1e3d98(0x162)]['limit'];else _0x24a8a3['name']==='max'&&(_0x25913f['max']=_0x24a8a3[_0x1e3d98(0x162)][_0x1e3d98(0x14f)]);}_0x1d66cd[_0x1e3d98(0x14d)]=_0x25913f;}_0x1d66cd[_0x1e3d98(0x168)]&&_0x1d66cd['title']&&_0x41a5a9[_0x1e3d98(0x195)](_0x1d66cd);}return _0x41a5a9;}function a8_0x214e(_0x210e29,_0x5694b1){const _0x4b9b52=a8_0x4b9b();return a8_0x214e=function(_0x214e68,_0x44737c){_0x214e68=_0x214e68-0x14a;let _0x4c0563=_0x4b9b52[_0x214e68];return _0x4c0563;},a8_0x214e(_0x210e29,_0x5694b1);}function convertSchemaType(_0x15b13d){const _0x341b26=a8_0x474479;switch(_0x15b13d){case _0x341b26(0x183):return _0x341b26(0x17c);case'Boolean':return _0x341b26(0x16a);case _0x341b26(0x19d):return'number';case _0x341b26(0x188):return _0x341b26(0x196);case'File':return _0x341b26(0x154);default:return _0x341b26(0x196);}}function convertTypeToString(_0x59fa4d){const _0x1c9c72=a8_0x474479;switch(_0x59fa4d){case core_1[_0x1c9c72(0x163)][_0x1c9c72(0x178)]:return _0x1c9c72(0x14b);case core_1[_0x1c9c72(0x163)]['QUERY']:return'query';case core_1[_0x1c9c72(0x163)]['PARAM']:return _0x1c9c72(0x192);case core_1[_0x1c9c72(0x163)][_0x1c9c72(0x1a1)]:return _0x1c9c72(0x184);case core_1[_0x1c9c72(0x163)][_0x1c9c72(0x166)]:case core_1['RouteParamTypes'][_0x1c9c72(0x16f)]:case core_1[_0x1c9c72(0x163)][_0x1c9c72(0x172)]:return _0x1c9c72(0x154);default:return _0x1c9c72(0x14b);}}
|
|
1
|
+
'use strict';function a8_0x4f3f(){const _0x2456f7=['allow','string','propertyData','static/apitest','module','metadata','routerOptions','RouteParamTypes','find','Boolean','file','4493136VGnqcC','get','1649718oVdgBD','flags.label','split','pprefix','route','parameterIndex','function','lodash','BODY','13016JfBNYs','FILESSTREAM','min','95578GGQUCH','String','number','push','requestMethod','items','args','__esModule','iterator','rules','startsWith','filepath','3493mGGqHD','body','max','key','Number','type','ACTION_ROUTE_KEY','filter','File','concat','5027780RlvrQD','flags.default','query','replace','FILESTREAM','getMethodParamTypes','-array','isArray','getClassMetadata','defineProperty','log','default','routes','name','PARAM','test','length','4609255verxMB','文件上传-','description','ACTION_KEY','14RZwqZu','children','flags.description','required','array','../types/action','noreq','path','HEADERS','limit','indexOf','tagName','RULES_KEY','object','4ayrZOw','@midwayjs/core','summary','keys','prefix','@anncic-api/validator','title','WEB_ROUTER_PARAM_KEY','header','FIELDS','3912663jnONiY','getClassExtendedMetadata','routerName','request','getRoutes','method'];a8_0x4f3f=function(){return _0x2456f7;};return a8_0x4f3f();}const a8_0x50676c=a8_0x4e88;(function(_0x481f6b,_0xa71194){const _0x55419d=a8_0x4e88,_0x44a5a9=_0x481f6b();while(!![]){try{const _0x455a57=-parseInt(_0x55419d(0x22a))/0x1*(-parseInt(_0x55419d(0x1ff))/0x2)+-parseInt(_0x55419d(0x242))/0x3+-parseInt(_0x55419d(0x238))/0x4*(-parseInt(_0x55419d(0x226))/0x5)+-parseInt(_0x55419d(0x1f1))/0x6+parseInt(_0x55419d(0x20b))/0x7*(parseInt(_0x55419d(0x1fc))/0x8)+-parseInt(_0x55419d(0x1f3))/0x9+parseInt(_0x55419d(0x215))/0xa;if(_0x455a57===_0xa71194)break;else _0x44a5a9['push'](_0x44a5a9['shift']());}catch(_0x3a0ce2){_0x44a5a9['push'](_0x44a5a9['shift']());}}}(a8_0x4f3f,0xa35f1));function a8_0x4e88(_0x598c95,_0x46e948){const _0x4f3f20=a8_0x4f3f();return a8_0x4e88=function(_0x4e88a0,_0x15ebd4){_0x4e88a0=_0x4e88a0-0x1ef;let _0x374d36=_0x4f3f20[_0x4e88a0];return _0x374d36;},a8_0x4e88(_0x598c95,_0x46e948);}Object[a8_0x50676c(0x21e)](exports,a8_0x50676c(0x206),{'value':!![]}),exports[a8_0x50676c(0x246)]=void 0x0;const lodash_1=require(a8_0x50676c(0x1fa)),validator_1=require(a8_0x50676c(0x23d)),core_1=require('@midwayjs/core'),core_2=require(a8_0x50676c(0x239)),core_3=require(a8_0x50676c(0x239)),action_1=require(a8_0x50676c(0x22f));function getRoutes(_0x219182={'prefix':'/','module':![]}){const _0x30ed8f=a8_0x50676c;var _0x1c94bc,_0x51b3be;const _0xda41db=(0x0,core_3['listModule'])(action_1['ACTION_KEY']),_0x23c5b9={},_0xe7d359=Array[_0x30ed8f(0x21c)](_0x219182[_0x30ed8f(0x212)]||[])?_0x219182[_0x30ed8f(0x212)]||[]:[_0x219182['filter']];_0xa0029b:for(const _0x14858a of _0xda41db){let _0xb9547f=(0x0,core_3[_0x30ed8f(0x21d)])(action_1[_0x30ed8f(0x229)],_0x14858a),_0x56a740=(0x0,core_3[_0x30ed8f(0x21d)])(action_1[_0x30ed8f(0x211)],_0x14858a);if(_0xb9547f&&_0x56a740){let _0x2d3c4a=_0xb9547f[_0x30ed8f(0x23c)],_0x4b4396={};if(_0x219182[_0x30ed8f(0x24c)]&&(0x0,lodash_1[_0x30ed8f(0x1f2)])(_0xb9547f,_0x30ed8f(0x24c),![])!=_0x219182['module'])continue _0xa0029b;else{if(_0x219182[_0x30ed8f(0x24c)]===![]&&!!(0x0,lodash_1[_0x30ed8f(0x1f2)])(_0xb9547f,_0x30ed8f(0x24c),null))continue _0xa0029b;}if(_0x219182[_0x30ed8f(0x23c)]&&!_0x2d3c4a[_0x30ed8f(0x209)](_0x219182['prefix']))continue _0xa0029b;_0x2d3c4a!=='/'?(_0x4b4396['summary']=(_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f[_0x30ed8f(0x24e)][_0x30ed8f(0x235)])||(/^\//[_0x30ed8f(0x224)](_0x2d3c4a)?_0x2d3c4a[_0x30ed8f(0x1f5)]('/')[0x1]:_0x2d3c4a),_0x4b4396['description']=(_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f[_0x30ed8f(0x24e)]['description'])||_0x4b4396[_0x30ed8f(0x23a)],_0x4b4396[_0x30ed8f(0x221)]=[]):(_0x4b4396['summary']=(_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f['routerOptions'][_0x30ed8f(0x235)])||_0x30ed8f(0x220),_0x4b4396[_0x30ed8f(0x228)]=(_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f[_0x30ed8f(0x24e)][_0x30ed8f(0x228)])||'',_0x4b4396[_0x30ed8f(0x221)]=[]);_0x219182[_0x30ed8f(0x20a)]&&(_0x4b4396['filepath']=_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f['filepath']);(_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f[_0x30ed8f(0x1f6)])&&(_0x4b4396['prefix']=_0xb9547f['pprefix']);(_0xb9547f===null||_0xb9547f===void 0x0?void 0x0:_0xb9547f[_0x30ed8f(0x24c)])&&(_0x4b4396[_0x30ed8f(0x24c)]=_0xb9547f[_0x30ed8f(0x24c)]);let _0x2066fc=(0x0,core_3[_0x30ed8f(0x21d)])(core_2['INJECT_CUSTOM_PARAM'],_0x14858a)||{};if(typeof _0x56a740[Symbol[_0x30ed8f(0x207)]]===_0x30ed8f(0x1f9))for(let _0x30d4b1 of _0x56a740){let _0xa49e68={};_0xa49e68[_0x30ed8f(0x247)]=_0x30d4b1[_0x30ed8f(0x203)],_0xa49e68[_0x30ed8f(0x1f7)]=(_0x2d3c4a+_0x30d4b1[_0x30ed8f(0x231)])[_0x30ed8f(0x218)](/\/{1,}/,'/'),_0xa49e68[_0x30ed8f(0x23a)]=(_0x30d4b1===null||_0x30d4b1===void 0x0?void 0x0:_0x30d4b1[_0x30ed8f(0x244)])||_0x4b4396[_0x30ed8f(0x23a)]||_0x30ed8f(0x220),_0xa49e68[_0x30ed8f(0x228)]=(_0x30d4b1===null||_0x30d4b1===void 0x0?void 0x0:_0x30d4b1[_0x30ed8f(0x228)])||'',_0xa49e68['request']=[];if(!(0x0,lodash_1[_0x30ed8f(0x209)])(_0xa49e68[_0x30ed8f(0x1f7)],_0x30ed8f(0x24b))&&!(0x0,lodash_1[_0x30ed8f(0x209)])(_0xa49e68[_0x30ed8f(0x1f7)],'/static/apitest')&&_0xe7d359['indexOf'](_0xa49e68[_0x30ed8f(0x1f7)])===-0x1){if(!(_0x219182===null||_0x219182===void 0x0?void 0x0:_0x219182[_0x30ed8f(0x230)])){let _0x269b4d=(0x0,core_3[_0x30ed8f(0x21a)])(new _0x14858a(),_0x30d4b1[_0x30ed8f(0x247)]);for(const _0x255681 in _0x269b4d){let _0x3fc69f=(_0x1c94bc=_0x2066fc[_0x30d4b1[_0x30ed8f(0x247)]])===null||_0x1c94bc===void 0x0?void 0x0:_0x1c94bc[_0x30ed8f(0x250)](_0x5a29ba=>_0x5a29ba[_0x30ed8f(0x1f8)]==_0x255681&&_0x5a29ba[_0x30ed8f(0x20e)]===core_2[_0x30ed8f(0x23f)]&&(_0x5a29ba===null||_0x5a29ba===void 0x0?void 0x0:_0x5a29ba['metadata']));if(_0x3fc69f===null||_0x3fc69f===void 0x0?void 0x0:_0x3fc69f[_0x30ed8f(0x24d)]){let _0x5b2b00=convertTypeToString(_0x3fc69f[_0x30ed8f(0x24d)]['type']||0x0);if([_0x30ed8f(0x217),_0x30ed8f(0x20c)][_0x30ed8f(0x234)](_0x5b2b00)!=-0x1&&_0x3fc69f[_0x30ed8f(0x24d)][_0x30ed8f(0x24a)][_0x30ed8f(0x234)](':')==-0x1&&!_0xa49e68[_0x30ed8f(0x245)][_0x30ed8f(0x250)](_0x2d3896=>_0x2d3896[_0x30ed8f(0x20e)]==_0x3fc69f[_0x30ed8f(0x24d)][_0x30ed8f(0x24a)]))_0xa49e68[_0x30ed8f(0x245)]['push']({'key':_0x3fc69f[_0x30ed8f(0x24d)]['propertyData'],'title':_0x3fc69f[_0x30ed8f(0x24d)][_0x30ed8f(0x24a)],'type':convertSchemaType(_0x269b4d[_0x3fc69f[_0x30ed8f(0x1f8)]][_0x30ed8f(0x222)]),'required':![],'default':'','desc':''});else{if(_0x5b2b00==_0x30ed8f(0x1f0)){let _0xd2c7a8=((_0x51b3be=_0x3fc69f===null||_0x3fc69f===void 0x0?void 0x0:_0x3fc69f[_0x30ed8f(0x24d)])===null||_0x51b3be===void 0x0?void 0x0:_0x51b3be[_0x30ed8f(0x24a)])||_0x30ed8f(0x1f0);_0xd2c7a8[_0x30ed8f(0x234)](':')==-0x1&&!_0xa49e68['request']['find'](_0x2a5852=>_0x2a5852['key']==_0xd2c7a8&&_0x2a5852[_0x30ed8f(0x210)]=='file')&&_0xa49e68['request'][_0x30ed8f(0x202)]({'key':_0xd2c7a8,'title':_0x30ed8f(0x227)+_0xd2c7a8,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x424770=(0x0,core_3[_0x30ed8f(0x243)])(validator_1[_0x30ed8f(0x236)],_0x269b4d[_0x255681]);_0x424770&&_0xa49e68[_0x30ed8f(0x245)][_0x30ed8f(0x202)](...getJoiRequest(_0x424770));}}}_0x4b4396[_0x30ed8f(0x221)]['push'](_0xa49e68);}}if(_0x4b4396[_0x30ed8f(0x221)][_0x30ed8f(0x225)]>0x0){let _0x5c4f2f=_0x23c5b9[_0x2d3c4a];_0x5c4f2f?(_0x5c4f2f[_0x30ed8f(0x23a)]!=_0x4b4396[_0x30ed8f(0x23a)]&&(_0x5c4f2f['summary']=_0x5c4f2f['summary']+','+_0x4b4396[_0x30ed8f(0x23a)]),_0x5c4f2f[_0x30ed8f(0x228)]!=_0x4b4396['description']&&(_0x5c4f2f['description']=_0x5c4f2f[_0x30ed8f(0x228)]+','+_0x4b4396['description']),_0x5c4f2f[_0x30ed8f(0x221)]=_0x5c4f2f[_0x30ed8f(0x221)][_0x30ed8f(0x214)](_0x4b4396['routes']),_0x23c5b9[_0x2d3c4a]=_0x5c4f2f):_0x23c5b9[_0x2d3c4a]=_0x4b4396;}}}return _0x23c5b9;}exports['getRoutes']=getRoutes;function getJoiRequest(_0x3f593c){const _0x1de223=a8_0x50676c,_0x199a9e=[];for(let _0x18252b in _0x3f593c){const _0x39fa79={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x4f9155=typeof _0x3f593c[_0x18252b]['describe']==_0x1de223(0x1f9)?_0x3f593c[_0x18252b]['describe']():_0x3f593c[_0x18252b];_0x39fa79['key']=_0x18252b,_0x39fa79[_0x1de223(0x210)]=_0x4f9155[_0x1de223(0x210)],_0x39fa79[_0x1de223(0x23e)]=(0x0,lodash_1['get'])(_0x4f9155,_0x1de223(0x1f4),_0x18252b),_0x39fa79[_0x1de223(0x220)]=(0x0,lodash_1[_0x1de223(0x1f2)])(_0x4f9155,_0x1de223(0x216),''),_0x39fa79[_0x1de223(0x22d)]=(0x0,lodash_1['get'])(_0x4f9155,'flags.presence','')==_0x1de223(0x22d),_0x39fa79[_0x1de223(0x228)]=(0x0,lodash_1['get'])(_0x4f9155,_0x1de223(0x22c),'');if(_0x4f9155[_0x1de223(0x210)]==_0x1de223(0x237))_0x39fa79[_0x1de223(0x22b)]=getJoiRequest(_0x4f9155[_0x1de223(0x23b)]);else _0x4f9155[_0x1de223(0x210)]==_0x1de223(0x22e)&&_0x4f9155[_0x1de223(0x204)]&&Array[_0x1de223(0x21c)](_0x4f9155[_0x1de223(0x204)])&&_0x4f9155['items'][0x0]&&console[_0x1de223(0x21f)](_0x18252b+_0x1de223(0x21b),_0x4f9155);_0x4f9155['allow']&&Array[_0x1de223(0x21c)](_0x4f9155[_0x1de223(0x248)])&&_0x4f9155[_0x1de223(0x248)][_0x1de223(0x225)]>0x0&&(_0x39fa79[_0x1de223(0x228)]='只允许:['+_0x4f9155['allow']['join'](',')+'];'+_0x39fa79[_0x1de223(0x228)]);if(_0x39fa79['key']&&_0x39fa79[_0x1de223(0x210)]){const _0x3b1aef={};for(const _0x1b0a08 of _0x4f9155['rules']||[]){if(_0x1b0a08[_0x1de223(0x222)]==='min'&&_0x1b0a08[_0x1de223(0x205)])_0x3b1aef[_0x1de223(0x1fe)]=_0x1b0a08[_0x1de223(0x205)][_0x1de223(0x233)];else _0x1b0a08['name']==='max'&&(_0x3b1aef[_0x1de223(0x20d)]=_0x1b0a08[_0x1de223(0x205)][_0x1de223(0x233)]);}_0x39fa79[_0x1de223(0x208)]=_0x3b1aef;}_0x39fa79['key']&&_0x39fa79[_0x1de223(0x23e)]&&_0x199a9e['push'](_0x39fa79);}return _0x199a9e;}function convertSchemaType(_0x1edfe6){const _0x8e703d=a8_0x50676c;switch(_0x1edfe6){case'Object':return _0x8e703d(0x237);case _0x8e703d(0x1ef):return'boolean';case _0x8e703d(0x20f):return _0x8e703d(0x201);case _0x8e703d(0x200):return _0x8e703d(0x249);case _0x8e703d(0x213):return _0x8e703d(0x1f0);default:return _0x8e703d(0x249);}}function convertTypeToString(_0x5dd58b){const _0x5cdec9=a8_0x50676c;switch(_0x5dd58b){case core_1[_0x5cdec9(0x24f)][_0x5cdec9(0x232)]:return _0x5cdec9(0x240);case core_1[_0x5cdec9(0x24f)]['QUERY']:return _0x5cdec9(0x217);case core_1[_0x5cdec9(0x24f)][_0x5cdec9(0x223)]:return _0x5cdec9(0x231);case core_1['RouteParamTypes'][_0x5cdec9(0x1fb)]:return _0x5cdec9(0x20c);case core_1[_0x5cdec9(0x24f)][_0x5cdec9(0x241)]:case core_1[_0x5cdec9(0x24f)][_0x5cdec9(0x1fd)]:case core_1[_0x5cdec9(0x24f)][_0x5cdec9(0x219)]:return'file';default:return _0x5cdec9(0x240);}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a9_0x1dd437=a9_0x15fe;(function(_0x483a68,_0x1f720a){var _0x585734=a9_0x15fe,_0x255449=_0x483a68();while(!![]){try{var _0x34d69b=-parseInt(_0x585734(0xdb))/0x1+-parseInt(_0x585734(0xc8))/0x2*(parseInt(_0x585734(0xbe))/0x3)+-parseInt(_0x585734(0xe4))/0x4+-parseInt(_0x585734(0xf4))/0x5*(parseInt(_0x585734(0xf2))/0x6)+parseInt(_0x585734(0xc5))/0x7*(parseInt(_0x585734(0xcc))/0x8)+parseInt(_0x585734(0xe5))/0x9*(parseInt(_0x585734(0xb9))/0xa)+parseInt(_0x585734(0xcb))/0xb;if(_0x34d69b===_0x1f720a)break;else _0x255449['push'](_0x255449['shift']());}catch(_0x2e504d){_0x255449['push'](_0x255449['shift']());}}}(a9_0x1780,0xe8e82));var __createBinding=this&&this[a9_0x1dd437(0xcd)]||(Object[a9_0x1dd437(0xd3)]?function(_0x13fd48,_0x20689a,_0x24d202,_0x57f0b7){var _0xc7f4d8=a9_0x1dd437;if(_0x57f0b7===undefined)_0x57f0b7=_0x24d202;var _0x409a3b=Object[_0xc7f4d8(0xe6)](_0x20689a,_0x24d202);(!_0x409a3b||(_0xc7f4d8(0xc2)in _0x409a3b?!_0x20689a['__esModule']:_0x409a3b[_0xc7f4d8(0xca)]||_0x409a3b[_0xc7f4d8(0xc0)]))&&(_0x409a3b={'enumerable':!![],'get':function(){return _0x20689a[_0x24d202];}}),Object[_0xc7f4d8(0xda)](_0x13fd48,_0x57f0b7,_0x409a3b);}:function(_0x2b4387,_0x3f8163,_0x2ae102,_0x3a613e){if(_0x3a613e===undefined)_0x3a613e=_0x2ae102;_0x2b4387[_0x3a613e]=_0x3f8163[_0x2ae102];}),__exportStar=this&&this[a9_0x1dd437(0xd8)]||function(_0x3a4e9f,_0x3c0e25){var _0x2c95d9=a9_0x1dd437;for(var _0x45e5ae in _0x3a4e9f)if(_0x45e5ae!==_0x2c95d9(0xf1)&&!Object[_0x2c95d9(0xd4)]['hasOwnProperty']['call'](_0x3c0e25,_0x45e5ae))__createBinding(_0x3c0e25,_0x3a4e9f,_0x45e5ae);};Object['defineProperty'](exports,a9_0x1dd437(0xbd),{'value':!![]}),exports[a9_0x1dd437(0xdf)]=exports[a9_0x1dd437(0xde)]=exports[a9_0x1dd437(0xf0)]=exports[a9_0x1dd437(0xdd)]=exports[a9_0x1dd437(0xd6)]=exports['Logger']=exports[a9_0x1dd437(0xe7)]=exports['App']=exports[a9_0x1dd437(0xd9)]=exports['Headers']=exports[a9_0x1dd437(0xee)]=exports[a9_0x1dd437(0xec)]=exports[a9_0x1dd437(0xc6)]=exports[a9_0x1dd437(0xe9)]=exports[a9_0x1dd437(0xe3)]=exports[a9_0x1dd437(0xf3)]=exports[a9_0x1dd437(0xc9)]=exports['ValidatorService']=exports[a9_0x1dd437(0xe0)]=exports[a9_0x1dd437(0xea)]=exports[a9_0x1dd437(0xdc)]=exports[a9_0x1dd437(0xd5)]=exports[a9_0x1dd437(0xc3)]=exports[a9_0x1dd437(0xd7)]=exports[a9_0x1dd437(0xf6)]=exports['Apitest']=exports[a9_0x1dd437(0xed)]=exports[a9_0x1dd437(0xef)]=void 0x0;const getAppsConfig_1=require(a9_0x1dd437(0xc1));Object['defineProperty'](exports,'getAppsConfig',{'enumerable':!![],'get':function(){var _0xbbef4d=a9_0x1dd437;return getAppsConfig_1[_0xbbef4d(0xdf)];}}),__exportStar(require(a9_0x1dd437(0xd0)),exports),__exportStar(require('./service/ApitestService'),exports);var ActionApi_1=require(a9_0x1dd437(0xeb));Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xef),{'enumerable':!![],'get':function(){var _0x257355=a9_0x1dd437;return ActionApi_1[_0x257355(0xef)];}});var Action_1=require(a9_0x1dd437(0xf5));Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xed),{'enumerable':!![],'get':function(){var _0x49f2df=a9_0x1dd437;return Action_1[_0x49f2df(0xed)];}});var ActionApitest_1=require(a9_0x1dd437(0xe1));Object['defineProperty'](exports,'Apitest',{'enumerable':!![],'get':function(){var _0x9dfff3=a9_0x1dd437;return ActionApitest_1[_0x9dfff3(0xc7)];}});var getRoutes_1=require('./helper/getRoutes');Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xf6),{'enumerable':!![],'get':function(){var _0x3af428=a9_0x1dd437;return getRoutes_1[_0x3af428(0xf6)];}});var ApiError_1=require('./exception/ApiError');Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xd7),{'enumerable':!![],'get':function(){var _0x17d6c0=a9_0x1dd437;return ApiError_1[_0x17d6c0(0xd7)];}});var cache_1=require(a9_0x1dd437(0xce));Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xc3),{'enumerable':!![],'get':function(){return cache_1['CacheService'];}});var event_1=require(a9_0x1dd437(0xe8));Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xd5),{'enumerable':!![],'get':function(){var _0xb1f51=a9_0x1dd437;return event_1[_0xb1f51(0xd5)];}});var ApiService_1=require(a9_0x1dd437(0xe2));function a9_0x1780(){var _0x926ffe=['1778415vLkYkU','ApiService','Inject','ScopeEnum','getAppsConfig','ValidatorError','./decorator/ActionApitest','./service/ApiService','Files','157032MTJgst','215703jzujCb','getOwnPropertyDescriptor','Config','@anncic-api/event','Fields','ExcelService','./decorator/ActionApi','Param','Action','Query','Api','Scope','default','127266dYAlAF','File','45Irwlag','./decorator/Action','getRoutes','320yuBNpC','@midwayjs/core','Headers','App','__esModule','201IGRECs','Logger','configurable','./helper/getAppsConfig','get','CacheService','CustomConfiguration','42NHLNdu','Body','Apitest','33214FjvgGl','Configuration','writable','22779867LMnPxL','1649848ZVLHVV','__createBinding','@anncic-api/cache','./service/ExcelService','./types/common','./configuration','ValidatorService','create','prototype','EventService','Provide','ApiError','__exportStar','Init','defineProperty'];a9_0x1780=function(){return _0x926ffe;};return a9_0x1780();}Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xdc),{'enumerable':!![],'get':function(){var _0x429d75=a9_0x1dd437;return ApiService_1[_0x429d75(0xdc)];}});var ExcelService_1=require(a9_0x1dd437(0xcf));Object[a9_0x1dd437(0xda)](exports,'ExcelService',{'enumerable':!![],'get':function(){var _0x130f22=a9_0x1dd437;return ExcelService_1[_0x130f22(0xea)];}});var validator_1=require('@anncic-api/validator');Object['defineProperty'](exports,a9_0x1dd437(0xe0),{'enumerable':!![],'get':function(){var _0x13b88d=a9_0x1dd437;return validator_1[_0x13b88d(0xe0)];}}),Object[a9_0x1dd437(0xda)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x4b39ad=a9_0x1dd437;return validator_1[_0x4b39ad(0xd2)];}});var configuration_1=require(a9_0x1dd437(0xd1));Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xc9),{'enumerable':!![],'get':function(){var _0x26fe62=a9_0x1dd437;return configuration_1[_0x26fe62(0xc4)];}});var core_1=require('@midwayjs/core');Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xf3),{'enumerable':!![],'get':function(){return core_1['File'];}}),Object['defineProperty'](exports,a9_0x1dd437(0xe3),{'enumerable':!![],'get':function(){var _0x54979b=a9_0x1dd437;return core_1[_0x54979b(0xe3)];}}),Object[a9_0x1dd437(0xda)](exports,'Fields',{'enumerable':!![],'get':function(){return core_1['Fields'];}}),Object[a9_0x1dd437(0xda)](exports,'Body',{'enumerable':!![],'get':function(){var _0x433e12=a9_0x1dd437;return core_1[_0x433e12(0xc6)];}}),Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xec),{'enumerable':!![],'get':function(){var _0x476dec=a9_0x1dd437;return core_1[_0x476dec(0xec)];}}),Object[a9_0x1dd437(0xda)](exports,'Query',{'enumerable':!![],'get':function(){var _0x5cf3cc=a9_0x1dd437;return core_1[_0x5cf3cc(0xee)];}}),Object['defineProperty'](exports,'Headers',{'enumerable':!![],'get':function(){var _0x5213e7=a9_0x1dd437;return core_1[_0x5213e7(0xbb)];}}),Object['defineProperty'](exports,a9_0x1dd437(0xd9),{'enumerable':!![],'get':function(){var _0x1e6239=a9_0x1dd437;return core_1[_0x1e6239(0xd9)];}});var core_2=require(a9_0x1dd437(0xba));function a9_0x15fe(_0x3d1a87,_0x39e565){var _0x17808d=a9_0x1780();return a9_0x15fe=function(_0x15febb,_0x223132){_0x15febb=_0x15febb-0xb9;var _0x3d06bf=_0x17808d[_0x15febb];return _0x3d06bf;},a9_0x15fe(_0x3d1a87,_0x39e565);}Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xbc),{'enumerable':!![],'get':function(){var _0x2cd6f2=a9_0x1dd437;return core_2[_0x2cd6f2(0xbc)];}}),Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xe7),{'enumerable':!![],'get':function(){var _0x145ebd=a9_0x1dd437;return core_2[_0x145ebd(0xe7)];}}),Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xbf),{'enumerable':!![],'get':function(){var _0x5f1005=a9_0x1dd437;return core_2[_0x5f1005(0xbf)];}}),Object[a9_0x1dd437(0xda)](exports,'Provide',{'enumerable':!![],'get':function(){return core_2['Provide'];}}),Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xdd),{'enumerable':!![],'get':function(){var _0x504f87=a9_0x1dd437;return core_2[_0x504f87(0xdd)];}}),Object[a9_0x1dd437(0xda)](exports,a9_0x1dd437(0xf0),{'enumerable':!![],'get':function(){return core_2['Scope'];}}),Object['defineProperty'](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x41ac4b=a9_0x1dd437;return core_2[_0x41ac4b(0xde)];}}),global[a9_0x1dd437(0xdf)]=getAppsConfig_1[a9_0x1dd437(0xdf)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a10_0x3e79(_0x5ec77a,_0x11f0b8){var _0x3ff484=a10_0x3ff4();return a10_0x3e79=function(_0x3e797e,_0x31ad39){_0x3e797e=_0x3e797e-0x174;var _0x2bb4f3=_0x3ff484[_0x3e797e];return _0x2bb4f3;},a10_0x3e79(_0x5ec77a,_0x11f0b8);}var a10_0x22b0c1=a10_0x3e79;function a10_0x3ff4(){var _0x37263a=['fromEntries','defineProperty','secret','sort','join','requesttime','getOwnPropertyDescriptor','270813jtdsOn','prototype','Singleton','timeout','checksign','now','Scope','object','__esModule','decorate','ApiService','device','signature','MD5','Config','metadata','push','toLowerCase','secret=','HEADERS_DEVICE','anncicapi','undefined','8253336Yzcvxh','4erLnKZ','579740ckFpWv','Provide','22oAohKJ','686411XucvuK','token','68048hbjwHz','__decorate','缺少头信息:signature','getsign','863154KTkrnU','HEADERS_LACK','password','ScopeEnum','config','checkcode','882ztdjee','length','design:type','TIMEOUT','crypto-js','map','616WQWUeR','7240875zNdLOR','logintime','ApiError','function','toString','devices','../exception/ApiError','__metadata'];a10_0x3ff4=function(){return _0x37263a;};return a10_0x3ff4();}(function(_0x4b8d5a,_0x4648a8){var _0x294707=a10_0x3e79,_0x29d525=_0x4b8d5a();while(!![]){try{var _0x506784=parseInt(_0x294707(0x178))/0x1+-parseInt(_0x294707(0x177))/0x2*(-parseInt(_0x294707(0x19a))/0x3)+parseInt(_0x294707(0x174))/0x4*(-parseInt(_0x294707(0x18b))/0x5)+-parseInt(_0x294707(0x1b0))/0x6+parseInt(_0x294707(0x184))/0x7*(-parseInt(_0x294707(0x17a))/0x8)+-parseInt(_0x294707(0x17e))/0x9+parseInt(_0x294707(0x175))/0xa*(parseInt(_0x294707(0x18a))/0xb);if(_0x506784===_0x4648a8)break;else _0x29d525['push'](_0x29d525['shift']());}catch(_0x1538cc){_0x29d525['push'](_0x29d525['shift']());}}}(a10_0x3ff4,0xe428f));var __decorate=this&&this[a10_0x22b0c1(0x17b)]||function(_0x28bbe5,_0x4464c6,_0x2618a0,_0x1db65e){var _0x46836a=a10_0x22b0c1,_0x386955=arguments[_0x46836a(0x185)],_0x22a3fd=_0x386955<0x3?_0x4464c6:_0x1db65e===null?_0x1db65e=Object[_0x46836a(0x199)](_0x4464c6,_0x2618a0):_0x1db65e,_0x4471be;if(typeof Reflect==='object'&&typeof Reflect[_0x46836a(0x1a3)]===_0x46836a(0x18e))_0x22a3fd=Reflect[_0x46836a(0x1a3)](_0x28bbe5,_0x4464c6,_0x2618a0,_0x1db65e);else{for(var _0x4c2f3e=_0x28bbe5[_0x46836a(0x185)]-0x1;_0x4c2f3e>=0x0;_0x4c2f3e--)if(_0x4471be=_0x28bbe5[_0x4c2f3e])_0x22a3fd=(_0x386955<0x3?_0x4471be(_0x22a3fd):_0x386955>0x3?_0x4471be(_0x4464c6,_0x2618a0,_0x22a3fd):_0x4471be(_0x4464c6,_0x2618a0))||_0x22a3fd;}return _0x386955>0x3&&_0x22a3fd&&Object[_0x46836a(0x194)](_0x4464c6,_0x2618a0,_0x22a3fd),_0x22a3fd;},__metadata=this&&this[a10_0x22b0c1(0x192)]||function(_0x2089aa,_0xd8b5ec){var _0x50ecf3=a10_0x22b0c1;if(typeof Reflect===_0x50ecf3(0x1a1)&&typeof Reflect[_0x50ecf3(0x1a9)]===_0x50ecf3(0x18e))return Reflect[_0x50ecf3(0x1a9)](_0x2089aa,_0xd8b5ec);};Object[a10_0x22b0c1(0x194)](exports,a10_0x22b0c1(0x1a2),{'value':!![]}),exports[a10_0x22b0c1(0x1a4)]=void 0x0;const crypto_js_1=require(a10_0x22b0c1(0x188)),core_1=require('@midwayjs/core'),ApiError_1=require(a10_0x22b0c1(0x191));let ApiService=class ApiService{['password'](_0x22c9e4){var _0x5efafc=a10_0x22b0c1,_0x17c2b8;return _0x22c9e4?(0x0,crypto_js_1[_0x5efafc(0x1a7)])(_0x22c9e4+(0x0,crypto_js_1['MD5'])((0x0,crypto_js_1['MD5'])(_0x22c9e4)['toString']()+((_0x17c2b8=this[_0x5efafc(0x182)])===null||_0x17c2b8===void 0x0?void 0x0:_0x17c2b8[_0x5efafc(0x180)]))[_0x5efafc(0x18f)]())[_0x5efafc(0x18f)]():'';}['getcheck'](_0x54fa31,_0x317b1d,_0x3d52e3=Date[a10_0x22b0c1(0x19f)]()){var _0x151b1d=a10_0x22b0c1;return{'Token':_0x54fa31,'Logintime':_0x3d52e3,'Checkcode':this[_0x151b1d(0x183)](_0x54fa31,_0x317b1d,_0x3d52e3)};}[a10_0x22b0c1(0x17d)](_0x5992f7={}){var _0x574ab6=a10_0x22b0c1;const _0x25f573=[],_0x124ebf=Object[_0x574ab6(0x193)](Object['entries'](_0x5992f7)[_0x574ab6(0x189)](_0x5c37e4=>[_0x5c37e4[0x0][_0x574ab6(0x1ab)](),_0x5c37e4[0x1]]));for(let _0x1e9543 of['device','requesttime',_0x574ab6(0x179),_0x574ab6(0x18c),_0x574ab6(0x183)]){if(typeof _0x124ebf[_0x1e9543]==_0x574ab6(0x1af))throw new AnnError(ApiError_1['ApiError'][_0x574ab6(0x17f)],{'message':'缺少头信息:'+_0x1e9543});_0x25f573[_0x574ab6(0x1aa)](_0x1e9543+'='+_0x124ebf[_0x1e9543]);}if(Math['abs'](_0x124ebf[_0x574ab6(0x198)])-Date['now']()>this[_0x574ab6(0x182)][_0x574ab6(0x19d)])throw new AnnError(ApiError_1[_0x574ab6(0x18d)][_0x574ab6(0x187)]);if(!this[_0x574ab6(0x182)][_0x574ab6(0x190)][_0x124ebf['device']]||!this[_0x574ab6(0x182)]['devices'][_0x124ebf['device']]['secret']||!this[_0x574ab6(0x182)][_0x574ab6(0x190)][_0x124ebf[_0x574ab6(0x1a5)]][_0x574ab6(0x183)])throw new AnnError(ApiError_1[_0x574ab6(0x18d)][_0x574ab6(0x1ad)]);if(_0x124ebf[_0x574ab6(0x179)]&&_0x124ebf[_0x574ab6(0x183)]!=this['checkcode'](_0x124ebf[_0x574ab6(0x179)],_0x124ebf[_0x574ab6(0x1a5)],_0x124ebf[_0x574ab6(0x18c)]))throw new AnnError(ApiError_1[_0x574ab6(0x18d)]['HEADERS_CHECKCODE']);return _0x25f573['push'](_0x574ab6(0x1ac)+this[_0x574ab6(0x182)]['devices'][_0x124ebf[_0x574ab6(0x1a5)]][_0x574ab6(0x195)]),(0x0,crypto_js_1['MD5'])(_0x25f573[_0x574ab6(0x196)]()[_0x574ab6(0x197)](''))['toString']();}[a10_0x22b0c1(0x183)](_0x25f0ec,_0x375143,_0x3ac636=Date[a10_0x22b0c1(0x19f)]()){var _0x58127f=a10_0x22b0c1,_0x16e14f,_0xe6ef1,_0x3b98e6;if(!((_0x16e14f=this[_0x58127f(0x182)])===null||_0x16e14f===void 0x0?void 0x0:_0x16e14f[_0x58127f(0x190)][_0x375143])||!((_0x3b98e6=(_0xe6ef1=this[_0x58127f(0x182)])===null||_0xe6ef1===void 0x0?void 0x0:_0xe6ef1[_0x58127f(0x190)][_0x375143])===null||_0x3b98e6===void 0x0?void 0x0:_0x3b98e6['checkcode']))throw new AnnError(ApiError_1[_0x58127f(0x18d)][_0x58127f(0x1ad)]);return(0x0,crypto_js_1['MD5'])(_0x25f0ec+(0x0,crypto_js_1[_0x58127f(0x1a7)])(_0x3ac636+this[_0x58127f(0x182)][_0x58127f(0x190)][_0x375143][_0x58127f(0x183)])[_0x58127f(0x18f)]())[_0x58127f(0x18f)]();}[a10_0x22b0c1(0x19e)](_0x2b49cf={}){var _0x593677=a10_0x22b0c1;const _0x1d5e1e=Object[_0x593677(0x193)](Object['entries'](_0x2b49cf)[_0x593677(0x189)](_0x51db18=>[_0x51db18[0x0][_0x593677(0x1ab)](),_0x51db18[0x1]]));if(!(_0x1d5e1e===null||_0x1d5e1e===void 0x0?void 0x0:_0x1d5e1e['signature']))throw new AnnError(ApiError_1[_0x593677(0x18d)][_0x593677(0x17f)],{'message':_0x593677(0x17c)});if((_0x1d5e1e===null||_0x1d5e1e===void 0x0?void 0x0:_0x1d5e1e[_0x593677(0x1a6)])!=this[_0x593677(0x17d)](_0x1d5e1e))throw new AnnError(ApiError_1[_0x593677(0x18d)]['HEADERS_SIGNATURE']);return!![];}};__decorate([(0x0,core_1[a10_0x22b0c1(0x1a8)])(a10_0x22b0c1(0x1ae)),__metadata(a10_0x22b0c1(0x186),Object)],ApiService[a10_0x22b0c1(0x19b)],a10_0x22b0c1(0x182),void 0x0),ApiService=__decorate([(0x0,core_1[a10_0x22b0c1(0x176)])(),(0x0,core_1[a10_0x22b0c1(0x1a0)])(core_1[a10_0x22b0c1(0x181)][a10_0x22b0c1(0x19c)])],ApiService),exports[a10_0x22b0c1(0x1a4)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a11_0xa197(_0x3ffd50,_0x31e53f){const _0x42517b=a11_0x4251();return a11_0xa197=function(_0xa1976a,_0x25632e){_0xa1976a=_0xa1976a-0x104;let _0x40c00e=_0x42517b[_0xa1976a];return _0x40c00e;},a11_0xa197(_0x3ffd50,_0x31e53f);}const a11_0x506e11=a11_0xa197;(function(_0x220d95,_0x576c06){const _0x3fe5f1=a11_0xa197,_0x44b6f2=_0x220d95();while(!![]){try{const _0x320541=parseInt(_0x3fe5f1(0x109))/0x1*(-parseInt(_0x3fe5f1(0x13c))/0x2)+parseInt(_0x3fe5f1(0x13d))/0x3*(-parseInt(_0x3fe5f1(0x152))/0x4)+parseInt(_0x3fe5f1(0x115))/0x5+parseInt(_0x3fe5f1(0x146))/0x6+-parseInt(_0x3fe5f1(0x149))/0x7*(parseInt(_0x3fe5f1(0x12c))/0x8)+parseInt(_0x3fe5f1(0x128))/0x9+-parseInt(_0x3fe5f1(0x153))/0xa*(parseInt(_0x3fe5f1(0x139))/0xb);if(_0x320541===_0x576c06)break;else _0x44b6f2['push'](_0x44b6f2['shift']());}catch(_0x7fdc92){_0x44b6f2['push'](_0x44b6f2['shift']());}}}(a11_0x4251,0x75e4c));var __decorate=this&&this[a11_0x506e11(0x126)]||function(_0x19158d,_0x276ba3,_0x454ae4,_0x31936f){const _0x52ad48=a11_0x506e11;var _0x40f350=arguments[_0x52ad48(0x14d)],_0x1e5dba=_0x40f350<0x3?_0x276ba3:_0x31936f===null?_0x31936f=Object[_0x52ad48(0x14b)](_0x276ba3,_0x454ae4):_0x31936f,_0x21bddb;if(typeof Reflect==='object'&&typeof Reflect[_0x52ad48(0x113)]===_0x52ad48(0x110))_0x1e5dba=Reflect[_0x52ad48(0x113)](_0x19158d,_0x276ba3,_0x454ae4,_0x31936f);else{for(var _0x483de9=_0x19158d[_0x52ad48(0x14d)]-0x1;_0x483de9>=0x0;_0x483de9--)if(_0x21bddb=_0x19158d[_0x483de9])_0x1e5dba=(_0x40f350<0x3?_0x21bddb(_0x1e5dba):_0x40f350>0x3?_0x21bddb(_0x276ba3,_0x454ae4,_0x1e5dba):_0x21bddb(_0x276ba3,_0x454ae4))||_0x1e5dba;}return _0x40f350>0x3&&_0x1e5dba&&Object[_0x52ad48(0x13b)](_0x276ba3,_0x454ae4,_0x1e5dba),_0x1e5dba;},__metadata=this&&this['__metadata']||function(_0x38f2cf,_0x4ad5cc){const _0x5911f8=a11_0x506e11;if(typeof Reflect===_0x5911f8(0x137)&&typeof Reflect[_0x5911f8(0x10d)]===_0x5911f8(0x110))return Reflect[_0x5911f8(0x10d)](_0x38f2cf,_0x4ad5cc);},__param=this&&this[a11_0x506e11(0x108)]||function(_0x5b04e4,_0x503785){return function(_0x3c1ec3,_0x543c78){_0x503785(_0x3c1ec3,_0x543c78,_0x5b04e4);};};Object[a11_0x506e11(0x13b)](exports,a11_0x506e11(0x144),{'value':!![]}),exports[a11_0x506e11(0x14f)]=exports[a11_0x506e11(0x151)]=void 0x0;const path_1=require(a11_0x506e11(0x154)),fs_1=require('fs'),core_1=require(a11_0x506e11(0x133)),core_2=require(a11_0x506e11(0x133)),core_3=require(a11_0x506e11(0x133)),getRoutes_1=require(a11_0x506e11(0x11b));function a11_0x4251(){const _0x5b5360=['134673XqbMqH','filepath','defineProperty','2HUUoMI','1394673iQfAuU','config','existsSync','Get','__apiList__','ctx','/index.html','__esModule','apiteststatic','5234124CZOYML','apitest','public,\x20max-age=604800','104636vPrAnJ','Environment','getOwnPropertyDescriptor','/apiteststatic/','length','set','ApitestStaticController','Singleton','ApitestService','4DREFJU','30QvFLEM','path','Provide','apidoc','apitesthtml','summary','cache-control','content-type','__param','302824EodOUS','prefix','.css','method','metadata','join','prototype','function','__devices__','apitestmodule','decorate','../../public/index.html','2526710ySJQOY','Scope','devices','url','/apitest','module','../helper/getRoutes','replace','ScopeEnum','isDevelopmentEnvironment','MidwayEnvironmentService','stringify','request','application/javascript;\x20charset=utf-8','push','readFileSync','getRoutes','__decorate','utf-8','4568040rDoVCD','Inject','design:paramtypes','design:returntype','320ZiHTcb','Config','route','/apiteststatic/*','routes','extname','description','@midwayjs/core','Param','design:type','.js','object','anncicapi'];a11_0x4251=function(){return _0x5b5360;};return a11_0x4251();}let ApitestService=class ApitestService{async[a11_0x506e11(0x156)](_0x2e9f61){const _0x4150c9=a11_0x506e11,_0x5c059f=(0x0,getRoutes_1[_0x4150c9(0x125)])(_0x2e9f61),_0x3fe172=[];for(let _0x408e7a in _0x5c059f){for(let _0x50ff1c in _0x5c059f[_0x408e7a][_0x4150c9(0x130)]){let _0x4f465e=_0x5c059f[_0x408e7a][_0x4150c9(0x130)][_0x50ff1c],_0x355d7c=[];for(let _0x2861b8 in _0x4f465e[_0x4150c9(0x121)]){_0x355d7c['push'](_0x4f465e[_0x4150c9(0x121)][_0x2861b8]);}_0x3fe172[_0x4150c9(0x123)]({'title':_0x5c059f[_0x408e7a][_0x4150c9(0x105)]+':'+_0x4f465e[_0x4150c9(0x105)],'prefix':_0x5c059f[_0x408e7a][_0x4150c9(0x10a)],'router':_0x4f465e[_0x4150c9(0x12e)],'method':_0x4f465e[_0x4150c9(0x10c)],'describe':_0x4f465e[_0x4150c9(0x132)]||'','filepath':_0x5c059f[_0x408e7a][_0x4150c9(0x13a)]||'','request':_0x355d7c});}}const _0x32a51b=(0x0,path_1[_0x4150c9(0x10e)])(__dirname,_0x4150c9(0x114));return(0x0,fs_1[_0x4150c9(0x124)])(_0x32a51b,{'encoding':_0x4150c9(0x127)})[_0x4150c9(0x11c)](/__res__/g,_0x4150c9(0x14c))['replace'](_0x4150c9(0x141),JSON['stringify'](_0x3fe172))[_0x4150c9(0x11c)](_0x4150c9(0x111),JSON[_0x4150c9(0x120)](this[_0x4150c9(0x13e)][_0x4150c9(0x117)]));}};__decorate([(0x0,core_3[a11_0x506e11(0x12d)])(a11_0x506e11(0x138)),__metadata(a11_0x506e11(0x135),Object)],ApitestService[a11_0x506e11(0x10f)],a11_0x506e11(0x13e),void 0x0),ApitestService=__decorate([(0x0,core_2[a11_0x506e11(0x155)])(a11_0x506e11(0x147)),(0x0,core_3[a11_0x506e11(0x116)])(core_3[a11_0x506e11(0x11d)][a11_0x506e11(0x150)])],ApitestService),exports[a11_0x506e11(0x151)]=ApitestService;let ApitestStaticController=class ApitestStaticController{async[a11_0x506e11(0x104)](){const _0x2e1055=a11_0x506e11;if(this[_0x2e1055(0x147)]){const _0xd86803={'module':![]};return this[_0x2e1055(0x14a)]['isDevelopmentEnvironment']()&&(_0xd86803[_0x2e1055(0x13a)]=!![]),await this['ApitestService']['apidoc'](_0xd86803);}return'';}async[a11_0x506e11(0x112)](_0x49e0dd){const _0xb24d06=a11_0x506e11;if(this['apitest']){const _0x36a3c8={'module':_0x49e0dd};return this[_0xb24d06(0x14a)][_0xb24d06(0x11e)]()&&(_0x36a3c8['filepath']=!![]),await this['ApitestService'][_0xb24d06(0x156)](_0x36a3c8);}return'';}async[a11_0x506e11(0x145)](){const _0xb10565=a11_0x506e11;if((0x0,path_1[_0xb10565(0x131)])(this[_0xb10565(0x142)][_0xb10565(0x121)][_0xb10565(0x118)])){var _0x39e733=(0x0,path_1[_0xb10565(0x10e)])(__dirname,'../../public/'+this[_0xb10565(0x142)][_0xb10565(0x121)]['url'][_0xb10565(0x11c)](_0xb10565(0x14c),'/'));if(_0x39e733['substring'](_0x39e733[_0xb10565(0x14d)]-0xb)!=_0xb10565(0x143)){this[_0xb10565(0x142)][_0xb10565(0x14e)](_0xb10565(0x106),_0xb10565(0x148));if((0x0,path_1[_0xb10565(0x131)])(this['ctx'][_0xb10565(0x121)][_0xb10565(0x118)])==_0xb10565(0x136))this[_0xb10565(0x142)][_0xb10565(0x14e)]('content-type',_0xb10565(0x122));else(0x0,path_1[_0xb10565(0x131)])(this[_0xb10565(0x142)][_0xb10565(0x121)][_0xb10565(0x118)])==_0xb10565(0x10b)&&this[_0xb10565(0x142)][_0xb10565(0x14e)](_0xb10565(0x107),'text/css;\x20charset=utf-8');return(0x0,fs_1[_0xb10565(0x13f)])(_0x39e733)&&(0x0,fs_1['readFileSync'])(_0x39e733,{'encoding':_0xb10565(0x127)});}}return'';}};__decorate([(0x0,core_3['Inject'])(),__metadata('design:type',Object)],ApitestStaticController[a11_0x506e11(0x10f)],'ctx',void 0x0),__decorate([(0x0,core_3[a11_0x506e11(0x129)])(),__metadata(a11_0x506e11(0x135),core_1[a11_0x506e11(0x11f)])],ApitestStaticController[a11_0x506e11(0x10f)],a11_0x506e11(0x14a),void 0x0),__decorate([(0x0,core_3[a11_0x506e11(0x129)])(),__metadata('design:type',ApitestService)],ApitestStaticController[a11_0x506e11(0x10f)],a11_0x506e11(0x151),void 0x0),__decorate([(0x0,core_3[a11_0x506e11(0x12d)])(a11_0x506e11(0x147)),__metadata('design:type',Boolean)],ApitestStaticController['prototype'],a11_0x506e11(0x147),void 0x0),__decorate([(0x0,core_3[a11_0x506e11(0x12d)])('anncicapi'),__metadata(a11_0x506e11(0x135),Object)],ApitestStaticController[a11_0x506e11(0x10f)],'config',void 0x0),__decorate([(0x0,core_2[a11_0x506e11(0x140)])(a11_0x506e11(0x119)),__metadata(a11_0x506e11(0x135),Function),__metadata(a11_0x506e11(0x12a),[]),__metadata('design:returntype',Promise)],ApitestStaticController[a11_0x506e11(0x10f)],a11_0x506e11(0x104),null),__decorate([(0x0,core_2['Get'])('/apitest-:module'),__param(0x0,(0x0,core_2[a11_0x506e11(0x134)])(a11_0x506e11(0x11a))),__metadata(a11_0x506e11(0x135),Function),__metadata(a11_0x506e11(0x12a),[String]),__metadata(a11_0x506e11(0x12b),Promise)],ApitestStaticController[a11_0x506e11(0x10f)],a11_0x506e11(0x112),null),__decorate([(0x0,core_2[a11_0x506e11(0x140)])(a11_0x506e11(0x12f)),__metadata(a11_0x506e11(0x135),Function),__metadata(a11_0x506e11(0x12a),[]),__metadata(a11_0x506e11(0x12b),Promise)],ApitestStaticController[a11_0x506e11(0x10f)],a11_0x506e11(0x145),null),ApitestStaticController=__decorate([(0x0,core_2['Controller'])('/'),(0x0,core_3[a11_0x506e11(0x116)])(core_3[a11_0x506e11(0x11d)]['Request'])],ApitestStaticController),exports[a11_0x506e11(0x14f)]=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12_0x1eb745=a12_0x2a2b;function a12_0x2a2b(_0x440f75,_0x1de3db){const _0x371f76=a12_0x371f();return a12_0x2a2b=function(_0x2a2b7e,_0x4bf00c){_0x2a2b7e=_0x2a2b7e-0x85;let _0x344277=_0x371f76[_0x2a2b7e];return _0x344277;},a12_0x2a2b(_0x440f75,_0x1de3db);}(function(_0x240ccd,_0x135d46){const _0x33701d=a12_0x2a2b,_0x1bece5=_0x240ccd();while(!![]){try{const _0x4737e9=-parseInt(_0x33701d(0xac))/0x1+-parseInt(_0x33701d(0xb1))/0x2*(parseInt(_0x33701d(0xc1))/0x3)+-parseInt(_0x33701d(0xc2))/0x4*(parseInt(_0x33701d(0xa4))/0x5)+-parseInt(_0x33701d(0x88))/0x6+parseInt(_0x33701d(0x8b))/0x7*(parseInt(_0x33701d(0x9c))/0x8)+parseInt(_0x33701d(0x95))/0x9*(-parseInt(_0x33701d(0xb8))/0xa)+-parseInt(_0x33701d(0x89))/0xb*(-parseInt(_0x33701d(0x8a))/0xc);if(_0x4737e9===_0x135d46)break;else _0x1bece5['push'](_0x1bece5['shift']());}catch(_0x583e94){_0x1bece5['push'](_0x1bece5['shift']());}}}(a12_0x371f,0x3eece));var __decorate=this&&this['__decorate']||function(_0x4ab0a5,_0x5089b6,_0x52ba6c,_0x3ce55e){const _0xf18e27=a12_0x2a2b;var _0x202ec6=arguments[_0xf18e27(0xaf)],_0xc63eaa=_0x202ec6<0x3?_0x5089b6:_0x3ce55e===null?_0x3ce55e=Object[_0xf18e27(0xb2)](_0x5089b6,_0x52ba6c):_0x3ce55e,_0xbb7dee;if(typeof Reflect===_0xf18e27(0xa0)&&typeof Reflect[_0xf18e27(0xad)]==='function')_0xc63eaa=Reflect[_0xf18e27(0xad)](_0x4ab0a5,_0x5089b6,_0x52ba6c,_0x3ce55e);else{for(var _0x2bc572=_0x4ab0a5['length']-0x1;_0x2bc572>=0x0;_0x2bc572--)if(_0xbb7dee=_0x4ab0a5[_0x2bc572])_0xc63eaa=(_0x202ec6<0x3?_0xbb7dee(_0xc63eaa):_0x202ec6>0x3?_0xbb7dee(_0x5089b6,_0x52ba6c,_0xc63eaa):_0xbb7dee(_0x5089b6,_0x52ba6c))||_0xc63eaa;}return _0x202ec6>0x3&&_0xc63eaa&&Object[_0xf18e27(0xc0)](_0x5089b6,_0x52ba6c,_0xc63eaa),_0xc63eaa;},__metadata=this&&this[a12_0x1eb745(0xb3)]||function(_0x2fe0f5,_0x25f2e0){const _0x4ed3c2=a12_0x1eb745;if(typeof Reflect===_0x4ed3c2(0xa0)&&typeof Reflect[_0x4ed3c2(0x86)]===_0x4ed3c2(0xaa))return Reflect[_0x4ed3c2(0x86)](_0x2fe0f5,_0x25f2e0);};Object[a12_0x1eb745(0xc0)](exports,a12_0x1eb745(0x93),{'value':!![]}),exports[a12_0x1eb745(0xbb)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x1eb745(0x91)),koasend=require(a12_0x1eb745(0xa9)),core_1=require(a12_0x1eb745(0x8c));function a12_0x371f(){const _0x446760=['findRows','readFile','keys','exceljs','design:type','__esModule','isNumber','180TxmcYz','getAppDir','replace','endsWith','frozen','startsWith','Api\x20Excel\x20Error:\x20','90824qATNmf','col','eachCell','\x20is\x20read\x20fail','object','export','worksheets','Scope','9040hDFqmx','cellCount','writeFile','substring','get','koa-send','function','header','398562VwRzBi','decorate','model','length','Workbook','722BrMYXO','getOwnPropertyDescriptor','__metadata','public/xlsx','Provide','/public/xlsx','xlsx','153280SBhumV','.xlsx','app','ExcelService','addWorksheet','getCell','toString','mkdirSync','defineProperty','1491KzCBMp','76NElXaa','prototype','rowCount','push','key','handler','App','metadata','columns','1571406JqXgry','2321tWsdYb','70836yzezBF','119VRgZPs','@midwayjs/core','value'];a12_0x371f=function(){return _0x446760;};return a12_0x371f();}let ExcelService=class ExcelService{async['parse'](_0x33ee70,_0x37f273,_0x8305f2=[0x0]){const _0x737758=a12_0x1eb745;var _0x112972,_0x5cb4a8;const _0xa16c68=new exceljs[(_0x737758(0xb0))](),_0x5c56e1=[];let _0x4d961e=_0x33ee70[_0x737758(0x97)](/(\\|\/)/g,'/')[_0x737758(0x97)](/\/{2,}/g,'/');!(_0x4d961e===null||_0x4d961e===void 0x0?void 0x0:_0x4d961e[_0x737758(0x9a)]('/'))&&(_0x4d961e=this[_0x737758(0xba)][_0x737758(0x96)]()+'/'+_0x4d961e);try{await _0xa16c68[_0x737758(0xb7)][_0x737758(0x8f)](_0x4d961e);}catch(_0x5d230){return console['log'](_0x737758(0x9b)+_0x4d961e+_0x737758(0x9f)),_0x5c56e1;}for(const _0x162c5e of _0x8305f2){const _0x3d45b0=lodash[_0x737758(0x94)](_0x162c5e)?((_0x112972=_0xa16c68[_0x737758(0xa2)])===null||_0x112972===void 0x0?void 0x0:_0x112972[_0x162c5e])||undefined:_0xa16c68['getWorksheet'](_0x162c5e);if(_0x3d45b0){var _0x5e372e=0x1;const _0x54c922=_0x3d45b0['getRow'](0x1),_0x33b3b1=await new Promise(_0x28bc98=>{const _0xffa1c4=_0x737758,_0x2aafed={};_0x54c922[_0xffa1c4(0x9e)]((_0x27fdb3,_0x24fcfc)=>{const _0x1651be=_0xffa1c4;for(const _0x39c88d of _0x37f273){if(_0x27fdb3[_0x1651be(0x8d)]==_0x39c88d['header'])_0x5e372e=0x2,_0x2aafed[_0x39c88d[_0x1651be(0xc6)]]={'header':_0x27fdb3[_0x1651be(0x9d)],'handler':_0x39c88d[_0x1651be(0xc7)]};else{if(!_0x2aafed[_0x39c88d[_0x1651be(0xc6)]])try{const _0x209f86=_0x54c922[_0x1651be(0xbd)](_0x39c88d[_0x1651be(0xab)]);_0x209f86&&(_0x2aafed[_0x39c88d[_0x1651be(0xc6)]]={'header':_0x209f86['col'],'handler':_0x39c88d[_0x1651be(0xc7)]});}catch{}}}_0x54c922[_0x1651be(0xa5)]==_0x24fcfc&&_0x28bc98(_0x2aafed);});});for(const _0x54ccfc of _0x3d45b0[_0x737758(0x8e)](_0x5e372e,_0x3d45b0[_0x737758(0xc4)])){const _0x3d128a={};for(const _0x1894c5 in _0x33b3b1){if(_0x33b3b1[_0x1894c5][_0x737758(0xab)]){const _0x3b34bb=_0x54ccfc[_0x737758(0xbd)](_0x33b3b1[_0x1894c5][_0x737758(0xab)]);typeof((_0x5cb4a8=_0x33b3b1[_0x1894c5])===null||_0x5cb4a8===void 0x0?void 0x0:_0x5cb4a8[_0x737758(0xc7)])==_0x737758(0xaa)?_0x3d128a[_0x1894c5]=await _0x33b3b1[_0x1894c5][_0x737758(0xc7)]((_0x3b34bb===null||_0x3b34bb===void 0x0?void 0x0:_0x3b34bb[_0x737758(0xbe)]())||'',_0x3b34bb[_0x737758(0xae)]):_0x3d128a[_0x1894c5]=(_0x3b34bb===null||_0x3b34bb===void 0x0?void 0x0:_0x3b34bb[_0x737758(0xbe)]())||'';}}Object[_0x737758(0x90)](_0x3d128a)[_0x737758(0xaf)]>0x0&&_0x5c56e1[_0x737758(0xc5)](_0x3d128a);}}}return _0x5c56e1;}async[a12_0x1eb745(0xa1)](_0x271463,_0x577ef1,_0x4583fe,_0x341ff5=a12_0x1eb745(0xb4)){const _0x30f070=a12_0x1eb745;var _0x138399,_0x5aff8f;const _0x18065d=new exceljs[(_0x30f070(0xb0))](),_0x309f96={},_0x596f15=[],_0x27ee10=_0x18065d[_0x30f070(0xbc)]('Sheet\x201',{'views':[{'state':_0x30f070(0x99),'xSplit':0x1}]});for(const _0x5a9df6 in _0x577ef1){_0x309f96[_0x577ef1[_0x5a9df6][_0x30f070(0xc6)]]=_0x577ef1[_0x5a9df6][_0x30f070(0xab)],_0x596f15[_0x30f070(0xc5)]({'header':_0x577ef1[_0x5a9df6][_0x30f070(0xab)],'key':(_0x138399=_0x577ef1[_0x5a9df6])===null||_0x138399===void 0x0?void 0x0:_0x138399[_0x30f070(0xc6)][_0x30f070(0x97)](/\./g,'_')});}_0x27ee10[_0x30f070(0x87)]=_0x596f15;for(const _0x2fc970 of _0x4583fe){const _0x520775={};for(const _0x220569 in _0x577ef1){typeof((_0x5aff8f=_0x577ef1[_0x220569])===null||_0x5aff8f===void 0x0?void 0x0:_0x5aff8f[_0x30f070(0xc7)])==_0x30f070(0xaa)?_0x520775[_0x577ef1[_0x220569][_0x30f070(0xc6)][_0x30f070(0x97)](/\./g,'_')]=await _0x577ef1[_0x220569][_0x30f070(0xc7)](_0x2fc970):_0x520775[_0x577ef1[_0x220569]['key'][_0x30f070(0x97)](/\./g,'_')]=lodash[_0x30f070(0xa8)](_0x2fc970,_0x577ef1[_0x220569][_0x30f070(0xc6)],'');}_0x27ee10['addRow'](_0x520775);}let _0x44c222='';const _0x47a8b1=_0x271463+'-'+lodash['random'](0x2710,0x1869f)+_0x30f070(0xb9);if(_0x341ff5&&_0x341ff5['startsWith']('/'))_0x44c222=''+_0x341ff5;else _0x341ff5&&!_0x341ff5['startsWith']('/')&&!_0x341ff5['startsWith']('\x5c')?_0x44c222=this[_0x30f070(0xba)][_0x30f070(0x96)]()+'/'+_0x341ff5:_0x44c222=this[_0x30f070(0xba)][_0x30f070(0x96)]()+_0x30f070(0xb6);return(_0x44c222['endsWith']('/')||_0x44c222[_0x30f070(0x98)]('\x5c'))&&(_0x44c222=_0x44c222[_0x30f070(0xa7)](0x0,_0x44c222[_0x30f070(0xaf)]-0x1)),_0x44c222=_0x44c222[_0x30f070(0x97)](/(\\|\/)/g,'/')[_0x30f070(0x97)](/\/{2,}/g,'/'),!fs['existsSync'](_0x44c222)&&fs[_0x30f070(0xbf)](_0x44c222,{'recursive':!![]}),await _0x18065d['xlsx'][_0x30f070(0xa6)]((_0x44c222+'/'+_0x47a8b1)[_0x30f070(0x97)](/(\\|\/)/g,'/')[_0x30f070(0x97)](/\/{2,}/g,'/')),{'filename':_0x47a8b1,'filepath':(_0x44c222[_0x30f070(0xa7)]((''+this['app'][_0x30f070(0x96)]())['length'])+'/'+_0x47a8b1)[_0x30f070(0x97)](/(\\|\/)/g,'/')[_0x30f070(0x97)](/\/{2,}/g,'/')};}async['download'](_0x38f5ff,_0x20e986){return await koasend(_0x38f5ff,''+_0x20e986);}};__decorate([(0x0,core_1[a12_0x1eb745(0x85)])(),__metadata(a12_0x1eb745(0x92),Object)],ExcelService[a12_0x1eb745(0xc3)],'app',void 0x0),ExcelService=__decorate([(0x0,core_1[a12_0x1eb745(0xb5)])(),(0x0,core_1[a12_0x1eb745(0xa3)])(core_1['ScopeEnum']['Singleton'])],ExcelService),exports[a12_0x1eb745(0xbb)]=ExcelService;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a13_0xc897d9=a13_0x8510;function a13_0x310e(){var _0x257d21=['defineProperty','ACTION_KEY','AppsConfigTmp','14LQqXlq','anncic-api:apps:config','1633440aZPEDS','751394kJWYOg','__esModule','anncic-api:action','1RqVIgK','1515906jBJikx','7138290dOTcCn','5468632uuqYQM','835IWdGAL','35716vFuPXO','APPSCONFIG_KEY','ACTION_ROUTE_KEY','4746060OAUszl'];a13_0x310e=function(){return _0x257d21;};return a13_0x310e();}(function(_0x55ea5d,_0x49cf5e){var _0x4b5f4e=a13_0x8510,_0x5a9958=_0x55ea5d();while(!![]){try{var _0x28b58b=-parseInt(_0x4b5f4e(0xe2))/0x1*(-parseInt(_0x4b5f4e(0xdf))/0x2)+parseInt(_0x4b5f4e(0xe3))/0x3+parseInt(_0x4b5f4e(0xe7))/0x4*(-parseInt(_0x4b5f4e(0xe6))/0x5)+parseInt(_0x4b5f4e(0xf0))/0x6+-parseInt(_0x4b5f4e(0xee))/0x7*(-parseInt(_0x4b5f4e(0xe5))/0x8)+parseInt(_0x4b5f4e(0xea))/0x9+-parseInt(_0x4b5f4e(0xe4))/0xa;if(_0x28b58b===_0x49cf5e)break;else _0x5a9958['push'](_0x5a9958['shift']());}catch(_0x3a9341){_0x5a9958['push'](_0x5a9958['shift']());}}}(a13_0x310e,0xcdc0d));function a13_0x8510(_0x4bf207,_0x3a3f8e){var _0x310e72=a13_0x310e();return a13_0x8510=function(_0x8510ab,_0x3f88d2){_0x8510ab=_0x8510ab-0xdf;var _0x337118=_0x310e72[_0x8510ab];return _0x337118;},a13_0x8510(_0x4bf207,_0x3a3f8e);}Object[a13_0xc897d9(0xeb)](exports,a13_0xc897d9(0xe0),{'value':!![]}),exports[a13_0xc897d9(0xed)]=exports[a13_0xc897d9(0xe8)]=exports[a13_0xc897d9(0xe9)]=exports[a13_0xc897d9(0xec)]=void 0x0,exports[a13_0xc897d9(0xec)]=a13_0xc897d9(0xe1),exports['ACTION_ROUTE_KEY']='anncic-api:action:route',exports[a13_0xc897d9(0xe8)]=a13_0xc897d9(0xef);class AppsConfigTmp{}exports[a13_0xc897d9(0xed)]=AppsConfigTmp;
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a14_0x31b3(){var _0x4e0d67=['27BvZOuj','__esModule','分页数量','_page','function','1429190QAHbTZ','215484ODvrPE','33MZWFWh','valid','number','metadata','626308YrgSfn','length','decorate','12842vujXdw','701407wZyBjf','integer','prototype','30pGOZCa','_size','35rYoBFV','1:是;0:否','_order','1108866gnyonr','min','trim','design:type','getOwnPropertyDescriptor','PageDTO','第一页为1,第二页为2','RuleType','_isreverse','__metadata','是否倒序','54fQnkEw','defineProperty','__decorate','Rule','858IZoKns','738744CMpwPH','object','排序方式'];a14_0x31b3=function(){return _0x4e0d67;};return a14_0x31b3();}var a14_0x381100=a14_0x2230;function a14_0x2230(_0x33a666,_0x2c7e4b){var _0x31b3b5=a14_0x31b3();return a14_0x2230=function(_0x2230f9,_0xb34631){_0x2230f9=_0x2230f9-0x164;var _0x203672=_0x31b3b5[_0x2230f9];return _0x203672;},a14_0x2230(_0x33a666,_0x2c7e4b);}(function(_0xa813b2,_0x53e6d3){var _0x12c4f6=a14_0x2230,_0x4e95f8=_0xa813b2();while(!![]){try{var _0x405989=parseInt(_0x12c4f6(0x17c))/0x1*(-parseInt(_0x12c4f6(0x176))/0x2)+-parseInt(_0x12c4f6(0x17f))/0x3+-parseInt(_0x12c4f6(0x173))/0x4*(-parseInt(_0x12c4f6(0x17a))/0x5)+-parseInt(_0x12c4f6(0x18a))/0x6*(parseInt(_0x12c4f6(0x177))/0x7)+-parseInt(_0x12c4f6(0x165))/0x8*(-parseInt(_0x12c4f6(0x168))/0x9)+-parseInt(_0x12c4f6(0x16d))/0xa*(parseInt(_0x12c4f6(0x16f))/0xb)+parseInt(_0x12c4f6(0x16e))/0xc*(parseInt(_0x12c4f6(0x164))/0xd);if(_0x405989===_0x53e6d3)break;else _0x4e95f8['push'](_0x4e95f8['shift']());}catch(_0x1589bf){_0x4e95f8['push'](_0x4e95f8['shift']());}}}(a14_0x31b3,0x7463a));var __decorate=this&&this[a14_0x381100(0x18c)]||function(_0x472a85,_0x10d2d9,_0x5b6830,_0x2c5989){var _0x5f4529=a14_0x381100,_0x46136b=arguments[_0x5f4529(0x174)],_0x16ce19=_0x46136b<0x3?_0x10d2d9:_0x2c5989===null?_0x2c5989=Object[_0x5f4529(0x183)](_0x10d2d9,_0x5b6830):_0x2c5989,_0x33b78f;if(typeof Reflect==='object'&&typeof Reflect[_0x5f4529(0x175)]===_0x5f4529(0x16c))_0x16ce19=Reflect[_0x5f4529(0x175)](_0x472a85,_0x10d2d9,_0x5b6830,_0x2c5989);else{for(var _0x296ecc=_0x472a85[_0x5f4529(0x174)]-0x1;_0x296ecc>=0x0;_0x296ecc--)if(_0x33b78f=_0x472a85[_0x296ecc])_0x16ce19=(_0x46136b<0x3?_0x33b78f(_0x16ce19):_0x46136b>0x3?_0x33b78f(_0x10d2d9,_0x5b6830,_0x16ce19):_0x33b78f(_0x10d2d9,_0x5b6830))||_0x16ce19;}return _0x46136b>0x3&&_0x16ce19&&Object[_0x5f4529(0x18b)](_0x10d2d9,_0x5b6830,_0x16ce19),_0x16ce19;},__metadata=this&&this[a14_0x381100(0x188)]||function(_0xe5b749,_0x28180c){var _0x1a36ea=a14_0x381100;if(typeof Reflect===_0x1a36ea(0x166)&&typeof Reflect[_0x1a36ea(0x172)]===_0x1a36ea(0x16c))return Reflect[_0x1a36ea(0x172)](_0xe5b749,_0x28180c);};Object[a14_0x381100(0x18b)](exports,a14_0x381100(0x169),{'value':!![]}),exports[a14_0x381100(0x184)]=void 0x0;const validator_1=require('@anncic-api/validator');class PageDTO{}__decorate([(0x0,validator_1[a14_0x381100(0x18d)])('分页',validator_1[a14_0x381100(0x186)]['number']()[a14_0x381100(0x178)]()[a14_0x381100(0x180)](0x1),a14_0x381100(0x185)),__metadata(a14_0x381100(0x182),Number)],PageDTO['prototype'],a14_0x381100(0x16b),void 0x0),__decorate([(0x0,validator_1[a14_0x381100(0x18d)])(a14_0x381100(0x16a),validator_1[a14_0x381100(0x186)]['number']()[a14_0x381100(0x178)]()['min'](0x1)),__metadata(a14_0x381100(0x182),Number)],PageDTO['prototype'],a14_0x381100(0x17b),void 0x0),__decorate([(0x0,validator_1[a14_0x381100(0x18d)])(a14_0x381100(0x167),validator_1[a14_0x381100(0x186)]['string']()[a14_0x381100(0x181)]()),__metadata(a14_0x381100(0x182),String)],PageDTO[a14_0x381100(0x179)],a14_0x381100(0x17e),void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x381100(0x189),validator_1[a14_0x381100(0x186)][a14_0x381100(0x171)]()[a14_0x381100(0x178)]()[a14_0x381100(0x170)](0x0,0x1),a14_0x381100(0x17d)),__metadata(a14_0x381100(0x182),Number)],PageDTO[a14_0x381100(0x179)],a14_0x381100(0x187),void 0x0),exports[a14_0x381100(0x184)]=PageDTO;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.20",
|
|
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.
|
|
25
|
-
"@midwayjs/cross-domain": "^3.
|
|
26
|
-
"@midwayjs/i18n": "^3.
|
|
27
|
-
"@midwayjs/koa": "^3.
|
|
28
|
-
"@midwayjs/static-file": "^3.
|
|
29
|
-
"@midwayjs/upload": "^3.
|
|
30
|
-
"anncic-apihelper": "^1.3.
|
|
20
|
+
"@anncic-api/cache": "^1.3.20",
|
|
21
|
+
"@anncic-api/core": "^1.3.20",
|
|
22
|
+
"@anncic-api/event": "^1.3.20",
|
|
23
|
+
"@anncic-api/typeorm": "^1.3.20",
|
|
24
|
+
"@anncic-api/validator": "^1.3.20",
|
|
25
|
+
"@midwayjs/cross-domain": "^3.8.0",
|
|
26
|
+
"@midwayjs/i18n": "^3.8.0",
|
|
27
|
+
"@midwayjs/koa": "^3.8.0",
|
|
28
|
+
"@midwayjs/static-file": "^3.8.0",
|
|
29
|
+
"@midwayjs/upload": "^3.8.0",
|
|
30
|
+
"anncic-apihelper": "^1.3.20",
|
|
31
31
|
"exceljs": "^4.3.0",
|
|
32
32
|
"koa-send": "^5.0.1"
|
|
33
33
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"cross-env": "^7.0.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f5b71b5dcb7e468728b96a7a6a821afae99abf97"
|
|
43
43
|
}
|