anncic-api 1.2.3 → 1.2.5
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.d.ts +7 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x444363=a0_0x5827;function a0_0x5827(_0x3c6ad4,_0x586254){var _0x2088f8=a0_0x2088();return a0_0x5827=function(_0x582710,_0xf311a2){_0x582710=_0x582710-0xd5;var _0x4c868b=_0x2088f8[_0x582710];return _0x4c868b;},a0_0x5827(_0x3c6ad4,_0x586254);}(function(_0x31d278,_0x35a5f7){var _0x1aecd2=a0_0x5827,_0x248097=_0x31d278();while(!![]){try{var _0x997f03=-parseInt(_0x1aecd2(0xe6))/0x1+-parseInt(_0x1aecd2(0xe4))/0x2*(parseInt(_0x1aecd2(0xe7))/0x3)+-parseInt(_0x1aecd2(0xdb))/0x4+-parseInt(_0x1aecd2(0xe0))/0x5*(-parseInt(_0x1aecd2(0xd7))/0x6)+parseInt(_0x1aecd2(0xd6))/0x7+parseInt(_0x1aecd2(0xd8))/0x8+parseInt(_0x1aecd2(0xe1))/0x9*(parseInt(_0x1aecd2(0xe2))/0xa);if(_0x997f03===_0x35a5f7)break;else _0x248097['push'](_0x248097['shift']());}catch(_0x155b3c){_0x248097['push'](_0x248097['shift']());}}}(a0_0x2088,0xcceb0));function a0_0x2088(){var _0x21ec82=['zhiulanuiy7892387985hnoi','1389795GxvhAz','443013uXPhgk','xml','dhauo1234420123gg3234901','name','3426962JesENv','48906iVcBoY','6798856jObgNQ','defineProperty','text','2801716nAWhMD','20mb','/runtime/.upload','form','appDir','855WotzUD','1053Rpnlox','105130KUTtsU','json','14EFUIMA'];a0_0x2088=function(){return _0x21ec82;};return a0_0x2088();}Object[a0_0x444363(0xd9)](exports,'__esModule',{'value':!![]}),exports['default']=_0x479cb3=>{var _0x4f96de=a0_0x444363;return{'apitest':!![],'keys':_0x479cb3[_0x4f96de(0xd5)],'anncicapi':{'timeout':0x1388,'password':_0x4f96de(0xe5),'devices':{'DEFAULT':{'secret':_0x4f96de(0xe9),'checkcode':_0x4f96de(0xe9)}}},'bodyParser':{'enableTypes':[_0x4f96de(0xe3),_0x4f96de(0xde),_0x4f96de(0xda),_0x4f96de(0xe8)],'formLimit':_0x4f96de(0xdc),'jsonLimit':_0x4f96de(0xdc),'textLimit':_0x4f96de(0xdc),'xmlLimit':_0x4f96de(0xdc)},'upload':{'tmpdir':_0x479cb3[_0x4f96de(0xdf)]+_0x4f96de(0xdd),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a1_0x1e0d(_0x1b1755,_0x5ed64e){var _0x5839a6=a1_0x5839();return a1_0x1e0d=function(_0x1e0de2,_0x425bae){_0x1e0de2=_0x1e0de2-0xab;var _0xf586d=_0x5839a6[_0x1e0de2];return _0xf586d;},a1_0x1e0d(_0x1b1755,_0x5ed64e);}var a1_0x306f34=a1_0x1e0d;(function(_0x357008,_0x4c04a2){var _0x40b6ba=a1_0x1e0d,_0x2cd0c2=_0x357008();while(!![]){try{var _0x13044b=parseInt(_0x40b6ba(0xb0))/0x1*(-parseInt(_0x40b6ba(0xb4))/0x2)+parseInt(_0x40b6ba(0xb6))/0x3*(parseInt(_0x40b6ba(0xb3))/0x4)+-parseInt(_0x40b6ba(0xb2))/0x5+parseInt(_0x40b6ba(0xb5))/0x6*(-parseInt(_0x40b6ba(0xb1))/0x7)+parseInt(_0x40b6ba(0xac))/0x8*(parseInt(_0x40b6ba(0xae))/0x9)+-parseInt(_0x40b6ba(0xaf))/0xa+parseInt(_0x40b6ba(0xad))/0xb;if(_0x13044b===_0x4c04a2)break;else _0x2cd0c2['push'](_0x2cd0c2['shift']());}catch(_0x583245){_0x2cd0c2['push'](_0x2cd0c2['shift']());}}}(a1_0x5839,0x4312d));function a1_0x5839(){var _0x3df4a6=['11640YryWvN','2mLJHcP','970122CuDzEz','24aLAuyb','default','80024DuxlUA','12577301ugEmfF','423RdxcVt','3465260xKsuXm','448309mtvvsv','14WlbdYO','1219350eTKfBJ'];a1_0x5839=function(){return _0x3df4a6;};return a1_0x5839();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a1_0x306f34(0xab)]={'apitest':![],'anncicapi':{'timeout':0x1388}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x45e067=a2_0x3cfb;(function(_0x42ad4d,_0x4c99f2){const _0x54811a=a2_0x3cfb,_0x8c7f72=_0x42ad4d();while(!![]){try{const _0x4944b4=parseInt(_0x54811a(0x15c))/0x1*(-parseInt(_0x54811a(0x179))/0x2)+parseInt(_0x54811a(0x13a))/0x3+-parseInt(_0x54811a(0x11e))/0x4+parseInt(_0x54811a(0x125))/0x5+-parseInt(_0x54811a(0x14c))/0x6*(-parseInt(_0x54811a(0x139))/0x7)+-parseInt(_0x54811a(0x12e))/0x8+-parseInt(_0x54811a(0x175))/0x9*(-parseInt(_0x54811a(0x167))/0xa);if(_0x4944b4===_0x4c99f2)break;else _0x8c7f72['push'](_0x8c7f72['shift']());}catch(_0x31d280){_0x8c7f72['push'](_0x8c7f72['shift']());}}}(a2_0x5bdb,0xc6c95));function a2_0x3cfb(_0x418370,_0x1b3952){const _0x5bdb18=a2_0x5bdb();return a2_0x3cfb=function(_0x3cfb9d,_0x521134){_0x3cfb9d=_0x3cfb9d-0x11e;let _0x5e2359=_0x5bdb18[_0x3cfb9d];return _0x5e2359;},a2_0x3cfb(_0x418370,_0x1b3952);}var __decorate=this&&this[a2_0x45e067(0x132)]||function(_0x70eb7d,_0x3a4af4,_0x449d0e,_0x276b17){const _0x3dc4de=a2_0x45e067;var _0x85b45c=arguments[_0x3dc4de(0x15f)],_0x443bf8=_0x85b45c<0x3?_0x3a4af4:_0x276b17===null?_0x276b17=Object['getOwnPropertyDescriptor'](_0x3a4af4,_0x449d0e):_0x276b17,_0x568d4d;if(typeof Reflect===_0x3dc4de(0x176)&&typeof Reflect[_0x3dc4de(0x16c)]===_0x3dc4de(0x120))_0x443bf8=Reflect[_0x3dc4de(0x16c)](_0x70eb7d,_0x3a4af4,_0x449d0e,_0x276b17);else{for(var _0x85b7f=_0x70eb7d['length']-0x1;_0x85b7f>=0x0;_0x85b7f--)if(_0x568d4d=_0x70eb7d[_0x85b7f])_0x443bf8=(_0x85b45c<0x3?_0x568d4d(_0x443bf8):_0x85b45c>0x3?_0x568d4d(_0x3a4af4,_0x449d0e,_0x443bf8):_0x568d4d(_0x3a4af4,_0x449d0e))||_0x443bf8;}return _0x85b45c>0x3&&_0x443bf8&&Object[_0x3dc4de(0x17a)](_0x3a4af4,_0x449d0e,_0x443bf8),_0x443bf8;},__metadata=this&&this[a2_0x45e067(0x145)]||function(_0x3f31b0,_0x52f949){const _0x693a56=a2_0x45e067;if(typeof Reflect===_0x693a56(0x176)&&typeof Reflect[_0x693a56(0x148)]===_0x693a56(0x120))return Reflect[_0x693a56(0x148)](_0x3f31b0,_0x52f949);};function a2_0x5bdb(){const _0x232812=['DEFAULT','hanlderApplications','addObject','./config/config.default','./exception/ApiError','@midwayjs/koa','checkConfigKeys','_matchedRoute','__metadata','decorator','existsSync','metadata','MidwayApplicationManager','toLowerCase','method','601428hvOLxF','intercept','anncic-apihelper','environment','MidwayDecoratorService','body','handlerActionRoute','design:type','isArray','onReady','dirs','get','isNull','args','context','@anncic-api/typeorm','164oYtXaG','__esModule','staticFile','length','headers','string','@midwayjs/upload','MidwayEnvironmentService','Inject','upload','mkdirSync','10ZeeJva','ApiError','filterConfig','config','device','decorate','@midwayjs/core','tmpdir','requestContext','@midwayjs/cross-domain','@anncic-api/cache','koa','isClass','anncicapi','7003089OcCHap','object','@anncic-api/core','query','11714fpPcWT','defineProperty','key','1088852WJjQEf','ApiService','function','keys','./types/action','input','Configuration','1914785WYMPRM','anncic-api','application','./config/config.production','Anncic-api\x20static-file\x20:\x20mkdir\x20','devices','dir','defaultsDeep','prototype','8171208QYzhJJ','log','@midwayjs/i18n','CustomConfiguration','__decorate','forEach','getConfiguration','checksign','handler','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','request','28RmRYBQ','4519083SknlJM','@midwayjs/static-file','Types'];a2_0x5bdb=function(){return _0x232812;};return a2_0x5bdb();}Object[a2_0x45e067(0x17a)](exports,a2_0x45e067(0x15d),{'value':!![]}),exports[a2_0x45e067(0x131)]=void 0x0;const core_1=require(a2_0x45e067(0x16d)),core_2=require(a2_0x45e067(0x16d)),ApiError_1=require(a2_0x45e067(0x141)),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x45e067(0x122)),fs=require('fs'),koa=require(a2_0x45e067(0x142)),i18n=require(a2_0x45e067(0x130)),upload=require(a2_0x45e067(0x162)),staticFile=require(a2_0x45e067(0x13b)),crossDomain=require(a2_0x45e067(0x170)),ConfigDefault=require(a2_0x45e067(0x140)),ConfigProduction=require(a2_0x45e067(0x128)),anncic=require(a2_0x45e067(0x177)),anncicCache=require(a2_0x45e067(0x171)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x45e067(0x15b)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require(a2_0x45e067(0x14e));let CustomConfiguration=class CustomConfiguration{async[a2_0x45e067(0x155)](){const _0x225da1=a2_0x45e067;await this[_0x225da1(0x169)](),await this['checkConfigKeys'](),await this[_0x225da1(0x152)](),await this[_0x225da1(0x13e)]();}async[a2_0x45e067(0x143)](){}async[a2_0x45e067(0x152)](){const _0x425574=a2_0x45e067,_0x4339d7=this[_0x425574(0x16a)][_0x425574(0x134)]();this[_0x425574(0x146)]['registerMethodHandler'](action_1['ACTION_ROUTE_KEY'],_0x17e4fc=>{const _0x30f728=_0x425574,_0x473b60=_0x17e4fc[_0x30f728(0x148)];return{'before':async _0x520cec=>{const _0x2fd041=_0x30f728;var _0x45f5a6,_0x1910f9;const _0x10f83a=(_0x45f5a6=_0x520cec===null||_0x520cec===void 0x0?void 0x0:_0x520cec['target'])===null||_0x45f5a6===void 0x0?void 0x0:_0x45f5a6[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x10f83a&&(_0x473b60===null||_0x473b60===void 0x0?void 0x0:_0x473b60['apimit'])){if(!this['ApiService'][_0x2fd041(0x135)]((_0x1910f9=_0x10f83a===null||_0x10f83a===void 0x0?void 0x0:_0x10f83a['request'])===null||_0x1910f9===void 0x0?void 0x0:_0x1910f9[_0x2fd041(0x160)]))throw new AnnError(ApiError_1[_0x2fd041(0x168)]['HEADERS_SIGNATURE']);}},'around':async _0x3a453b=>{const _0x2a1af8=_0x30f728;var _0x66e422,_0x310ce8,_0x454562,_0x436b33,_0x152420;const _0x1d77e6=(_0x66e422=_0x3a453b===null||_0x3a453b===void 0x0?void 0x0:_0x3a453b['target'])===null||_0x66e422===void 0x0?void 0x0:_0x66e422[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x1d77e6&&(_0x473b60===null||_0x473b60===void 0x0?void 0x0:_0x473b60['apimit'])){if(((_0x310ce8=_0x1d77e6[_0x2a1af8(0x160)])===null||_0x310ce8===void 0x0?void 0x0:_0x310ce8['device'])&&((_0x152420=(_0x436b33=(_0x454562=_0x4339d7===null||_0x4339d7===void 0x0?void 0x0:_0x4339d7['anncicapi'])===null||_0x454562===void 0x0?void 0x0:_0x454562[_0x2a1af8(0x12a)])===null||_0x436b33===void 0x0?void 0x0:_0x436b33[_0x1d77e6[_0x2a1af8(0x160)][_0x2a1af8(0x16b)]])===null||_0x152420===void 0x0?void 0x0:_0x152420[_0x2a1af8(0x14d)])){const _0xd63831=Array[_0x2a1af8(0x154)](_0x4339d7[_0x2a1af8(0x174)][_0x2a1af8(0x12a)][_0x1d77e6['headers'][_0x2a1af8(0x16b)]][_0x2a1af8(0x14d)])?_0x4339d7['anncicapi'][_0x2a1af8(0x12a)][_0x1d77e6[_0x2a1af8(0x160)][_0x2a1af8(0x16b)]][_0x2a1af8(0x14d)]:[_0x4339d7[_0x2a1af8(0x174)][_0x2a1af8(0x12a)][_0x1d77e6['headers'][_0x2a1af8(0x16b)]]['intercept']];for(const _0x4dd400 of _0xd63831){if(core_1[_0x2a1af8(0x13c)][_0x2a1af8(0x173)](_0x4dd400)||typeof _0x4dd400==_0x2a1af8(0x161)){const _0xf4128a=await _0x1d77e6[_0x2a1af8(0x16f)]['getAsync'](_0x4dd400);typeof(_0xf4128a===null||_0xf4128a===void 0x0?void 0x0:_0xf4128a['handler'])=='function'&&await _0xf4128a[_0x2a1af8(0x136)](typeof(_0x1d77e6===null||_0x1d77e6===void 0x0?void 0x0:_0x1d77e6[_0x2a1af8(0x14b)])==_0x2a1af8(0x161)&&(_0x1d77e6===null||_0x1d77e6===void 0x0?void 0x0:_0x1d77e6[_0x2a1af8(0x144)])?_0x1d77e6[_0x2a1af8(0x14b)][_0x2a1af8(0x14a)]()+'@'+(_0x1d77e6===null||_0x1d77e6===void 0x0?void 0x0:_0x1d77e6['_matchedRoute']):undefined,_0x1d77e6,_0x473b60);}else core_1[_0x2a1af8(0x13c)]['isFunction'](_0x4dd400)&&await _0x4dd400(typeof(_0x1d77e6===null||_0x1d77e6===void 0x0?void 0x0:_0x1d77e6[_0x2a1af8(0x14b)])==_0x2a1af8(0x161)&&(_0x1d77e6===null||_0x1d77e6===void 0x0?void 0x0:_0x1d77e6[_0x2a1af8(0x144)])?_0x1d77e6[_0x2a1af8(0x14b)][_0x2a1af8(0x14a)]()+'@'+(_0x1d77e6===null||_0x1d77e6===void 0x0?void 0x0:_0x1d77e6[_0x2a1af8(0x144)]):undefined,_0x1d77e6,_0x473b60);}}}return await _0x3a453b['proceed'](..._0x3a453b[_0x2a1af8(0x159)]);},'afterThrow':(_0x3918a7,_0x13e136)=>{throw _0x13e136;}};});}async[a2_0x45e067(0x13e)](){const _0x11e3d4=a2_0x45e067;this['application']['getApplications']([_0x11e3d4(0x172)])[_0x11e3d4(0x133)](_0x3e1602=>{const _0x3edb59=_0x11e3d4;(_0x3e1602===null||_0x3e1602===void 0x0?void 0x0:_0x3e1602[_0x3edb59(0x15a)])&&Object['defineProperties'](_0x3e1602[_0x3edb59(0x15a)],{'ok':{'value':function(_0x190cb0,_0x1f2fa3,_0x47425d=0x0){return{'code':_0x47425d,'data':_0x190cb0,'extra':_0x1f2fa3};}},'input':{'value':function(_0x3e8aa8,_0x1d206b){const _0x3d9955=_0x3edb59;var _0xb266fb;const _0x14c56b=lodash[_0x3d9955(0x12c)]({},this[_0x3d9955(0x138)]['body']||this[_0x3d9955(0x138)][((_0xb266fb=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0xb266fb===void 0x0?void 0x0:_0xb266fb[_0x3d9955(0x17b)])||_0x3d9955(0x151)]||{},this['request'][_0x3d9955(0x178)]||{});return _0x3e8aa8?lodash[_0x3d9955(0x157)](_0x14c56b,_0x3e8aa8,_0x1d206b):_0x14c56b;}},'when':{'value':async function(_0x19c17c,_0x1c1fb3){const _0x1dac30=_0x3edb59,_0x12909f=this[_0x1dac30(0x123)](_0x19c17c,null);if(!lodash[_0x1dac30(0x158)](_0x12909f))return await _0x1c1fb3(_0x12909f);}},'only':{'value':function(_0x384fdc){const _0x49d299=_0x3edb59,_0x1bb873={};for(let _0x3c8f58=0x0;_0x3c8f58<_0x384fdc[_0x49d299(0x15f)];_0x3c8f58++){lodash[_0x49d299(0x154)](_0x384fdc[_0x3c8f58])&&_0x384fdc[_0x3c8f58]['length']>0x0&&lodash['isString'](_0x384fdc[_0x3c8f58][0x0])&&(_0x1bb873[_0x384fdc[_0x3c8f58][0x0]]=this[_0x49d299(0x123)](_0x384fdc[_0x3c8f58][0x0],_0x384fdc[_0x3c8f58][_0x49d299(0x15f)]>0x1?_0x384fdc[_0x3c8f58][0x1]:null));}return _0x1bb873;}}});});}async[a2_0x45e067(0x169)](){const _0x3e5e18=a2_0x45e067;var _0x666f4d,_0x11c50b,_0x1b1f97,_0x494379,_0x25f8bf,_0x14015b;const _0x52f3ae=this[_0x3e5e18(0x16a)]['getConfiguration']();((_0x11c50b=(_0x666f4d=_0x52f3ae===null||_0x52f3ae===void 0x0?void 0x0:_0x52f3ae[_0x3e5e18(0x174)])===null||_0x666f4d===void 0x0?void 0x0:_0x666f4d[_0x3e5e18(0x12a)])===null||_0x11c50b===void 0x0?void 0x0:_0x11c50b[_0x3e5e18(0x13d)])&&Object[_0x3e5e18(0x121)](_0x52f3ae[_0x3e5e18(0x174)]['devices'])[_0x3e5e18(0x15f)]>0x1&&delete _0x52f3ae[_0x3e5e18(0x174)][_0x3e5e18(0x12a)][_0x3e5e18(0x13d)];if((_0x1b1f97=_0x52f3ae===null||_0x52f3ae===void 0x0?void 0x0:_0x52f3ae[_0x3e5e18(0x15e)])===null||_0x1b1f97===void 0x0?void 0x0:_0x1b1f97['dirs'])for(const _0x59e724 in _0x52f3ae['staticFile'][_0x3e5e18(0x156)]){((_0x494379=_0x52f3ae['staticFile'][_0x3e5e18(0x156)][_0x59e724])===null||_0x494379===void 0x0?void 0x0:_0x494379[_0x3e5e18(0x12b)])&&typeof((_0x25f8bf=_0x52f3ae[_0x3e5e18(0x15e)][_0x3e5e18(0x156)][_0x59e724])===null||_0x25f8bf===void 0x0?void 0x0:_0x25f8bf[_0x3e5e18(0x12b)])==_0x3e5e18(0x161)&&!fs[_0x3e5e18(0x147)](_0x52f3ae['staticFile']['dirs'][_0x59e724][_0x3e5e18(0x12b)])&&(fs[_0x3e5e18(0x166)](_0x52f3ae[_0x3e5e18(0x15e)][_0x3e5e18(0x156)][_0x59e724][_0x3e5e18(0x12b)],{'recursive':!![]}),console[_0x3e5e18(0x12f)](_0x3e5e18(0x129)+_0x52f3ae[_0x3e5e18(0x15e)][_0x3e5e18(0x156)][_0x59e724]['dir']));}((_0x14015b=_0x52f3ae===null||_0x52f3ae===void 0x0?void 0x0:_0x52f3ae[_0x3e5e18(0x165)])===null||_0x14015b===void 0x0?void 0x0:_0x14015b[_0x3e5e18(0x16e)])&&!fs['existsSync'](_0x52f3ae[_0x3e5e18(0x165)][_0x3e5e18(0x16e)])&&(fs['mkdirSync'](_0x52f3ae[_0x3e5e18(0x165)]['tmpdir'],{'recursive':!![]}),console[_0x3e5e18(0x12f)](_0x3e5e18(0x137)+_0x52f3ae['upload'][_0x3e5e18(0x16e)])),this[_0x3e5e18(0x16a)][_0x3e5e18(0x13f)](_0x52f3ae);}};__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x45e067(0x153),core_2['MidwayConfigService'])],CustomConfiguration['prototype'],a2_0x45e067(0x16a),void 0x0),__decorate([(0x0,core_1[a2_0x45e067(0x164)])(),__metadata('design:type',core_2[a2_0x45e067(0x150)])],CustomConfiguration['prototype'],a2_0x45e067(0x146),void 0x0),__decorate([(0x0,core_1[a2_0x45e067(0x164)])(),__metadata(a2_0x45e067(0x153),core_2[a2_0x45e067(0x149)])],CustomConfiguration[a2_0x45e067(0x12d)],a2_0x45e067(0x127),void 0x0),__decorate([(0x0,core_1[a2_0x45e067(0x164)])(),__metadata(a2_0x45e067(0x153),core_2[a2_0x45e067(0x163)])],CustomConfiguration['prototype'],a2_0x45e067(0x14f),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x45e067(0x153),ApiService_1[a2_0x45e067(0x11f)])],CustomConfiguration[a2_0x45e067(0x12d)],a2_0x45e067(0x11f),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x45e067(0x124)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x45e067(0x126),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x45e067(0x131)]=CustomConfiguration;
|
|
1
|
+
'use strict';function a2_0x3e18(_0x4d142e,_0xebc9f7){const _0x2b99d2=a2_0x2b99();return a2_0x3e18=function(_0x3e185f,_0xa9fa6d){_0x3e185f=_0x3e185f-0x131;let _0xc1f45d=_0x2b99d2[_0x3e185f];return _0xc1f45d;},a2_0x3e18(_0x4d142e,_0xebc9f7);}const a2_0x163004=a2_0x3e18;(function(_0x60ede9,_0x13b159){const _0x2aa97b=a2_0x3e18,_0x4ee24e=_0x60ede9();while(!![]){try{const _0x461f10=parseInt(_0x2aa97b(0x13e))/0x1+parseInt(_0x2aa97b(0x17f))/0x2+-parseInt(_0x2aa97b(0x150))/0x3+parseInt(_0x2aa97b(0x13b))/0x4*(parseInt(_0x2aa97b(0x155))/0x5)+-parseInt(_0x2aa97b(0x17b))/0x6*(parseInt(_0x2aa97b(0x16d))/0x7)+parseInt(_0x2aa97b(0x143))/0x8*(parseInt(_0x2aa97b(0x15b))/0x9)+-parseInt(_0x2aa97b(0x13d))/0xa;if(_0x461f10===_0x13b159)break;else _0x4ee24e['push'](_0x4ee24e['shift']());}catch(_0x1e0783){_0x4ee24e['push'](_0x4ee24e['shift']());}}}(a2_0x2b99,0x9dcb7));function a2_0x2b99(){const _0x5a53a2=['requestContext','defineProperties','isString','@midwayjs/i18n','HEADERS_SIGNATURE','design:type','@anncic-api/event','defaultsDeep','args','isFunction','context','anncic-api','13836YyBNLV','checkConfigKeys','method','metadata','122562REPTgV','MidwayConfigService','Inject','input','request','getApplications','hanlderApplications','get','mkdirSync','MidwayEnvironmentService','getAsync','handlerActionRoute','staticFile','config','application','intercept','object','devices','Configuration','device','tmpdir','isClass','Anncic-api\x20static-file\x20:\x20mkdir\x20','@anncic-api/typeorm','@midwayjs/cross-domain','addObject','prototype','query','@anncic-api/validator','environment','32QsKfyn','anncicapi','6250770GalAnO','1218163EHpapA','existsSync','ApiService','defineProperty','log','69808xZRNIu','dirs','@anncic-api/cache','Types','key','toLowerCase','anncic-apihelper','__decorate','registerMethodHandler','body','@midwayjs/upload','string','headers','3339642UqhHHZ','dir','filterConfig','checksign','MidwayDecoratorService','507640reHBwc','getOwnPropertyDescriptor','target','isArray','@midwayjs/static-file','length','1332QvqakT','getConfiguration','./types/action','__esModule','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','CustomConfiguration','_matchedRoute','bodyXml','handler','keys','./config/config.production','decorate','decorator','function','REQUEST_OBJ_CTX_KEY','@midwayjs/core','DEFAULT','upload','3031bCdwbJ','@midwayjs/koa'];a2_0x2b99=function(){return _0x5a53a2;};return a2_0x2b99();}var __decorate=this&&this[a2_0x163004(0x14a)]||function(_0x452a79,_0x12fd7e,_0x102860,_0x44f510){const _0x2898f1=a2_0x163004;var _0x5c5bdc=arguments[_0x2898f1(0x15a)],_0x3efd2b=_0x5c5bdc<0x3?_0x12fd7e:_0x44f510===null?_0x44f510=Object[_0x2898f1(0x156)](_0x12fd7e,_0x102860):_0x44f510,_0x1b8f03;if(typeof Reflect===_0x2898f1(0x18f)&&typeof Reflect[_0x2898f1(0x166)]===_0x2898f1(0x168))_0x3efd2b=Reflect[_0x2898f1(0x166)](_0x452a79,_0x12fd7e,_0x102860,_0x44f510);else{for(var _0x170d80=_0x452a79[_0x2898f1(0x15a)]-0x1;_0x170d80>=0x0;_0x170d80--)if(_0x1b8f03=_0x452a79[_0x170d80])_0x3efd2b=(_0x5c5bdc<0x3?_0x1b8f03(_0x3efd2b):_0x5c5bdc>0x3?_0x1b8f03(_0x12fd7e,_0x102860,_0x3efd2b):_0x1b8f03(_0x12fd7e,_0x102860))||_0x3efd2b;}return _0x5c5bdc>0x3&&_0x3efd2b&&Object[_0x2898f1(0x141)](_0x12fd7e,_0x102860,_0x3efd2b),_0x3efd2b;},__metadata=this&&this['__metadata']||function(_0x402bc6,_0x58deff){const _0xde5457=a2_0x163004;if(typeof Reflect===_0xde5457(0x18f)&&typeof Reflect[_0xde5457(0x17e)]===_0xde5457(0x168))return Reflect[_0xde5457(0x17e)](_0x402bc6,_0x58deff);};Object[a2_0x163004(0x141)](exports,a2_0x163004(0x15e),{'value':!![]}),exports[a2_0x163004(0x160)]=void 0x0;const core_1=require('@midwayjs/core'),core_2=require(a2_0x163004(0x16a)),ApiError_1=require('./exception/ApiError'),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x163004(0x15d)),fs=require('fs'),koa=require(a2_0x163004(0x16e)),i18n=require(a2_0x163004(0x172)),upload=require(a2_0x163004(0x14d)),staticFile=require(a2_0x163004(0x159)),crossDomain=require(a2_0x163004(0x135)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0x163004(0x165)),anncic=require('@anncic-api/core'),anncicCache=require(a2_0x163004(0x145)),anncicEvent=require(a2_0x163004(0x175)),anncicTypeorm=require(a2_0x163004(0x134)),anncicValidator=require(a2_0x163004(0x139)),anncicHelper=require(a2_0x163004(0x149));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x5fabfa=a2_0x163004;await this[_0x5fabfa(0x152)](),await this[_0x5fabfa(0x17c)](),await this[_0x5fabfa(0x18a)](),await this[_0x5fabfa(0x185)]();}async[a2_0x163004(0x17c)](){}async[a2_0x163004(0x18a)](){const _0x5a8754=a2_0x163004,_0x428dc0=this['config'][_0x5a8754(0x15c)]();this[_0x5a8754(0x167)][_0x5a8754(0x14b)](action_1['ACTION_ROUTE_KEY'],_0x545d12=>{const _0x5982a1=_0x5a8754,_0x3ef0bc=_0x545d12[_0x5982a1(0x17e)];return{'before':async _0x5145c7=>{const _0x494f9b=_0x5982a1;var _0xf5fc70,_0x478872;const _0x58971c=(_0xf5fc70=_0x5145c7===null||_0x5145c7===void 0x0?void 0x0:_0x5145c7[_0x494f9b(0x157)])===null||_0xf5fc70===void 0x0?void 0x0:_0xf5fc70[core_2[_0x494f9b(0x169)]];if(_0x58971c&&(_0x3ef0bc===null||_0x3ef0bc===void 0x0?void 0x0:_0x3ef0bc['apimit'])){if(!this['ApiService'][_0x494f9b(0x153)]((_0x478872=_0x58971c===null||_0x58971c===void 0x0?void 0x0:_0x58971c[_0x494f9b(0x183)])===null||_0x478872===void 0x0?void 0x0:_0x478872[_0x494f9b(0x14f)]))throw new AnnError(ApiError_1['ApiError'][_0x494f9b(0x173)]);}},'around':async _0x142457=>{const _0x10b149=_0x5982a1;var _0x2b7b3f,_0x4a1bcc,_0xc3cbd2,_0xc3fa46,_0x4be21b;const _0x149521=(_0x2b7b3f=_0x142457===null||_0x142457===void 0x0?void 0x0:_0x142457[_0x10b149(0x157)])===null||_0x2b7b3f===void 0x0?void 0x0:_0x2b7b3f[core_2[_0x10b149(0x169)]];if(_0x149521&&(_0x3ef0bc===null||_0x3ef0bc===void 0x0?void 0x0:_0x3ef0bc['apimit'])){if(((_0x4a1bcc=_0x149521['headers'])===null||_0x4a1bcc===void 0x0?void 0x0:_0x4a1bcc[_0x10b149(0x192)])&&((_0x4be21b=(_0xc3fa46=(_0xc3cbd2=_0x428dc0===null||_0x428dc0===void 0x0?void 0x0:_0x428dc0[_0x10b149(0x13c)])===null||_0xc3cbd2===void 0x0?void 0x0:_0xc3cbd2[_0x10b149(0x190)])===null||_0xc3fa46===void 0x0?void 0x0:_0xc3fa46[_0x149521['headers'][_0x10b149(0x192)]])===null||_0x4be21b===void 0x0?void 0x0:_0x4be21b[_0x10b149(0x18e)])){const _0x2806d4=Array['isArray'](_0x428dc0[_0x10b149(0x13c)]['devices'][_0x149521[_0x10b149(0x14f)]['device']][_0x10b149(0x18e)])?_0x428dc0[_0x10b149(0x13c)][_0x10b149(0x190)][_0x149521[_0x10b149(0x14f)][_0x10b149(0x192)]][_0x10b149(0x18e)]:[_0x428dc0[_0x10b149(0x13c)][_0x10b149(0x190)][_0x149521[_0x10b149(0x14f)][_0x10b149(0x192)]][_0x10b149(0x18e)]];for(const _0x4c84bc of _0x2806d4){if(core_1[_0x10b149(0x146)][_0x10b149(0x132)](_0x4c84bc)||typeof _0x4c84bc=='string'){const _0x173a02=await _0x149521[_0x10b149(0x16f)][_0x10b149(0x189)](_0x4c84bc);typeof(_0x173a02===null||_0x173a02===void 0x0?void 0x0:_0x173a02[_0x10b149(0x163)])==_0x10b149(0x168)&&await _0x173a02[_0x10b149(0x163)](typeof(_0x149521===null||_0x149521===void 0x0?void 0x0:_0x149521[_0x10b149(0x17d)])==_0x10b149(0x14e)&&(_0x149521===null||_0x149521===void 0x0?void 0x0:_0x149521[_0x10b149(0x161)])?_0x149521['method'][_0x10b149(0x148)]()+'@'+(_0x149521===null||_0x149521===void 0x0?void 0x0:_0x149521[_0x10b149(0x161)]):undefined,_0x149521,_0x3ef0bc);}else core_1[_0x10b149(0x146)][_0x10b149(0x178)](_0x4c84bc)&&await _0x4c84bc(typeof(_0x149521===null||_0x149521===void 0x0?void 0x0:_0x149521[_0x10b149(0x17d)])==_0x10b149(0x14e)&&(_0x149521===null||_0x149521===void 0x0?void 0x0:_0x149521['_matchedRoute'])?_0x149521['method'][_0x10b149(0x148)]()+'@'+(_0x149521===null||_0x149521===void 0x0?void 0x0:_0x149521['_matchedRoute']):undefined,_0x149521,_0x3ef0bc);}}}return await _0x142457['proceed'](..._0x142457[_0x10b149(0x177)]);},'afterThrow':(_0x38ca9c,_0x35e823)=>{throw _0x35e823;}};});}async[a2_0x163004(0x185)](){const _0x185097=a2_0x163004;this[_0x185097(0x18d)][_0x185097(0x184)](['koa'])['forEach'](_0x362a44=>{const _0x2008cd=_0x185097;(_0x362a44===null||_0x362a44===void 0x0?void 0x0:_0x362a44[_0x2008cd(0x179)])&&Object[_0x2008cd(0x170)](_0x362a44[_0x2008cd(0x179)],{'ok':{'value':function(_0x12e6fe,_0x3949d6,_0x287e7d=0x0){return{'code':_0x287e7d,'data':_0x12e6fe,'extra':_0x3949d6};}},'input':{'value':function(_0x504a08,_0x34a04e){const _0x2f3726=_0x2008cd;var _0x40ec4c;const _0x14cb78=lodash[_0x2f3726(0x176)]({},this[_0x2f3726(0x183)][_0x2f3726(0x14c)]||this[_0x2f3726(0x183)][((_0x40ec4c=config===null||config===void 0x0?void 0x0:config[_0x2f3726(0x162)])===null||_0x40ec4c===void 0x0?void 0x0:_0x40ec4c[_0x2f3726(0x147)])||_0x2f3726(0x14c)]||{},this[_0x2f3726(0x183)][_0x2f3726(0x138)]||{});return _0x504a08?lodash[_0x2f3726(0x186)](_0x14cb78,_0x504a08,_0x34a04e):_0x14cb78;}},'when':{'value':async function(_0x1958b3,_0x4b682e){const _0x10d588=_0x2008cd,_0x5d30e5=this[_0x10d588(0x182)](_0x1958b3,null);if(!lodash['isNull'](_0x5d30e5))return await _0x4b682e(_0x5d30e5);}},'only':{'value':function(_0x2eef5e){const _0x4fc124=_0x2008cd,_0x3c0fcc={};for(let _0x44e270=0x0;_0x44e270<_0x2eef5e[_0x4fc124(0x15a)];_0x44e270++){lodash[_0x4fc124(0x158)](_0x2eef5e[_0x44e270])&&_0x2eef5e[_0x44e270][_0x4fc124(0x15a)]>0x0&&lodash[_0x4fc124(0x171)](_0x2eef5e[_0x44e270][0x0])&&(_0x3c0fcc[_0x2eef5e[_0x44e270][0x0]]=this[_0x4fc124(0x182)](_0x2eef5e[_0x44e270][0x0],_0x2eef5e[_0x44e270][_0x4fc124(0x15a)]>0x1?_0x2eef5e[_0x44e270][0x1]:null));}return _0x3c0fcc;}}});});}async['filterConfig'](){const _0x25fde2=a2_0x163004;var _0x225fb7,_0x17d745,_0x358820,_0x39901c,_0x50b48e,_0xb119a;const _0x3502b1=this[_0x25fde2(0x18c)][_0x25fde2(0x15c)]();((_0x17d745=(_0x225fb7=_0x3502b1===null||_0x3502b1===void 0x0?void 0x0:_0x3502b1['anncicapi'])===null||_0x225fb7===void 0x0?void 0x0:_0x225fb7['devices'])===null||_0x17d745===void 0x0?void 0x0:_0x17d745['DEFAULT'])&&Object[_0x25fde2(0x164)](_0x3502b1[_0x25fde2(0x13c)]['devices'])[_0x25fde2(0x15a)]>0x1&&delete _0x3502b1[_0x25fde2(0x13c)]['devices'][_0x25fde2(0x16b)];if((_0x358820=_0x3502b1===null||_0x3502b1===void 0x0?void 0x0:_0x3502b1[_0x25fde2(0x18b)])===null||_0x358820===void 0x0?void 0x0:_0x358820[_0x25fde2(0x144)])for(const _0x40b945 in _0x3502b1[_0x25fde2(0x18b)][_0x25fde2(0x144)]){((_0x39901c=_0x3502b1[_0x25fde2(0x18b)][_0x25fde2(0x144)][_0x40b945])===null||_0x39901c===void 0x0?void 0x0:_0x39901c['dir'])&&typeof((_0x50b48e=_0x3502b1[_0x25fde2(0x18b)][_0x25fde2(0x144)][_0x40b945])===null||_0x50b48e===void 0x0?void 0x0:_0x50b48e[_0x25fde2(0x151)])==_0x25fde2(0x14e)&&!fs[_0x25fde2(0x13f)](_0x3502b1[_0x25fde2(0x18b)][_0x25fde2(0x144)][_0x40b945][_0x25fde2(0x151)])&&(fs['mkdirSync'](_0x3502b1[_0x25fde2(0x18b)][_0x25fde2(0x144)][_0x40b945]['dir'],{'recursive':!![]}),console[_0x25fde2(0x142)](_0x25fde2(0x133)+_0x3502b1[_0x25fde2(0x18b)][_0x25fde2(0x144)][_0x40b945]['dir']));}((_0xb119a=_0x3502b1===null||_0x3502b1===void 0x0?void 0x0:_0x3502b1[_0x25fde2(0x16c)])===null||_0xb119a===void 0x0?void 0x0:_0xb119a[_0x25fde2(0x131)])&&!fs[_0x25fde2(0x13f)](_0x3502b1['upload']['tmpdir'])&&(fs[_0x25fde2(0x187)](_0x3502b1[_0x25fde2(0x16c)][_0x25fde2(0x131)],{'recursive':!![]}),console[_0x25fde2(0x142)](_0x25fde2(0x15f)+_0x3502b1['upload']['tmpdir'])),this[_0x25fde2(0x18c)][_0x25fde2(0x136)](_0x3502b1);}};__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x163004(0x174),core_2[a2_0x163004(0x180)])],CustomConfiguration[a2_0x163004(0x137)],'config',void 0x0),__decorate([(0x0,core_1[a2_0x163004(0x181)])(),__metadata(a2_0x163004(0x174),core_2[a2_0x163004(0x154)])],CustomConfiguration['prototype'],a2_0x163004(0x167),void 0x0),__decorate([(0x0,core_1[a2_0x163004(0x181)])(),__metadata(a2_0x163004(0x174),core_2['MidwayApplicationManager'])],CustomConfiguration[a2_0x163004(0x137)],'application',void 0x0),__decorate([(0x0,core_1[a2_0x163004(0x181)])(),__metadata(a2_0x163004(0x174),core_2[a2_0x163004(0x188)])],CustomConfiguration[a2_0x163004(0x137)],a2_0x163004(0x13a),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x163004(0x174),ApiService_1[a2_0x163004(0x140)])],CustomConfiguration[a2_0x163004(0x137)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x163004(0x191)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x163004(0x17a),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a3_0x3516(){const _0x35f18c=['startsWith','ACTION_KEY','47OWEeca','AppsConfigTmp','substring','__esModule','saveModule','9vFYoHX','10279470pSWrUR','220lHMyfs','trim','match','splice','indexOf','Action','\x20文件请放在apps/','replace','filepath','join','APPSCONFIG_KEY','saveClassMetadata','4500044MYnFkT','7uUEUhR','-action','endsWith','Controller','/controller/','filter','/apps/','length','2794143SRdCVH','3SICghG','existsSync','-controller','prefix','app/controller/','parseRoute','middlewareIgnore','\x20文件请放在app/controller/文件下','rootpath','middleware','cwd','route','5200985bpvnpK','push','toLowerCase','8056200QHWeLE','../types/action','7338456okiGXE','module','/config.','@midwayjs/core','split','apps/','defineProperty'];a3_0x3516=function(){return _0x35f18c;};return a3_0x3516();}const a3_0x247acb=a3_0x6dac;(function(_0xa2a2c5,_0x174d56){const _0x4636ef=a3_0x6dac,_0x334318=_0xa2a2c5();while(!![]){try{const _0x379adf=-parseInt(_0x4636ef(0x1ff))/0x1*(-parseInt(_0x4636ef(0x206))/0x2)+-parseInt(_0x4636ef(0x1e5))/0x3*(-parseInt(_0x4636ef(0x212))/0x4)+-parseInt(_0x4636ef(0x1f1))/0x5+-parseInt(_0x4636ef(0x1f6))/0x6+-parseInt(_0x4636ef(0x213))/0x7*(-parseInt(_0x4636ef(0x1f4))/0x8)+-parseInt(_0x4636ef(0x204))/0x9*(-parseInt(_0x4636ef(0x205))/0xa)+-parseInt(_0x4636ef(0x21b))/0xb;if(_0x379adf===_0x174d56)break;else _0x334318['push'](_0x334318['shift']());}catch(_0x36b97c){_0x334318['push'](_0x334318['shift']());}}}(a3_0x3516,0x9e2bb));Object[a3_0x247acb(0x1fc)](exports,a3_0x247acb(0x202),{'value':!![]}),exports['parseRoute']=exports[a3_0x247acb(0x20b)]=void 0x0;const fs=require('fs'),core_1=require(a3_0x247acb(0x1f9)),action_1=require(a3_0x247acb(0x1f5));function Action(_0x5d412d,_0x5e1a5a,_0x23a7ed={'middleware':[],'sensitive':!![]}){return _0x385174=>{const _0x594f22=a3_0x6dac;_0x23a7ed['tagName']=_0x5e1a5a;const _0x4db5ae=parseRoute(_0x5d412d);if(_0x4db5ae[_0x594f22(0x1f7)]){_0x23a7ed[_0x594f22(0x1e8)]=_0x23a7ed['prefix']?'/'+_0x4db5ae[_0x594f22(0x1f7)]+'/'+_0x23a7ed[_0x594f22(0x1e8)]:'/'+_0x4db5ae['route'];_0x4db5ae[_0x594f22(0x1e8)]&&(_0x23a7ed[_0x594f22(0x1e8)]='/'+_0x4db5ae['prefix']+'/'+_0x23a7ed['prefix']);if(fs[_0x594f22(0x1e6)](_0x4db5ae[_0x594f22(0x1ed)]+_0x594f22(0x219)+_0x4db5ae[_0x594f22(0x1f7)]+_0x594f22(0x1f8)+(lodash[_0x594f22(0x215)](_0x4db5ae[_0x594f22(0x20e)],'ts')?'ts':'js'))){const _0x5aa12c=include(_0x4db5ae[_0x594f22(0x1ed)]+_0x594f22(0x219)+_0x4db5ae[_0x594f22(0x1f7)]+_0x594f22(0x1f8)+(lodash['endsWith'](_0x4db5ae[_0x594f22(0x20e)],'ts')?'ts':'js'));if(_0x5aa12c[_0x594f22(0x1ee)]&&lodash['isArray'](_0x5aa12c[_0x594f22(0x1ee)])&&_0x5aa12c['middleware'][_0x594f22(0x21a)]>0x0)for(let _0x23e50e in _0x5aa12c[_0x594f22(0x1ee)]){_0x5aa12c[_0x594f22(0x1eb)][_0x594f22(0x20a)](_0x5aa12c[_0x594f22(0x1ee)][_0x23e50e])==-0x1&&_0x23a7ed[_0x594f22(0x1ee)][_0x594f22(0x1f2)](_0x5aa12c[_0x594f22(0x1ee)][_0x23e50e]);}const _0x3504ec=(0x0,core_1['getClassMetadata'])(action_1['APPSCONFIG_KEY'],action_1[_0x594f22(0x200)])||{};_0x3504ec[''+_0x4db5ae[_0x594f22(0x1f7)]]=_0x5aa12c,(0x0,core_1[_0x594f22(0x211)])(action_1[_0x594f22(0x210)],_0x3504ec,action_1[_0x594f22(0x200)]);}_0x23a7ed[_0x594f22(0x1e8)]=_0x23a7ed[_0x594f22(0x1e8)][_0x594f22(0x1f3)]()[_0x594f22(0x20d)](/\/{2,}/g,'/'),(0x0,core_1[_0x594f22(0x203)])(action_1[_0x594f22(0x1fe)],_0x385174),(0x0,core_1[_0x594f22(0x216)])(_0x23a7ed[_0x594f22(0x1e8)],_0x23a7ed)(_0x385174),(0x0,core_1['saveClassMetadata'])(action_1['ACTION_KEY'],{'prefix':_0x23a7ed['prefix'],'pprefix':_0x4db5ae[_0x594f22(0x1e8)],'module':_0x4db5ae[_0x594f22(0x1f7)],'filepath':_0x4db5ae[_0x594f22(0x20e)],'routerOptions':_0x23a7ed},_0x385174);}else _0x23a7ed[_0x594f22(0x1e8)]=_0x23a7ed['prefix']?'/'+_0x23a7ed[_0x594f22(0x1e8)]:'/'+_0x4db5ae[_0x594f22(0x1f0)],_0x4db5ae[_0x594f22(0x1e8)]&&(_0x23a7ed[_0x594f22(0x1e8)]='/'+_0x4db5ae['prefix']+'/'+_0x23a7ed[_0x594f22(0x1e8)]),_0x23a7ed['prefix']=_0x23a7ed[_0x594f22(0x1e8)][_0x594f22(0x1f3)]()['replace'](/\/{2,}/g,'/'),(0x0,core_1['saveModule'])(action_1[_0x594f22(0x1fe)],_0x385174),(0x0,core_1[_0x594f22(0x216)])(_0x23a7ed[_0x594f22(0x1e8)],_0x23a7ed)(_0x385174),(0x0,core_1[_0x594f22(0x211)])(action_1['ACTION_KEY'],{'prefix':_0x23a7ed[_0x594f22(0x1e8)],'module':_0x4db5ae[_0x594f22(0x1f7)],'pprefix':_0x4db5ae[_0x594f22(0x1e8)],'filepath':_0x4db5ae['filepath'],'routerOptions':_0x23a7ed},_0x385174);};}exports[a3_0x247acb(0x20b)]=Action;function parseRoute(_0x56dd0d){const _0x1b463b=a3_0x247acb;_0x56dd0d=_0x56dd0d[_0x1b463b(0x20d)](/(\\|\/)/g,'/');const _0x38143a=process[_0x1b463b(0x1ef)]()['replace'](/(\\|\/)/g,'/'),_0x1f1173=_0x56dd0d[_0x1b463b(0x201)](0x0,_0x38143a[_0x1b463b(0x21a)]+_0x56dd0d[_0x1b463b(0x201)](_0x38143a['length']+0x1)[_0x1b463b(0x20a)]('/')+0x1),_0x2b187a=_0x56dd0d[_0x1b463b(0x201)](_0x1f1173[_0x1b463b(0x21a)]+0x1)[_0x1b463b(0x20d)](/(\\|\/)/g,'/'),_0x3550eb={'route':'','prefix':![],'module':![],'rootpath':_0x1f1173,'filepath':_0x2b187a};if(_0x2b187a[_0x1b463b(0x1fd)]('app/controller/')){const _0x2031a4=_0x2b187a[_0x1b463b(0x201)](_0x1b463b(0x1e9)[_0x1b463b(0x21a)])[_0x1b463b(0x1fa)]('/')['filter'](_0x5b0671=>_0x5b0671&&_0x5b0671[_0x1b463b(0x207)]());return _0x2031a4[_0x1b463b(0x21a)]>0x1&&(_0x3550eb[_0x1b463b(0x1e8)]=_0x2031a4[0x0]['toLowerCase'](),_0x2031a4[_0x1b463b(0x209)](0x0,0x1)),_0x3550eb[_0x1b463b(0x1f0)]=('/'+_0x2031a4[_0x1b463b(0x20f)]('/'))[_0x1b463b(0x20d)](/(\.ts|\.js)$/,'')[_0x1b463b(0x20d)](/\/{2,}/g,'/')[_0x1b463b(0x208)](/[\/|A-Z]*[^A-Z]+/g)[_0x1b463b(0x20f)]('-')['toLowerCase']()[_0x1b463b(0x20d)](/\/\-/g,'/'),_0x3550eb['route'][_0x1b463b(0x215)](_0x1b463b(0x214))&&(_0x3550eb[_0x1b463b(0x1f0)]=_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x201)](0x0,_0x3550eb[_0x1b463b(0x1f0)]['length']-0x7)),_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x215)](_0x1b463b(0x1e7))&&(_0x3550eb[_0x1b463b(0x1f0)]=_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x201)](0x0,_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x21a)]-0xb)),_0x3550eb;}else{if(_0x2b187a[_0x1b463b(0x1fd)](_0x1b463b(0x1fb))){const _0x4f08ce=_0x2b187a[_0x1b463b(0x201)](0x0,_0x2b187a[_0x1b463b(0x20a)]('/apps/')+0x5),_0x1e2140=_0x2b187a[_0x1b463b(0x201)](_0x4f08ce[_0x1b463b(0x21a)]+0x1)[_0x1b463b(0x20d)](/(\\|\/)/g,'/')[_0x1b463b(0x1fa)]('/')[0x0];if(_0x2b187a['startsWith']('apps/'+_0x1e2140+'/controller/')){const _0x352f86=_0x2b187a['substring']((_0x4f08ce+'/'+_0x1e2140+_0x1b463b(0x217))['length'])['split']('/')[_0x1b463b(0x218)](_0x3aba9b=>_0x3aba9b&&_0x3aba9b[_0x1b463b(0x207)]());return _0x352f86[_0x1b463b(0x21a)]>0x1&&(_0x3550eb[_0x1b463b(0x1e8)]=_0x352f86[0x0]['toLowerCase'](),_0x352f86['splice'](0x0,0x1)),_0x3550eb[_0x1b463b(0x1f7)]=_0x1e2140,_0x3550eb[_0x1b463b(0x1f0)]=('/'+_0x1e2140+'/'+_0x352f86['join']('/'))['replace'](/(\.ts|\.js)$/,'')[_0x1b463b(0x20d)](/\/{2,}/,'/')[_0x1b463b(0x208)](/[\/|A-Z]*[^A-Z]+/g)[_0x1b463b(0x20f)]('-')[_0x1b463b(0x1f3)]()[_0x1b463b(0x20d)](/\/\-/g,'/'),_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x215)](_0x1b463b(0x214))&&(_0x3550eb[_0x1b463b(0x1f0)]=_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x201)](0x0,_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x21a)]-0x7)),_0x3550eb[_0x1b463b(0x1f0)]['endsWith'](_0x1b463b(0x1e7))&&(_0x3550eb[_0x1b463b(0x1f0)]=_0x3550eb[_0x1b463b(0x1f0)][_0x1b463b(0x201)](0x0,_0x3550eb[_0x1b463b(0x1f0)]['length']-0xb)),_0x3550eb;}throw new Error(_0x2b187a+_0x1b463b(0x20c)+_0x1e2140+'/controller/文件下');}}throw new Error(_0x2b187a+_0x1b463b(0x1ec));}function a3_0x6dac(_0x44e61d,_0x3f8d0f){const _0x351630=a3_0x3516();return a3_0x6dac=function(_0x6dac84,_0x5733c2){_0x6dac84=_0x6dac84-0x1e5;let _0x2a0cdb=_0x351630[_0x6dac84];return _0x2a0cdb;},a3_0x6dac(_0x44e61d,_0x3f8d0f);}exports[a3_0x247acb(0x1ea)]=parseRoute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a4_0x5c9f(_0x23a1cf,_0xf1e0b2){const _0x1a9edb=a4_0x1a9e();return a4_0x5c9f=function(_0x5c9f4f,_0x2cca51){_0x5c9f4f=_0x5c9f4f-0x1a2;let _0x53b457=_0x1a9edb[_0x5c9f4f];return _0x53b457;},a4_0x5c9f(_0x23a1cf,_0xf1e0b2);}const a4_0x581aaa=a4_0x5c9f;(function(_0x4ded33,_0x12ab2e){const _0x563b90=a4_0x5c9f,_0x16cb04=_0x4ded33();while(!![]){try{const _0x51ae5e=-parseInt(_0x563b90(0x1b8))/0x1*(parseInt(_0x563b90(0x1b7))/0x2)+-parseInt(_0x563b90(0x1a9))/0x3+parseInt(_0x563b90(0x1a4))/0x4*(parseInt(_0x563b90(0x1bc))/0x5)+-parseInt(_0x563b90(0x1be))/0x6*(parseInt(_0x563b90(0x1c3))/0x7)+-parseInt(_0x563b90(0x1aa))/0x8*(parseInt(_0x563b90(0x1af))/0x9)+-parseInt(_0x563b90(0x1c0))/0xa+parseInt(_0x563b90(0x1ba))/0xb;if(_0x51ae5e===_0x12ab2e)break;else _0x16cb04['push'](_0x16cb04['shift']());}catch(_0x27c3c0){_0x16cb04['push'](_0x16cb04['shift']());}}}(a4_0x1a9e,0x4a1fa));Object[a4_0x581aaa(0x1b1)](exports,a4_0x581aaa(0x1a8),{'value':!![]}),exports[a4_0x581aaa(0x1b2)]=void 0x0;const validator_1=require(a4_0x581aaa(0x1ad)),core_1=require(a4_0x581aaa(0x1c2)),action_1=require('../types/action');function Api(_0x31bae5,_0xb85d43=a4_0x581aaa(0x1bb),_0x499ead='/',_0x150e05={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0xd794a6,_0x9f957c,_0x1e30fd)=>{const _0x1b64b9=a4_0x5c9f;var _0x290cce,_0x1b4bb6,_0x5d06b7;!_0x150e05['middleware']&&(_0x150e05[_0x1b64b9(0x1b6)]=[]);!((_0x290cce=_0x150e05===null||_0x150e05===void 0x0?void 0x0:_0x150e05[_0x1b64b9(0x1b3)])===null||_0x290cce===void 0x0?void 0x0:_0x290cce[_0x1b64b9(0x1ac)])&&(_0x150e05['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x1b64b9(0x1b9)}});if(((_0x1b4bb6=_0x150e05===null||_0x150e05===void 0x0?void 0x0:_0x150e05[_0x1b64b9(0x1b6)])===null||_0x1b4bb6===void 0x0?void 0x0:_0x1b4bb6[_0x1b64b9(0x1a2)])>0x0&&((_0x5d06b7=_0x150e05===null||_0x150e05===void 0x0?void 0x0:_0x150e05[_0x1b64b9(0x1a6)])===null||_0x5d06b7===void 0x0?void 0x0:_0x5d06b7[_0x1b64b9(0x1a2)])>0x0)for(let _0x2b9ba6 in _0x150e05[_0x1b64b9(0x1b6)]){_0x150e05[_0x1b64b9(0x1a6)][_0x1b64b9(0x1ab)](_0x150e05[_0x1b64b9(0x1b6)][_0x2b9ba6])!==-0x1&&(_0x150e05['middleware'][_0x2b9ba6]=null);}_0x150e05[_0x1b64b9(0x1b5)]=_0x31bae5,(0x0,validator_1['Validator'])(_0x150e05['validate'])(_0xd794a6,_0x9f957c,_0x1e30fd),(0x0,core_1['RequestMapping'])(Object[_0x1b64b9(0x1bf)](_0x150e05,{'path':_0x499ead,'requestMethod':(_0xb85d43==_0x1b64b9(0x1a3)?_0x1b64b9(0x1bd):_0xb85d43)[_0x1b64b9(0x1b4)]()}))(_0xd794a6,_0x9f957c,_0x1e30fd),(0x0,core_1['attachClassMetadata'])(action_1['ACTION_ROUTE_KEY'],{'path':_0x499ead,'method':_0x9f957c,'apimit':_0x150e05[_0x1b64b9(0x1a5)],'routerName':_0x150e05[_0x1b64b9(0x1b5)],'description':_0x150e05[_0x1b64b9(0x1a7)],'middleware':(_0x150e05[_0x1b64b9(0x1b6)]||[])['filter'](_0x210345=>!!_0x210345),'requestMethod':(_0xb85d43=='del'?_0x1b64b9(0x1bd):_0xb85d43)[_0x1b64b9(0x1b4)]()},_0xd794a6),(0x0,core_1[_0x1b64b9(0x1b0)])(action_1[_0x1b64b9(0x1ae)],{'path':_0x499ead,'method':_0x9f957c,'apimit':_0x150e05[_0x1b64b9(0x1a5)],'routerName':_0x150e05[_0x1b64b9(0x1b5)],'description':_0x150e05[_0x1b64b9(0x1a7)],'middleware':(_0x150e05[_0x1b64b9(0x1b6)]||[])[_0x1b64b9(0x1c1)](_0xe281fb=>!!_0xe281fb),'requestMethod':(_0xb85d43==_0x1b64b9(0x1a3)?_0x1b64b9(0x1bd):_0xb85d43)[_0x1b64b9(0x1b4)]()})(_0xd794a6,_0x9f957c,_0x1e30fd);};}function a4_0x1a9e(){const _0x402eea=['del','312eWCHvm','apimit','middlewareIgnore','description','__esModule','849756UZGTbs','16hSXBKE','indexOf','validationOptions','@anncic-api/validator','ACTION_ROUTE_KEY','2586123OOnbxr','createCustomMethodDecorator','defineProperty','Api','validate','toLowerCase','routerName','middleware','235402tJJoqW','5rMXatR','utc','28123282DTWnxo','get','2570pIMVvV','delete','1165038MFkXgm','assign','4583470ftiJts','filter','@midwayjs/core','14GCpHqR','length'];a4_0x1a9e=function(){return _0x402eea;};return a4_0x1a9e();}exports['Api']=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5_0x163e9e=a5_0x1499;(function(_0x368dd2,_0xc81e75){const _0xbb277f=a5_0x1499,_0x1327f2=_0x368dd2();while(!![]){try{const _0x357d52=-parseInt(_0xbb277f(0xe5))/0x1+-parseInt(_0xbb277f(0xf0))/0x2*(-parseInt(_0xbb277f(0xea))/0x3)+parseInt(_0xbb277f(0xe7))/0x4*(parseInt(_0xbb277f(0xe2))/0x5)+parseInt(_0xbb277f(0xdc))/0x6*(-parseInt(_0xbb277f(0xe6))/0x7)+parseInt(_0xbb277f(0xe8))/0x8*(parseInt(_0xbb277f(0xe1))/0x9)+-parseInt(_0xbb277f(0xef))/0xa*(parseInt(_0xbb277f(0xe3))/0xb)+-parseInt(_0xbb277f(0xed))/0xc;if(_0x357d52===_0xc81e75)break;else _0x1327f2['push'](_0x1327f2['shift']());}catch(_0x1be338){_0x1327f2['push'](_0x1327f2['shift']());}}}(a5_0x5a34,0x84efb));function a5_0x1499(_0x4a137e,_0x5d1ea7){const _0x5a34bc=a5_0x5a34();return a5_0x1499=function(_0x149929,_0x41a00f){_0x149929=_0x149929-0xd9;let _0x389bda=_0x5a34bc[_0x149929];return _0x389bda;},a5_0x1499(_0x4a137e,_0x5d1ea7);}Object[a5_0x163e9e(0xeb)](exports,'__esModule',{'value':!![]}),exports[a5_0x163e9e(0xf3)]=void 0x0;function a5_0x5a34(){const _0x21101d=['306ppPKBb','2636905ZSOSYt','802703DjFBtF','app','257632EFTXkv','133grwBgc','4rsPllw','165488DwkDHU','apidoc','57civQSC','defineProperty','RequestMapping','8488728wAgdtW','ApitestService','100LAiGPB','113194JWVDAn','@midwayjs/core','value','Apitest','REQUEST_OBJ_CTX_KEY','getApplicationContext','apitest','21090yBZbeO','MidwayEnvironmentService','getConfig','getAsync','filepath'];a5_0x5a34=function(){return _0x21101d;};return a5_0x5a34();}const core_1=require(a5_0x163e9e(0xf1)),ApitestService_1=require('../service/ApitestService');function Apitest(_0x12ee0f='/apitest',_0x4dc203){return(_0x32e896,_0x44358a,_0x2a49bb)=>{const _0x210265=a5_0x1499;return(0x0,core_1[_0x210265(0xec)])({'path':_0x12ee0f,'requestMethod':'get'})(_0x32e896,_0x44358a,_0x2a49bb),_0x2a49bb[_0x210265(0xf2)]=async function(..._0x409efe){const _0x31dd92=_0x210265;var _0x535ad8;const _0x1285cc=(_0x535ad8=this[core_1[_0x31dd92(0xd9)]])===null||_0x535ad8===void 0x0?void 0x0:_0x535ad8[_0x31dd92(0xe4)];if(_0x1285cc&&_0x1285cc[_0x31dd92(0xde)](_0x31dd92(0xdb))){const _0x195a43=await _0x1285cc[_0x31dd92(0xda)]()[_0x31dd92(0xdf)](ApitestService_1[_0x31dd92(0xee)]),_0x4bfc91=await _0x1285cc['getApplicationContext']()[_0x31dd92(0xdf)](core_1[_0x31dd92(0xdd)]);return _0x4bfc91['isDevelopmentEnvironment']()&&(_0x4dc203[_0x31dd92(0xe0)]=!![]),await _0x195a43[_0x31dd92(0xe9)](_0x4dc203);}return'';},_0x2a49bb;};}exports[a5_0x163e9e(0xf3)]=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a6_0x216e(_0x497c3d,_0x31dfdb){var _0x1935f7=a6_0x1935();return a6_0x216e=function(_0x216e02,_0x487e29){_0x216e02=_0x216e02-0x99;var _0x593dc9=_0x1935f7[_0x216e02];return _0x593dc9;},a6_0x216e(_0x497c3d,_0x31dfdb);}var a6_0x5d43e5=a6_0x216e;function a6_0x1935(){var _0x280544=['defineProperty','HEADERS_CHECKCODE','2641079kWgbRL','177976lCsQuV','decorate','2402004YMbvSb','16OOABzT','object','TIMEOUT','网络繁忙,请稍后重试','217191ImzhOJ','HEADERS_LACK','__metadata','design:type','function','metadata','getOwnPropertyDescriptor','请使用正确的设备','308495nGskUw','HEADERS_DEVICE','checkcode验证失败','4637511DfBppi','请求头信息不完整','HEADERS_SIGNATURE','ApiError','8TFXNAx','727332npbCkt','__esModule','20rUqkRr','__decorate','length'];a6_0x1935=function(){return _0x280544;};return a6_0x1935();}(function(_0x3d7546,_0x170b11){var _0x49d09d=a6_0x216e,_0x4852b7=_0x3d7546();while(!![]){try{var _0x19d201=-parseInt(_0x49d09d(0xa9))/0x1+parseInt(_0x49d09d(0xa1))/0x2+-parseInt(_0x49d09d(0xb0))/0x3*(-parseInt(_0x49d09d(0xac))/0x4)+parseInt(_0x49d09d(0x99))/0x5+parseInt(_0x49d09d(0xab))/0x6+parseInt(_0x49d09d(0xa8))/0x7*(parseInt(_0x49d09d(0xa0))/0x8)+parseInt(_0x49d09d(0x9c))/0x9*(-parseInt(_0x49d09d(0xa3))/0xa);if(_0x19d201===_0x170b11)break;else _0x4852b7['push'](_0x4852b7['shift']());}catch(_0x27d895){_0x4852b7['push'](_0x4852b7['shift']());}}}(a6_0x1935,0x45592));var __decorate=this&&this[a6_0x5d43e5(0xa4)]||function(_0x48d5b3,_0x8f6ec9,_0x2084b8,_0x34054a){var _0x2a261b=a6_0x5d43e5,_0x4425af=arguments[_0x2a261b(0xa5)],_0x37351e=_0x4425af<0x3?_0x8f6ec9:_0x34054a===null?_0x34054a=Object[_0x2a261b(0xb6)](_0x8f6ec9,_0x2084b8):_0x34054a,_0x517094;if(typeof Reflect===_0x2a261b(0xad)&&typeof Reflect['decorate']===_0x2a261b(0xb4))_0x37351e=Reflect[_0x2a261b(0xaa)](_0x48d5b3,_0x8f6ec9,_0x2084b8,_0x34054a);else{for(var _0x1255b7=_0x48d5b3[_0x2a261b(0xa5)]-0x1;_0x1255b7>=0x0;_0x1255b7--)if(_0x517094=_0x48d5b3[_0x1255b7])_0x37351e=(_0x4425af<0x3?_0x517094(_0x37351e):_0x4425af>0x3?_0x517094(_0x8f6ec9,_0x2084b8,_0x37351e):_0x517094(_0x8f6ec9,_0x2084b8))||_0x37351e;}return _0x4425af>0x3&&_0x37351e&&Object[_0x2a261b(0xa6)](_0x8f6ec9,_0x2084b8,_0x37351e),_0x37351e;},__metadata=this&&this[a6_0x5d43e5(0xb2)]||function(_0x21c2e6,_0x411207){var _0x1f34bb=a6_0x5d43e5;if(typeof Reflect==='object'&&typeof Reflect[_0x1f34bb(0xb5)]==='function')return Reflect[_0x1f34bb(0xb5)](_0x21c2e6,_0x411207);};Object[a6_0x5d43e5(0xa6)](exports,a6_0x5d43e5(0xa2),{'value':!![]}),exports[a6_0x5d43e5(0x9f)]=void 0x0;class ApiError{}ApiError[a6_0x5d43e5(0xae)]=0x3d7e31,ApiError[a6_0x5d43e5(0xb1)]=0x3d7e32,ApiError['HEADERS_DEVICE']=0x3d7e33,ApiError[a6_0x5d43e5(0xa7)]=0x3d7e34,ApiError[a6_0x5d43e5(0x9e)]=0x3d7e35,__decorate([AnnErrorMsg(a6_0x5d43e5(0xaf)),__metadata(a6_0x5d43e5(0xb3),Object)],ApiError,a6_0x5d43e5(0xae),void 0x0),__decorate([AnnErrorMsg(a6_0x5d43e5(0x9d)),__metadata('design:type',Object)],ApiError,a6_0x5d43e5(0xb1),void 0x0),__decorate([AnnErrorMsg(a6_0x5d43e5(0xb7)),__metadata(a6_0x5d43e5(0xb3),Object)],ApiError,a6_0x5d43e5(0x9a),void 0x0),__decorate([AnnErrorMsg(a6_0x5d43e5(0x9b)),__metadata(a6_0x5d43e5(0xb3),Object)],ApiError,'HEADERS_CHECKCODE',void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a6_0x5d43e5(0xb3),Object)],ApiError,a6_0x5d43e5(0x9e),void 0x0),exports[a6_0x5d43e5(0x9f)]=ApiError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7_0xcdcd7f=a7_0x302c;(function(_0x4973c8,_0x10b7d1){const _0x331e7e=a7_0x302c,_0x59886d=_0x4973c8();while(!![]){try{const _0x315b92=-parseInt(_0x331e7e(0xaa))/0x1*(-parseInt(_0x331e7e(0xa1))/0x2)+parseInt(_0x331e7e(0xa9))/0x3*(-parseInt(_0x331e7e(0xa5))/0x4)+parseInt(_0x331e7e(0x9a))/0x5+parseInt(_0x331e7e(0xab))/0x6*(-parseInt(_0x331e7e(0xa4))/0x7)+parseInt(_0x331e7e(0xa7))/0x8+parseInt(_0x331e7e(0x9c))/0x9+parseInt(_0x331e7e(0x9e))/0xa*(-parseInt(_0x331e7e(0xa3))/0xb);if(_0x315b92===_0x10b7d1)break;else _0x59886d['push'](_0x59886d['shift']());}catch(_0x9eebc6){_0x59886d['push'](_0x59886d['shift']());}}}(a7_0x28d3,0x24f81));Object[a7_0xcdcd7f(0x9d)](exports,a7_0xcdcd7f(0x99),{'value':!![]}),exports['getAppsConfig']=void 0x0;const core_1=require(a7_0xcdcd7f(0xa6)),action_1=require(a7_0xcdcd7f(0xa0));function a7_0x28d3(){const _0x532481=['APPSCONFIG_KEY','../types/action','18296MJpQrM','AppsConfigTmp','53372reXtJW','21KZiBit','1098652quxrYm','@midwayjs/core','1673728qpkOSX','getClassMetadata','3DPdDnS','29IJRPXU','300606hLnPuO','getAppsConfig','__esModule','1075450bjLmrN','get','902529gXFZsD','defineProperty','440SoJeMk'];a7_0x28d3=function(){return _0x532481;};return a7_0x28d3();}function a7_0x302c(_0x2eefc7,_0xd00de2){const _0x28d303=a7_0x28d3();return a7_0x302c=function(_0x302c8a,_0x1025e2){_0x302c8a=_0x302c8a-0x98;let _0x5672c7=_0x28d303[_0x302c8a];return _0x5672c7;},a7_0x302c(_0x2eefc7,_0xd00de2);}function getAppsConfig(_0x413289){const _0x58ed0c=a7_0xcdcd7f,_0x2558f7=(0x0,core_1[_0x58ed0c(0xa8)])(action_1[_0x58ed0c(0x9f)],action_1[_0x58ed0c(0xa2)])||{};return _0x413289?lodash[_0x58ed0c(0x9b)](_0x2558f7,_0x413289):_0x2558f7;}exports[a7_0xcdcd7f(0x98)]=getAppsConfig;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8_0xc7ac51=a8_0xd130;(function(_0x37d510,_0x1553c0){const _0x433b92=a8_0xd130,_0x102a89=_0x37d510();while(!![]){try{const _0x4334fe=parseInt(_0x433b92(0x10a))/0x1*(parseInt(_0x433b92(0x115))/0x2)+-parseInt(_0x433b92(0x10e))/0x3*(-parseInt(_0x433b92(0xc8))/0x4)+-parseInt(_0x433b92(0xdf))/0x5*(-parseInt(_0x433b92(0xd7))/0x6)+-parseInt(_0x433b92(0xf7))/0x7*(-parseInt(_0x433b92(0xc4))/0x8)+parseInt(_0x433b92(0xe9))/0x9*(-parseInt(_0x433b92(0xea))/0xa)+parseInt(_0x433b92(0x108))/0xb*(parseInt(_0x433b92(0xc9))/0xc)+parseInt(_0x433b92(0x11b))/0xd*(-parseInt(_0x433b92(0x118))/0xe);if(_0x4334fe===_0x1553c0)break;else _0x102a89['push'](_0x102a89['shift']());}catch(_0x1c9215){_0x102a89['push'](_0x102a89['shift']());}}}(a8_0x3b2e,0xb42d3));function a8_0xd130(_0x461c24,_0x51dc1a){const _0x3b2efa=a8_0x3b2e();return a8_0xd130=function(_0xd1308c,_0x12b271){_0xd1308c=_0xd1308c-0xc1;let _0x52aea0=_0x3b2efa[_0xd1308c];return _0x52aea0;},a8_0xd130(_0x461c24,_0x51dc1a);}Object[a8_0xc7ac51(0xee)](exports,a8_0xc7ac51(0x107),{'value':!![]}),exports[a8_0xc7ac51(0x123)]=void 0x0;const lodash_1=require(a8_0xc7ac51(0x112)),validator_1=require('@anncic-api/validator'),core_1=require('@midwayjs/core'),core_2=require(a8_0xc7ac51(0xc5)),core_3=require(a8_0xc7ac51(0xc5)),action_1=require(a8_0xc7ac51(0xcb));function a8_0x3b2e(){const _0x1b594a=['flags.description','object','729NyrpbP','boolean','describe','RouteParamTypes','lodash','Number','BODY','1692CexdUy','routes','Boolean','1078FgSGNb','getClassExtendedMetadata','key','215293xMgaEf','iterator','summary','String','ACTION_ROUTE_KEY','FIELDS','get','string','getRoutes','ACTION_KEY','prefix','title','8UxZknP','@midwayjs/core','getMethodParamTypes','tagName','15676BCwtkY','421644IIbJno','-array','../types/action','route','min','module','FILESSTREAM','filter','method','find','array','name','request','default','5000862gOGNYE','flags.label','routerOptions','HEADERS','flags.default','push','PARAM','Object','5hyWnVi','isArray','listModule','path','filepath','metadata','children','allow','file','propertyData','9vBXmKu','11212490HbBzyI','rules','INJECT_CUSTOM_PARAM','indexOf','defineProperty','flags.presence','replace','RULES_KEY','startsWith','header','parameterIndex','required','description','6982171zNFgON','routerName','test','number','pprefix','文件上传-','File','type','body','getClassMetadata','function','args','length','FILESTREAM','items','limit','__esModule','44zuJkcL','concat','249NbCguP','/static/apitest'];a8_0x3b2e=function(){return _0x1b594a;};return a8_0x3b2e();}function getRoutes(_0x3758d8={'prefix':'/','module':![]}){const _0x279bcf=a8_0xc7ac51;var _0x4c38b3,_0x12ec8f;const _0x6dc74b=(0x0,core_3[_0x279bcf(0xe1)])(action_1[_0x279bcf(0xc1)]),_0x213721={},_0x4dc98f=Array['isArray'](_0x3758d8['filter']||[])?_0x3758d8[_0x279bcf(0xd0)]||[]:[_0x3758d8[_0x279bcf(0xd0)]];_0x348e70:for(const _0x4deb88 of _0x6dc74b){let _0x39763d=(0x0,core_3[_0x279bcf(0x100)])(action_1[_0x279bcf(0xc1)],_0x4deb88),_0x41429f=(0x0,core_3['getClassMetadata'])(action_1[_0x279bcf(0x11f)],_0x4deb88);if(_0x39763d&&_0x41429f){let _0x51603c=_0x39763d[_0x279bcf(0xc2)],_0x5d0d92={};if(_0x3758d8[_0x279bcf(0xce)]&&(0x0,lodash_1[_0x279bcf(0x121)])(_0x39763d,_0x279bcf(0xce),![])!=_0x3758d8[_0x279bcf(0xce)])continue _0x348e70;else{if(_0x3758d8['module']===![]&&!!(0x0,lodash_1[_0x279bcf(0x121)])(_0x39763d,_0x279bcf(0xce),null))continue _0x348e70;}if(_0x3758d8['prefix']&&!_0x51603c[_0x279bcf(0xf2)](_0x3758d8[_0x279bcf(0xc2)]))continue _0x348e70;_0x51603c!=='/'?(_0x5d0d92[_0x279bcf(0x11d)]=(_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xd9)][_0x279bcf(0xc7)])||(/^\//[_0x279bcf(0xf9)](_0x51603c)?_0x51603c['split']('/')[0x1]:_0x51603c),_0x5d0d92[_0x279bcf(0xf6)]=(_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xd9)]['description'])||_0x5d0d92[_0x279bcf(0x11d)],_0x5d0d92[_0x279bcf(0x116)]=[]):(_0x5d0d92[_0x279bcf(0x11d)]=(_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xd9)][_0x279bcf(0xc7)])||_0x279bcf(0xd6),_0x5d0d92['description']=(_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xd9)][_0x279bcf(0xf6)])||'',_0x5d0d92[_0x279bcf(0x116)]=[]);_0x3758d8[_0x279bcf(0xe3)]&&(_0x5d0d92[_0x279bcf(0xe3)]=_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xe3)]);(_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xfb)])&&(_0x5d0d92[_0x279bcf(0xc2)]=_0x39763d[_0x279bcf(0xfb)]);(_0x39763d===null||_0x39763d===void 0x0?void 0x0:_0x39763d[_0x279bcf(0xce)])&&(_0x5d0d92[_0x279bcf(0xce)]=_0x39763d[_0x279bcf(0xce)]);let _0x17354c=(0x0,core_3[_0x279bcf(0x100)])(core_2[_0x279bcf(0xec)],_0x4deb88)||{};if(typeof _0x41429f[Symbol[_0x279bcf(0x11c)]]===_0x279bcf(0x101))for(let _0x31d510 of _0x41429f){let _0x32d3ef={};_0x32d3ef[_0x279bcf(0xd1)]=_0x31d510['requestMethod'],_0x32d3ef[_0x279bcf(0xcc)]=(_0x51603c+_0x31d510[_0x279bcf(0xe2)])[_0x279bcf(0xf0)](/\/{1,}/,'/'),_0x32d3ef[_0x279bcf(0x11d)]=(_0x31d510===null||_0x31d510===void 0x0?void 0x0:_0x31d510[_0x279bcf(0xf8)])||_0x5d0d92[_0x279bcf(0x11d)]||_0x279bcf(0xd6),_0x32d3ef[_0x279bcf(0xf6)]=(_0x31d510===null||_0x31d510===void 0x0?void 0x0:_0x31d510[_0x279bcf(0xf6)])||'',_0x32d3ef['request']=[];if(!(0x0,lodash_1['startsWith'])(_0x32d3ef[_0x279bcf(0xcc)],'static/apitest')&&!(0x0,lodash_1[_0x279bcf(0xf2)])(_0x32d3ef['route'],_0x279bcf(0x10b))&&_0x4dc98f[_0x279bcf(0xed)](_0x32d3ef[_0x279bcf(0xcc)])===-0x1){if(!(_0x3758d8===null||_0x3758d8===void 0x0?void 0x0:_0x3758d8['noreq'])){let _0x467e04=(0x0,core_3[_0x279bcf(0xc6)])(new _0x4deb88(),_0x31d510['method']);for(const _0x347565 in _0x467e04){let _0x3bb13e=(_0x4c38b3=_0x17354c[_0x31d510[_0x279bcf(0xd1)]])===null||_0x4c38b3===void 0x0?void 0x0:_0x4c38b3['find'](_0x20dd83=>_0x20dd83[_0x279bcf(0xf4)]==_0x347565&&_0x20dd83[_0x279bcf(0x11a)]===core_2['WEB_ROUTER_PARAM_KEY']&&(_0x20dd83===null||_0x20dd83===void 0x0?void 0x0:_0x20dd83['metadata']));if(_0x3bb13e===null||_0x3bb13e===void 0x0?void 0x0:_0x3bb13e['metadata']){let _0x24d747=convertTypeToString(_0x3bb13e[_0x279bcf(0xe4)][_0x279bcf(0xfe)]||0x0);if(['query',_0x279bcf(0xff)][_0x279bcf(0xed)](_0x24d747)!=-0x1&&_0x3bb13e['metadata']['propertyData'][_0x279bcf(0xed)](':')==-0x1&&!_0x32d3ef[_0x279bcf(0xd5)][_0x279bcf(0xd2)](_0x504033=>_0x504033[_0x279bcf(0x11a)]==_0x3bb13e['metadata'][_0x279bcf(0xe8)]))_0x32d3ef['request'][_0x279bcf(0xdc)]({'key':_0x3bb13e[_0x279bcf(0xe4)]['propertyData'],'title':_0x3bb13e[_0x279bcf(0xe4)][_0x279bcf(0xe8)],'type':convertSchemaType(_0x467e04[_0x3bb13e['parameterIndex']]['name']),'required':![],'default':'','desc':''});else{if(_0x24d747==_0x279bcf(0xe7)){let _0x5c8765=((_0x12ec8f=_0x3bb13e===null||_0x3bb13e===void 0x0?void 0x0:_0x3bb13e[_0x279bcf(0xe4)])===null||_0x12ec8f===void 0x0?void 0x0:_0x12ec8f[_0x279bcf(0xe8)])||'file';_0x5c8765[_0x279bcf(0xed)](':')==-0x1&&!_0x32d3ef['request'][_0x279bcf(0xd2)](_0x853f02=>_0x853f02[_0x279bcf(0x11a)]==_0x5c8765&&_0x853f02[_0x279bcf(0xfe)]=='file')&&_0x32d3ef['request'][_0x279bcf(0xdc)]({'key':_0x5c8765,'title':_0x279bcf(0xfc)+_0x5c8765,'type':_0x279bcf(0xe7),'required':!![],'default':'','desc':''});}}}else{const _0x473d3d=(0x0,core_3[_0x279bcf(0x119)])(validator_1[_0x279bcf(0xf1)],_0x467e04[_0x347565]);_0x473d3d&&_0x32d3ef['request'][_0x279bcf(0xdc)](...getJoiRequest(_0x473d3d));}}}_0x5d0d92['routes'][_0x279bcf(0xdc)](_0x32d3ef);}}if(_0x5d0d92[_0x279bcf(0x116)][_0x279bcf(0x103)]>0x0){let _0x2e11c5=_0x213721[_0x51603c];_0x2e11c5?(_0x2e11c5['summary']!=_0x5d0d92[_0x279bcf(0x11d)]&&(_0x2e11c5[_0x279bcf(0x11d)]=_0x2e11c5[_0x279bcf(0x11d)]+','+_0x5d0d92[_0x279bcf(0x11d)]),_0x2e11c5[_0x279bcf(0xf6)]!=_0x5d0d92[_0x279bcf(0xf6)]&&(_0x2e11c5[_0x279bcf(0xf6)]=_0x2e11c5[_0x279bcf(0xf6)]+','+_0x5d0d92[_0x279bcf(0xf6)]),_0x2e11c5['routes']=_0x2e11c5[_0x279bcf(0x116)][_0x279bcf(0x109)](_0x5d0d92[_0x279bcf(0x116)]),_0x213721[_0x51603c]=_0x2e11c5):_0x213721[_0x51603c]=_0x5d0d92;}}}return _0x213721;}exports[a8_0xc7ac51(0x123)]=getRoutes;function getJoiRequest(_0x3f6a8d){const _0x273ea4=a8_0xc7ac51,_0x53df11=[];for(let _0x96f7d5 in _0x3f6a8d){const _0x338ac9={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x2f6168=typeof _0x3f6a8d[_0x96f7d5][_0x273ea4(0x110)]=='function'?_0x3f6a8d[_0x96f7d5]['describe']():_0x3f6a8d[_0x96f7d5];_0x338ac9[_0x273ea4(0x11a)]=_0x96f7d5,_0x338ac9['type']=_0x2f6168['type'],_0x338ac9[_0x273ea4(0xc3)]=(0x0,lodash_1[_0x273ea4(0x121)])(_0x2f6168,_0x273ea4(0xd8),_0x96f7d5),_0x338ac9[_0x273ea4(0xd6)]=(0x0,lodash_1[_0x273ea4(0x121)])(_0x2f6168,_0x273ea4(0xdb),''),_0x338ac9[_0x273ea4(0xf5)]=(0x0,lodash_1[_0x273ea4(0x121)])(_0x2f6168,_0x273ea4(0xef),'')==_0x273ea4(0xf5),_0x338ac9[_0x273ea4(0xf6)]=(0x0,lodash_1[_0x273ea4(0x121)])(_0x2f6168,_0x273ea4(0x10c),'');if(_0x2f6168[_0x273ea4(0xfe)]==_0x273ea4(0x10d))_0x338ac9[_0x273ea4(0xe5)]=getJoiRequest(_0x2f6168['keys']);else _0x2f6168[_0x273ea4(0xfe)]==_0x273ea4(0xd3)&&_0x2f6168[_0x273ea4(0x105)]&&Array[_0x273ea4(0xe0)](_0x2f6168[_0x273ea4(0x105)])&&_0x2f6168[_0x273ea4(0x105)][0x0]&&console['log'](_0x96f7d5+_0x273ea4(0xca),_0x2f6168);_0x2f6168['allow']&&Array['isArray'](_0x2f6168[_0x273ea4(0xe6)])&&_0x2f6168['allow'][_0x273ea4(0x103)]>0x0&&(_0x338ac9[_0x273ea4(0xf6)]='只允许:['+_0x2f6168[_0x273ea4(0xe6)]['join'](',')+'];'+_0x338ac9[_0x273ea4(0xf6)]);if(_0x338ac9[_0x273ea4(0x11a)]&&_0x338ac9['type']){const _0x3eaa8e={};for(const _0x3c85e2 of _0x2f6168[_0x273ea4(0xeb)]||[]){if(_0x3c85e2[_0x273ea4(0xd4)]===_0x273ea4(0xcd)&&_0x3c85e2[_0x273ea4(0x102)])_0x3eaa8e[_0x273ea4(0xcd)]=_0x3c85e2[_0x273ea4(0x102)]['limit'];else _0x3c85e2[_0x273ea4(0xd4)]==='max'&&(_0x3eaa8e['max']=_0x3c85e2['args'][_0x273ea4(0x106)]);}_0x338ac9[_0x273ea4(0xeb)]=_0x3eaa8e;}_0x338ac9[_0x273ea4(0x11a)]&&_0x338ac9[_0x273ea4(0xc3)]&&_0x53df11[_0x273ea4(0xdc)](_0x338ac9);}return _0x53df11;}function convertSchemaType(_0x35490b){const _0x28c3de=a8_0xc7ac51;switch(_0x35490b){case _0x28c3de(0xde):return _0x28c3de(0x10d);case _0x28c3de(0x117):return _0x28c3de(0x10f);case _0x28c3de(0x113):return _0x28c3de(0xfa);case _0x28c3de(0x11e):return _0x28c3de(0x122);case _0x28c3de(0xfd):return _0x28c3de(0xe7);default:return'string';}}function convertTypeToString(_0x5ce2cd){const _0x1bf519=a8_0xc7ac51;switch(_0x5ce2cd){case core_1[_0x1bf519(0x111)][_0x1bf519(0xda)]:return _0x1bf519(0xf3);case core_1[_0x1bf519(0x111)]['QUERY']:return'query';case core_1[_0x1bf519(0x111)][_0x1bf519(0xdd)]:return _0x1bf519(0xe2);case core_1[_0x1bf519(0x111)][_0x1bf519(0x114)]:return'body';case core_1[_0x1bf519(0x111)][_0x1bf519(0x120)]:case core_1['RouteParamTypes'][_0x1bf519(0xcf)]:case core_1[_0x1bf519(0x111)][_0x1bf519(0x104)]:return _0x1bf519(0xe7);default:return _0x1bf519(0xf3);}}
|
|
1
|
+
'use strict';function a8_0x2e62(_0x31de64,_0x272d53){const _0x7ee6bd=a8_0x7ee6();return a8_0x2e62=function(_0x2e62ac,_0x3de377){_0x2e62ac=_0x2e62ac-0x127;let _0x304b16=_0x7ee6bd[_0x2e62ac];return _0x304b16;},a8_0x2e62(_0x31de64,_0x272d53);}const a8_0x3be03e=a8_0x2e62;(function(_0x3596ee,_0x439be9){const _0x4ae18a=a8_0x2e62,_0xcd919a=_0x3596ee();while(!![]){try{const _0x49664e=parseInt(_0x4ae18a(0x13d))/0x1*(parseInt(_0x4ae18a(0x12a))/0x2)+-parseInt(_0x4ae18a(0x145))/0x3*(-parseInt(_0x4ae18a(0x12e))/0x4)+parseInt(_0x4ae18a(0x15c))/0x5+parseInt(_0x4ae18a(0x14c))/0x6+parseInt(_0x4ae18a(0x175))/0x7*(-parseInt(_0x4ae18a(0x17c))/0x8)+parseInt(_0x4ae18a(0x161))/0x9+parseInt(_0x4ae18a(0x186))/0xa*(-parseInt(_0x4ae18a(0x12d))/0xb);if(_0x49664e===_0x439be9)break;else _0xcd919a['push'](_0xcd919a['shift']());}catch(_0x25b654){_0xcd919a['push'](_0xcd919a['shift']());}}}(a8_0x7ee6,0xcbd93));Object[a8_0x3be03e(0x167)](exports,a8_0x3be03e(0x14d),{'value':!![]}),exports[a8_0x3be03e(0x174)]=void 0x0;const lodash_1=require(a8_0x3be03e(0x128)),validator_1=require(a8_0x3be03e(0x159)),core_1=require(a8_0x3be03e(0x12f)),core_2=require(a8_0x3be03e(0x12f)),core_3=require('@midwayjs/core'),action_1=require(a8_0x3be03e(0x180));function a8_0x7ee6(){const _0x13ab40=['defineProperty','replace','test','flags.description','module','file','pprefix','prefix','key','allow','find','route','push','getRoutes','3206XYubFP','keys','args','object','filter','required','method','13152KToKvZ','flags.presence','length','description','../types/action','FILESSTREAM','routes','FIELDS','只允许:[','文件上传-','24590WKbhVu','get','summary','default','lodash','requestMethod','135392xqswIr','path','isArray','7711XFkRof','1356aaXgwO','@midwayjs/core','iterator','function','flags.default','query','noreq','boolean','describe','header','min','WEB_ROUTER_PARAM_KEY','indexOf','flags.label','INJECT_CUSTOM_PARAM','4IHQaWw','HEADERS','routerOptions','ACTION_KEY','concat','Boolean','getMethodParamTypes','name','4989ULVWYT','log','routerName','items','type','body','startsWith','6299736idKZuw','__esModule','children','rules','number','metadata','tagName','join','RULES_KEY','File','String','static/apitest','Object','@anncic-api/validator','FILESTREAM','request','2356290lxYAVL','title','propertyData','limit','array','8603271UwLYFj','getClassMetadata','string','filepath','/static/apitest','RouteParamTypes'];a8_0x7ee6=function(){return _0x13ab40;};return a8_0x7ee6();}function getRoutes(_0x2649c1={'prefix':'/','module':![]}){const _0x457d21=a8_0x3be03e;var _0x27242b,_0x1c655e;const _0x21f3af=(0x0,core_3['listModule'])(action_1[_0x457d21(0x140)]),_0x4626a8={},_0x4b2da3=Array[_0x457d21(0x12c)](_0x2649c1[_0x457d21(0x179)]||[])?_0x2649c1[_0x457d21(0x179)]||[]:[_0x2649c1['filter']];_0x9ffa9e:for(const _0xd32988 of _0x21f3af){let _0x2e562d=(0x0,core_3[_0x457d21(0x162)])(action_1['ACTION_KEY'],_0xd32988),_0x498aaf=(0x0,core_3[_0x457d21(0x162)])(action_1['ACTION_ROUTE_KEY'],_0xd32988);if(_0x2e562d&&_0x498aaf){let _0x477a4a=_0x2e562d[_0x457d21(0x16e)],_0xaed9a2={};if(_0x2649c1[_0x457d21(0x16b)]&&(0x0,lodash_1[_0x457d21(0x187)])(_0x2e562d,'module',![])!=_0x2649c1[_0x457d21(0x16b)])continue _0x9ffa9e;else{if(_0x2649c1[_0x457d21(0x16b)]===![]&&!!(0x0,lodash_1['get'])(_0x2e562d,_0x457d21(0x16b),null))continue _0x9ffa9e;}if(_0x2649c1[_0x457d21(0x16e)]&&!_0x477a4a[_0x457d21(0x14b)](_0x2649c1['prefix']))continue _0x9ffa9e;_0x477a4a!=='/'?(_0xaed9a2[_0x457d21(0x188)]=(_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d[_0x457d21(0x13f)][_0x457d21(0x152)])||(/^\//[_0x457d21(0x169)](_0x477a4a)?_0x477a4a['split']('/')[0x1]:_0x477a4a),_0xaed9a2['description']=(_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d['routerOptions']['description'])||_0xaed9a2[_0x457d21(0x188)],_0xaed9a2[_0x457d21(0x182)]=[]):(_0xaed9a2[_0x457d21(0x188)]=(_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d[_0x457d21(0x13f)][_0x457d21(0x152)])||_0x457d21(0x127),_0xaed9a2[_0x457d21(0x17f)]=(_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d[_0x457d21(0x13f)][_0x457d21(0x17f)])||'',_0xaed9a2[_0x457d21(0x182)]=[]);_0x2649c1[_0x457d21(0x164)]&&(_0xaed9a2['filepath']=_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d[_0x457d21(0x164)]);(_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d[_0x457d21(0x16d)])&&(_0xaed9a2[_0x457d21(0x16e)]=_0x2e562d[_0x457d21(0x16d)]);(_0x2e562d===null||_0x2e562d===void 0x0?void 0x0:_0x2e562d['module'])&&(_0xaed9a2['module']=_0x2e562d[_0x457d21(0x16b)]);let _0x303274=(0x0,core_3[_0x457d21(0x162)])(core_2[_0x457d21(0x13c)],_0xd32988)||{};if(typeof _0x498aaf[Symbol[_0x457d21(0x130)]]===_0x457d21(0x131))for(let _0x247c71 of _0x498aaf){let _0x499b50={};_0x499b50['method']=_0x247c71[_0x457d21(0x129)],_0x499b50['route']=(_0x477a4a+_0x247c71[_0x457d21(0x12b)])[_0x457d21(0x168)](/\/{1,}/,'/'),_0x499b50[_0x457d21(0x188)]=(_0x247c71===null||_0x247c71===void 0x0?void 0x0:_0x247c71[_0x457d21(0x147)])||_0xaed9a2[_0x457d21(0x188)]||_0x457d21(0x127),_0x499b50['description']=(_0x247c71===null||_0x247c71===void 0x0?void 0x0:_0x247c71['description'])||'',_0x499b50[_0x457d21(0x15b)]=[];if(!(0x0,lodash_1[_0x457d21(0x14b)])(_0x499b50[_0x457d21(0x172)],_0x457d21(0x157))&&!(0x0,lodash_1[_0x457d21(0x14b)])(_0x499b50[_0x457d21(0x172)],_0x457d21(0x165))&&_0x4b2da3[_0x457d21(0x13a)](_0x499b50[_0x457d21(0x172)])===-0x1){if(!(_0x2649c1===null||_0x2649c1===void 0x0?void 0x0:_0x2649c1[_0x457d21(0x134)])){let _0x242f4f=(0x0,core_3[_0x457d21(0x143)])(new _0xd32988(),_0x247c71[_0x457d21(0x17b)]);for(const _0x1be3af in _0x242f4f){let _0x2f38d8=(_0x27242b=_0x303274[_0x247c71[_0x457d21(0x17b)]])===null||_0x27242b===void 0x0?void 0x0:_0x27242b[_0x457d21(0x171)](_0xa6e858=>_0xa6e858['parameterIndex']==_0x1be3af&&_0xa6e858[_0x457d21(0x16f)]===core_2[_0x457d21(0x139)]&&(_0xa6e858===null||_0xa6e858===void 0x0?void 0x0:_0xa6e858[_0x457d21(0x151)]));if(_0x2f38d8===null||_0x2f38d8===void 0x0?void 0x0:_0x2f38d8[_0x457d21(0x151)]){let _0x15f3f9=convertTypeToString(_0x2f38d8[_0x457d21(0x151)][_0x457d21(0x149)]||0x0);if([_0x457d21(0x133),_0x457d21(0x14a)][_0x457d21(0x13a)](_0x15f3f9)!=-0x1&&_0x2f38d8[_0x457d21(0x151)][_0x457d21(0x15e)][_0x457d21(0x13a)](':')==-0x1&&!_0x499b50[_0x457d21(0x15b)][_0x457d21(0x171)](_0x3960a0=>_0x3960a0[_0x457d21(0x16f)]==_0x2f38d8[_0x457d21(0x151)]['propertyData']))_0x499b50[_0x457d21(0x15b)][_0x457d21(0x173)]({'key':_0x2f38d8[_0x457d21(0x151)][_0x457d21(0x15e)],'title':_0x2f38d8[_0x457d21(0x151)][_0x457d21(0x15e)],'type':convertSchemaType(_0x242f4f[_0x2f38d8['parameterIndex']][_0x457d21(0x144)]),'required':![],'default':'','desc':''});else{if(_0x15f3f9==_0x457d21(0x16c)){let _0xe1b0be=((_0x1c655e=_0x2f38d8===null||_0x2f38d8===void 0x0?void 0x0:_0x2f38d8[_0x457d21(0x151)])===null||_0x1c655e===void 0x0?void 0x0:_0x1c655e[_0x457d21(0x15e)])||_0x457d21(0x16c);_0xe1b0be['indexOf'](':')==-0x1&&!_0x499b50[_0x457d21(0x15b)][_0x457d21(0x171)](_0x293479=>_0x293479['key']==_0xe1b0be&&_0x293479[_0x457d21(0x149)]==_0x457d21(0x16c))&&_0x499b50[_0x457d21(0x15b)][_0x457d21(0x173)]({'key':_0xe1b0be,'title':_0x457d21(0x185)+_0xe1b0be,'type':_0x457d21(0x16c),'required':!![],'default':'','desc':''});}}}else{const _0x2f89be=(0x0,core_3['getClassExtendedMetadata'])(validator_1[_0x457d21(0x154)],_0x242f4f[_0x1be3af]);_0x2f89be&&_0x499b50[_0x457d21(0x15b)][_0x457d21(0x173)](...getJoiRequest(_0x2f89be));}}}_0xaed9a2[_0x457d21(0x182)][_0x457d21(0x173)](_0x499b50);}}if(_0xaed9a2[_0x457d21(0x182)][_0x457d21(0x17e)]>0x0){let _0x50e4cc=_0x4626a8[_0x477a4a];_0x50e4cc?(_0x50e4cc['summary']!=_0xaed9a2[_0x457d21(0x188)]&&(_0x50e4cc[_0x457d21(0x188)]=_0x50e4cc[_0x457d21(0x188)]+','+_0xaed9a2[_0x457d21(0x188)]),_0x50e4cc[_0x457d21(0x17f)]!=_0xaed9a2[_0x457d21(0x17f)]&&(_0x50e4cc[_0x457d21(0x17f)]=_0x50e4cc[_0x457d21(0x17f)]+','+_0xaed9a2[_0x457d21(0x17f)]),_0x50e4cc[_0x457d21(0x182)]=_0x50e4cc[_0x457d21(0x182)][_0x457d21(0x141)](_0xaed9a2['routes']),_0x4626a8[_0x477a4a]=_0x50e4cc):_0x4626a8[_0x477a4a]=_0xaed9a2;}}}return _0x4626a8;}exports[a8_0x3be03e(0x174)]=getRoutes;function getJoiRequest(_0x49ec19){const _0x1b94db=a8_0x3be03e,_0x1ecff7=[];for(let _0x46e560 in _0x49ec19){const _0xfc7437={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x1cbdaa=typeof _0x49ec19[_0x46e560][_0x1b94db(0x136)]==_0x1b94db(0x131)?_0x49ec19[_0x46e560][_0x1b94db(0x136)]():_0x49ec19[_0x46e560];_0xfc7437[_0x1b94db(0x16f)]=_0x46e560,_0xfc7437['type']=_0x1cbdaa[_0x1b94db(0x149)],_0xfc7437[_0x1b94db(0x15d)]=(0x0,lodash_1[_0x1b94db(0x187)])(_0x1cbdaa,_0x1b94db(0x13b),_0x46e560),_0xfc7437[_0x1b94db(0x127)]=(0x0,lodash_1['get'])(_0x1cbdaa,_0x1b94db(0x132),''),_0xfc7437[_0x1b94db(0x17a)]=(0x0,lodash_1[_0x1b94db(0x187)])(_0x1cbdaa,_0x1b94db(0x17d),'')==_0x1b94db(0x17a),_0xfc7437[_0x1b94db(0x17f)]=(0x0,lodash_1[_0x1b94db(0x187)])(_0x1cbdaa,_0x1b94db(0x16a),'');if(_0x1cbdaa[_0x1b94db(0x149)]==_0x1b94db(0x178))_0xfc7437[_0x1b94db(0x14e)]=getJoiRequest(_0x1cbdaa[_0x1b94db(0x176)]);else _0x1cbdaa['type']==_0x1b94db(0x160)&&_0x1cbdaa[_0x1b94db(0x148)]&&Array[_0x1b94db(0x12c)](_0x1cbdaa[_0x1b94db(0x148)])&&_0x1cbdaa[_0x1b94db(0x148)][0x0]&&console[_0x1b94db(0x146)](_0x46e560+'-array',_0x1cbdaa);_0x1cbdaa[_0x1b94db(0x170)]&&Array[_0x1b94db(0x12c)](_0x1cbdaa[_0x1b94db(0x170)])&&_0x1cbdaa[_0x1b94db(0x170)][_0x1b94db(0x17e)]>0x0&&(_0xfc7437[_0x1b94db(0x17f)]=_0x1b94db(0x184)+_0x1cbdaa[_0x1b94db(0x170)][_0x1b94db(0x153)](',')+'];'+_0xfc7437[_0x1b94db(0x17f)]);if(_0xfc7437[_0x1b94db(0x16f)]&&_0xfc7437[_0x1b94db(0x149)]){const _0x1711ba={};for(const _0x8070e8 of _0x1cbdaa[_0x1b94db(0x14f)]||[]){if(_0x8070e8[_0x1b94db(0x144)]===_0x1b94db(0x138)&&_0x8070e8['args'])_0x1711ba['min']=_0x8070e8[_0x1b94db(0x177)][_0x1b94db(0x15f)];else _0x8070e8[_0x1b94db(0x144)]==='max'&&(_0x1711ba['max']=_0x8070e8[_0x1b94db(0x177)][_0x1b94db(0x15f)]);}_0xfc7437[_0x1b94db(0x14f)]=_0x1711ba;}_0xfc7437['key']&&_0xfc7437['title']&&_0x1ecff7[_0x1b94db(0x173)](_0xfc7437);}return _0x1ecff7;}function convertSchemaType(_0x91dc7c){const _0x22654b=a8_0x3be03e;switch(_0x91dc7c){case _0x22654b(0x158):return'object';case _0x22654b(0x142):return _0x22654b(0x135);case'Number':return _0x22654b(0x150);case _0x22654b(0x156):return'string';case _0x22654b(0x155):return _0x22654b(0x16c);default:return _0x22654b(0x163);}}function convertTypeToString(_0x269bae){const _0x22ce69=a8_0x3be03e;switch(_0x269bae){case core_1[_0x22ce69(0x166)][_0x22ce69(0x13e)]:return _0x22ce69(0x137);case core_1['RouteParamTypes']['QUERY']:return _0x22ce69(0x133);case core_1[_0x22ce69(0x166)]['PARAM']:return _0x22ce69(0x12b);case core_1['RouteParamTypes']['BODY']:return _0x22ce69(0x14a);case core_1[_0x22ce69(0x166)][_0x22ce69(0x183)]:case core_1['RouteParamTypes'][_0x22ce69(0x181)]:case core_1[_0x22ce69(0x166)][_0x22ce69(0x15a)]:return _0x22ce69(0x16c);default:return _0x22ce69(0x137);}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0x5e7adb=a9_0x3c83;(function(_0x136c37,_0x5df63a){var _0x2348ec=a9_0x3c83,_0x50c480=_0x136c37();while(!![]){try{var _0x4815f1=parseInt(_0x2348ec(0x212))/0x1+parseInt(_0x2348ec(0x20a))/0x2*(-parseInt(_0x2348ec(0x1ef))/0x3)+parseInt(_0x2348ec(0x1ec))/0x4*(parseInt(_0x2348ec(0x1ff))/0x5)+parseInt(_0x2348ec(0x204))/0x6*(parseInt(_0x2348ec(0x224))/0x7)+-parseInt(_0x2348ec(0x1f2))/0x8*(-parseInt(_0x2348ec(0x1f8))/0x9)+-parseInt(_0x2348ec(0x21e))/0xa*(parseInt(_0x2348ec(0x20b))/0xb)+-parseInt(_0x2348ec(0x200))/0xc*(parseInt(_0x2348ec(0x22c))/0xd);if(_0x4815f1===_0x5df63a)break;else _0x50c480['push'](_0x50c480['shift']());}catch(_0x79a1b){_0x50c480['push'](_0x50c480['shift']());}}}(a9_0x2391,0x25f9c));var __createBinding=this&&this[a9_0x5e7adb(0x217)]||(Object[a9_0x5e7adb(0x205)]?function(_0x2c9373,_0x360f5f,_0x43bcdc,_0x373ce1){var _0x2604e9=a9_0x5e7adb;if(_0x373ce1===undefined)_0x373ce1=_0x43bcdc;var _0x2313d5=Object[_0x2604e9(0x21d)](_0x360f5f,_0x43bcdc);(!_0x2313d5||(_0x2604e9(0x21c)in _0x2313d5?!_0x360f5f[_0x2604e9(0x211)]:_0x2313d5[_0x2604e9(0x1fc)]||_0x2313d5[_0x2604e9(0x1f4)]))&&(_0x2313d5={'enumerable':!![],'get':function(){return _0x360f5f[_0x43bcdc];}}),Object['defineProperty'](_0x2c9373,_0x373ce1,_0x2313d5);}:function(_0x7c6e28,_0x1ccc59,_0x3515b3,_0x2eb943){if(_0x2eb943===undefined)_0x2eb943=_0x3515b3;_0x7c6e28[_0x2eb943]=_0x1ccc59[_0x3515b3];}),__exportStar=this&&this[a9_0x5e7adb(0x213)]||function(_0x24ff21,_0x4132ab){var _0x33396c=a9_0x5e7adb;for(var _0x358def in _0x24ff21)if(_0x358def!==_0x33396c(0x1fd)&&!Object[_0x33396c(0x21a)][_0x33396c(0x207)][_0x33396c(0x20d)](_0x4132ab,_0x358def))__createBinding(_0x4132ab,_0x24ff21,_0x358def);};Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x211),{'value':!![]}),exports['getAppsConfig']=exports[a9_0x5e7adb(0x202)]=exports['Scope']=exports[a9_0x5e7adb(0x1fa)]=exports[a9_0x5e7adb(0x1f3)]=exports[a9_0x5e7adb(0x206)]=exports[a9_0x5e7adb(0x1eb)]=exports[a9_0x5e7adb(0x1f1)]=exports[a9_0x5e7adb(0x219)]=exports[a9_0x5e7adb(0x201)]=exports['Query']=exports[a9_0x5e7adb(0x1f5)]=exports[a9_0x5e7adb(0x203)]=exports['Fields']=exports[a9_0x5e7adb(0x22a)]=exports[a9_0x5e7adb(0x210)]=exports['Configuration']=exports[a9_0x5e7adb(0x20f)]=exports[a9_0x5e7adb(0x216)]=exports[a9_0x5e7adb(0x1ee)]=exports[a9_0x5e7adb(0x1f7)]=exports[a9_0x5e7adb(0x222)]=exports[a9_0x5e7adb(0x218)]=exports['ApiError']=exports[a9_0x5e7adb(0x223)]=exports[a9_0x5e7adb(0x215)]=exports[a9_0x5e7adb(0x20c)]=exports['Api']=void 0x0;const getAppsConfig_1=require(a9_0x5e7adb(0x22d));Object[a9_0x5e7adb(0x20e)](exports,'getAppsConfig',{'enumerable':!![],'get':function(){var _0x52bb10=a9_0x5e7adb;return getAppsConfig_1[_0x52bb10(0x208)];}}),__exportStar(require(a9_0x5e7adb(0x1fe)),exports),__exportStar(require(a9_0x5e7adb(0x22b)),exports);var ActionApi_1=require(a9_0x5e7adb(0x21f));Object['defineProperty'](exports,a9_0x5e7adb(0x1f0),{'enumerable':!![],'get':function(){return ActionApi_1['Api'];}});var Action_1=require(a9_0x5e7adb(0x225));Object['defineProperty'](exports,'Action',{'enumerable':!![],'get':function(){var _0x2eceee=a9_0x5e7adb;return Action_1[_0x2eceee(0x20c)];}});var ActionApitest_1=require(a9_0x5e7adb(0x229));Object[a9_0x5e7adb(0x20e)](exports,'Apitest',{'enumerable':!![],'get':function(){return ActionApitest_1['Apitest'];}});var getRoutes_1=require(a9_0x5e7adb(0x220));Object['defineProperty'](exports,'getRoutes',{'enumerable':!![],'get':function(){return getRoutes_1['getRoutes'];}});var ApiError_1=require(a9_0x5e7adb(0x1f6));Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x221),{'enumerable':!![],'get':function(){var _0x29c426=a9_0x5e7adb;return ApiError_1[_0x29c426(0x221)];}});var cache_1=require('@anncic-api/cache');Object['defineProperty'](exports,a9_0x5e7adb(0x218),{'enumerable':!![],'get':function(){var _0x523a97=a9_0x5e7adb;return cache_1[_0x523a97(0x218)];}});var event_1=require(a9_0x5e7adb(0x21b));Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x222),{'enumerable':!![],'get':function(){return event_1['EventService'];}});var ApiService_1=require('./service/ApiService');Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x1f7),{'enumerable':!![],'get':function(){var _0x28ec2f=a9_0x5e7adb;return ApiService_1[_0x28ec2f(0x1f7)];}});var ExcelService_1=require('./service/ExcelService');Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x1ee),{'enumerable':!![],'get':function(){var _0x3cb096=a9_0x5e7adb;return ExcelService_1[_0x3cb096(0x1ee)];}});var validator_1=require(a9_0x5e7adb(0x1ed));Object['defineProperty'](exports,a9_0x5e7adb(0x216),{'enumerable':!![],'get':function(){var _0x9b4ac1=a9_0x5e7adb;return validator_1[_0x9b4ac1(0x216)];}}),Object[a9_0x5e7adb(0x20e)](exports,'ValidatorService',{'enumerable':!![],'get':function(){var _0x42c011=a9_0x5e7adb;return validator_1[_0x42c011(0x20f)];}});var configuration_1=require(a9_0x5e7adb(0x228));Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x214),{'enumerable':!![],'get':function(){var _0x57221e=a9_0x5e7adb;return configuration_1[_0x57221e(0x1f9)];}});var core_1=require(a9_0x5e7adb(0x227));Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x210),{'enumerable':!![],'get':function(){var _0x5ee74e=a9_0x5e7adb;return core_1[_0x5ee74e(0x210)];}}),Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x22a),{'enumerable':!![],'get':function(){var _0x25277a=a9_0x5e7adb;return core_1[_0x25277a(0x22a)];}}),Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x226),{'enumerable':!![],'get':function(){return core_1['Fields'];}}),Object['defineProperty'](exports,a9_0x5e7adb(0x203),{'enumerable':!![],'get':function(){var _0x334938=a9_0x5e7adb;return core_1[_0x334938(0x203)];}}),Object['defineProperty'](exports,a9_0x5e7adb(0x1f5),{'enumerable':!![],'get':function(){return core_1['Param'];}}),Object[a9_0x5e7adb(0x20e)](exports,'Query',{'enumerable':!![],'get':function(){var _0x26c528=a9_0x5e7adb;return core_1[_0x26c528(0x1fb)];}}),Object['defineProperty'](exports,a9_0x5e7adb(0x201),{'enumerable':!![],'get':function(){var _0x2bbc7d=a9_0x5e7adb;return core_1[_0x2bbc7d(0x201)];}}),Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x219),{'enumerable':!![],'get':function(){var _0xe4f611=a9_0x5e7adb;return core_1[_0xe4f611(0x219)];}});var core_2=require(a9_0x5e7adb(0x227));function a9_0x3c83(_0x3b56b6,_0x48a187){var _0x239162=a9_0x2391();return a9_0x3c83=function(_0x3c83d3,_0x344865){_0x3c83d3=_0x3c83d3-0x1eb;var _0x58fa18=_0x239162[_0x3c83d3];return _0x58fa18;},a9_0x3c83(_0x3b56b6,_0x48a187);}function a9_0x2391(){var _0x532654=['3iPfVbV','Api','App','362536BuXSap','Provide','configurable','Param','./exception/ApiError','ApiService','45knIWAe','CustomConfiguration','Inject','Query','writable','default','./types/common','556675NyBHal','12qkdwjp','Headers','ScopeEnum','Body','12iDFlYk','create','Logger','hasOwnProperty','getAppsConfig','Scope','481646yXdSVC','106810pBjiMM','Action','call','defineProperty','ValidatorService','File','__esModule','279817uEyqVk','__exportStar','Configuration','Apitest','ValidatorError','__createBinding','CacheService','Init','prototype','@anncic-api/event','get','getOwnPropertyDescriptor','110WQepKJ','./decorator/ActionApi','./helper/getRoutes','ApiError','EventService','getRoutes','534422KiLBRo','./decorator/Action','Fields','@midwayjs/core','./configuration','./decorator/ActionApitest','Files','./service/ApitestService','4921579zhNTBi','./helper/getAppsConfig','Config','8mwuxCi','@anncic-api/validator','ExcelService'];a9_0x2391=function(){return _0x532654;};return a9_0x2391();}Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x1f1),{'enumerable':!![],'get':function(){var _0x53b55f=a9_0x5e7adb;return core_2[_0x53b55f(0x1f1)];}}),Object[a9_0x5e7adb(0x20e)](exports,'Config',{'enumerable':!![],'get':function(){var _0x53c0d7=a9_0x5e7adb;return core_2[_0x53c0d7(0x1eb)];}}),Object['defineProperty'](exports,a9_0x5e7adb(0x206),{'enumerable':!![],'get':function(){var _0x31885b=a9_0x5e7adb;return core_2[_0x31885b(0x206)];}}),Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x1f3),{'enumerable':!![],'get':function(){var _0x155e48=a9_0x5e7adb;return core_2[_0x155e48(0x1f3)];}}),Object[a9_0x5e7adb(0x20e)](exports,a9_0x5e7adb(0x1fa),{'enumerable':!![],'get':function(){var _0x3cc2f9=a9_0x5e7adb;return core_2[_0x3cc2f9(0x1fa)];}}),Object['defineProperty'](exports,a9_0x5e7adb(0x209),{'enumerable':!![],'get':function(){var _0x39e56a=a9_0x5e7adb;return core_2[_0x39e56a(0x209)];}}),Object['defineProperty'](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x585912=a9_0x5e7adb;return core_2[_0x585912(0x202)];}}),global[a9_0x5e7adb(0x208)]=getAppsConfig_1[a9_0x5e7adb(0x208)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';function a10_0x2526(){var _0x1cde49=['HEADERS_LACK','logintime','prototype','config','1413272PDHAJP','getOwnPropertyDescriptor','toString','token','secret','secret=','map','timeout','toLowerCase','1767785JfadUe','HEADERS_CHECKCODE','signature','__decorate','entries','ApiService','6789177NanYAz','1964438ktVMxi','Singleton','缺少头信息:','getsign','__esModule','design:type','HEADERS_SIGNATURE','HEADERS_DEVICE','push','6eJWkRX','requesttime','device','fromEntries','getcheck','61443Zncola','devices','defineProperty','缺少头信息:signature','crypto-js','undefined','__metadata','length','ScopeEnum','abs','join','checksign','now','function','MD5','2628831KDcqAD','checkcode','ApiError','sort','decorate','1695232lIKdRn','14diNEze'];a10_0x2526=function(){return _0x1cde49;};return a10_0x2526();}var a10_0x55f1a7=a10_0x5bf4;(function(_0x26f948,_0xb7d2a3){var _0x459f0a=a10_0x5bf4,_0x14e379=_0x26f948();while(!![]){try{var _0x2bb0c2=parseInt(_0x459f0a(0xcb))/0x1*(-parseInt(_0x459f0a(0xe0))/0x2)+parseInt(_0x459f0a(0xda))/0x3+-parseInt(_0x459f0a(0xe5))/0x4+parseInt(_0x459f0a(0xee))/0x5*(-parseInt(_0x459f0a(0xc6))/0x6)+parseInt(_0x459f0a(0xf5))/0x7+-parseInt(_0x459f0a(0xdf))/0x8+parseInt(_0x459f0a(0xf4))/0x9;if(_0x2bb0c2===_0xb7d2a3)break;else _0x14e379['push'](_0x14e379['shift']());}catch(_0x57ed72){_0x14e379['push'](_0x14e379['shift']());}}}(a10_0x2526,0x894d0));function a10_0x5bf4(_0x3d4f32,_0x1615ce){var _0x2526ea=a10_0x2526();return a10_0x5bf4=function(_0x5bf4ad,_0x2d5a4c){_0x5bf4ad=_0x5bf4ad-0xc6;var _0x41c60d=_0x2526ea[_0x5bf4ad];return _0x41c60d;},a10_0x5bf4(_0x3d4f32,_0x1615ce);}var __decorate=this&&this[a10_0x55f1a7(0xf1)]||function(_0xc3dc78,_0x1e43da,_0x1d6ada,_0x32421f){var _0x14fca9=a10_0x55f1a7,_0x4c8828=arguments[_0x14fca9(0xd2)],_0x240e57=_0x4c8828<0x3?_0x1e43da:_0x32421f===null?_0x32421f=Object[_0x14fca9(0xe6)](_0x1e43da,_0x1d6ada):_0x32421f,_0x59e63f;if(typeof Reflect==='object'&&typeof Reflect[_0x14fca9(0xde)]===_0x14fca9(0xd8))_0x240e57=Reflect[_0x14fca9(0xde)](_0xc3dc78,_0x1e43da,_0x1d6ada,_0x32421f);else{for(var _0x3351a5=_0xc3dc78[_0x14fca9(0xd2)]-0x1;_0x3351a5>=0x0;_0x3351a5--)if(_0x59e63f=_0xc3dc78[_0x3351a5])_0x240e57=(_0x4c8828<0x3?_0x59e63f(_0x240e57):_0x4c8828>0x3?_0x59e63f(_0x1e43da,_0x1d6ada,_0x240e57):_0x59e63f(_0x1e43da,_0x1d6ada))||_0x240e57;}return _0x4c8828>0x3&&_0x240e57&&Object[_0x14fca9(0xcd)](_0x1e43da,_0x1d6ada,_0x240e57),_0x240e57;},__metadata=this&&this[a10_0x55f1a7(0xd1)]||function(_0x508cb6,_0xf680de){var _0x547b9f=a10_0x55f1a7;if(typeof Reflect==='object'&&typeof Reflect['metadata']===_0x547b9f(0xd8))return Reflect['metadata'](_0x508cb6,_0xf680de);};Object[a10_0x55f1a7(0xcd)](exports,a10_0x55f1a7(0xf9),{'value':!![]}),exports[a10_0x55f1a7(0xf3)]=void 0x0;const crypto_js_1=require(a10_0x55f1a7(0xcf)),core_1=require('@midwayjs/core'),ApiError_1=require('../exception/ApiError');let ApiService=class ApiService{['password'](_0x43713c){var _0x98e7ba=a10_0x55f1a7,_0x545958;return _0x43713c?(0x0,crypto_js_1[_0x98e7ba(0xd9)])(_0x43713c+(0x0,crypto_js_1[_0x98e7ba(0xd9)])((0x0,crypto_js_1[_0x98e7ba(0xd9)])(_0x43713c)[_0x98e7ba(0xe7)]()+((_0x545958=this[_0x98e7ba(0xe4)])===null||_0x545958===void 0x0?void 0x0:_0x545958['password']))[_0x98e7ba(0xe7)]())['toString']():'';}[a10_0x55f1a7(0xca)](_0x23f163,_0x2ab225,_0x3a3189=Date[a10_0x55f1a7(0xd7)]()){var _0x119254=a10_0x55f1a7;return{'Token':_0x23f163,'Logintime':_0x3a3189,'Checkcode':this[_0x119254(0xdb)](_0x23f163,_0x2ab225,_0x3a3189)};}[a10_0x55f1a7(0xf8)](_0x3323be={}){var _0x2c88e4=a10_0x55f1a7;const _0x5abf9f=[],_0xf9b23a=Object[_0x2c88e4(0xc9)](Object[_0x2c88e4(0xf2)](_0x3323be)[_0x2c88e4(0xeb)](_0x3e7d86=>[_0x3e7d86[0x0][_0x2c88e4(0xed)](),_0x3e7d86[0x1]]));for(let _0x52a056 of[_0x2c88e4(0xc8),_0x2c88e4(0xc7),_0x2c88e4(0xe8),_0x2c88e4(0xe2),_0x2c88e4(0xdb)]){if(typeof _0xf9b23a[_0x52a056]==_0x2c88e4(0xd0))throw new AnnError(ApiError_1[_0x2c88e4(0xdc)][_0x2c88e4(0xe1)],{'message':_0x2c88e4(0xf7)+_0x52a056});_0x5abf9f['push'](_0x52a056+'='+_0xf9b23a[_0x52a056]);}if(Math[_0x2c88e4(0xd4)](_0xf9b23a[_0x2c88e4(0xc7)])-Date[_0x2c88e4(0xd7)]()>this[_0x2c88e4(0xe4)][_0x2c88e4(0xec)])throw new AnnError(ApiError_1[_0x2c88e4(0xdc)]['TIMEOUT']);if(!this[_0x2c88e4(0xe4)][_0x2c88e4(0xcc)][_0xf9b23a[_0x2c88e4(0xc8)]]||!this['config']['devices'][_0xf9b23a[_0x2c88e4(0xc8)]][_0x2c88e4(0xe9)]||!this[_0x2c88e4(0xe4)]['devices'][_0xf9b23a['device']]['checkcode'])throw new AnnError(ApiError_1[_0x2c88e4(0xdc)]['HEADERS_DEVICE']);if(_0xf9b23a['token']&&_0xf9b23a[_0x2c88e4(0xdb)]!=this[_0x2c88e4(0xdb)](_0xf9b23a['token'],_0xf9b23a[_0x2c88e4(0xc8)],_0xf9b23a[_0x2c88e4(0xe2)]))throw new AnnError(ApiError_1[_0x2c88e4(0xdc)][_0x2c88e4(0xef)]);return _0x5abf9f[_0x2c88e4(0xfd)](_0x2c88e4(0xea)+this[_0x2c88e4(0xe4)]['devices'][_0xf9b23a[_0x2c88e4(0xc8)]]['secret']),(0x0,crypto_js_1[_0x2c88e4(0xd9)])(_0x5abf9f[_0x2c88e4(0xdd)]()[_0x2c88e4(0xd5)](''))['toString']();}[a10_0x55f1a7(0xdb)](_0x35e4eb,_0x3934fb,_0x3b1a5e=Date[a10_0x55f1a7(0xd7)]()){var _0x53fb31=a10_0x55f1a7,_0x12ae77,_0x15693c,_0x462677;if(!((_0x12ae77=this['config'])===null||_0x12ae77===void 0x0?void 0x0:_0x12ae77[_0x53fb31(0xcc)][_0x3934fb])||!((_0x462677=(_0x15693c=this[_0x53fb31(0xe4)])===null||_0x15693c===void 0x0?void 0x0:_0x15693c[_0x53fb31(0xcc)][_0x3934fb])===null||_0x462677===void 0x0?void 0x0:_0x462677[_0x53fb31(0xdb)]))throw new AnnError(ApiError_1['ApiError'][_0x53fb31(0xfc)]);return(0x0,crypto_js_1[_0x53fb31(0xd9)])(_0x35e4eb+(0x0,crypto_js_1[_0x53fb31(0xd9)])(_0x3b1a5e+this[_0x53fb31(0xe4)][_0x53fb31(0xcc)][_0x3934fb]['checkcode'])[_0x53fb31(0xe7)]())[_0x53fb31(0xe7)]();}[a10_0x55f1a7(0xd6)](_0x474851={}){var _0x2370c4=a10_0x55f1a7;const _0x24c909=Object[_0x2370c4(0xc9)](Object[_0x2370c4(0xf2)](_0x474851)['map'](_0x18d13d=>[_0x18d13d[0x0][_0x2370c4(0xed)](),_0x18d13d[0x1]]));if(!(_0x24c909===null||_0x24c909===void 0x0?void 0x0:_0x24c909[_0x2370c4(0xf0)]))throw new AnnError(ApiError_1['ApiError'][_0x2370c4(0xe1)],{'message':_0x2370c4(0xce)});if((_0x24c909===null||_0x24c909===void 0x0?void 0x0:_0x24c909[_0x2370c4(0xf0)])!=this[_0x2370c4(0xf8)](_0x24c909))throw new AnnError(ApiError_1[_0x2370c4(0xdc)][_0x2370c4(0xfb)]);return!![];}};__decorate([(0x0,core_1['Config'])('anncicapi'),__metadata(a10_0x55f1a7(0xfa),Object)],ApiService[a10_0x55f1a7(0xe3)],'config',void 0x0),ApiService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1['Scope'])(core_1[a10_0x55f1a7(0xd3)][a10_0x55f1a7(0xf6)])],ApiService),exports[a10_0x55f1a7(0xf3)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11_0x4c9fc1=a11_0x309c;(function(_0x266124,_0x54b5ff){const _0xe2cbe0=a11_0x309c,_0x484207=_0x266124();while(!![]){try{const _0xb849a4=-parseInt(_0xe2cbe0(0x12b))/0x1+parseInt(_0xe2cbe0(0x13e))/0x2*(parseInt(_0xe2cbe0(0x13a))/0x3)+-parseInt(_0xe2cbe0(0x116))/0x4+parseInt(_0xe2cbe0(0x147))/0x5*(-parseInt(_0xe2cbe0(0x13d))/0x6)+parseInt(_0xe2cbe0(0x135))/0x7+parseInt(_0xe2cbe0(0x122))/0x8+parseInt(_0xe2cbe0(0x11b))/0x9;if(_0xb849a4===_0x54b5ff)break;else _0x484207['push'](_0x484207['shift']());}catch(_0x47e627){_0x484207['push'](_0x484207['shift']());}}}(a11_0xc091,0x23098));var __decorate=this&&this[a11_0x4c9fc1(0x104)]||function(_0x981da8,_0x38e816,_0xe7ff36,_0x244762){const _0x215f38=a11_0x4c9fc1;var _0x8b5130=arguments[_0x215f38(0x114)],_0x550b84=_0x8b5130<0x3?_0x38e816:_0x244762===null?_0x244762=Object[_0x215f38(0x106)](_0x38e816,_0xe7ff36):_0x244762,_0x5c83b8;if(typeof Reflect===_0x215f38(0x134)&&typeof Reflect[_0x215f38(0x110)]==='function')_0x550b84=Reflect[_0x215f38(0x110)](_0x981da8,_0x38e816,_0xe7ff36,_0x244762);else{for(var _0x1ea613=_0x981da8[_0x215f38(0x114)]-0x1;_0x1ea613>=0x0;_0x1ea613--)if(_0x5c83b8=_0x981da8[_0x1ea613])_0x550b84=(_0x8b5130<0x3?_0x5c83b8(_0x550b84):_0x8b5130>0x3?_0x5c83b8(_0x38e816,_0xe7ff36,_0x550b84):_0x5c83b8(_0x38e816,_0xe7ff36))||_0x550b84;}return _0x8b5130>0x3&&_0x550b84&&Object[_0x215f38(0xfb)](_0x38e816,_0xe7ff36,_0x550b84),_0x550b84;},__metadata=this&&this[a11_0x4c9fc1(0x139)]||function(_0x5b9b27,_0x462fbc){const _0x573f2b=a11_0x4c9fc1;if(typeof Reflect===_0x573f2b(0x134)&&typeof Reflect[_0x573f2b(0xfc)]===_0x573f2b(0x127))return Reflect[_0x573f2b(0xfc)](_0x5b9b27,_0x462fbc);},__param=this&&this[a11_0x4c9fc1(0x132)]||function(_0x2f2cbb,_0x278336){return function(_0x398dd6,_0x15a464){_0x278336(_0x398dd6,_0x15a464,_0x2f2cbb);};};Object[a11_0x4c9fc1(0xfb)](exports,a11_0x4c9fc1(0x130),{'value':!![]}),exports[a11_0x4c9fc1(0x126)]=exports[a11_0x4c9fc1(0x101)]=void 0x0;const path_1=require(a11_0x4c9fc1(0x119)),fs_1=require('fs'),core_1=require(a11_0x4c9fc1(0x102)),core_2=require('@midwayjs/core'),core_3=require(a11_0x4c9fc1(0x102)),getRoutes_1=require(a11_0x4c9fc1(0x123));let ApitestService=class ApitestService{async[a11_0x4c9fc1(0x115)](_0x5797b8){const _0x544212=a11_0x4c9fc1,_0x8723fd=(0x0,getRoutes_1[_0x544212(0x105)])(_0x5797b8),_0x5a55e2=[];for(let _0x400820 in _0x8723fd){for(let _0x15175d in _0x8723fd[_0x400820]['routes']){let _0x16f8fb=_0x8723fd[_0x400820][_0x544212(0x128)][_0x15175d],_0x2eabec=[];for(let _0x187cf0 in _0x16f8fb['request']){_0x2eabec['push'](_0x16f8fb[_0x544212(0x149)][_0x187cf0]);}_0x5a55e2[_0x544212(0x111)]({'title':_0x8723fd[_0x400820][_0x544212(0x11e)]+':'+_0x16f8fb[_0x544212(0x11e)],'prefix':_0x8723fd[_0x400820][_0x544212(0x143)],'router':_0x16f8fb['route'],'method':_0x16f8fb[_0x544212(0x141)],'describe':_0x16f8fb[_0x544212(0x12d)]||'','filepath':_0x8723fd[_0x400820][_0x544212(0x12a)]||'','request':_0x2eabec});}}const _0x2920e5=(0x0,path_1[_0x544212(0x12c)])(__dirname,_0x544212(0x108));return(0x0,fs_1[_0x544212(0x121)])(_0x2920e5,{'encoding':'utf-8'})[_0x544212(0x137)](/__res__/g,_0x544212(0x131))[_0x544212(0x137)]('__apiList__',JSON['stringify'](_0x5a55e2))[_0x544212(0x137)](_0x544212(0x13c),JSON[_0x544212(0x125)](this['config'][_0x544212(0x10c)]));}};function a11_0x309c(_0x132732,_0x2a49a0){const _0xc09158=a11_0xc091();return a11_0x309c=function(_0x309c72,_0x2ee4e5){_0x309c72=_0x309c72-0xfa;let _0x40fc26=_0xc09158[_0x309c72];return _0x40fc26;},a11_0x309c(_0x132732,_0x2a49a0);}function a11_0xc091(){const _0x1ca164=['isDevelopmentEnvironment','set','ApitestService','@midwayjs/core','existsSync','__decorate','getRoutes','getOwnPropertyDescriptor','prototype','../../public/index.html','url','/apiteststatic/*','.js','devices','apitestmodule','Get','content-type','decorate','push','cache-control','anncicapi','length','apidoc','958960xUfKae','Controller','apitest','path','application/javascript;\x20charset=utf-8','3181401VMJICR','extname','ctx','summary','/apitest-:module','MidwayEnvironmentService','readFileSync','189472vpuCJf','../helper/getRoutes','design:type','stringify','ApitestStaticController','function','routes','config','filepath','77378cNpMod','join','description','substring','apiteststatic','__esModule','/apiteststatic/','__param','Config','object','810943ipcWWe','../../public/','replace','design:paramtypes','__metadata','673443mkfYtL','Provide','__devices__','1541238bJEHUj','2uyVXDd','Scope','apitesthtml','method','Environment','prefix','/index.html','/apitest','utf-8','5cxZbvD','Inject','request','design:returntype','defineProperty','metadata','ScopeEnum','Param'];a11_0xc091=function(){return _0x1ca164;};return a11_0xc091();}__decorate([(0x0,core_3[a11_0x4c9fc1(0x133)])(a11_0x4c9fc1(0x113)),__metadata(a11_0x4c9fc1(0x124),Object)],ApitestService[a11_0x4c9fc1(0x107)],'config',void 0x0),ApitestService=__decorate([(0x0,core_2[a11_0x4c9fc1(0x13b)])('apitest'),(0x0,core_3[a11_0x4c9fc1(0x13f)])(core_3[a11_0x4c9fc1(0xfd)]['Singleton'])],ApitestService),exports[a11_0x4c9fc1(0x101)]=ApitestService;let ApitestStaticController=class ApitestStaticController{async[a11_0x4c9fc1(0x140)](){const _0x57b275=a11_0x4c9fc1;if(this['apitest']){const _0x1229da={'module':![]};return this[_0x57b275(0x142)][_0x57b275(0xff)]()&&(_0x1229da[_0x57b275(0x12a)]=!![]),await this[_0x57b275(0x101)][_0x57b275(0x115)](_0x1229da);}return'';}async[a11_0x4c9fc1(0x10d)](_0x143506){const _0x812910=a11_0x4c9fc1;if(this[_0x812910(0x118)]){const _0x1f53dc={'module':_0x143506};return this[_0x812910(0x142)][_0x812910(0xff)]()&&(_0x1f53dc[_0x812910(0x12a)]=!![]),await this['ApitestService'][_0x812910(0x115)](_0x1f53dc);}return'';}async[a11_0x4c9fc1(0x12f)](){const _0x4818aa=a11_0x4c9fc1;if((0x0,path_1['extname'])(this[_0x4818aa(0x11d)][_0x4818aa(0x149)]['url'])){var _0x14123d=(0x0,path_1[_0x4818aa(0x12c)])(__dirname,_0x4818aa(0x136)+this[_0x4818aa(0x11d)][_0x4818aa(0x149)][_0x4818aa(0x109)][_0x4818aa(0x137)](_0x4818aa(0x131),'/'));if(_0x14123d[_0x4818aa(0x12e)](_0x14123d[_0x4818aa(0x114)]-0xb)!=_0x4818aa(0x144)){this[_0x4818aa(0x11d)][_0x4818aa(0x100)](_0x4818aa(0x112),'public,\x20max-age=604800');if((0x0,path_1[_0x4818aa(0x11c)])(this[_0x4818aa(0x11d)][_0x4818aa(0x149)]['url'])==_0x4818aa(0x10b))this[_0x4818aa(0x11d)][_0x4818aa(0x100)]('content-type',_0x4818aa(0x11a));else(0x0,path_1['extname'])(this['ctx']['request'][_0x4818aa(0x109)])=='.css'&&this[_0x4818aa(0x11d)][_0x4818aa(0x100)](_0x4818aa(0x10f),'text/css;\x20charset=utf-8');return(0x0,fs_1[_0x4818aa(0x103)])(_0x14123d)&&(0x0,fs_1[_0x4818aa(0x121)])(_0x14123d,{'encoding':_0x4818aa(0x146)});}}return'';}};__decorate([(0x0,core_3[a11_0x4c9fc1(0x148)])(),__metadata(a11_0x4c9fc1(0x124),Object)],ApitestStaticController['prototype'],a11_0x4c9fc1(0x11d),void 0x0),__decorate([(0x0,core_3[a11_0x4c9fc1(0x148)])(),__metadata('design:type',core_1[a11_0x4c9fc1(0x120)])],ApitestStaticController[a11_0x4c9fc1(0x107)],a11_0x4c9fc1(0x142),void 0x0),__decorate([(0x0,core_3[a11_0x4c9fc1(0x148)])(),__metadata(a11_0x4c9fc1(0x124),ApitestService)],ApitestStaticController[a11_0x4c9fc1(0x107)],a11_0x4c9fc1(0x101),void 0x0),__decorate([(0x0,core_3[a11_0x4c9fc1(0x133)])(a11_0x4c9fc1(0x118)),__metadata(a11_0x4c9fc1(0x124),Boolean)],ApitestStaticController['prototype'],a11_0x4c9fc1(0x118),void 0x0),__decorate([(0x0,core_3[a11_0x4c9fc1(0x133)])(a11_0x4c9fc1(0x113)),__metadata(a11_0x4c9fc1(0x124),Object)],ApitestStaticController['prototype'],a11_0x4c9fc1(0x129),void 0x0),__decorate([(0x0,core_2[a11_0x4c9fc1(0x10e)])(a11_0x4c9fc1(0x145)),__metadata(a11_0x4c9fc1(0x124),Function),__metadata(a11_0x4c9fc1(0x138),[]),__metadata(a11_0x4c9fc1(0xfa),Promise)],ApitestStaticController[a11_0x4c9fc1(0x107)],a11_0x4c9fc1(0x140),null),__decorate([(0x0,core_2[a11_0x4c9fc1(0x10e)])(a11_0x4c9fc1(0x11f)),__param(0x0,(0x0,core_2[a11_0x4c9fc1(0xfe)])('module')),__metadata(a11_0x4c9fc1(0x124),Function),__metadata(a11_0x4c9fc1(0x138),[String]),__metadata(a11_0x4c9fc1(0xfa),Promise)],ApitestStaticController[a11_0x4c9fc1(0x107)],a11_0x4c9fc1(0x10d),null),__decorate([(0x0,core_2['Get'])(a11_0x4c9fc1(0x10a)),__metadata(a11_0x4c9fc1(0x124),Function),__metadata('design:paramtypes',[]),__metadata(a11_0x4c9fc1(0xfa),Promise)],ApitestStaticController['prototype'],a11_0x4c9fc1(0x12f),null),ApitestStaticController=__decorate([(0x0,core_2[a11_0x4c9fc1(0x117)])('/'),(0x0,core_3[a11_0x4c9fc1(0x13f)])(core_3[a11_0x4c9fc1(0xfd)]['Request'])],ApitestStaticController),exports['ApitestStaticController']=ApitestStaticController;
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import * as exceljs from 'exceljs';
|
|
1
2
|
import { IMidwayApplication } from '@midwayjs/core';
|
|
2
3
|
interface ExcelColumn {
|
|
3
4
|
key: string;
|
|
4
5
|
header: string;
|
|
5
6
|
handler?: (row: any) => Promise<any>;
|
|
6
7
|
}
|
|
8
|
+
interface ExcelImportColumn {
|
|
9
|
+
key: string;
|
|
10
|
+
header: string;
|
|
11
|
+
handler?: (row: any, rowCell?: exceljs.CellModel) => Promise<any>;
|
|
12
|
+
}
|
|
7
13
|
export declare class ExcelService {
|
|
8
14
|
protected app: IMidwayApplication;
|
|
9
|
-
parse(filepath: string, column:
|
|
15
|
+
parse(filepath: string, column: ExcelImportColumn[], sheets?: Array<number | string>): Promise<{
|
|
10
16
|
[key: string]: any;
|
|
11
17
|
}[]>;
|
|
12
18
|
export(filename: string, column: ExcelColumn[], tmpEntitys: Array<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a12_0x430188=a12_0x507c;(function(_0x39059a,_0x4cda61){const _0x1b1c32=a12_0x507c,_0x5f1be0=_0x39059a();while(!![]){try{const _0x1c8363=-parseInt(_0x1b1c32(0x1d9))/0x1*(parseInt(_0x1b1c32(0x1d3))/0x2)+-parseInt(_0x1b1c32(0x204))/0x3+parseInt(_0x1b1c32(0x1f6))/0x4*(parseInt(_0x1b1c32(0x1d2))/0x5)+parseInt(_0x1b1c32(0x1e2))/0x6*(parseInt(_0x1b1c32(0x1d0))/0x7)+-parseInt(_0x1b1c32(0x1ee))/0x8*(-parseInt(_0x1b1c32(0x1ea))/0x9)+parseInt(_0x1b1c32(0x1cb))/0xa+-parseInt(_0x1b1c32(0x1fe))/0xb*(parseInt(_0x1b1c32(0x1c8))/0xc);if(_0x1c8363===_0x4cda61)break;else _0x5f1be0['push'](_0x5f1be0['shift']());}catch(_0x5405a4){_0x5f1be0['push'](_0x5f1be0['shift']());}}}(a12_0x3f81,0x24126));var __decorate=this&&this[a12_0x430188(0x1e4)]||function(_0xd3e694,_0xc1843b,_0x4cc00a,_0x120c0a){const _0x12d35a=a12_0x430188;var _0x32e949=arguments[_0x12d35a(0x1d7)],_0x15009f=_0x32e949<0x3?_0xc1843b:_0x120c0a===null?_0x120c0a=Object[_0x12d35a(0x1c3)](_0xc1843b,_0x4cc00a):_0x120c0a,_0x488ac8;if(typeof Reflect===_0x12d35a(0x1cf)&&typeof Reflect['decorate']===_0x12d35a(0x1cd))_0x15009f=Reflect[_0x12d35a(0x1ce)](_0xd3e694,_0xc1843b,_0x4cc00a,_0x120c0a);else{for(var _0x1126dc=_0xd3e694[_0x12d35a(0x1d7)]-0x1;_0x1126dc>=0x0;_0x1126dc--)if(_0x488ac8=_0xd3e694[_0x1126dc])_0x15009f=(_0x32e949<0x3?_0x488ac8(_0x15009f):_0x32e949>0x3?_0x488ac8(_0xc1843b,_0x4cc00a,_0x15009f):_0x488ac8(_0xc1843b,_0x4cc00a))||_0x15009f;}return _0x32e949>0x3&&_0x15009f&&Object[_0x12d35a(0x1fb)](_0xc1843b,_0x4cc00a,_0x15009f),_0x15009f;},__metadata=this&&this[a12_0x430188(0x1c7)]||function(_0x51ca24,_0x3debba){const _0x371bbd=a12_0x430188;if(typeof Reflect==='object'&&typeof Reflect[_0x371bbd(0x1c1)]===_0x371bbd(0x1cd))return Reflect[_0x371bbd(0x1c1)](_0x51ca24,_0x3debba);};Object[a12_0x430188(0x1fb)](exports,a12_0x430188(0x1c2),{'value':!![]}),exports[a12_0x430188(0x1d4)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x430188(0x1f5)),koasend=require(a12_0x430188(0x1da)),core_1=require(a12_0x430188(0x1fa));let ExcelService=class ExcelService{async[a12_0x430188(0x1ec)](_0x4fda4d,_0x5273f3,_0x1ea6f1=[0x0]){const _0x1982cc=a12_0x430188;var _0x23684b,_0x5bea3c;const _0x41e13f=new exceljs['Workbook'](),_0x168aba=[];let _0x3ac857=_0x4fda4d[_0x1982cc(0x1f1)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/');!(_0x3ac857===null||_0x3ac857===void 0x0?void 0x0:_0x3ac857[_0x1982cc(0x201)]('/'))&&(_0x3ac857=this['app']['getAppDir']()+'/'+_0x3ac857);try{await _0x41e13f[_0x1982cc(0x1e1)][_0x1982cc(0x203)](_0x3ac857);}catch(_0x514847){return console['log'](_0x1982cc(0x1dc)+_0x3ac857+_0x1982cc(0x1d5)),_0x168aba;}for(const _0x5316bd of _0x1ea6f1){const _0x4bd9a0=lodash['isNumber'](_0x5316bd)?((_0x23684b=_0x41e13f[_0x1982cc(0x1cc)])===null||_0x23684b===void 0x0?void 0x0:_0x23684b[_0x5316bd])||undefined:_0x41e13f['getWorksheet'](_0x5316bd);if(_0x4bd9a0){var _0x5a3e2d=0x1;const _0x133762=_0x4bd9a0[_0x1982cc(0x1d8)](0x1),_0x1afd54=await new Promise(_0x22b440=>{const _0x58bbe4=_0x1982cc,_0x167705={};_0x133762[_0x58bbe4(0x1fc)]((_0x300c0c,_0x3434df)=>{const _0x4c1b10=_0x58bbe4;for(const _0x2af2ff of _0x5273f3){if(_0x300c0c[_0x4c1b10(0x1e9)]==_0x2af2ff[_0x4c1b10(0x1e0)])_0x5a3e2d=0x2,_0x167705[_0x2af2ff[_0x4c1b10(0x1f4)]]={'header':_0x300c0c[_0x4c1b10(0x1f7)],'handler':_0x2af2ff[_0x4c1b10(0x1f0)]};else{if(!_0x167705[_0x2af2ff[_0x4c1b10(0x1f4)]])try{const _0x29b673=_0x133762['getCell'](_0x2af2ff[_0x4c1b10(0x1e0)]);_0x29b673&&(_0x167705[_0x2af2ff['key']]={'header':_0x29b673['col'],'handler':_0x2af2ff[_0x4c1b10(0x1f0)]});}catch{}}}_0x133762['cellCount']==_0x3434df&&_0x22b440(_0x167705);});});for(const _0xb06da of _0x4bd9a0[_0x1982cc(0x1c4)](_0x5a3e2d,_0x4bd9a0[_0x1982cc(0x1e8)])){const _0x29f532={};for(const _0x6ca3b5 in _0x1afd54){if(_0x1afd54[_0x6ca3b5][_0x1982cc(0x1e0)]){const _0x326f42=_0xb06da[_0x1982cc(0x1e7)](_0x1afd54[_0x6ca3b5]['header']);typeof((_0x5bea3c=_0x1afd54[_0x6ca3b5])===null||_0x5bea3c===void 0x0?void 0x0:_0x5bea3c[_0x1982cc(0x1f0)])==_0x1982cc(0x1cd)?_0x29f532[_0x6ca3b5]=_0x1afd54[_0x6ca3b5][_0x1982cc(0x1f0)]((_0x326f42===null||_0x326f42===void 0x0?void 0x0:_0x326f42['toString']())||'',_0x326f42['model']):_0x29f532[_0x6ca3b5]=(_0x326f42===null||_0x326f42===void 0x0?void 0x0:_0x326f42[_0x1982cc(0x1c9)]())||'';}}Object[_0x1982cc(0x1dd)](_0x29f532)['length']>0x0&&_0x168aba['push'](_0x29f532);}}}return _0x168aba;}async['export'](_0x219270,_0x2eeca8,_0x1f1d32,_0x3ebf3b=a12_0x430188(0x1ca)){const _0x4ced50=a12_0x430188;var _0x152d07,_0x786d;const _0x21ddb4=new exceljs[(_0x4ced50(0x202))](),_0x2f1674={},_0x3fc101=[],_0x5e0ac6=_0x21ddb4[_0x4ced50(0x1db)](_0x4ced50(0x1e5),{'views':[{'state':_0x4ced50(0x1eb),'xSplit':0x1}]});for(const _0x515a10 in _0x2eeca8){_0x2f1674[_0x2eeca8[_0x515a10][_0x4ced50(0x1f4)]]=_0x2eeca8[_0x515a10][_0x4ced50(0x1e0)],_0x3fc101[_0x4ced50(0x1de)]({'header':_0x2eeca8[_0x515a10][_0x4ced50(0x1e0)],'key':(_0x152d07=_0x2eeca8[_0x515a10])===null||_0x152d07===void 0x0?void 0x0:_0x152d07[_0x4ced50(0x1f4)][_0x4ced50(0x1f1)](/\./g,'_')});}_0x5e0ac6[_0x4ced50(0x1fd)]=_0x3fc101;for(const _0x51e69b of _0x1f1d32){const _0x47b169={};for(const _0xa5d0a4 in _0x2eeca8){typeof((_0x786d=_0x2eeca8[_0xa5d0a4])===null||_0x786d===void 0x0?void 0x0:_0x786d[_0x4ced50(0x1f0)])==_0x4ced50(0x1cd)?_0x47b169[_0x2eeca8[_0xa5d0a4][_0x4ced50(0x1f4)][_0x4ced50(0x1f1)](/\./g,'_')]=await _0x2eeca8[_0xa5d0a4][_0x4ced50(0x1f0)](_0x51e69b):_0x47b169[_0x2eeca8[_0xa5d0a4]['key'][_0x4ced50(0x1f1)](/\./g,'_')]=lodash[_0x4ced50(0x1e6)](_0x51e69b,_0x2eeca8[_0xa5d0a4][_0x4ced50(0x1f4)],'');}_0x5e0ac6[_0x4ced50(0x1f2)](_0x47b169);}let _0x242e46='';const _0x332dd9=_0x219270+'-'+lodash[_0x4ced50(0x1f3)](0x2710,0x1869f)+_0x4ced50(0x1f9);if(_0x3ebf3b&&_0x3ebf3b['startsWith']('/'))_0x242e46=''+_0x3ebf3b;else _0x3ebf3b&&!_0x3ebf3b[_0x4ced50(0x201)]('/')&&!_0x3ebf3b['startsWith']('\x5c')?_0x242e46=this[_0x4ced50(0x1ef)][_0x4ced50(0x1ed)]()+'/'+_0x3ebf3b:_0x242e46=this['app']['getAppDir']()+_0x4ced50(0x1c6);return(_0x242e46[_0x4ced50(0x1c5)]('/')||_0x242e46['endsWith']('\x5c'))&&(_0x242e46=_0x242e46['substring'](0x0,_0x242e46[_0x4ced50(0x1d7)]-0x1)),_0x242e46=_0x242e46[_0x4ced50(0x1f1)](/(\\|\/)/g,'/')[_0x4ced50(0x1f1)](/\/{2,}/g,'/'),!fs['existsSync'](_0x242e46)&&fs[_0x4ced50(0x1f8)](_0x242e46,{'recursive':!![]}),await _0x21ddb4['xlsx'][_0x4ced50(0x1df)]((_0x242e46+'/'+_0x332dd9)[_0x4ced50(0x1f1)](/(\\|\/)/g,'/')[_0x4ced50(0x1f1)](/\/{2,}/g,'/')),{'filename':_0x332dd9,'filepath':(_0x242e46['substring']((''+this[_0x4ced50(0x1ef)]['getAppDir']())['length'])+'/'+_0x332dd9)[_0x4ced50(0x1f1)](/(\\|\/)/g,'/')[_0x4ced50(0x1f1)](/\/{2,}/g,'/')};}async['download'](_0x3cebf9,_0x53649a){return await koasend(_0x3cebf9,''+_0x53649a);}};function a12_0x3f81(){const _0x56a719=['810610NgSELC','worksheets','function','decorate','object','28yjJBko','design:type','170BwYIij','98nVrpkj','ExcelService','\x20is\x20read\x20fail','prototype','length','getRow','5039InRuxv','koa-send','addWorksheet','Api\x20Excel\x20Error:\x20','keys','push','writeFile','header','xlsx','134256eqAKDR','Provide','__decorate','Sheet\x201','get','getCell','rowCount','value','2069694TpdKCb','frozen','parse','getAppDir','8lLaXZV','app','handler','replace','addRow','random','key','exceljs','29964ZMSBbn','col','mkdirSync','.xlsx','@midwayjs/core','defineProperty','eachCell','columns','451gKfvwO','Scope','Singleton','startsWith','Workbook','readFile','125733HMVkgE','metadata','__esModule','getOwnPropertyDescriptor','findRows','endsWith','/public/xlsx','__metadata','63996rDWmxW','toString','public/xlsx'];a12_0x3f81=function(){return _0x56a719;};return a12_0x3f81();}function a12_0x507c(_0x20e711,_0x591619){const _0x3f8106=a12_0x3f81();return a12_0x507c=function(_0x507cfe,_0x1a81dd){_0x507cfe=_0x507cfe-0x1c1;let _0x26691e=_0x3f8106[_0x507cfe];return _0x26691e;},a12_0x507c(_0x20e711,_0x591619);}__decorate([(0x0,core_1['App'])(),__metadata(a12_0x430188(0x1d1),Object)],ExcelService[a12_0x430188(0x1d6)],a12_0x430188(0x1ef),void 0x0),ExcelService=__decorate([(0x0,core_1[a12_0x430188(0x1e3)])(),(0x0,core_1[a12_0x430188(0x1ff)])(core_1['ScopeEnum'][a12_0x430188(0x200)])],ExcelService),exports['ExcelService']=ExcelService;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a13_0x575e39=a13_0x273b;(function(_0x165a7f,_0x25a9e0){var _0x28adea=a13_0x273b,_0x478f2c=_0x165a7f();while(!![]){try{var _0x56bb41=parseInt(_0x28adea(0x1d0))/0x1*(-parseInt(_0x28adea(0x1d8))/0x2)+parseInt(_0x28adea(0x1c7))/0x3*(parseInt(_0x28adea(0x1d3))/0x4)+-parseInt(_0x28adea(0x1cb))/0x5*(-parseInt(_0x28adea(0x1d2))/0x6)+-parseInt(_0x28adea(0x1d4))/0x7*(-parseInt(_0x28adea(0x1d5))/0x8)+-parseInt(_0x28adea(0x1c6))/0x9+-parseInt(_0x28adea(0x1d7))/0xa*(parseInt(_0x28adea(0x1d1))/0xb)+-parseInt(_0x28adea(0x1ce))/0xc*(-parseInt(_0x28adea(0x1cf))/0xd);if(_0x56bb41===_0x25a9e0)break;else _0x478f2c['push'](_0x478f2c['shift']());}catch(_0x103855){_0x478f2c['push'](_0x478f2c['shift']());}}}(a13_0x222c,0x9cfd3));function a13_0x273b(_0x572878,_0x20ef29){var _0x222c3d=a13_0x222c();return a13_0x273b=function(_0x273b69,_0x130193){_0x273b69=_0x273b69-0x1c5;var _0x453e5b=_0x222c3d[_0x273b69];return _0x453e5b;},a13_0x273b(_0x572878,_0x20ef29);}Object['defineProperty'](exports,a13_0x575e39(0x1c9),{'value':!![]}),exports[a13_0x575e39(0x1d6)]=exports[a13_0x575e39(0x1cc)]=exports[a13_0x575e39(0x1cd)]=exports[a13_0x575e39(0x1c8)]=void 0x0,exports['ACTION_KEY']=a13_0x575e39(0x1ca),exports[a13_0x575e39(0x1cd)]='anncic-api:action:route',exports[a13_0x575e39(0x1cc)]=a13_0x575e39(0x1c5);function a13_0x222c(){var _0x2d35c2=['ACTION_KEY','__esModule','anncic-api:action','71420yBHRNd','APPSCONFIG_KEY','ACTION_ROUTE_KEY','821604nknakZ','130lwepnv','4oQnYhh','13506603VNZHzD','288wazrBo','1336INMDqN','133hbZiPx','223224tRiAzp','AppsConfigTmp','10fBLuQw','202774IVYCuw','anncic-api:apps:config','851553rUCyYD','4227bTcZlK'];a13_0x222c=function(){return _0x2d35c2;};return a13_0x222c();}class AppsConfigTmp{}exports[a13_0x575e39(0x1d6)]=AppsConfigTmp;
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a14_0x14b5(_0x4c03b1,_0x4edd5d){var _0x20e137=a14_0x20e1();return a14_0x14b5=function(_0x14b57a,_0x468fb4){_0x14b57a=_0x14b57a-0x130;var _0x27c57f=_0x20e137[_0x14b57a];return _0x27c57f;},a14_0x14b5(_0x4c03b1,_0x4edd5d);}var a14_0x143d81=a14_0x14b5;(function(_0x49b71f,_0x23758e){var _0x58255e=a14_0x14b5,_0x4f187a=_0x49b71f();while(!![]){try{var _0x2eb895=parseInt(_0x58255e(0x135))/0x1+parseInt(_0x58255e(0x149))/0x2*(-parseInt(_0x58255e(0x134))/0x3)+-parseInt(_0x58255e(0x141))/0x4*(parseInt(_0x58255e(0x147))/0x5)+-parseInt(_0x58255e(0x13a))/0x6*(-parseInt(_0x58255e(0x148))/0x7)+parseInt(_0x58255e(0x13e))/0x8+parseInt(_0x58255e(0x131))/0x9*(parseInt(_0x58255e(0x14e))/0xa)+-parseInt(_0x58255e(0x142))/0xb*(-parseInt(_0x58255e(0x151))/0xc);if(_0x2eb895===_0x23758e)break;else _0x4f187a['push'](_0x4f187a['shift']());}catch(_0x566401){_0x4f187a['push'](_0x4f187a['shift']());}}}(a14_0x20e1,0x81c5f));var __decorate=this&&this[a14_0x143d81(0x130)]||function(_0x203776,_0x1bd865,_0x285847,_0x3fbbfe){var _0x3e344a=a14_0x143d81,_0x2fe80c=arguments[_0x3e344a(0x156)],_0x1d7997=_0x2fe80c<0x3?_0x1bd865:_0x3fbbfe===null?_0x3fbbfe=Object['getOwnPropertyDescriptor'](_0x1bd865,_0x285847):_0x3fbbfe,_0x4c2348;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x3e344a(0x14c))_0x1d7997=Reflect[_0x3e344a(0x133)](_0x203776,_0x1bd865,_0x285847,_0x3fbbfe);else{for(var _0x4b7ef1=_0x203776[_0x3e344a(0x156)]-0x1;_0x4b7ef1>=0x0;_0x4b7ef1--)if(_0x4c2348=_0x203776[_0x4b7ef1])_0x1d7997=(_0x2fe80c<0x3?_0x4c2348(_0x1d7997):_0x2fe80c>0x3?_0x4c2348(_0x1bd865,_0x285847,_0x1d7997):_0x4c2348(_0x1bd865,_0x285847))||_0x1d7997;}return _0x2fe80c>0x3&&_0x1d7997&&Object[_0x3e344a(0x136)](_0x1bd865,_0x285847,_0x1d7997),_0x1d7997;},__metadata=this&&this[a14_0x143d81(0x13b)]||function(_0x569532,_0x429dfc){var _0x36d13f=a14_0x143d81;if(typeof Reflect===_0x36d13f(0x139)&&typeof Reflect[_0x36d13f(0x14d)]===_0x36d13f(0x14c))return Reflect[_0x36d13f(0x14d)](_0x569532,_0x429dfc);};Object['defineProperty'](exports,a14_0x143d81(0x150),{'value':!![]}),exports[a14_0x143d81(0x157)]=void 0x0;const validator_1=require(a14_0x143d81(0x14f));class PageDTO{}__decorate([(0x0,validator_1[a14_0x143d81(0x13d)])('分页',validator_1[a14_0x143d81(0x154)][a14_0x143d81(0x144)]()['integer']()[a14_0x143d81(0x152)](0x1),'第一页为1,第二页为2'),__metadata(a14_0x143d81(0x146),Number)],PageDTO[a14_0x143d81(0x155)],a14_0x143d81(0x145),void 0x0),__decorate([(0x0,validator_1[a14_0x143d81(0x13d)])(a14_0x143d81(0x14a),validator_1['RuleType'][a14_0x143d81(0x144)]()[a14_0x143d81(0x13c)]()[a14_0x143d81(0x152)](0x1)),__metadata(a14_0x143d81(0x146),Number)],PageDTO[a14_0x143d81(0x155)],a14_0x143d81(0x153),void 0x0),__decorate([(0x0,validator_1['Rule'])(a14_0x143d81(0x13f),validator_1['RuleType'][a14_0x143d81(0x138)]()[a14_0x143d81(0x132)]()),__metadata('design:type',String)],PageDTO[a14_0x143d81(0x155)],a14_0x143d81(0x143),void 0x0),__decorate([(0x0,validator_1[a14_0x143d81(0x13d)])(a14_0x143d81(0x137),validator_1[a14_0x143d81(0x154)][a14_0x143d81(0x144)]()[a14_0x143d81(0x13c)]()['valid'](0x0,0x1),a14_0x143d81(0x140)),__metadata('design:type',Number)],PageDTO['prototype'],a14_0x143d81(0x14b),void 0x0),exports[a14_0x143d81(0x157)]=PageDTO;function a14_0x20e1(){var _0x27217=['441027wyEJHJ','trim','decorate','222tBkTGn','556915lTDxPv','defineProperty','是否倒序','string','object','6dZCbWt','__metadata','integer','Rule','180296uYCUet','排序方式','1:是;0:否','1892fLvfGc','958089ziNikb','_order','number','_page','design:type','9195MPnkyt','569681aoPkJu','17944eiaoiu','分页数量','_isreverse','function','metadata','20vqPRKV','@anncic-api/validator','__esModule','180BdkQkg','min','_size','RuleType','prototype','length','PageDTO','__decorate'];a14_0x20e1=function(){return _0x27217;};return a14_0x20e1();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
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.2.
|
|
21
|
-
"@anncic-api/core": "^1.2.
|
|
22
|
-
"@anncic-api/event": "^1.2.
|
|
23
|
-
"@anncic-api/typeorm": "^1.2.
|
|
24
|
-
"@anncic-api/validator": "^1.2.
|
|
20
|
+
"@anncic-api/cache": "^1.2.5",
|
|
21
|
+
"@anncic-api/core": "^1.2.5",
|
|
22
|
+
"@anncic-api/event": "^1.2.5",
|
|
23
|
+
"@anncic-api/typeorm": "^1.2.5",
|
|
24
|
+
"@anncic-api/validator": "^1.2.5",
|
|
25
25
|
"@midwayjs/cross-domain": "^3.6.0",
|
|
26
26
|
"@midwayjs/i18n": "^3.6.0",
|
|
27
27
|
"@midwayjs/koa": "^3.6.0",
|
|
28
28
|
"@midwayjs/static-file": "^3.6.0",
|
|
29
29
|
"@midwayjs/upload": "^3.6.0",
|
|
30
|
-
"anncic-apihelper": "^1.2.
|
|
30
|
+
"anncic-apihelper": "^1.2.5",
|
|
31
31
|
"exceljs": "^4.3.0",
|
|
32
32
|
"koa-send": "^5.0.1",
|
|
33
33
|
"urllib": "^3.3.0"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"javascript-obfuscator": "2.19.0",
|
|
38
38
|
"typescript": "^4.8.4"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "cce7121ac24f7f22830371c64361e137a3b438c6"
|
|
41
41
|
}
|