anncic-api 1.0.12 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/config/config.production.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/decorator/Action.js +1 -1
- package/dist/decorator/ActionApi.js +1 -1
- package/dist/decorator/ActionApitest.js +1 -1
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getRoutes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/package.json +14 -14
- package/public/apitest.js +18 -6
- package/public/index.html +0 -6
- package/dist/decorator/Controller.d.ts +0 -0
- package/dist/decorator/Controller.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x37622e=a0_0x16fc;function a0_0x4367(){var _0xf08fba=['134829uzjRgE','283422CRmHzR','50VGTWnG','2286200qtkABB','2273196XBOhye','default','3Vucuav','1039540YBSopH','22sCySCH','280JMgoiU','1UZDzvA','appDir','defineProperty','dhauo1234420123gg3234901','name','292262tlQxOn','2720459ifIyfl'];a0_0x4367=function(){return _0xf08fba;};return a0_0x4367();}(function(_0x4ac618,_0x578a98){var _0x1df027=a0_0x16fc,_0x39e4dc=_0x4ac618();while(!![]){try{var _0x13d250=-parseInt(_0x1df027(0xee))/0x1*(parseInt(_0x1df027(0xf3))/0x2)+parseInt(_0x1df027(0xea))/0x3*(parseInt(_0x1df027(0xeb))/0x4)+-parseInt(_0x1df027(0xe6))/0x5*(parseInt(_0x1df027(0xe5))/0x6)+parseInt(_0x1df027(0xf4))/0x7+parseInt(_0x1df027(0xe7))/0x8+-parseInt(_0x1df027(0xe4))/0x9*(parseInt(_0x1df027(0xed))/0xa)+parseInt(_0x1df027(0xec))/0xb*(parseInt(_0x1df027(0xe8))/0xc);if(_0x13d250===_0x578a98)break;else _0x39e4dc['push'](_0x39e4dc['shift']());}catch(_0x56775c){_0x39e4dc['push'](_0x39e4dc['shift']());}}}(a0_0x4367,0x432fa));function a0_0x16fc(_0x1e92ec,_0x3e2d95){var _0x4367c2=a0_0x4367();return a0_0x16fc=function(_0x16fc16,_0x1d07bc){_0x16fc16=_0x16fc16-0xe4;var _0x3200af=_0x4367c2[_0x16fc16];return _0x3200af;},a0_0x16fc(_0x1e92ec,_0x3e2d95);}Object[a0_0x37622e(0xf0)](exports,'__esModule',{'value':!![]}),exports[a0_0x37622e(0xe9)]=_0x27ed30=>{var _0x18a131=a0_0x37622e;return{'apitest':!![],'keys':_0x27ed30[_0x18a131(0xf2)],'anncicapi':{'timeout':0x1388,'password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':_0x18a131(0xf1),'checkcode':_0x18a131(0xf1)}}},'upload':{'tmpdir':_0x27ed30[_0x18a131(0xef)]+'/runtime/.upload','cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a1_0x59c81d=a1_0x2e24;function a1_0x2dc1(){var _0x2a96ea=['__esModule','3856304qLWAdG','10534185pWHwsk','6354xOLVMq','1631165iUfdxQ','37027660zqblIb','551QBGhBi','14ikLXcc','5806332DSrmOD','3WYfkaG','892024YpphQG'];a1_0x2dc1=function(){return _0x2a96ea;};return a1_0x2dc1();}(function(_0x6dafc7,_0x3f22cb){var _0x4246bf=a1_0x2e24,_0x409eed=_0x6dafc7();while(!![]){try{var _0x14343e=parseInt(_0x4246bf(0x1b0))/0x1*(-parseInt(_0x4246bf(0x1ad))/0x2)+parseInt(_0x4246bf(0x1b3))/0x3*(-parseInt(_0x4246bf(0x1b4))/0x4)+parseInt(_0x4246bf(0x1ae))/0x5+-parseInt(_0x4246bf(0x1b2))/0x6+parseInt(_0x4246bf(0x1b1))/0x7*(parseInt(_0x4246bf(0x1ab))/0x8)+-parseInt(_0x4246bf(0x1ac))/0x9+parseInt(_0x4246bf(0x1af))/0xa;if(_0x14343e===_0x3f22cb)break;else _0x409eed['push'](_0x409eed['shift']());}catch(_0x1ae808){_0x409eed['push'](_0x409eed['shift']());}}}(a1_0x2dc1,0xd72cb));function a1_0x2e24(_0x1e205f,_0x5190a5){var _0x2dc1bb=a1_0x2dc1();return a1_0x2e24=function(_0x2e2482,_0x5ccd2a){_0x2e2482=_0x2e2482-0x1ab;var _0x2169fe=_0x2dc1bb[_0x2e2482];return _0x2169fe;},a1_0x2e24(_0x1e205f,_0x5190a5);}Object['defineProperty'](exports,a1_0x59c81d(0x1b5),{'value':!![]}),exports['default']={'apitest':![],'anncicapi':{'timeout':0x1388}};
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x57441f=a2_0x58a5;(function(_0x1ff280,_0x1b9ccf){const _0x4fccb9=a2_0x58a5,_0x4503ec=_0x1ff280();while(!![]){try{const _0x23c414=parseInt(_0x4fccb9(0x21a))/0x1*(-parseInt(_0x4fccb9(0x1e0))/0x2)+-parseInt(_0x4fccb9(0x20b))/0x3+parseInt(_0x4fccb9(0x1f0))/0x4*(parseInt(_0x4fccb9(0x204))/0x5)+parseInt(_0x4fccb9(0x21b))/0x6+-parseInt(_0x4fccb9(0x218))/0x7+parseInt(_0x4fccb9(0x1fa))/0x8+parseInt(_0x4fccb9(0x1e7))/0x9*(-parseInt(_0x4fccb9(0x223))/0xa);if(_0x23c414===_0x1b9ccf)break;else _0x4503ec['push'](_0x4503ec['shift']());}catch(_0x325d83){_0x4503ec['push'](_0x4503ec['shift']());}}}(a2_0x3165,0x51ecd));function a2_0x3165(){const _0x4459fe=['3997860hNErcT','DEFAULT','config','object','Inject','headers','ApiService','@midwayjs/koa','2250vaIzwj','isArray','bodyParser','prototype','application','device','getApplications','bodyXml','keys','query','isNull','existsSync','HEADERS_SIGNATURE','Configuration','__esModule','upload','decorate','staticFile','./exception/ApiError','checkConfigKeys','@midwayjs/decorator','28fqUJcM','anncicapi','devices','getConfiguration','dir','@midwayjs/upload','design:type','27198VECsWl','@midwayjs/core','@midwayjs/static-file','beforeRoute','function','filterConfig','defineProperties','tmpdir','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','207972TJtQcO','input','@midwayjs/task','@anncic-api/core','registerMethodHandler','apimit','dirs','handlerActionRoute','context','request','4540752zGRJvy','anncic-apihelper','koa-xml-body','koa-bodyparser','addObject','@anncic-api/validator','ACTION_ROUTE_KEY','environment','hanlderApplications','koa','45wfhPSt','log','CustomConfiguration','target','anncic-api','./types/action','__decorate','839250PiCFwu','length','defineProperty','isString','_matchedRoute','@midwayjs/cross-domain','@anncic-api/typeorm','mkdirSync','decorator','getOwnPropertyDescriptor','string','metadata','body','49308deoglo','useMiddleware','28538JxWuHI'];a2_0x3165=function(){return _0x4459fe;};return a2_0x3165();}function a2_0x58a5(_0x4a36ba,_0x3336b0){const _0x316599=a2_0x3165();return a2_0x58a5=function(_0x58a5dc,_0x4d6565){_0x58a5dc=_0x58a5dc-0x1e0;let _0xdff3d6=_0x316599[_0x58a5dc];return _0xdff3d6;},a2_0x58a5(_0x4a36ba,_0x3336b0);}var __decorate=this&&this[a2_0x57441f(0x20a)]||function(_0x32de1a,_0x2e621e,_0x115630,_0x16b3b4){const _0xc3dd2c=a2_0x57441f;var _0x432702=arguments[_0xc3dd2c(0x20c)],_0x281e50=_0x432702<0x3?_0x2e621e:_0x16b3b4===null?_0x16b3b4=Object[_0xc3dd2c(0x214)](_0x2e621e,_0x115630):_0x16b3b4,_0x175d4a;if(typeof Reflect===_0xc3dd2c(0x21e)&&typeof Reflect['decorate']===_0xc3dd2c(0x1eb))_0x281e50=Reflect[_0xc3dd2c(0x233)](_0x32de1a,_0x2e621e,_0x115630,_0x16b3b4);else{for(var _0x5ee745=_0x32de1a[_0xc3dd2c(0x20c)]-0x1;_0x5ee745>=0x0;_0x5ee745--)if(_0x175d4a=_0x32de1a[_0x5ee745])_0x281e50=(_0x432702<0x3?_0x175d4a(_0x281e50):_0x432702>0x3?_0x175d4a(_0x2e621e,_0x115630,_0x281e50):_0x175d4a(_0x2e621e,_0x115630))||_0x281e50;}return _0x432702>0x3&&_0x281e50&&Object[_0xc3dd2c(0x20d)](_0x2e621e,_0x115630,_0x281e50),_0x281e50;},__metadata=this&&this['__metadata']||function(_0x384845,_0x38ed32){const _0x5490c4=a2_0x57441f;if(typeof Reflect==='object'&&typeof Reflect[_0x5490c4(0x216)]===_0x5490c4(0x1eb))return Reflect[_0x5490c4(0x216)](_0x384845,_0x38ed32);};Object['defineProperty'](exports,a2_0x57441f(0x231),{'value':!![]}),exports[a2_0x57441f(0x206)]=void 0x0;const decorator_1=require(a2_0x57441f(0x237)),core_1=require(a2_0x57441f(0x1e8)),ApiError_1=require(a2_0x57441f(0x235)),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x57441f(0x209)),fs=require('fs'),koa=require(a2_0x57441f(0x222)),i18n=require('@midwayjs/i18n'),task=require(a2_0x57441f(0x1f2)),upload=require(a2_0x57441f(0x1e5)),staticFile=require(a2_0x57441f(0x1e9)),crossDomain=require(a2_0x57441f(0x210)),bodyXml=require(a2_0x57441f(0x1fc)),bodyParser=require(a2_0x57441f(0x1fd)),ConfigDefault=require('./config/config.default'),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x57441f(0x1f3)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x57441f(0x211)),anncicValidator=require(a2_0x57441f(0x1ff)),anncicHelper=require(a2_0x57441f(0x1fb));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x21f70c=a2_0x57441f;await this[_0x21f70c(0x1ec)](),await this[_0x21f70c(0x236)](),await this[_0x21f70c(0x1f7)](),await this[_0x21f70c(0x202)]();}async['checkConfigKeys'](){}async['handlerActionRoute'](){const _0x1045f2=a2_0x57441f,_0xc444db=this[_0x1045f2(0x21d)][_0x1045f2(0x1e3)]();this[_0x1045f2(0x213)][_0x1045f2(0x1f4)](action_1[_0x1045f2(0x200)],_0x567e4b=>{const _0x466d61=_0x1045f2,_0x386482=_0x567e4b[_0x466d61(0x216)];return{'before':async _0x1770fc=>{const _0x16bf52=_0x466d61;var _0x240d82,_0x173d21,_0x2a6727,_0x39a620,_0x1b903e;const _0x247d74=(_0x240d82=_0x1770fc===null||_0x1770fc===void 0x0?void 0x0:_0x1770fc[_0x16bf52(0x207)])===null||_0x240d82===void 0x0?void 0x0:_0x240d82[core_1['REQUEST_OBJ_CTX_KEY']];if(_0x247d74){if((_0x386482===null||_0x386482===void 0x0?void 0x0:_0x386482[_0x16bf52(0x1f5)])&&!this[_0x16bf52(0x221)]['checksign']((_0x173d21=_0x247d74===null||_0x247d74===void 0x0?void 0x0:_0x247d74[_0x16bf52(0x1f9)])===null||_0x173d21===void 0x0?void 0x0:_0x173d21[_0x16bf52(0x220)]))throw new AnnError(ApiError_1['ApiError'][_0x16bf52(0x22f)]);((_0x2a6727=_0x247d74[_0x16bf52(0x220)])===null||_0x2a6727===void 0x0?void 0x0:_0x2a6727['device'])&&((_0x1b903e=(_0x39a620=_0xc444db===null||_0xc444db===void 0x0?void 0x0:_0xc444db['anncicapi'])===null||_0x39a620===void 0x0?void 0x0:_0x39a620[_0x16bf52(0x1e2)])===null||_0x1b903e===void 0x0?void 0x0:_0x1b903e[_0x247d74[_0x16bf52(0x220)]['device']])&&(typeof _0xc444db['anncicapi'][_0x16bf52(0x1e2)][_0x247d74['headers'][_0x16bf52(0x228)]][_0x16bf52(0x1ea)]==_0x16bf52(0x1eb)&&await _0xc444db[_0x16bf52(0x1e1)][_0x16bf52(0x1e2)][_0x247d74[_0x16bf52(0x220)][_0x16bf52(0x228)]][_0x16bf52(0x1ea)]((_0x247d74===null||_0x247d74===void 0x0?void 0x0:_0x247d74[_0x16bf52(0x20f)])||undefined,_0x386482,_0x247d74));}},'afterThrow':(_0x1beb73,_0x163385)=>{throw _0x163385;}};});}async[a2_0x57441f(0x202)](){const _0x2d16d9=a2_0x57441f;this[_0x2d16d9(0x227)][_0x2d16d9(0x229)]([_0x2d16d9(0x203)])['forEach'](_0xd761c8=>{const _0x16f4f2=_0x2d16d9;_0xd761c8['useMiddleware'](bodyXml(this[_0x16f4f2(0x21d)][_0x16f4f2(0x1e3)](_0x16f4f2(0x22a)))),_0xd761c8[_0x16f4f2(0x219)](bodyParser(this[_0x16f4f2(0x21d)][_0x16f4f2(0x1e3)](_0x16f4f2(0x225)))),(_0xd761c8===null||_0xd761c8===void 0x0?void 0x0:_0xd761c8['context'])&&Object[_0x16f4f2(0x1ed)](_0xd761c8[_0x16f4f2(0x1f8)],{'ok':{'value':function(_0x48c4b2,_0x3e64d8,_0x51dbac=0x0){return{'code':_0x51dbac,'data':_0x48c4b2,'extra':_0x3e64d8};}},'err':{'value':function(_0x4fdd84,_0x2f0466,_0x5ba6f5=0x1){return{'code':_0x5ba6f5,'extra':_0x2f0466,'msg':_0x4fdd84};}},'input':{'value':function(_0x2d0f3a,_0x11c930){const _0x1617a1=_0x16f4f2;var _0x44c7e8;const _0x550f57=lodash['defaultsDeep']({},this[_0x1617a1(0x1f9)][_0x1617a1(0x217)]||this[_0x1617a1(0x1f9)][((_0x44c7e8=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x44c7e8===void 0x0?void 0x0:_0x44c7e8['key'])||_0x1617a1(0x217)]||{},this[_0x1617a1(0x1f9)][_0x1617a1(0x22c)]||{});return _0x2d0f3a?lodash['get'](_0x550f57,_0x2d0f3a,_0x11c930):_0x550f57;}},'when':{'value':async function(_0x2485e9,_0x3c1ad9){const _0x3e8a95=_0x16f4f2,_0x114f51=this[_0x3e8a95(0x1f1)](_0x2485e9,null);if(!lodash[_0x3e8a95(0x22d)](_0x114f51))return await _0x3c1ad9(_0x114f51);}},'only':{'value':function(_0x205414){const _0x4b03bd=_0x16f4f2,_0x198d93={};for(let _0x433b68=0x0;_0x433b68<_0x205414[_0x4b03bd(0x20c)];_0x433b68++){lodash[_0x4b03bd(0x224)](_0x205414[_0x433b68])&&_0x205414[_0x433b68][_0x4b03bd(0x20c)]>0x0&&lodash[_0x4b03bd(0x20e)](_0x205414[_0x433b68][0x0])&&(_0x198d93[_0x205414[_0x433b68][0x0]]=this[_0x4b03bd(0x1f1)](_0x205414[_0x433b68][0x0],_0x205414[_0x433b68][_0x4b03bd(0x20c)]>0x1?_0x205414[_0x433b68][0x1]:null));}return _0x198d93;}}});});}async['filterConfig'](){const _0x15f0b1=a2_0x57441f;var _0x1ea829,_0x53d2d1,_0x5fd638,_0x14c4fb,_0x38e164,_0x594a0e;const _0x4f7525=this[_0x15f0b1(0x21d)][_0x15f0b1(0x1e3)]();((_0x53d2d1=(_0x1ea829=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['anncicapi'])===null||_0x1ea829===void 0x0?void 0x0:_0x1ea829[_0x15f0b1(0x1e2)])===null||_0x53d2d1===void 0x0?void 0x0:_0x53d2d1[_0x15f0b1(0x21c)])&&Object[_0x15f0b1(0x22b)](_0x4f7525[_0x15f0b1(0x1e1)][_0x15f0b1(0x1e2)])[_0x15f0b1(0x20c)]>0x1&&delete _0x4f7525[_0x15f0b1(0x1e1)][_0x15f0b1(0x1e2)][_0x15f0b1(0x21c)];if((_0x5fd638=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['staticFile'])===null||_0x5fd638===void 0x0?void 0x0:_0x5fd638[_0x15f0b1(0x1f6)])for(const _0x4290c3 in _0x4f7525[_0x15f0b1(0x234)][_0x15f0b1(0x1f6)]){((_0x14c4fb=_0x4f7525['staticFile']['dirs'][_0x4290c3])===null||_0x14c4fb===void 0x0?void 0x0:_0x14c4fb[_0x15f0b1(0x1e4)])&&typeof((_0x38e164=_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3])===null||_0x38e164===void 0x0?void 0x0:_0x38e164['dir'])==_0x15f0b1(0x215)&&!fs['existsSync'](_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3][_0x15f0b1(0x1e4)])&&(fs[_0x15f0b1(0x212)](_0x4f7525[_0x15f0b1(0x234)][_0x15f0b1(0x1f6)][_0x4290c3]['dir'],{'recursive':!![]}),console['log']('Anncic-api\x20static-file\x20:\x20mkdir\x20'+_0x4f7525['staticFile'][_0x15f0b1(0x1f6)][_0x4290c3][_0x15f0b1(0x1e4)]));}((_0x594a0e=_0x4f7525===null||_0x4f7525===void 0x0?void 0x0:_0x4f7525['upload'])===null||_0x594a0e===void 0x0?void 0x0:_0x594a0e[_0x15f0b1(0x1ee)])&&!fs[_0x15f0b1(0x22e)](_0x4f7525[_0x15f0b1(0x232)]['tmpdir'])&&(fs['mkdirSync'](_0x4f7525[_0x15f0b1(0x232)]['tmpdir'],{'recursive':!![]}),console[_0x15f0b1(0x205)](_0x15f0b1(0x1ef)+_0x4f7525[_0x15f0b1(0x232)][_0x15f0b1(0x1ee)])),this[_0x15f0b1(0x21d)][_0x15f0b1(0x1fe)](_0x4f7525);}};__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata('design:type',core_1['MidwayConfigService'])],CustomConfiguration[a2_0x57441f(0x226)],'config',void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayDecoratorService'])],CustomConfiguration['prototype'],a2_0x57441f(0x213),void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayApplicationManager'])],CustomConfiguration[a2_0x57441f(0x226)],'application',void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),core_1['MidwayEnvironmentService'])],CustomConfiguration[a2_0x57441f(0x226)],a2_0x57441f(0x201),void 0x0),__decorate([(0x0,decorator_1[a2_0x57441f(0x21f)])(),__metadata(a2_0x57441f(0x1e6),ApiService_1[a2_0x57441f(0x221)])],CustomConfiguration[a2_0x57441f(0x226)],a2_0x57441f(0x221),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x57441f(0x230)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x57441f(0x208),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x57441f(0x206)]=CustomConfiguration;
|
|
1
|
+
'use strict';const a2_0x15d18d=a2_0x4711;function a2_0x4711(_0x5340c5,_0x1e6f33){const _0x217dfb=a2_0x217d();return a2_0x4711=function(_0x47111d,_0x32d056){_0x47111d=_0x47111d-0x1b3;let _0x318ad6=_0x217dfb[_0x47111d];return _0x318ad6;},a2_0x4711(_0x5340c5,_0x1e6f33);}(function(_0x3d864b,_0x343c55){const _0x3d97d0=a2_0x4711,_0xc5b591=_0x3d864b();while(!![]){try{const _0x2ea049=-parseInt(_0x3d97d0(0x1e2))/0x1*(parseInt(_0x3d97d0(0x1d8))/0x2)+parseInt(_0x3d97d0(0x1bd))/0x3+-parseInt(_0x3d97d0(0x1d7))/0x4+parseInt(_0x3d97d0(0x1d5))/0x5*(parseInt(_0x3d97d0(0x1f2))/0x6)+parseInt(_0x3d97d0(0x1b7))/0x7*(-parseInt(_0x3d97d0(0x1fb))/0x8)+parseInt(_0x3d97d0(0x1fc))/0x9*(parseInt(_0x3d97d0(0x1fd))/0xa)+parseInt(_0x3d97d0(0x1df))/0xb*(-parseInt(_0x3d97d0(0x1d9))/0xc);if(_0x2ea049===_0x343c55)break;else _0xc5b591['push'](_0xc5b591['shift']());}catch(_0xac9751){_0xc5b591['push'](_0xc5b591['shift']());}}}(a2_0x217d,0x418a5));function a2_0x217d(){const _0x342a05=['device','checkConfigKeys','dir','20153SfeIAh','environment','upload','hanlderApplications','defaultsDeep','config','1173969fUhFcd','apimit','input','onReady','context','existsSync','object','getOwnPropertyDescriptor','Inject','getApplications','ApiError','target','defineProperties','devices','useMiddleware','./types/action','__esModule','@anncic-api/event','@midwayjs/task','@midwayjs/cross-domain','headers','mkdirSync','application','tmpdir','5KUJIob','string','403464raGSFk','256930NPJKWA','5465940bCtoti','HEADERS_SIGNATURE','@midwayjs/static-file','defineProperty','koa-bodyparser','Anncic-api\x20static-file\x20:\x20mkdir\x20','11oSnFYT','keys','anncic-api','1tBTNTA','MidwayDecoratorService','function','ApiService','beforeRoute','@midwayjs/upload','@midwayjs/core','decorate','MidwayApplicationManager','handlerActionRoute','bodyXml','metadata','log','CustomConfiguration','filterConfig','__decorate','2975538VAjRrz','decorator','./config/config.production','@anncic-api/core','body','request','dirs','length','prototype','832daepyV','5661cZsRaG','5810uXrdSW','staticFile','./exception/ApiError','@midwayjs/decorator','DEFAULT','addObject','Configuration','design:type','@anncic-api/typeorm','checksign','forEach','koa','__metadata','registerMethodHandler','anncicapi','ACTION_ROUTE_KEY','query','getConfiguration','./config/config.default','@anncic-api/validator','isString','_matchedRoute'];a2_0x217d=function(){return _0x342a05;};return a2_0x217d();}var __decorate=this&&this[a2_0x15d18d(0x1f1)]||function(_0x5cf387,_0x269d2c,_0x86fca8,_0x27f813){const _0x3c3f62=a2_0x15d18d;var _0x20b93b=arguments[_0x3c3f62(0x1f9)],_0x53933e=_0x20b93b<0x3?_0x269d2c:_0x27f813===null?_0x27f813=Object[_0x3c3f62(0x1c4)](_0x269d2c,_0x86fca8):_0x27f813,_0x3539d2;if(typeof Reflect===_0x3c3f62(0x1c3)&&typeof Reflect[_0x3c3f62(0x1e9)]===_0x3c3f62(0x1e4))_0x53933e=Reflect[_0x3c3f62(0x1e9)](_0x5cf387,_0x269d2c,_0x86fca8,_0x27f813);else{for(var _0x532438=_0x5cf387[_0x3c3f62(0x1f9)]-0x1;_0x532438>=0x0;_0x532438--)if(_0x3539d2=_0x5cf387[_0x532438])_0x53933e=(_0x20b93b<0x3?_0x3539d2(_0x53933e):_0x20b93b>0x3?_0x3539d2(_0x269d2c,_0x86fca8,_0x53933e):_0x3539d2(_0x269d2c,_0x86fca8))||_0x53933e;}return _0x20b93b>0x3&&_0x53933e&&Object[_0x3c3f62(0x1dc)](_0x269d2c,_0x86fca8,_0x53933e),_0x53933e;},__metadata=this&&this[a2_0x15d18d(0x209)]||function(_0x39a701,_0x36dbcc){const _0x4e3fb4=a2_0x15d18d;if(typeof Reflect===_0x4e3fb4(0x1c3)&&typeof Reflect[_0x4e3fb4(0x1ed)]===_0x4e3fb4(0x1e4))return Reflect['metadata'](_0x39a701,_0x36dbcc);};Object[a2_0x15d18d(0x1dc)](exports,a2_0x15d18d(0x1cd),{'value':!![]}),exports[a2_0x15d18d(0x1ef)]=void 0x0;const decorator_1=require(a2_0x15d18d(0x200)),core_1=require(a2_0x15d18d(0x1e8)),ApiError_1=require(a2_0x15d18d(0x1ff)),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x15d18d(0x1cc)),fs=require('fs'),koa=require('@midwayjs/koa'),i18n=require('@midwayjs/i18n'),task=require(a2_0x15d18d(0x1cf)),upload=require(a2_0x15d18d(0x1e7)),staticFile=require(a2_0x15d18d(0x1db)),crossDomain=require(a2_0x15d18d(0x1d0)),bodyXml=require('koa-xml-body'),bodyParser=require(a2_0x15d18d(0x1dd)),ConfigDefault=require(a2_0x15d18d(0x20f)),ConfigProduction=require(a2_0x15d18d(0x1f4)),anncic=require(a2_0x15d18d(0x1f5)),anncicEvent=require(a2_0x15d18d(0x1ce)),anncicTypeorm=require(a2_0x15d18d(0x205)),anncicValidator=require(a2_0x15d18d(0x210)),anncicHelper=require('anncic-apihelper');let CustomConfiguration=class CustomConfiguration{async[a2_0x15d18d(0x1c0)](){const _0x1f36cd=a2_0x15d18d;await this[_0x1f36cd(0x1f0)](),await this[_0x1f36cd(0x1b5)](),await this['handlerActionRoute'](),await this[_0x1f36cd(0x1ba)]();}async[a2_0x15d18d(0x1b5)](){}async[a2_0x15d18d(0x1eb)](){const _0x47351e=a2_0x15d18d,_0x261989=this['config'][_0x47351e(0x20e)]();this['decorator'][_0x47351e(0x20a)](action_1[_0x47351e(0x20c)],_0x490744=>{const _0x5405d4=_0x47351e,_0x3fc97b=_0x490744[_0x5405d4(0x1ed)];return{'before':async _0x1d6253=>{const _0x37a6ae=_0x5405d4;var _0x5b0095,_0x2ea6f8,_0x29419a,_0x1bbe5a,_0x32e4a3;const _0x366226=(_0x5b0095=_0x1d6253===null||_0x1d6253===void 0x0?void 0x0:_0x1d6253[_0x37a6ae(0x1c8)])===null||_0x5b0095===void 0x0?void 0x0:_0x5b0095[core_1['REQUEST_OBJ_CTX_KEY']];if(_0x366226){if((_0x3fc97b===null||_0x3fc97b===void 0x0?void 0x0:_0x3fc97b[_0x37a6ae(0x1be)])&&!this['ApiService'][_0x37a6ae(0x206)]((_0x2ea6f8=_0x366226===null||_0x366226===void 0x0?void 0x0:_0x366226[_0x37a6ae(0x1f7)])===null||_0x2ea6f8===void 0x0?void 0x0:_0x2ea6f8[_0x37a6ae(0x1d1)]))throw new AnnError(ApiError_1[_0x37a6ae(0x1c7)][_0x37a6ae(0x1da)]);((_0x29419a=_0x366226[_0x37a6ae(0x1d1)])===null||_0x29419a===void 0x0?void 0x0:_0x29419a[_0x37a6ae(0x1b4)])&&((_0x32e4a3=(_0x1bbe5a=_0x261989===null||_0x261989===void 0x0?void 0x0:_0x261989[_0x37a6ae(0x20b)])===null||_0x1bbe5a===void 0x0?void 0x0:_0x1bbe5a['devices'])===null||_0x32e4a3===void 0x0?void 0x0:_0x32e4a3[_0x366226[_0x37a6ae(0x1d1)][_0x37a6ae(0x1b4)]])&&(typeof _0x261989[_0x37a6ae(0x20b)][_0x37a6ae(0x1ca)][_0x366226[_0x37a6ae(0x1d1)][_0x37a6ae(0x1b4)]][_0x37a6ae(0x1e6)]==_0x37a6ae(0x1e4)&&await _0x261989[_0x37a6ae(0x20b)]['devices'][_0x366226['headers'][_0x37a6ae(0x1b4)]][_0x37a6ae(0x1e6)]((_0x366226===null||_0x366226===void 0x0?void 0x0:_0x366226[_0x37a6ae(0x1b3)])||undefined,_0x3fc97b,_0x366226));}},'afterThrow':(_0x4b094c,_0x51b9e2)=>{throw _0x51b9e2;}};});}async['hanlderApplications'](){const _0x333b2f=a2_0x15d18d;this[_0x333b2f(0x1d3)][_0x333b2f(0x1c6)]([_0x333b2f(0x208)])[_0x333b2f(0x207)](_0x5e0f79=>{const _0x4d8513=_0x333b2f;_0x5e0f79[_0x4d8513(0x1cb)](bodyXml(this[_0x4d8513(0x1bc)][_0x4d8513(0x20e)](_0x4d8513(0x1ec)))),_0x5e0f79[_0x4d8513(0x1cb)](bodyParser(this[_0x4d8513(0x1bc)][_0x4d8513(0x20e)]('bodyParser'))),(_0x5e0f79===null||_0x5e0f79===void 0x0?void 0x0:_0x5e0f79[_0x4d8513(0x1c1)])&&Object[_0x4d8513(0x1c9)](_0x5e0f79[_0x4d8513(0x1c1)],{'ok':{'value':function(_0x3cbfcb,_0x4b26b3,_0x485650=0x0){return{'code':_0x485650,'data':_0x3cbfcb,'extra':_0x4b26b3};}},'err':{'value':function(_0x12dc23,_0x4a71a1,_0x5478d6=0x1){return{'code':_0x5478d6,'extra':_0x4a71a1,'msg':_0x12dc23};}},'input':{'value':function(_0x22acfd,_0x13bb10){const _0x3a3e6a=_0x4d8513;var _0x5cfa9c;const _0x162d3d=lodash[_0x3a3e6a(0x1bb)]({},this[_0x3a3e6a(0x1f7)][_0x3a3e6a(0x1f6)]||this[_0x3a3e6a(0x1f7)][((_0x5cfa9c=config===null||config===void 0x0?void 0x0:config[_0x3a3e6a(0x1ec)])===null||_0x5cfa9c===void 0x0?void 0x0:_0x5cfa9c['key'])||_0x3a3e6a(0x1f6)]||{},this[_0x3a3e6a(0x1f7)][_0x3a3e6a(0x20d)]||{});return _0x22acfd?lodash['get'](_0x162d3d,_0x22acfd,_0x13bb10):_0x162d3d;}},'when':{'value':async function(_0x3e2061,_0x1793ff){const _0x1fcd19=this['input'](_0x3e2061,null);if(!lodash['isNull'](_0x1fcd19))return await _0x1793ff(_0x1fcd19);}},'only':{'value':function(_0x5acd68){const _0x3314ad=_0x4d8513,_0x415b8a={};for(let _0x5b2c9c=0x0;_0x5b2c9c<_0x5acd68[_0x3314ad(0x1f9)];_0x5b2c9c++){lodash['isArray'](_0x5acd68[_0x5b2c9c])&&_0x5acd68[_0x5b2c9c][_0x3314ad(0x1f9)]>0x0&&lodash[_0x3314ad(0x211)](_0x5acd68[_0x5b2c9c][0x0])&&(_0x415b8a[_0x5acd68[_0x5b2c9c][0x0]]=this[_0x3314ad(0x1bf)](_0x5acd68[_0x5b2c9c][0x0],_0x5acd68[_0x5b2c9c]['length']>0x1?_0x5acd68[_0x5b2c9c][0x1]:null));}return _0x415b8a;}}});});}async[a2_0x15d18d(0x1f0)](){const _0x161b5b=a2_0x15d18d;var _0xe38407,_0x451ef2,_0x10b6e9,_0xc5c1d5,_0x514816,_0x4b1f76;const _0x341d14=this[_0x161b5b(0x1bc)][_0x161b5b(0x20e)]();((_0x451ef2=(_0xe38407=_0x341d14===null||_0x341d14===void 0x0?void 0x0:_0x341d14[_0x161b5b(0x20b)])===null||_0xe38407===void 0x0?void 0x0:_0xe38407['devices'])===null||_0x451ef2===void 0x0?void 0x0:_0x451ef2[_0x161b5b(0x201)])&&Object[_0x161b5b(0x1e0)](_0x341d14[_0x161b5b(0x20b)][_0x161b5b(0x1ca)])[_0x161b5b(0x1f9)]>0x1&&delete _0x341d14[_0x161b5b(0x20b)][_0x161b5b(0x1ca)]['DEFAULT'];if((_0x10b6e9=_0x341d14===null||_0x341d14===void 0x0?void 0x0:_0x341d14[_0x161b5b(0x1fe)])===null||_0x10b6e9===void 0x0?void 0x0:_0x10b6e9['dirs'])for(const _0x33920d in _0x341d14['staticFile'][_0x161b5b(0x1f8)]){((_0xc5c1d5=_0x341d14[_0x161b5b(0x1fe)][_0x161b5b(0x1f8)][_0x33920d])===null||_0xc5c1d5===void 0x0?void 0x0:_0xc5c1d5['dir'])&&typeof((_0x514816=_0x341d14[_0x161b5b(0x1fe)][_0x161b5b(0x1f8)][_0x33920d])===null||_0x514816===void 0x0?void 0x0:_0x514816[_0x161b5b(0x1b6)])==_0x161b5b(0x1d6)&&!fs[_0x161b5b(0x1c2)](_0x341d14[_0x161b5b(0x1fe)][_0x161b5b(0x1f8)][_0x33920d][_0x161b5b(0x1b6)])&&(fs[_0x161b5b(0x1d2)](_0x341d14['staticFile'][_0x161b5b(0x1f8)][_0x33920d]['dir'],{'recursive':!![]}),console[_0x161b5b(0x1ee)](_0x161b5b(0x1de)+_0x341d14['staticFile']['dirs'][_0x33920d][_0x161b5b(0x1b6)]));}((_0x4b1f76=_0x341d14===null||_0x341d14===void 0x0?void 0x0:_0x341d14[_0x161b5b(0x1b9)])===null||_0x4b1f76===void 0x0?void 0x0:_0x4b1f76['tmpdir'])&&!fs['existsSync'](_0x341d14['upload'][_0x161b5b(0x1d4)])&&(fs[_0x161b5b(0x1d2)](_0x341d14['upload'][_0x161b5b(0x1d4)],{'recursive':!![]}),console[_0x161b5b(0x1ee)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0x341d14['upload'][_0x161b5b(0x1d4)])),this[_0x161b5b(0x1bc)][_0x161b5b(0x202)](_0x341d14);}};__decorate([(0x0,decorator_1[a2_0x15d18d(0x1c5)])(),__metadata(a2_0x15d18d(0x204),core_1['MidwayConfigService'])],CustomConfiguration[a2_0x15d18d(0x1fa)],'config',void 0x0),__decorate([(0x0,decorator_1[a2_0x15d18d(0x1c5)])(),__metadata(a2_0x15d18d(0x204),core_1[a2_0x15d18d(0x1e3)])],CustomConfiguration[a2_0x15d18d(0x1fa)],a2_0x15d18d(0x1f3),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata(a2_0x15d18d(0x204),core_1[a2_0x15d18d(0x1ea)])],CustomConfiguration[a2_0x15d18d(0x1fa)],a2_0x15d18d(0x1d3),void 0x0),__decorate([(0x0,decorator_1[a2_0x15d18d(0x1c5)])(),__metadata('design:type',core_1['MidwayEnvironmentService'])],CustomConfiguration[a2_0x15d18d(0x1fa)],a2_0x15d18d(0x1b8),void 0x0),__decorate([(0x0,decorator_1[a2_0x15d18d(0x1c5)])(),__metadata(a2_0x15d18d(0x204),ApiService_1[a2_0x15d18d(0x1e5)])],CustomConfiguration['prototype'],a2_0x15d18d(0x1e5),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a2_0x15d18d(0x203)])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper,task],'namespace':a2_0x15d18d(0x1e1),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x515749=a3_0x1745;(function(_0x1dfd7d,_0x594cf6){const _0x190dc6=a3_0x1745,_0x1e08a5=_0x1dfd7d();while(!![]){try{const _0x53000f=parseInt(_0x190dc6(0x18e))/0x1+parseInt(_0x190dc6(0x19f))/0x2*(parseInt(_0x190dc6(0x1a1))/0x3)+-parseInt(_0x190dc6(0x190))/0x4+parseInt(_0x190dc6(0x1b5))/0x5*(parseInt(_0x190dc6(0x193))/0x6)+parseInt(_0x190dc6(0x1ab))/0x7+-parseInt(_0x190dc6(0x1a0))/0x8+-parseInt(_0x190dc6(0x1ae))/0x9;if(_0x53000f===_0x594cf6)break;else _0x1e08a5['push'](_0x1e08a5['shift']());}catch(_0x5718bd){_0x1e08a5['push'](_0x1e08a5['shift']());}}}(a3_0x37af,0x56628));function a3_0x1745(_0x315936,_0x5777d2){const _0x37afe9=a3_0x37af();return a3_0x1745=function(_0x174589,_0x4ff2fb){_0x174589=_0x174589-0x187;let _0x9ed6ea=_0x37afe9[_0x174589];return _0x9ed6ea;},a3_0x1745(_0x315936,_0x5777d2);}Object[a3_0x515749(0x198)](exports,a3_0x515749(0x1b7),{'value':!![]}),exports[a3_0x515749(0x19d)]=exports[a3_0x515749(0x192)]=void 0x0;const fs=require('fs'),decorator_1=require('@midwayjs/decorator'),action_1=require(a3_0x515749(0x1b6));function Action(_0x4e80c9,_0x790171,_0x55455c={'middleware':[],'sensitive':!![]}){return _0x2241cc=>{const _0x200a82=a3_0x1745;_0x55455c['tagName']=_0x790171;const _0x5b6d4c=parseRoute(_0x4e80c9);if(_0x5b6d4c[_0x200a82(0x1b3)]){_0x55455c[_0x200a82(0x196)]=_0x55455c[_0x200a82(0x196)]?'/'+_0x5b6d4c[_0x200a82(0x1b3)]+'/'+_0x55455c['prefix']:'/'+_0x5b6d4c[_0x200a82(0x18c)];_0x5b6d4c['prefix']&&(_0x55455c[_0x200a82(0x196)]='/'+_0x5b6d4c['prefix']+'/'+_0x55455c[_0x200a82(0x196)]);if(fs[_0x200a82(0x197)](_0x5b6d4c['rootpath']+_0x200a82(0x1a3)+_0x5b6d4c[_0x200a82(0x1b3)]+_0x200a82(0x1b2)+(lodash['endsWith'](_0x5b6d4c['filepath'],'ts')?'ts':'js'))){const _0x5e9be5=include(_0x5b6d4c[_0x200a82(0x19e)]+_0x200a82(0x1a3)+_0x5b6d4c[_0x200a82(0x1b3)]+_0x200a82(0x1b2)+(lodash[_0x200a82(0x189)](_0x5b6d4c['filepath'],'ts')?'ts':'js'));if(_0x5e9be5[_0x200a82(0x1a2)]&&lodash[_0x200a82(0x1a8)](_0x5e9be5[_0x200a82(0x1a2)])&&_0x5e9be5[_0x200a82(0x1a2)][_0x200a82(0x1a6)]>0x0)for(let _0x28e5ed in _0x5e9be5[_0x200a82(0x1a2)]){_0x5e9be5['middlewareIgnore'][_0x200a82(0x1b8)](_0x5e9be5[_0x200a82(0x1a2)][_0x28e5ed])==-0x1&&_0x55455c[_0x200a82(0x1a2)][_0x200a82(0x1a5)](_0x5e9be5[_0x200a82(0x1a2)][_0x28e5ed]);}}_0x55455c[_0x200a82(0x196)]=_0x55455c['prefix']['toLowerCase']()[_0x200a82(0x199)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x200a82(0x18a)])(action_1['ACTION_KEY'],_0x2241cc),(0x0,decorator_1['Controller'])(_0x55455c[_0x200a82(0x196)],_0x55455c)(_0x2241cc),(0x0,decorator_1[_0x200a82(0x188)])(action_1[_0x200a82(0x18f)],{'prefix':_0x55455c['prefix'],'pprefix':_0x5b6d4c[_0x200a82(0x196)],'module':_0x5b6d4c['module'],'filepath':_0x5b6d4c['filepath'],'routerOptions':_0x55455c},_0x2241cc);}else _0x55455c['prefix']=_0x55455c[_0x200a82(0x196)]?'/'+_0x55455c['prefix']:'/'+_0x5b6d4c[_0x200a82(0x18c)],_0x5b6d4c['prefix']&&(_0x55455c['prefix']='/'+_0x5b6d4c[_0x200a82(0x196)]+'/'+_0x55455c[_0x200a82(0x196)]),_0x55455c[_0x200a82(0x196)]=_0x55455c[_0x200a82(0x196)][_0x200a82(0x1b0)]()[_0x200a82(0x199)](/\/{2,}/g,'/'),(0x0,decorator_1[_0x200a82(0x18a)])(action_1[_0x200a82(0x18f)],_0x2241cc),(0x0,decorator_1['Controller'])(_0x55455c[_0x200a82(0x196)],_0x55455c)(_0x2241cc),(0x0,decorator_1['saveClassMetadata'])(action_1[_0x200a82(0x18f)],{'prefix':_0x55455c[_0x200a82(0x196)],'module':_0x5b6d4c[_0x200a82(0x1b3)],'pprefix':_0x5b6d4c['prefix'],'filepath':_0x5b6d4c[_0x200a82(0x1b4)],'routerOptions':_0x55455c},_0x2241cc);};}function a3_0x37af(){const _0x3d4cc6=['defineProperty','replace','cwd','match','split','parseRoute','rootpath','2tXwzGj','2339512VSvnuO','893112GQgtTj','middleware','/apps/','apps/','push','length','-controller','isArray','substring','trim','1343328zMZftq','splice','\x20文件请放在apps/','1705158JbRiBt','app/controller/','toLowerCase','filter','/config.','module','filepath','488335odVOfs','../types/action','__esModule','indexOf','join','saveClassMetadata','endsWith','saveModule','/controller/','route','-action','334468kyVPmk','ACTION_KEY','1125376nUbruy','/controller/文件下','Action','18FxFLVE','\x20文件请放在app/controller/文件下','startsWith','prefix','existsSync'];a3_0x37af=function(){return _0x3d4cc6;};return a3_0x37af();}exports[a3_0x515749(0x192)]=Action;function parseRoute(_0x2255a9){const _0x35c1d4=a3_0x515749;_0x2255a9=_0x2255a9[_0x35c1d4(0x199)](/(\\|\/)/g,'/');const _0x50bb69=process[_0x35c1d4(0x19a)]()['replace'](/(\\|\/)/g,'/'),_0x2889ee=_0x2255a9['substring'](0x0,_0x50bb69['length']+_0x2255a9['substring'](_0x50bb69[_0x35c1d4(0x1a6)]+0x1)['indexOf']('/')+0x1),_0x28a571=_0x2255a9['substring'](_0x2889ee['length']+0x1)['replace'](/(\\|\/)/g,'/'),_0x43fef5={'route':'','prefix':![],'module':![],'rootpath':_0x2889ee,'filepath':_0x28a571};if(_0x28a571[_0x35c1d4(0x195)](_0x35c1d4(0x1af))){const _0x3a3377=_0x28a571[_0x35c1d4(0x1a9)](_0x35c1d4(0x1af)[_0x35c1d4(0x1a6)])[_0x35c1d4(0x19c)]('/')[_0x35c1d4(0x1b1)](_0x24137b=>_0x24137b&&_0x24137b[_0x35c1d4(0x1aa)]());return _0x3a3377[_0x35c1d4(0x1a6)]>0x1&&(_0x43fef5[_0x35c1d4(0x196)]=_0x3a3377[0x0][_0x35c1d4(0x1b0)](),_0x3a3377['splice'](0x0,0x1)),_0x43fef5[_0x35c1d4(0x18c)]=('/'+_0x3a3377[_0x35c1d4(0x187)]('/'))[_0x35c1d4(0x199)](/(\.ts|\.js)$/,'')[_0x35c1d4(0x199)](/\/{2,}/g,'/')[_0x35c1d4(0x19b)](/[\/|A-Z]*[^A-Z]+/g)[_0x35c1d4(0x187)]('-')['toLowerCase']()[_0x35c1d4(0x199)](/\/\-/g,'/'),_0x43fef5[_0x35c1d4(0x18c)]['endsWith'](_0x35c1d4(0x18d))&&(_0x43fef5[_0x35c1d4(0x18c)]=_0x43fef5['route'][_0x35c1d4(0x1a9)](0x0,_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x1a6)]-0x7)),_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x189)](_0x35c1d4(0x1a7))&&(_0x43fef5[_0x35c1d4(0x18c)]=_0x43fef5['route'][_0x35c1d4(0x1a9)](0x0,_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x1a6)]-0xb)),_0x43fef5;}else{if(_0x28a571[_0x35c1d4(0x195)](_0x35c1d4(0x1a4))){const _0x2c2374=_0x28a571['substring'](0x0,_0x28a571['indexOf'](_0x35c1d4(0x1a3))+0x5),_0x1bffb9=_0x28a571['substring'](_0x2c2374['length']+0x1)[_0x35c1d4(0x199)](/(\\|\/)/g,'/')[_0x35c1d4(0x19c)]('/')[0x0];if(_0x28a571[_0x35c1d4(0x195)](_0x35c1d4(0x1a4)+_0x1bffb9+_0x35c1d4(0x18b))){const _0x5d4274=_0x28a571[_0x35c1d4(0x1a9)]((_0x2c2374+'/'+_0x1bffb9+_0x35c1d4(0x18b))[_0x35c1d4(0x1a6)])[_0x35c1d4(0x19c)]('/')[_0x35c1d4(0x1b1)](_0x5587ba=>_0x5587ba&&_0x5587ba['trim']());return _0x5d4274[_0x35c1d4(0x1a6)]>0x1&&(_0x43fef5[_0x35c1d4(0x196)]=_0x5d4274[0x0]['toLowerCase'](),_0x5d4274[_0x35c1d4(0x1ac)](0x0,0x1)),_0x43fef5[_0x35c1d4(0x1b3)]=_0x1bffb9,_0x43fef5['route']=('/'+_0x1bffb9+'/'+_0x5d4274[_0x35c1d4(0x187)]('/'))[_0x35c1d4(0x199)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x35c1d4(0x1b0)]()[_0x35c1d4(0x199)](/\/\-/g,'/'),_0x43fef5[_0x35c1d4(0x18c)]['endsWith'](_0x35c1d4(0x18d))&&(_0x43fef5['route']=_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x1a9)](0x0,_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x1a6)]-0x7)),_0x43fef5['route'][_0x35c1d4(0x189)](_0x35c1d4(0x1a7))&&(_0x43fef5[_0x35c1d4(0x18c)]=_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x1a9)](0x0,_0x43fef5[_0x35c1d4(0x18c)][_0x35c1d4(0x1a6)]-0xb)),_0x43fef5;}throw new Error(_0x28a571+_0x35c1d4(0x1ad)+_0x1bffb9+_0x35c1d4(0x191));}}throw new Error(_0x28a571+_0x35c1d4(0x194));}exports[a3_0x515749(0x19d)]=parseRoute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0xb3f32=a4_0x2a9b;(function(_0x10960b,_0x4b325b){const _0x216e8f=a4_0x2a9b,_0x1bf000=_0x10960b();while(!![]){try{const _0x319ffe=parseInt(_0x216e8f(0x18e))/0x1*(-parseInt(_0x216e8f(0x194))/0x2)+parseInt(_0x216e8f(0x184))/0x3+-parseInt(_0x216e8f(0x1a0))/0x4+parseInt(_0x216e8f(0x189))/0x5*(parseInt(_0x216e8f(0x196))/0x6)+-parseInt(_0x216e8f(0x19d))/0x7*(parseInt(_0x216e8f(0x19b))/0x8)+parseInt(_0x216e8f(0x198))/0x9*(parseInt(_0x216e8f(0x183))/0xa)+-parseInt(_0x216e8f(0x18a))/0xb*(-parseInt(_0x216e8f(0x18d))/0xc);if(_0x319ffe===_0x4b325b)break;else _0x1bf000['push'](_0x1bf000['shift']());}catch(_0x15a448){_0x1bf000['push'](_0x1bf000['shift']());}}}(a4_0x149e,0x68455));function a4_0x2a9b(_0x20075f,_0x36b5c6){const _0x149ebf=a4_0x149e();return a4_0x2a9b=function(_0x2a9bf9,_0x1bcbfc){_0x2a9bf9=_0x2a9bf9-0x183;let _0x4724d2=_0x149ebf[_0x2a9bf9];return _0x4724d2;},a4_0x2a9b(_0x20075f,_0x36b5c6);}Object[a4_0xb3f32(0x193)](exports,a4_0xb3f32(0x190),{'value':!![]}),exports[a4_0xb3f32(0x1a1)]=void 0x0;const validator_1=require('@anncic-api/validator'),decorator_1=require('@midwayjs/decorator'),action_1=require(a4_0xb3f32(0x19a));function a4_0x149e(){const _0x49a229=['12xXyWci','1pYWNRt','filter','__esModule','length','ACTION_ROUTE_KEY','defineProperty','1429042SWMXPK','utc','372450ReDJRP','middleware','9mIyiqZ','routerName','../types/action','568SjOWUe','toLowerCase','73374KknxrQ','indexOf','createCustomMethodDecorator','2376212ZREQqT','Api','validationOptions','attachClassMetadata','5810620YHjfoS','2201868hRZJcl','apimit','validate','middlewareIgnore','del','5FJhMHc','12130756yLjvmJ','assign','delete'];a4_0x149e=function(){return _0x49a229;};return a4_0x149e();}function Api(_0x565282,_0x4af650='get',_0x3bc7af='/',_0xcf51f6={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x52bc4c,_0x2d36ed,_0x307864)=>{const _0x270b8e=a4_0x2a9b;var _0x4f8f68,_0x459a5e,_0x323f1b;!_0xcf51f6['middleware']&&(_0xcf51f6['middleware']=[]);!((_0x4f8f68=_0xcf51f6===null||_0xcf51f6===void 0x0?void 0x0:_0xcf51f6[_0x270b8e(0x186)])===null||_0x4f8f68===void 0x0?void 0x0:_0x4f8f68[_0x270b8e(0x1a2)])&&(_0xcf51f6[_0x270b8e(0x186)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x270b8e(0x195)}});if(((_0x459a5e=_0xcf51f6===null||_0xcf51f6===void 0x0?void 0x0:_0xcf51f6[_0x270b8e(0x197)])===null||_0x459a5e===void 0x0?void 0x0:_0x459a5e[_0x270b8e(0x191)])>0x0&&((_0x323f1b=_0xcf51f6===null||_0xcf51f6===void 0x0?void 0x0:_0xcf51f6[_0x270b8e(0x187)])===null||_0x323f1b===void 0x0?void 0x0:_0x323f1b[_0x270b8e(0x191)])>0x0)for(let _0x3f9ea0 in _0xcf51f6['middleware']){_0xcf51f6[_0x270b8e(0x187)][_0x270b8e(0x19e)](_0xcf51f6[_0x270b8e(0x197)][_0x3f9ea0])!==-0x1&&(_0xcf51f6[_0x270b8e(0x197)][_0x3f9ea0]=null);}_0xcf51f6[_0x270b8e(0x199)]=_0x565282,(0x0,validator_1['Validator'])(_0xcf51f6[_0x270b8e(0x186)])(_0x52bc4c,_0x2d36ed,_0x307864),(0x0,decorator_1['RequestMapping'])(Object[_0x270b8e(0x18b)](_0xcf51f6,{'path':_0x3bc7af,'requestMethod':(_0x4af650=='del'?_0x270b8e(0x18c):_0x4af650)[_0x270b8e(0x19c)]()}))(_0x52bc4c,_0x2d36ed,_0x307864),(0x0,decorator_1[_0x270b8e(0x1a3)])(action_1[_0x270b8e(0x192)],{'path':_0x3bc7af,'method':_0x2d36ed,'apimit':_0xcf51f6['apimit'],'routerName':_0xcf51f6[_0x270b8e(0x199)],'description':_0xcf51f6['description'],'middleware':(_0xcf51f6['middleware']||[])[_0x270b8e(0x18f)](_0x104e54=>!!_0x104e54),'requestMethod':(_0x4af650==_0x270b8e(0x188)?_0x270b8e(0x18c):_0x4af650)[_0x270b8e(0x19c)]()},_0x52bc4c),(0x0,decorator_1[_0x270b8e(0x19f)])(action_1[_0x270b8e(0x192)],{'path':_0x3bc7af,'method':_0x2d36ed,'apimit':_0xcf51f6[_0x270b8e(0x185)],'routerName':_0xcf51f6[_0x270b8e(0x199)],'description':_0xcf51f6['description'],'middleware':(_0xcf51f6[_0x270b8e(0x197)]||[])[_0x270b8e(0x18f)](_0x27c2f8=>!!_0x27c2f8),'requestMethod':(_0x4af650==_0x270b8e(0x188)?_0x270b8e(0x18c):_0x4af650)[_0x270b8e(0x19c)]()})(_0x52bc4c,_0x2d36ed,_0x307864);};}exports[a4_0xb3f32(0x1a1)]=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a5_0x3aa15b=a5_0x4248;(function(_0x46aa70,_0x3b6a63){const _0x28c791=a5_0x4248,_0x3190de=_0x46aa70();while(!![]){try{const _0x5a641f=parseInt(_0x28c791(0x202))/0x1+parseInt(_0x28c791(0x1f1))/0x2*(-parseInt(_0x28c791(0x1fa))/0x3)+parseInt(_0x28c791(0x1fc))/0x4*(-parseInt(_0x28c791(0x1f9))/0x5)+parseInt(_0x28c791(0x1f8))/0x6*(parseInt(_0x28c791(0x1f3))/0x7)+parseInt(_0x28c791(0x1fb))/0x8+parseInt(_0x28c791(0x1f7))/0x9*(parseInt(_0x28c791(0x203))/0xa)+parseInt(_0x28c791(0x1f4))/0xb;if(_0x5a641f===_0x3b6a63)break;else _0x3190de['push'](_0x3190de['shift']());}catch(_0x25a029){_0x3190de['push'](_0x3190de['shift']());}}}(a5_0x4860,0x55f42));function a5_0x4248(_0x5d01e9,_0xfdee89){const _0x4860c8=a5_0x4860();return a5_0x4248=function(_0x42484d,_0x5addb1){_0x42484d=_0x42484d-0x1ef;let _0x1965c1=_0x4860c8[_0x42484d];return _0x1965c1;},a5_0x4248(_0x5d01e9,_0xfdee89);}function a5_0x4860(){const _0x564d7a=['REQUEST_OBJ_CTX_KEY','filepath','81mdEnVB','6xVCBSg','166255ODCMga','2042193qDeaoF','2472224Grtmom','4nUAHyF','../service/ApitestService','apidoc','Apitest','@midwayjs/core','defineProperty','173316DhodnC','384610qMWUme','value','getConfig','MidwayEnvironmentService','app','__esModule','getApplicationContext','isDevelopmentEnvironment','2kfLfML','get','673799rCEWFy','1554278ZnzauE'];a5_0x4860=function(){return _0x564d7a;};return a5_0x4860();}Object[a5_0x3aa15b(0x201)](exports,a5_0x3aa15b(0x208),{'value':!![]}),exports[a5_0x3aa15b(0x1ff)]=void 0x0;const decorator_1=require('@midwayjs/decorator'),core_1=require(a5_0x3aa15b(0x200)),ApitestService_1=require(a5_0x3aa15b(0x1fd));function Apitest(_0x4b234c='/apitest',_0x52fd7f){return(_0x4e6cc6,_0x52fd1d,_0x425003)=>{const _0x423354=a5_0x4248;return(0x0,decorator_1['RequestMapping'])({'path':_0x4b234c,'requestMethod':_0x423354(0x1f2)})(_0x4e6cc6,_0x52fd1d,_0x425003),_0x425003[_0x423354(0x204)]=async function(..._0x2fb86b){const _0x2ee46f=_0x423354;var _0x5e41f8;const _0x3cb84e=(_0x5e41f8=this[core_1[_0x2ee46f(0x1f5)]])===null||_0x5e41f8===void 0x0?void 0x0:_0x5e41f8[_0x2ee46f(0x207)];if(_0x3cb84e&&_0x3cb84e[_0x2ee46f(0x205)]('apitest')){const _0xe157ee=await _0x3cb84e[_0x2ee46f(0x1ef)]()['getAsync'](ApitestService_1['ApitestService']),_0x14d9b2=await _0x3cb84e[_0x2ee46f(0x1ef)]()['getAsync'](core_1[_0x2ee46f(0x206)]);return _0x14d9b2[_0x2ee46f(0x1f0)]()&&(_0x52fd7f[_0x2ee46f(0x1f6)]=!![]),await _0xe157ee[_0x2ee46f(0x1fe)](_0x52fd7f);}return'';},_0x425003;};}exports[a5_0x3aa15b(0x1ff)]=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a6_0x5e822b=a6_0x2eab;(function(_0x98960b,_0x583749){var _0x1e3b7b=a6_0x2eab,_0x26551e=_0x98960b();while(!![]){try{var _0x33050e=parseInt(_0x1e3b7b(0x1e3))/0x1*(-parseInt(_0x1e3b7b(0x1e9))/0x2)+parseInt(_0x1e3b7b(0x1e4))/0x3+-parseInt(_0x1e3b7b(0x1e1))/0x4+-parseInt(_0x1e3b7b(0x1e6))/0x5*(parseInt(_0x1e3b7b(0x1f2))/0x6)+parseInt(_0x1e3b7b(0x1f5))/0x7+parseInt(_0x1e3b7b(0x1e8))/0x8*(parseInt(_0x1e3b7b(0x1ea))/0x9)+parseInt(_0x1e3b7b(0x1ed))/0xa*(parseInt(_0x1e3b7b(0x1ef))/0xb);if(_0x33050e===_0x583749)break;else _0x26551e['push'](_0x26551e['shift']());}catch(_0x2ff04e){_0x26551e['push'](_0x26551e['shift']());}}}(a6_0x9b00,0xa2ec2));function a6_0x2eab(_0x5535e7,_0x1ca2b0){var _0x9b00f4=a6_0x9b00();return a6_0x2eab=function(_0x2eab2e,_0x49c7ee){_0x2eab2e=_0x2eab2e-0x1de;var _0x529335=_0x9b00f4[_0x2eab2e];return _0x529335;},a6_0x2eab(_0x5535e7,_0x1ca2b0);}var __decorate=this&&this['__decorate']||function(_0x184a70,_0x56ccb3,_0x450d6c,_0x266504){var _0x9d36a4=a6_0x2eab,_0x439839=arguments[_0x9d36a4(0x1f9)],_0x1ada2b=_0x439839<0x3?_0x56ccb3:_0x266504===null?_0x266504=Object[_0x9d36a4(0x1e0)](_0x56ccb3,_0x450d6c):_0x266504,_0x19a534;if(typeof Reflect===_0x9d36a4(0x1e2)&&typeof Reflect[_0x9d36a4(0x1f6)]===_0x9d36a4(0x1df))_0x1ada2b=Reflect[_0x9d36a4(0x1f6)](_0x184a70,_0x56ccb3,_0x450d6c,_0x266504);else{for(var _0x1a62e4=_0x184a70[_0x9d36a4(0x1f9)]-0x1;_0x1a62e4>=0x0;_0x1a62e4--)if(_0x19a534=_0x184a70[_0x1a62e4])_0x1ada2b=(_0x439839<0x3?_0x19a534(_0x1ada2b):_0x439839>0x3?_0x19a534(_0x56ccb3,_0x450d6c,_0x1ada2b):_0x19a534(_0x56ccb3,_0x450d6c))||_0x1ada2b;}return _0x439839>0x3&&_0x1ada2b&&Object[_0x9d36a4(0x1fa)](_0x56ccb3,_0x450d6c,_0x1ada2b),_0x1ada2b;},__metadata=this&&this[a6_0x5e822b(0x1f4)]||function(_0x41b435,_0xd8797b){var _0x13d8de=a6_0x5e822b;if(typeof Reflect===_0x13d8de(0x1e2)&&typeof Reflect['metadata']===_0x13d8de(0x1df))return Reflect[_0x13d8de(0x1f7)](_0x41b435,_0xd8797b);};function a6_0x9b00(){var _0x41f1ff=['__metadata','593285ehtWuJ','decorate','metadata','signature验证失败','length','defineProperty','design:type','function','getOwnPropertyDescriptor','4198608jNNJXy','object','12478SwyhXP','1956888OAuhii','checkcode验证失败','5wVcXbH','ApiError','341192athvna','62jzUszX','9jNQSDe','HEADERS_CHECKCODE','HEADERS_SIGNATURE','10HWIsSw','请求头信息不完整','19790342ObhZje','HEADERS_LACK','__esModule','2850132btqASn','HEADERS_DEVICE'];a6_0x9b00=function(){return _0x41f1ff;};return a6_0x9b00();}Object[a6_0x5e822b(0x1fa)](exports,a6_0x5e822b(0x1f1),{'value':!![]}),exports[a6_0x5e822b(0x1e7)]=void 0x0;class ApiError{}ApiError['TIMEOUT']=0x18a89,ApiError[a6_0x5e822b(0x1f0)]=0x18a8a,ApiError[a6_0x5e822b(0x1f3)]=0x18a8b,ApiError[a6_0x5e822b(0x1eb)]=0x18a8c,ApiError[a6_0x5e822b(0x1ec)]=0x18a8d,__decorate([AnnErrorMsg('网络繁忙,请稍后重试'),__metadata(a6_0x5e822b(0x1de),Object)],ApiError,'TIMEOUT',void 0x0),__decorate([AnnErrorMsg(a6_0x5e822b(0x1ee)),__metadata(a6_0x5e822b(0x1de),Object)],ApiError,'HEADERS_LACK',void 0x0),__decorate([AnnErrorMsg('请使用正确的设备'),__metadata(a6_0x5e822b(0x1de),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg(a6_0x5e822b(0x1e5)),__metadata(a6_0x5e822b(0x1de),Object)],ApiError,a6_0x5e822b(0x1eb),void 0x0),__decorate([AnnErrorMsg(a6_0x5e822b(0x1f8)),__metadata('design:type',Object)],ApiError,'HEADERS_SIGNATURE',void 0x0),exports[a6_0x5e822b(0x1e7)]=ApiError;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a8_0xf3b986=a8_0x12f9;function a8_0x12f9(_0x3ac628,_0x4d798c){const _0xff10f1=a8_0xff10();return a8_0x12f9=function(_0x12f965,_0x28562f){_0x12f965=_0x12f965-0x173;let _0x20e7c9=_0xff10f1[_0x12f965];return _0x20e7c9;},a8_0x12f9(_0x3ac628,_0x4d798c);}(function(_0x1388d3,_0x2e5b26){const _0xdef9ff=a8_0x12f9,_0x383f18=_0x1388d3();while(!![]){try{const _0x130d2f=parseInt(_0xdef9ff(0x18c))/0x1*(parseInt(_0xdef9ff(0x1ac))/0x2)+parseInt(_0xdef9ff(0x1bf))/0x3*(parseInt(_0xdef9ff(0x184))/0x4)+parseInt(_0xdef9ff(0x1c5))/0x5*(-parseInt(_0xdef9ff(0x1b3))/0x6)+-parseInt(_0xdef9ff(0x1b6))/0x7+-parseInt(_0xdef9ff(0x194))/0x8*(parseInt(_0xdef9ff(0x1bd))/0x9)+parseInt(_0xdef9ff(0x1b8))/0xa*(-parseInt(_0xdef9ff(0x190))/0xb)+parseInt(_0xdef9ff(0x1cf))/0xc;if(_0x130d2f===_0x2e5b26)break;else _0x383f18['push'](_0x383f18['shift']());}catch(_0x36f731){_0x383f18['push'](_0x383f18['shift']());}}}(a8_0xff10,0x59ec1));Object['defineProperty'](exports,a8_0xf3b986(0x1d3),{'value':!![]}),exports[a8_0xf3b986(0x176)]=void 0x0;const lodash_1=require(a8_0xf3b986(0x1ab)),validator_1=require('@anncic-api/validator'),decorator_1=require(a8_0xf3b986(0x19e)),decorator_2=require(a8_0xf3b986(0x19e)),decorator_3=require(a8_0xf3b986(0x19e)),action_1=require('../types/action');function getRoutes(_0x2ded97={'prefix':'/','module':![]}){const _0x8bfa95=a8_0xf3b986;var _0x541775,_0x4eb886;const _0x4b6d33=(0x0,decorator_3[_0x8bfa95(0x175)])(action_1['ACTION_KEY']),_0x20c255={},_0x1bee3a=Array[_0x8bfa95(0x18f)](_0x2ded97['filter']||[])?_0x2ded97[_0x8bfa95(0x182)]||[]:[_0x2ded97['filter']];_0x38fcfb:for(const _0x58e466 of _0x4b6d33){let _0x1a78e7=(0x0,decorator_3[_0x8bfa95(0x1c1)])(action_1[_0x8bfa95(0x1cc)],_0x58e466),_0x287ef8=(0x0,decorator_3['getClassMetadata'])(action_1[_0x8bfa95(0x19d)],_0x58e466);if(_0x1a78e7&&_0x287ef8){let _0x4a3103=_0x1a78e7['prefix'],_0x28c74c={};if(_0x2ded97[_0x8bfa95(0x192)]&&(0x0,lodash_1[_0x8bfa95(0x196)])(_0x1a78e7,'module',![])!=_0x2ded97[_0x8bfa95(0x192)])continue _0x38fcfb;else{if(_0x2ded97[_0x8bfa95(0x192)]===![]&&!!(0x0,lodash_1[_0x8bfa95(0x196)])(_0x1a78e7,'module',null))continue _0x38fcfb;}if(_0x2ded97['prefix']&&!_0x4a3103[_0x8bfa95(0x19c)](_0x2ded97[_0x8bfa95(0x1aa)]))continue _0x38fcfb;_0x4a3103!=='/'?(_0x28c74c[_0x8bfa95(0x187)]=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)][_0x8bfa95(0x1af)])||(/^\//[_0x8bfa95(0x1cb)](_0x4a3103)?_0x4a3103[_0x8bfa95(0x1b7)]('/')[0x1]:_0x4a3103),_0x28c74c['description']=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)][_0x8bfa95(0x1a6)])||_0x28c74c[_0x8bfa95(0x187)],_0x28c74c[_0x8bfa95(0x1a8)]=[]):(_0x28c74c['summary']=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7['routerOptions'][_0x8bfa95(0x1af)])||_0x8bfa95(0x1bb),_0x28c74c[_0x8bfa95(0x1a6)]=(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x173)]['description'])||'',_0x28c74c['routes']=[]);_0x2ded97[_0x8bfa95(0x1cd)]&&(_0x28c74c['filepath']=_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x1cd)]);(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7['pprefix'])&&(_0x28c74c[_0x8bfa95(0x1aa)]=_0x1a78e7[_0x8bfa95(0x188)]);(_0x1a78e7===null||_0x1a78e7===void 0x0?void 0x0:_0x1a78e7[_0x8bfa95(0x192)])&&(_0x28c74c[_0x8bfa95(0x192)]=_0x1a78e7['module']);let _0x5685b4=(0x0,decorator_3[_0x8bfa95(0x1c1)])(decorator_2['INJECT_CUSTOM_PARAM'],_0x58e466)||{};if(typeof _0x287ef8[Symbol[_0x8bfa95(0x197)]]===_0x8bfa95(0x1ba))for(let _0x2f3c8f of _0x287ef8){let _0x14fba4={};_0x14fba4[_0x8bfa95(0x1a2)]=_0x2f3c8f['requestMethod'],_0x14fba4['route']=(_0x4a3103+_0x2f3c8f['path'])[_0x8bfa95(0x18a)](/\/{1,}/,'/'),_0x14fba4[_0x8bfa95(0x187)]=(_0x2f3c8f===null||_0x2f3c8f===void 0x0?void 0x0:_0x2f3c8f[_0x8bfa95(0x1b4)])||_0x28c74c[_0x8bfa95(0x187)]||_0x8bfa95(0x1bb),_0x14fba4[_0x8bfa95(0x1a6)]=(_0x2f3c8f===null||_0x2f3c8f===void 0x0?void 0x0:_0x2f3c8f[_0x8bfa95(0x1a6)])||'',_0x14fba4['request']=[];if(!(0x0,lodash_1[_0x8bfa95(0x19c)])(_0x14fba4['route'],_0x8bfa95(0x1c6))&&!(0x0,lodash_1[_0x8bfa95(0x19c)])(_0x14fba4[_0x8bfa95(0x198)],'/static/apitest')&&_0x1bee3a[_0x8bfa95(0x1bc)](_0x14fba4[_0x8bfa95(0x198)])===-0x1){if(!(_0x2ded97===null||_0x2ded97===void 0x0?void 0x0:_0x2ded97['noreq'])){let _0x2898af=(0x0,decorator_3[_0x8bfa95(0x189)])(new _0x58e466(),_0x2f3c8f[_0x8bfa95(0x1a2)]);for(const _0x34bba5 in _0x2898af){let _0x407470=(_0x541775=_0x5685b4[_0x2f3c8f['method']])===null||_0x541775===void 0x0?void 0x0:_0x541775[_0x8bfa95(0x186)](_0x5d9914=>_0x5d9914[_0x8bfa95(0x1c3)]==_0x34bba5&&_0x5d9914['key']===decorator_2[_0x8bfa95(0x183)]&&(_0x5d9914===null||_0x5d9914===void 0x0?void 0x0:_0x5d9914[_0x8bfa95(0x18e)]));if(_0x407470===null||_0x407470===void 0x0?void 0x0:_0x407470[_0x8bfa95(0x18e)]){let _0x4c3ab4=convertTypeToString(_0x407470[_0x8bfa95(0x18e)]['type']||0x0);if([_0x8bfa95(0x177),_0x8bfa95(0x1c0)][_0x8bfa95(0x1bc)](_0x4c3ab4)!=-0x1&&_0x407470['metadata'][_0x8bfa95(0x17d)][_0x8bfa95(0x1bc)](':')==-0x1&&!_0x14fba4[_0x8bfa95(0x1ce)][_0x8bfa95(0x186)](_0x31d5fb=>_0x31d5fb[_0x8bfa95(0x181)]==_0x407470[_0x8bfa95(0x18e)][_0x8bfa95(0x17d)]))_0x14fba4['request']['push']({'key':_0x407470['metadata']['propertyData'],'title':_0x407470[_0x8bfa95(0x18e)][_0x8bfa95(0x17d)],'type':convertSchemaType(_0x2898af[_0x407470[_0x8bfa95(0x1c3)]][_0x8bfa95(0x17e)]),'required':![],'default':'','desc':''});else{if(_0x4c3ab4==_0x8bfa95(0x17c)){let _0xa2bcce=((_0x4eb886=_0x407470===null||_0x407470===void 0x0?void 0x0:_0x407470[_0x8bfa95(0x18e)])===null||_0x4eb886===void 0x0?void 0x0:_0x4eb886[_0x8bfa95(0x17d)])||_0x8bfa95(0x17c);_0xa2bcce[_0x8bfa95(0x1bc)](':')==-0x1&&!_0x14fba4['request'][_0x8bfa95(0x186)](_0x4616c9=>_0x4616c9[_0x8bfa95(0x181)]==_0xa2bcce&&_0x4616c9['type']==_0x8bfa95(0x17c))&&_0x14fba4[_0x8bfa95(0x1ce)]['push']({'key':_0xa2bcce,'title':_0x8bfa95(0x18b)+_0xa2bcce,'type':'file','required':!![],'default':'','desc':''});}}}else{const _0x39eb79=(0x0,decorator_3[_0x8bfa95(0x1a4)])(validator_1[_0x8bfa95(0x1a7)],_0x2898af[_0x34bba5]);_0x39eb79&&_0x14fba4['request'][_0x8bfa95(0x18d)](...getJoiRequest(_0x39eb79));}}}_0x28c74c[_0x8bfa95(0x1a8)]['push'](_0x14fba4);}}if(_0x28c74c[_0x8bfa95(0x1a8)][_0x8bfa95(0x19b)]>0x0){let _0x32b31f=_0x20c255[_0x4a3103];_0x32b31f?(_0x32b31f[_0x8bfa95(0x187)]!=_0x28c74c[_0x8bfa95(0x187)]&&(_0x32b31f[_0x8bfa95(0x187)]=_0x32b31f[_0x8bfa95(0x187)]+','+_0x28c74c[_0x8bfa95(0x187)]),_0x32b31f[_0x8bfa95(0x1a6)]!=_0x28c74c['description']&&(_0x32b31f['description']=_0x32b31f[_0x8bfa95(0x1a6)]+','+_0x28c74c['description']),_0x32b31f[_0x8bfa95(0x1a8)]=_0x32b31f[_0x8bfa95(0x1a8)][_0x8bfa95(0x1d2)](_0x28c74c['routes']),_0x20c255[_0x4a3103]=_0x32b31f):_0x20c255[_0x4a3103]=_0x28c74c;}}}return _0x20c255;}function a8_0xff10(){const _0x4394cf=['flags.description','file','propertyData','name','header','min','key','filter','WEB_ROUTER_PARAM_KEY','1684xWAwNm','QUERY','find','summary','pprefix','getMethodParamTypes','replace','文件上传-','79wJVTpp','push','metadata','isArray','11YnWaVT','Boolean','module','string','54096eGYxyr','Object','get','iterator','route','rules','log','length','startsWith','ACTION_ROUTE_KEY','@midwayjs/decorator','RouteParamTypes','required','allow','method','FIELDS','getClassExtendedMetadata','boolean','description','RULES_KEY','routes','HEADERS','prefix','lodash','10178DNOlQH','limit','Number','tagName','join','FILESTREAM','File','60zuFBBI','routerName','title','2637271yKGWzC','split','4377210GUjCNi','flags.default','function','default','indexOf','189DryTVg','object','1257RPfkly','body','getClassMetadata','args','parameterIndex','path','216305AoMYIt','static/apitest','keys','describe','type','FILESSTREAM','test','ACTION_KEY','filepath','request','14147724umaAnv','BODY','-array','concat','__esModule','routerOptions','max','listModule','getRoutes','query','只允许:[','flags.presence','items'];a8_0xff10=function(){return _0x4394cf;};return a8_0xff10();}exports[a8_0xf3b986(0x176)]=getRoutes;function getJoiRequest(_0x215576){const _0x38aca9=a8_0xf3b986,_0x47d43e=[];for(let _0x2cd126 in _0x215576){const _0x498f0c={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x5bb99a=typeof _0x215576[_0x2cd126][_0x38aca9(0x1c8)]=='function'?_0x215576[_0x2cd126][_0x38aca9(0x1c8)]():_0x215576[_0x2cd126];_0x498f0c[_0x38aca9(0x181)]=_0x2cd126,_0x498f0c['type']=_0x5bb99a['type'],_0x498f0c['title']=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,'flags.label',_0x2cd126),_0x498f0c[_0x38aca9(0x1bb)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x1b9),''),_0x498f0c[_0x38aca9(0x1a0)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x179),'')==_0x38aca9(0x1a0),_0x498f0c[_0x38aca9(0x1a6)]=(0x0,lodash_1[_0x38aca9(0x196)])(_0x5bb99a,_0x38aca9(0x17b),'');if(_0x5bb99a[_0x38aca9(0x1c9)]=='object')_0x498f0c['children']=getJoiRequest(_0x5bb99a[_0x38aca9(0x1c7)]);else _0x5bb99a['type']=='array'&&_0x5bb99a['items']&&Array[_0x38aca9(0x18f)](_0x5bb99a[_0x38aca9(0x17a)])&&_0x5bb99a[_0x38aca9(0x17a)][0x0]&&console[_0x38aca9(0x19a)](_0x2cd126+_0x38aca9(0x1d1),_0x5bb99a);_0x5bb99a['allow']&&Array[_0x38aca9(0x18f)](_0x5bb99a[_0x38aca9(0x1a1)])&&_0x5bb99a[_0x38aca9(0x1a1)][_0x38aca9(0x19b)]>0x0&&(_0x498f0c[_0x38aca9(0x1a6)]=_0x38aca9(0x178)+_0x5bb99a[_0x38aca9(0x1a1)][_0x38aca9(0x1b0)](',')+'];'+_0x498f0c[_0x38aca9(0x1a6)]);if(_0x498f0c[_0x38aca9(0x181)]&&_0x498f0c[_0x38aca9(0x1c9)]){const _0x5d57be={};for(const _0x29498f of _0x5bb99a[_0x38aca9(0x199)]||[]){if(_0x29498f['name']===_0x38aca9(0x180)&&_0x29498f[_0x38aca9(0x1c2)])_0x5d57be['min']=_0x29498f[_0x38aca9(0x1c2)][_0x38aca9(0x1ad)];else _0x29498f[_0x38aca9(0x17e)]===_0x38aca9(0x174)&&(_0x5d57be[_0x38aca9(0x174)]=_0x29498f[_0x38aca9(0x1c2)][_0x38aca9(0x1ad)]);}_0x498f0c['rules']=_0x5d57be;}_0x498f0c['key']&&_0x498f0c[_0x38aca9(0x1b5)]&&_0x47d43e[_0x38aca9(0x18d)](_0x498f0c);}return _0x47d43e;}function convertSchemaType(_0x5d78a7){const _0x3c0c7d=a8_0xf3b986;switch(_0x5d78a7){case _0x3c0c7d(0x195):return _0x3c0c7d(0x1be);case _0x3c0c7d(0x191):return _0x3c0c7d(0x1a5);case _0x3c0c7d(0x1ae):return'number';case'String':return _0x3c0c7d(0x193);case _0x3c0c7d(0x1b2):return'file';default:return _0x3c0c7d(0x193);}}function convertTypeToString(_0x5c7506){const _0x3f363a=a8_0xf3b986;switch(_0x5c7506){case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1a9)]:return _0x3f363a(0x17f);case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x185)]:return _0x3f363a(0x177);case decorator_1['RouteParamTypes']['PARAM']:return _0x3f363a(0x1c4);case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1d0)]:return'body';case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1a3)]:case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1ca)]:case decorator_1[_0x3f363a(0x19f)][_0x3f363a(0x1b1)]:return _0x3f363a(0x17c);default:return'header';}}
|
|
1
|
+
'use strict';const a7_0x345ec6=a7_0x160e;(function(_0xec0e07,_0x1c5295){const _0x5567b0=a7_0x160e,_0x42c3a6=_0xec0e07();while(!![]){try{const _0x4476eb=-parseInt(_0x5567b0(0x19c))/0x1+-parseInt(_0x5567b0(0x1c7))/0x2+-parseInt(_0x5567b0(0x190))/0x3+-parseInt(_0x5567b0(0x1c8))/0x4*(-parseInt(_0x5567b0(0x1d8))/0x5)+-parseInt(_0x5567b0(0x1d2))/0x6+-parseInt(_0x5567b0(0x19e))/0x7*(parseInt(_0x5567b0(0x191))/0x8)+-parseInt(_0x5567b0(0x1c0))/0x9*(-parseInt(_0x5567b0(0x1b1))/0xa);if(_0x4476eb===_0x1c5295)break;else _0x42c3a6['push'](_0x42c3a6['shift']());}catch(_0x3aba71){_0x42c3a6['push'](_0x42c3a6['shift']());}}}(a7_0xc8a4,0xd2f52));Object[a7_0x345ec6(0x1e2)](exports,a7_0x345ec6(0x1e1),{'value':!![]}),exports[a7_0x345ec6(0x198)]=void 0x0;const lodash_1=require(a7_0x345ec6(0x1b7)),validator_1=require(a7_0x345ec6(0x1d6)),decorator_1=require(a7_0x345ec6(0x1d4)),decorator_2=require('@midwayjs/decorator'),decorator_3=require(a7_0x345ec6(0x1d4)),action_1=require('../types/action');function a7_0x160e(_0x4129dc,_0x31549a){const _0xc8a4ff=a7_0xc8a4();return a7_0x160e=function(_0x160e78,_0x1910ff){_0x160e78=_0x160e78-0x185;let _0x2a1093=_0xc8a4ff[_0x160e78];return _0x2a1093;},a7_0x160e(_0x4129dc,_0x31549a);}function getRoutes(_0x3f88b3={'prefix':'/','module':![]}){const _0xb7d9f6=a7_0x345ec6;var _0x116186,_0x5e0dd5;const _0x3ee5d0=(0x0,decorator_3['listModule'])(action_1['ACTION_KEY']),_0x1612ee={},_0x294c0e=Array['isArray'](_0x3f88b3['filter']||[])?_0x3f88b3[_0xb7d9f6(0x1ac)]||[]:[_0x3f88b3['filter']];_0x183bbc:for(const _0x49cdcc of _0x3ee5d0){let _0x395b69=(0x0,decorator_3['getClassMetadata'])(action_1[_0xb7d9f6(0x1b2)],_0x49cdcc),_0x2cdc34=(0x0,decorator_3[_0xb7d9f6(0x1c3)])(action_1['ACTION_ROUTE_KEY'],_0x49cdcc);if(_0x395b69&&_0x2cdc34){let _0x630eca=_0x395b69[_0xb7d9f6(0x1bf)],_0x3ba04a={};if(_0x3f88b3[_0xb7d9f6(0x1cf)]&&(0x0,lodash_1[_0xb7d9f6(0x1dd)])(_0x395b69,_0xb7d9f6(0x1cf),![])!=_0x3f88b3[_0xb7d9f6(0x1cf)])continue _0x183bbc;else{if(_0x3f88b3['module']===![]&&!!(0x0,lodash_1['get'])(_0x395b69,_0xb7d9f6(0x1cf),null))continue _0x183bbc;}if(_0x3f88b3[_0xb7d9f6(0x1bf)]&&!_0x630eca[_0xb7d9f6(0x194)](_0x3f88b3['prefix']))continue _0x183bbc;_0x630eca!=='/'?(_0x3ba04a[_0xb7d9f6(0x188)]=(_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69[_0xb7d9f6(0x19a)][_0xb7d9f6(0x1e0)])||(/^\//[_0xb7d9f6(0x18d)](_0x630eca)?_0x630eca[_0xb7d9f6(0x193)]('/')[0x1]:_0x630eca),_0x3ba04a[_0xb7d9f6(0x1a7)]=(_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69[_0xb7d9f6(0x19a)]['description'])||_0x3ba04a['summary'],_0x3ba04a[_0xb7d9f6(0x1b8)]=[]):(_0x3ba04a['summary']=(_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69[_0xb7d9f6(0x19a)]['tagName'])||'default',_0x3ba04a[_0xb7d9f6(0x1a7)]=(_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69[_0xb7d9f6(0x19a)][_0xb7d9f6(0x1a7)])||'',_0x3ba04a['routes']=[]);_0x3f88b3['filepath']&&(_0x3ba04a['filepath']=_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69[_0xb7d9f6(0x1c9)]);(_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69['pprefix'])&&(_0x3ba04a[_0xb7d9f6(0x1bf)]=_0x395b69[_0xb7d9f6(0x1ad)]);(_0x395b69===null||_0x395b69===void 0x0?void 0x0:_0x395b69[_0xb7d9f6(0x1cf)])&&(_0x3ba04a[_0xb7d9f6(0x1cf)]=_0x395b69['module']);let _0x36e4b9=(0x0,decorator_3[_0xb7d9f6(0x1c3)])(decorator_2[_0xb7d9f6(0x199)],_0x49cdcc)||{};if(typeof _0x2cdc34[Symbol['iterator']]===_0xb7d9f6(0x187))for(let _0x29f56d of _0x2cdc34){let _0x27c755={};_0x27c755['method']=_0x29f56d[_0xb7d9f6(0x1ba)],_0x27c755['route']=(_0x630eca+_0x29f56d[_0xb7d9f6(0x1dc)])['replace'](/\/{1,}/,'/'),_0x27c755[_0xb7d9f6(0x188)]=(_0x29f56d===null||_0x29f56d===void 0x0?void 0x0:_0x29f56d[_0xb7d9f6(0x1db)])||_0x3ba04a[_0xb7d9f6(0x188)]||_0xb7d9f6(0x1a6),_0x27c755['description']=(_0x29f56d===null||_0x29f56d===void 0x0?void 0x0:_0x29f56d[_0xb7d9f6(0x1a7)])||'',_0x27c755[_0xb7d9f6(0x1a8)]=[];if(!(0x0,lodash_1[_0xb7d9f6(0x194)])(_0x27c755[_0xb7d9f6(0x1cd)],_0xb7d9f6(0x1b0))&&!(0x0,lodash_1['startsWith'])(_0x27c755['route'],_0xb7d9f6(0x1d3))&&_0x294c0e[_0xb7d9f6(0x1d0)](_0x27c755[_0xb7d9f6(0x1cd)])===-0x1){if(!(_0x3f88b3===null||_0x3f88b3===void 0x0?void 0x0:_0x3f88b3['noreq'])){let _0x456f70=(0x0,decorator_3[_0xb7d9f6(0x1ce)])(new _0x49cdcc(),_0x29f56d[_0xb7d9f6(0x1a3)]);for(const _0x1884e2 in _0x456f70){let _0x290ef2=(_0x116186=_0x36e4b9[_0x29f56d[_0xb7d9f6(0x1a3)]])===null||_0x116186===void 0x0?void 0x0:_0x116186[_0xb7d9f6(0x1cb)](_0x436c54=>_0x436c54[_0xb7d9f6(0x19b)]==_0x1884e2&&_0x436c54[_0xb7d9f6(0x19d)]===decorator_2[_0xb7d9f6(0x1bb)]&&(_0x436c54===null||_0x436c54===void 0x0?void 0x0:_0x436c54[_0xb7d9f6(0x1de)]));if(_0x290ef2===null||_0x290ef2===void 0x0?void 0x0:_0x290ef2[_0xb7d9f6(0x1de)]){let _0x22ff65=convertTypeToString(_0x290ef2[_0xb7d9f6(0x1de)][_0xb7d9f6(0x185)]||0x0);if([_0xb7d9f6(0x1b3),_0xb7d9f6(0x1ae)][_0xb7d9f6(0x1d0)](_0x22ff65)!=-0x1&&_0x290ef2['metadata'][_0xb7d9f6(0x1c4)][_0xb7d9f6(0x1d0)](':')==-0x1&&!_0x27c755[_0xb7d9f6(0x1a8)][_0xb7d9f6(0x1cb)](_0xf9a91e=>_0xf9a91e[_0xb7d9f6(0x19d)]==_0x290ef2[_0xb7d9f6(0x1de)][_0xb7d9f6(0x1c4)]))_0x27c755['request']['push']({'key':_0x290ef2[_0xb7d9f6(0x1de)][_0xb7d9f6(0x1c4)],'title':_0x290ef2[_0xb7d9f6(0x1de)]['propertyData'],'type':convertSchemaType(_0x456f70[_0x290ef2[_0xb7d9f6(0x19b)]][_0xb7d9f6(0x1c5)]),'required':![],'default':'','desc':''});else{if(_0x22ff65==_0xb7d9f6(0x192)){let _0x17a9c1=((_0x5e0dd5=_0x290ef2===null||_0x290ef2===void 0x0?void 0x0:_0x290ef2[_0xb7d9f6(0x1de)])===null||_0x5e0dd5===void 0x0?void 0x0:_0x5e0dd5['propertyData'])||_0xb7d9f6(0x192);_0x17a9c1[_0xb7d9f6(0x1d0)](':')==-0x1&&!_0x27c755['request'][_0xb7d9f6(0x1cb)](_0x3701ab=>_0x3701ab[_0xb7d9f6(0x19d)]==_0x17a9c1&&_0x3701ab['type']==_0xb7d9f6(0x192))&&_0x27c755[_0xb7d9f6(0x1a8)][_0xb7d9f6(0x1ab)]({'key':_0x17a9c1,'title':_0xb7d9f6(0x18a)+_0x17a9c1,'type':_0xb7d9f6(0x192),'required':!![],'default':'','desc':''});}}}else{const _0x44e504=(0x0,decorator_3[_0xb7d9f6(0x19f)])(validator_1[_0xb7d9f6(0x1c1)],_0x456f70[_0x1884e2]);_0x44e504&&_0x27c755[_0xb7d9f6(0x1a8)]['push'](...getJoiRequest(_0x44e504));}}}_0x3ba04a[_0xb7d9f6(0x1b8)][_0xb7d9f6(0x1ab)](_0x27c755);}}if(_0x3ba04a['routes'][_0xb7d9f6(0x1a9)]>0x0){let _0x239c87=_0x1612ee[_0x630eca];_0x239c87?(_0x239c87[_0xb7d9f6(0x188)]!=_0x3ba04a['summary']&&(_0x239c87[_0xb7d9f6(0x188)]=_0x239c87[_0xb7d9f6(0x188)]+','+_0x3ba04a['summary']),_0x239c87['description']!=_0x3ba04a['description']&&(_0x239c87[_0xb7d9f6(0x1a7)]=_0x239c87[_0xb7d9f6(0x1a7)]+','+_0x3ba04a[_0xb7d9f6(0x1a7)]),_0x239c87[_0xb7d9f6(0x1b8)]=_0x239c87[_0xb7d9f6(0x1b8)][_0xb7d9f6(0x1a0)](_0x3ba04a['routes']),_0x1612ee[_0x630eca]=_0x239c87):_0x1612ee[_0x630eca]=_0x3ba04a;}}}return _0x1612ee;}exports['getRoutes']=getRoutes;function getJoiRequest(_0x229176){const _0x204881=a7_0x345ec6,_0x40d83d=[];for(let _0x465f59 in _0x229176){const _0x1e9dcb={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x837826=typeof _0x229176[_0x465f59][_0x204881(0x1bd)]==_0x204881(0x187)?_0x229176[_0x465f59][_0x204881(0x1bd)]():_0x229176[_0x465f59];_0x1e9dcb['key']=_0x465f59,_0x1e9dcb[_0x204881(0x185)]=_0x837826['type'],_0x1e9dcb[_0x204881(0x1a5)]=(0x0,lodash_1[_0x204881(0x1dd)])(_0x837826,_0x204881(0x186),_0x465f59),_0x1e9dcb['default']=(0x0,lodash_1[_0x204881(0x1dd)])(_0x837826,_0x204881(0x1d5),''),_0x1e9dcb[_0x204881(0x1a2)]=(0x0,lodash_1[_0x204881(0x1dd)])(_0x837826,_0x204881(0x18f),'')=='required',_0x1e9dcb[_0x204881(0x1a7)]=(0x0,lodash_1[_0x204881(0x1dd)])(_0x837826,'flags.description','');if(_0x837826[_0x204881(0x185)]=='object')_0x1e9dcb[_0x204881(0x189)]=getJoiRequest(_0x837826[_0x204881(0x1b6)]);else _0x837826[_0x204881(0x185)]==_0x204881(0x1ca)&&_0x837826[_0x204881(0x197)]&&Array[_0x204881(0x1c6)](_0x837826[_0x204881(0x197)])&&_0x837826[_0x204881(0x197)][0x0]&&console[_0x204881(0x195)](_0x465f59+_0x204881(0x1aa),_0x837826);_0x837826['allow']&&Array[_0x204881(0x1c6)](_0x837826[_0x204881(0x1df)])&&_0x837826[_0x204881(0x1df)]['length']>0x0&&(_0x1e9dcb[_0x204881(0x1a7)]='只允许:['+_0x837826[_0x204881(0x1df)][_0x204881(0x1bc)](',')+'];'+_0x1e9dcb['description']);if(_0x1e9dcb[_0x204881(0x19d)]&&_0x1e9dcb[_0x204881(0x185)]){const _0x4bfba7={};for(const _0x3a5355 of _0x837826['rules']||[]){if(_0x3a5355[_0x204881(0x1c5)]===_0x204881(0x18b)&&_0x3a5355['args'])_0x4bfba7[_0x204881(0x18b)]=_0x3a5355[_0x204881(0x1da)][_0x204881(0x1d7)];else _0x3a5355[_0x204881(0x1c5)]==='max'&&(_0x4bfba7[_0x204881(0x1b5)]=_0x3a5355['args'][_0x204881(0x1d7)]);}_0x1e9dcb[_0x204881(0x1b9)]=_0x4bfba7;}_0x1e9dcb[_0x204881(0x19d)]&&_0x1e9dcb[_0x204881(0x1a5)]&&_0x40d83d[_0x204881(0x1ab)](_0x1e9dcb);}return _0x40d83d;}function convertSchemaType(_0x29d874){const _0x4f8ab3=a7_0x345ec6;switch(_0x29d874){case _0x4f8ab3(0x1cc):return'object';case _0x4f8ab3(0x196):return _0x4f8ab3(0x1af);case'Number':return _0x4f8ab3(0x1d9);case'String':return _0x4f8ab3(0x1e3);case'File':return _0x4f8ab3(0x192);default:return'string';}}function convertTypeToString(_0x452dda){const _0x42acf2=a7_0x345ec6;switch(_0x452dda){case decorator_1[_0x42acf2(0x1b4)][_0x42acf2(0x1be)]:return _0x42acf2(0x1d1);case decorator_1['RouteParamTypes'][_0x42acf2(0x1c2)]:return _0x42acf2(0x1b3);case decorator_1[_0x42acf2(0x1b4)][_0x42acf2(0x1a1)]:return _0x42acf2(0x1dc);case decorator_1['RouteParamTypes'][_0x42acf2(0x18c)]:return _0x42acf2(0x1ae);case decorator_1[_0x42acf2(0x1b4)][_0x42acf2(0x18e)]:case decorator_1['RouteParamTypes'][_0x42acf2(0x1a4)]:case decorator_1['RouteParamTypes']['FILESTREAM']:return _0x42acf2(0x192);default:return _0x42acf2(0x1d1);}}function a7_0xc8a4(){const _0x383a5c=['flags.default','@anncic-api/validator','limit','1430995KLurBK','number','args','routerName','path','get','metadata','allow','tagName','__esModule','defineProperty','string','type','flags.label','function','summary','children','文件上传-','min','BODY','test','FIELDS','flags.presence','4825788vOgDon','152ABmjgE','file','split','startsWith','log','Boolean','items','getRoutes','INJECT_CUSTOM_PARAM','routerOptions','parameterIndex','967813VVuxXF','key','46249GnDAuM','getClassExtendedMetadata','concat','PARAM','required','method','FILESSTREAM','title','default','description','request','length','-array','push','filter','pprefix','body','boolean','static/apitest','130CUlAbt','ACTION_KEY','query','RouteParamTypes','max','keys','lodash','routes','rules','requestMethod','WEB_ROUTER_PARAM_KEY','join','describe','HEADERS','prefix','4042737pykOAp','RULES_KEY','QUERY','getClassMetadata','propertyData','name','isArray','1742702wzgPcK','4HLPTcI','filepath','array','find','Object','route','getMethodParamTypes','module','indexOf','header','10129998kErIiY','/static/apitest','@midwayjs/decorator'];a7_0xc8a4=function(){return _0x383a5c;};return a7_0xc8a4();}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a8_0x3365bc=a8_0x353e;(function(_0xe2a972,_0x28d6d1){var _0x5f09b5=a8_0x353e,_0x53d596=_0xe2a972();while(!![]){try{var _0x3d4f71=parseInt(_0x5f09b5(0xba))/0x1+-parseInt(_0x5f09b5(0x86))/0x2*(-parseInt(_0x5f09b5(0x91))/0x3)+parseInt(_0x5f09b5(0x9c))/0x4+-parseInt(_0x5f09b5(0xb4))/0x5*(-parseInt(_0x5f09b5(0x81))/0x6)+parseInt(_0x5f09b5(0x9b))/0x7*(parseInt(_0x5f09b5(0xae))/0x8)+-parseInt(_0x5f09b5(0x88))/0x9*(parseInt(_0x5f09b5(0x90))/0xa)+-parseInt(_0x5f09b5(0xb9))/0xb*(parseInt(_0x5f09b5(0x9a))/0xc);if(_0x3d4f71===_0x28d6d1)break;else _0x53d596['push'](_0x53d596['shift']());}catch(_0x575b6c){_0x53d596['push'](_0x53d596['shift']());}}}(a8_0x350b,0xb9ce5));function a8_0x350b(){var _0x2e8d52=['Logger','defineProperty','Inject','./helper/getRoutes','8536184VXvCtz','configurable','QueueService','getRoutes','@anncic-api/validator','Fields','15aeZNcQ','Headers','Query','default','get','110CHKIyy','908566VYPoxp','@anncic-api/event','ValidatorService','Apitest','Body','150204zOfesy','Action','Config','Scope','Param','88fYfJRK','Files','10774359QSxWjD','ScopeEnum','Api','__createBinding','App','ApiService','@midwayjs/task','@midwayjs/decorator','10xpXXgy','48291qoxblj','./service/ExcelService','prototype','CacheService','ExcelService','./decorator/ActionApitest','create','CustomConfiguration','./decorator/Action','1550196LHVBWk','7TOaUJQ','1964332QSvqBs','Provide','writable','./exception/ApiError','./decorator/ActionApi','__exportStar','Init','Configuration','ValidatorError','__esModule','File','@anncic-api/cache','ApiError','EventService'];a8_0x350b=function(){return _0x2e8d52;};return a8_0x350b();}var __createBinding=this&&this[a8_0x3365bc(0x8b)]||(Object[a8_0x3365bc(0x97)]?function(_0x4b04a0,_0x46880b,_0x39a1fd,_0x1eb058){var _0x3f2b42=a8_0x3365bc;if(_0x1eb058===undefined)_0x1eb058=_0x39a1fd;var _0x4bd778=Object['getOwnPropertyDescriptor'](_0x46880b,_0x39a1fd);(!_0x4bd778||(_0x3f2b42(0xb8)in _0x4bd778?!_0x46880b[_0x3f2b42(0xa5)]:_0x4bd778[_0x3f2b42(0x9e)]||_0x4bd778[_0x3f2b42(0xaf)]))&&(_0x4bd778={'enumerable':!![],'get':function(){return _0x46880b[_0x39a1fd];}}),Object[_0x3f2b42(0xab)](_0x4b04a0,_0x1eb058,_0x4bd778);}:function(_0x42ff50,_0x4bf994,_0xfef040,_0x142dd8){if(_0x142dd8===undefined)_0x142dd8=_0xfef040;_0x42ff50[_0x142dd8]=_0x4bf994[_0xfef040];}),__exportStar=this&&this[a8_0x3365bc(0xa1)]||function(_0x272946,_0x547dcd){var _0x23408e=a8_0x3365bc;for(var _0x3256f3 in _0x272946)if(_0x3256f3!==_0x23408e(0xb7)&&!Object[_0x23408e(0x93)]['hasOwnProperty']['call'](_0x547dcd,_0x3256f3))__createBinding(_0x547dcd,_0x272946,_0x3256f3);};Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xa5),{'value':!![]}),exports[a8_0x3365bc(0x89)]=exports[a8_0x3365bc(0x84)]=exports[a8_0x3365bc(0xac)]=exports[a8_0x3365bc(0x9d)]=exports[a8_0x3365bc(0xaa)]=exports[a8_0x3365bc(0x83)]=exports[a8_0x3365bc(0x8c)]=exports[a8_0x3365bc(0xa2)]=exports[a8_0x3365bc(0xb5)]=exports[a8_0x3365bc(0xb6)]=exports[a8_0x3365bc(0x85)]=exports[a8_0x3365bc(0xbe)]=exports[a8_0x3365bc(0xb3)]=exports[a8_0x3365bc(0x87)]=exports[a8_0x3365bc(0xa6)]=exports[a8_0x3365bc(0xa3)]=exports[a8_0x3365bc(0xbc)]=exports[a8_0x3365bc(0xa4)]=exports[a8_0x3365bc(0x95)]=exports[a8_0x3365bc(0x8d)]=exports['EventService']=exports[a8_0x3365bc(0x94)]=exports[a8_0x3365bc(0xb0)]=exports[a8_0x3365bc(0xa8)]=exports[a8_0x3365bc(0xbd)]=exports[a8_0x3365bc(0x82)]=exports[a8_0x3365bc(0x8a)]=exports[a8_0x3365bc(0xb1)]=void 0x0,__exportStar(require('./types/common'),exports),__exportStar(require('./service/ApitestService'),exports);var getRoutes_1=require(a8_0x3365bc(0xad));Object['defineProperty'](exports,a8_0x3365bc(0xb1),{'enumerable':!![],'get':function(){var _0x386be9=a8_0x3365bc;return getRoutes_1[_0x386be9(0xb1)];}});var ActionApi_1=require(a8_0x3365bc(0xa0));Object['defineProperty'](exports,'Api',{'enumerable':!![],'get':function(){var _0x190cc2=a8_0x3365bc;return ActionApi_1[_0x190cc2(0x8a)];}});var Action_1=require(a8_0x3365bc(0x99));function a8_0x353e(_0x4dcfdb,_0x453847){var _0x350bf7=a8_0x350b();return a8_0x353e=function(_0x353e0f,_0x5b6988){_0x353e0f=_0x353e0f-0x81;var _0x1181a7=_0x350bf7[_0x353e0f];return _0x1181a7;},a8_0x353e(_0x4dcfdb,_0x453847);}Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0x82),{'enumerable':!![],'get':function(){var _0x4d9c27=a8_0x3365bc;return Action_1[_0x4d9c27(0x82)];}});var ActionApitest_1=require(a8_0x3365bc(0x96));Object['defineProperty'](exports,a8_0x3365bc(0xbd),{'enumerable':!![],'get':function(){var _0x314e42=a8_0x3365bc;return ActionApitest_1[_0x314e42(0xbd)];}});var ApiError_1=require(a8_0x3365bc(0x9f));Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xa8),{'enumerable':!![],'get':function(){return ApiError_1['ApiError'];}});var task_1=require(a8_0x3365bc(0x8e));Object[a8_0x3365bc(0xab)](exports,'QueueService',{'enumerable':!![],'get':function(){var _0x28ad96=a8_0x3365bc;return task_1[_0x28ad96(0xb0)];}});var cache_1=require(a8_0x3365bc(0xa7));Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0x94),{'enumerable':!![],'get':function(){var _0x3410bc=a8_0x3365bc;return cache_1[_0x3410bc(0x94)];}});var event_1=require(a8_0x3365bc(0xbb));Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xa9),{'enumerable':!![],'get':function(){var _0x5109b5=a8_0x3365bc;return event_1[_0x5109b5(0xa9)];}});var ApiService_1=require('./service/ApiService');Object[a8_0x3365bc(0xab)](exports,'ApiService',{'enumerable':!![],'get':function(){return ApiService_1['ApiService'];}});var ExcelService_1=require(a8_0x3365bc(0x92));Object['defineProperty'](exports,a8_0x3365bc(0x95),{'enumerable':!![],'get':function(){var _0x44769c=a8_0x3365bc;return ExcelService_1[_0x44769c(0x95)];}});var validator_1=require(a8_0x3365bc(0xb2));Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xa4),{'enumerable':!![],'get':function(){return validator_1['ValidatorError'];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xbc),{'enumerable':!![],'get':function(){var _0x578476=a8_0x3365bc;return validator_1[_0x578476(0xbc)];}});var configuration_1=require('./configuration');Object[a8_0x3365bc(0xab)](exports,'Configuration',{'enumerable':!![],'get':function(){var _0x24fe49=a8_0x3365bc;return configuration_1[_0x24fe49(0x98)];}});var decorator_1=require(a8_0x3365bc(0x8f));Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xa6),{'enumerable':!![],'get':function(){var _0x50003d=a8_0x3365bc;return decorator_1[_0x50003d(0xa6)];}}),Object['defineProperty'](exports,a8_0x3365bc(0x87),{'enumerable':!![],'get':function(){var _0x254029=a8_0x3365bc;return decorator_1[_0x254029(0x87)];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xb3),{'enumerable':!![],'get':function(){var _0x310110=a8_0x3365bc;return decorator_1[_0x310110(0xb3)];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xbe),{'enumerable':!![],'get':function(){var _0x4a33b3=a8_0x3365bc;return decorator_1[_0x4a33b3(0xbe)];}}),Object['defineProperty'](exports,a8_0x3365bc(0x85),{'enumerable':!![],'get':function(){var _0x9871d8=a8_0x3365bc;return decorator_1[_0x9871d8(0x85)];}}),Object[a8_0x3365bc(0xab)](exports,'Query',{'enumerable':!![],'get':function(){var _0xd6c340=a8_0x3365bc;return decorator_1[_0xd6c340(0xb6)];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xb5),{'enumerable':!![],'get':function(){var _0x3f8fc0=a8_0x3365bc;return decorator_1[_0x3f8fc0(0xb5)];}}),Object['defineProperty'](exports,'Init',{'enumerable':!![],'get':function(){var _0x2dc34f=a8_0x3365bc;return decorator_1[_0x2dc34f(0xa2)];}});var decorator_2=require(a8_0x3365bc(0x8f));Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0x8c),{'enumerable':!![],'get':function(){var _0x4e811d=a8_0x3365bc;return decorator_2[_0x4e811d(0x8c)];}}),Object[a8_0x3365bc(0xab)](exports,'Config',{'enumerable':!![],'get':function(){return decorator_2['Config'];}}),Object['defineProperty'](exports,a8_0x3365bc(0xaa),{'enumerable':!![],'get':function(){return decorator_2['Logger'];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0x9d),{'enumerable':!![],'get':function(){return decorator_2['Provide'];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0xac),{'enumerable':!![],'get':function(){var _0x597b68=a8_0x3365bc;return decorator_2[_0x597b68(0xac)];}}),Object[a8_0x3365bc(0xab)](exports,a8_0x3365bc(0x84),{'enumerable':!![],'get':function(){var _0x96dece=a8_0x3365bc;return decorator_2[_0x96dece(0x84)];}}),Object[a8_0x3365bc(0xab)](exports,'ScopeEnum',{'enumerable':!![],'get':function(){var _0x451fda=a8_0x3365bc;return decorator_2[_0x451fda(0x89)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a9_0x1425(){var _0xf2d9a1=['logintime','config','25442yGLWav','TIMEOUT','Config','push','ScopeEnum','470664BvzSoa','72oWrbMx','1944SdMoIl','checksign','Scope','map','ApiService','secret','MD5','defineProperty','HEADERS_SIGNATURE','../exception/ApiError','function','device','8060iJLxRj','@midwayjs/decorator','toLowerCase','HEADERS_LACK','1041870onJhVV','undefined','join','toString','HEADERS_DEVICE','ApiError','token','anncicapi','__decorate','length','57LPnsfa','__esModule','object','devices','decorate','entries','timeout','abs','now','__metadata','sort','crypto-js','477988VOigBa','缺少头信息:signature','getsign','HEADERS_CHECKCODE','prototype','checkcode','1232476HmKjJq','requesttime','5135305LnkLyR','Provide','signature','password','metadata'];a9_0x1425=function(){return _0xf2d9a1;};return a9_0x1425();}var a9_0x185a00=a9_0x33c2;(function(_0x541950,_0x5a128d){var _0x38acbb=a9_0x33c2,_0x4c9f85=_0x541950();while(!![]){try{var _0x3c6cb1=-parseInt(_0x38acbb(0x7e))/0x1+-parseInt(_0x38acbb(0x8d))/0x2*(-parseInt(_0x38acbb(0xae))/0x3)+-parseInt(_0x38acbb(0x84))/0x4+-parseInt(_0x38acbb(0xa0))/0x5*(parseInt(_0x38acbb(0x94))/0x6)+parseInt(_0x38acbb(0x86))/0x7+-parseInt(_0x38acbb(0x92))/0x8+-parseInt(_0x38acbb(0x93))/0x9*(-parseInt(_0x38acbb(0xa4))/0xa);if(_0x3c6cb1===_0x5a128d)break;else _0x4c9f85['push'](_0x4c9f85['shift']());}catch(_0x325de4){_0x4c9f85['push'](_0x4c9f85['shift']());}}}(a9_0x1425,0x6bcee));var __decorate=this&&this[a9_0x185a00(0xac)]||function(_0x47e0c3,_0x12cd25,_0x5fa998,_0x469ee3){var _0x43bc0f=a9_0x185a00,_0x5db741=arguments[_0x43bc0f(0xad)],_0x41da1a=_0x5db741<0x3?_0x12cd25:_0x469ee3===null?_0x469ee3=Object['getOwnPropertyDescriptor'](_0x12cd25,_0x5fa998):_0x469ee3,_0x256769;if(typeof Reflect===_0x43bc0f(0xb0)&&typeof Reflect[_0x43bc0f(0xb2)]===_0x43bc0f(0x9e))_0x41da1a=Reflect[_0x43bc0f(0xb2)](_0x47e0c3,_0x12cd25,_0x5fa998,_0x469ee3);else{for(var _0x3232f2=_0x47e0c3[_0x43bc0f(0xad)]-0x1;_0x3232f2>=0x0;_0x3232f2--)if(_0x256769=_0x47e0c3[_0x3232f2])_0x41da1a=(_0x5db741<0x3?_0x256769(_0x41da1a):_0x5db741>0x3?_0x256769(_0x12cd25,_0x5fa998,_0x41da1a):_0x256769(_0x12cd25,_0x5fa998))||_0x41da1a;}return _0x5db741>0x3&&_0x41da1a&&Object[_0x43bc0f(0x9b)](_0x12cd25,_0x5fa998,_0x41da1a),_0x41da1a;},__metadata=this&&this[a9_0x185a00(0x7b)]||function(_0x54c87e,_0x3450d5){var _0x2b072f=a9_0x185a00;if(typeof Reflect===_0x2b072f(0xb0)&&typeof Reflect[_0x2b072f(0x8a)]===_0x2b072f(0x9e))return Reflect[_0x2b072f(0x8a)](_0x54c87e,_0x3450d5);};Object[a9_0x185a00(0x9b)](exports,a9_0x185a00(0xaf),{'value':!![]}),exports['ApiService']=void 0x0;const crypto_js_1=require(a9_0x185a00(0x7d)),decorator_1=require(a9_0x185a00(0xa1)),ApiError_1=require(a9_0x185a00(0x9d));function a9_0x33c2(_0x5e8dfb,_0x233d87){var _0x1425f3=a9_0x1425();return a9_0x33c2=function(_0x33c24b,_0x422636){_0x33c24b=_0x33c24b-0x7a;var _0x28616e=_0x1425f3[_0x33c24b];return _0x28616e;},a9_0x33c2(_0x5e8dfb,_0x233d87);}let ApiService=class ApiService{[a9_0x185a00(0x89)](_0x348bdb){var _0xe6c7b=a9_0x185a00,_0x14626b;return _0x348bdb?(0x0,crypto_js_1[_0xe6c7b(0x9a)])(_0x348bdb+(0x0,crypto_js_1[_0xe6c7b(0x9a)])((0x0,crypto_js_1['MD5'])(_0x348bdb)[_0xe6c7b(0xa7)]()+((_0x14626b=this[_0xe6c7b(0x8c)])===null||_0x14626b===void 0x0?void 0x0:_0x14626b['password']))[_0xe6c7b(0xa7)]())[_0xe6c7b(0xa7)]():'';}['getcheck'](_0x287b52,_0x44ed45,_0xf00351=Date[a9_0x185a00(0x7a)]()){var _0x4ffefb=a9_0x185a00;return{'Token':_0x287b52,'Logintime':_0xf00351,'Checkcode':this[_0x4ffefb(0x83)](_0x287b52,_0x44ed45,_0xf00351)};}['getsign'](_0x5b3c56={}){var _0x574c5a=a9_0x185a00;const _0x54d822=[],_0x4d0e60=Object['fromEntries'](Object[_0x574c5a(0xb3)](_0x5b3c56)[_0x574c5a(0x97)](_0x46346f=>[_0x46346f[0x0]['toLowerCase'](),_0x46346f[0x1]]));for(let _0x64ad52 of[_0x574c5a(0x9f),_0x574c5a(0x85),'token',_0x574c5a(0x8b),_0x574c5a(0x83)]){if(typeof _0x4d0e60[_0x64ad52]==_0x574c5a(0xa5))throw new AnnError(ApiError_1[_0x574c5a(0xa9)][_0x574c5a(0xa3)],{'message':'缺少头信息:'+_0x64ad52});_0x54d822[_0x574c5a(0x90)](_0x64ad52+'='+_0x4d0e60[_0x64ad52]);}if(Math[_0x574c5a(0xb5)](_0x4d0e60[_0x574c5a(0x85)])-Date[_0x574c5a(0x7a)]()>this[_0x574c5a(0x8c)][_0x574c5a(0xb4)])throw new AnnError(ApiError_1['ApiError'][_0x574c5a(0x8e)]);if(!this[_0x574c5a(0x8c)][_0x574c5a(0xb1)][_0x4d0e60[_0x574c5a(0x9f)]]||!this[_0x574c5a(0x8c)][_0x574c5a(0xb1)][_0x4d0e60['device']][_0x574c5a(0x99)]||!this[_0x574c5a(0x8c)][_0x574c5a(0xb1)][_0x4d0e60[_0x574c5a(0x9f)]][_0x574c5a(0x83)])throw new AnnError(ApiError_1[_0x574c5a(0xa9)][_0x574c5a(0xa8)]);if(_0x4d0e60['token']&&_0x4d0e60['checkcode']!=this[_0x574c5a(0x83)](_0x4d0e60[_0x574c5a(0xaa)],_0x4d0e60[_0x574c5a(0x9f)],_0x4d0e60[_0x574c5a(0x8b)]))throw new AnnError(ApiError_1[_0x574c5a(0xa9)][_0x574c5a(0x81)]);return _0x54d822[_0x574c5a(0x90)]('secret='+this[_0x574c5a(0x8c)][_0x574c5a(0xb1)][_0x4d0e60['device']][_0x574c5a(0x99)]),(0x0,crypto_js_1[_0x574c5a(0x9a)])(_0x54d822[_0x574c5a(0x7c)]()[_0x574c5a(0xa6)](''))[_0x574c5a(0xa7)]();}[a9_0x185a00(0x83)](_0x14b62b,_0x14847c,_0x11d782=Date[a9_0x185a00(0x7a)]()){var _0x175758=a9_0x185a00,_0xafa622,_0x139f42,_0x37bc1c;if(!((_0xafa622=this[_0x175758(0x8c)])===null||_0xafa622===void 0x0?void 0x0:_0xafa622[_0x175758(0xb1)][_0x14847c])||!((_0x37bc1c=(_0x139f42=this[_0x175758(0x8c)])===null||_0x139f42===void 0x0?void 0x0:_0x139f42['devices'][_0x14847c])===null||_0x37bc1c===void 0x0?void 0x0:_0x37bc1c[_0x175758(0x83)]))throw new AnnError(ApiError_1['ApiError'][_0x175758(0xa8)]);return(0x0,crypto_js_1[_0x175758(0x9a)])(_0x14b62b+(0x0,crypto_js_1[_0x175758(0x9a)])(_0x11d782+this[_0x175758(0x8c)][_0x175758(0xb1)][_0x14847c][_0x175758(0x83)])['toString']())[_0x175758(0xa7)]();}[a9_0x185a00(0x95)](_0x36d8e6={}){var _0xd49e8b=a9_0x185a00;const _0x3bb1ae=Object['fromEntries'](Object[_0xd49e8b(0xb3)](_0x36d8e6)[_0xd49e8b(0x97)](_0xbf1f63=>[_0xbf1f63[0x0][_0xd49e8b(0xa2)](),_0xbf1f63[0x1]]));if(!(_0x3bb1ae===null||_0x3bb1ae===void 0x0?void 0x0:_0x3bb1ae[_0xd49e8b(0x88)]))throw new AnnError(ApiError_1[_0xd49e8b(0xa9)]['HEADERS_LACK'],{'message':_0xd49e8b(0x7f)});if((_0x3bb1ae===null||_0x3bb1ae===void 0x0?void 0x0:_0x3bb1ae[_0xd49e8b(0x88)])!=this[_0xd49e8b(0x80)](_0x3bb1ae))throw new AnnError(ApiError_1[_0xd49e8b(0xa9)][_0xd49e8b(0x9c)]);return!![];}};__decorate([(0x0,decorator_1[a9_0x185a00(0x8f)])(a9_0x185a00(0xab)),__metadata('design:type',Object)],ApiService[a9_0x185a00(0x82)],'config',void 0x0),ApiService=__decorate([(0x0,decorator_1[a9_0x185a00(0x87)])(),(0x0,decorator_1[a9_0x185a00(0x96)])(decorator_1[a9_0x185a00(0x91)]['Singleton'])],ApiService),exports[a9_0x185a00(0x98)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a10_0xacc7a4=a10_0x384e;(function(_0x1aa971,_0x5754ae){const _0x149e6c=a10_0x384e,_0x17fa60=_0x1aa971();while(!![]){try{const _0x4d565e=parseInt(_0x149e6c(0x163))/0x1*(parseInt(_0x149e6c(0x166))/0x2)+parseInt(_0x149e6c(0x15e))/0x3*(-parseInt(_0x149e6c(0x130))/0x4)+-parseInt(_0x149e6c(0x12c))/0x5*(parseInt(_0x149e6c(0x165))/0x6)+parseInt(_0x149e6c(0x134))/0x7+parseInt(_0x149e6c(0x11b))/0x8+parseInt(_0x149e6c(0x148))/0x9+-parseInt(_0x149e6c(0x11c))/0xa;if(_0x4d565e===_0x5754ae)break;else _0x17fa60['push'](_0x17fa60['shift']());}catch(_0x1dd816){_0x17fa60['push'](_0x17fa60['shift']());}}}(a10_0x5259,0x54ceb));function a10_0x384e(_0x8d8d76,_0xfe0c99){const _0x52593c=a10_0x5259();return a10_0x384e=function(_0x384e68,_0x37750b){_0x384e68=_0x384e68-0x117;let _0xacc565=_0x52593c[_0x384e68];return _0xacc565;},a10_0x384e(_0x8d8d76,_0xfe0c99);}var __decorate=this&&this[a10_0xacc7a4(0x15d)]||function(_0x2415b3,_0x334ef9,_0x110d08,_0x5b2390){const _0x4556a0=a10_0xacc7a4;var _0x41931c=arguments[_0x4556a0(0x160)],_0x1b6593=_0x41931c<0x3?_0x334ef9:_0x5b2390===null?_0x5b2390=Object[_0x4556a0(0x142)](_0x334ef9,_0x110d08):_0x5b2390,_0x3bd3a0;if(typeof Reflect===_0x4556a0(0x11a)&&typeof Reflect[_0x4556a0(0x164)]===_0x4556a0(0x120))_0x1b6593=Reflect['decorate'](_0x2415b3,_0x334ef9,_0x110d08,_0x5b2390);else{for(var _0x18064d=_0x2415b3['length']-0x1;_0x18064d>=0x0;_0x18064d--)if(_0x3bd3a0=_0x2415b3[_0x18064d])_0x1b6593=(_0x41931c<0x3?_0x3bd3a0(_0x1b6593):_0x41931c>0x3?_0x3bd3a0(_0x334ef9,_0x110d08,_0x1b6593):_0x3bd3a0(_0x334ef9,_0x110d08))||_0x1b6593;}return _0x41931c>0x3&&_0x1b6593&&Object[_0x4556a0(0x123)](_0x334ef9,_0x110d08,_0x1b6593),_0x1b6593;},__metadata=this&&this['__metadata']||function(_0x6ff674,_0x50e4f6){const _0x39b2b0=a10_0xacc7a4;if(typeof Reflect===_0x39b2b0(0x11a)&&typeof Reflect['metadata']===_0x39b2b0(0x120))return Reflect[_0x39b2b0(0x12d)](_0x6ff674,_0x50e4f6);},__param=this&&this[a10_0xacc7a4(0x119)]||function(_0x1d4d3e,_0xe2ba54){return function(_0x2b68d0,_0x53f2c8){_0xe2ba54(_0x2b68d0,_0x53f2c8,_0x1d4d3e);};};Object['defineProperty'](exports,a10_0xacc7a4(0x144),{'value':!![]}),exports[a10_0xacc7a4(0x121)]=exports[a10_0xacc7a4(0x12b)]=void 0x0;const path_1=require(a10_0xacc7a4(0x137)),fs_1=require('fs'),core_1=require(a10_0xacc7a4(0x161)),decorator_1=require(a10_0xacc7a4(0x15c)),decorator_2=require(a10_0xacc7a4(0x15c)),getRoutes_1=require('../helper/getRoutes');let ApitestService=class ApitestService{async[a10_0xacc7a4(0x14e)](_0x4ab98c){const _0x43f78c=a10_0xacc7a4,_0xbcad9d=(0x0,getRoutes_1[_0x43f78c(0x12f)])(_0x4ab98c),_0x17c481=[];for(let _0x49d34b in _0xbcad9d){for(let _0x500b6a in _0xbcad9d[_0x49d34b]['routes']){let _0x419ce0=_0xbcad9d[_0x49d34b][_0x43f78c(0x138)][_0x500b6a],_0x413aec=[];for(let _0x10b18e in _0x419ce0[_0x43f78c(0x145)]){_0x413aec[_0x43f78c(0x122)](_0x419ce0[_0x43f78c(0x145)][_0x10b18e]);}_0x17c481[_0x43f78c(0x122)]({'title':_0xbcad9d[_0x49d34b][_0x43f78c(0x126)]+':'+_0x419ce0[_0x43f78c(0x126)],'prefix':_0xbcad9d[_0x49d34b][_0x43f78c(0x13b)],'router':_0x419ce0[_0x43f78c(0x149)],'method':_0x419ce0['method'],'describe':_0x419ce0['description']||'','filepath':_0xbcad9d[_0x49d34b][_0x43f78c(0x11d)]||'','request':_0x413aec});}}const _0x195911=(0x0,path_1[_0x43f78c(0x136)])(__dirname,_0x43f78c(0x128));return(0x0,fs_1[_0x43f78c(0x156)])(_0x195911,{'encoding':_0x43f78c(0x125)})[_0x43f78c(0x153)](/__res__/g,_0x43f78c(0x150))[_0x43f78c(0x153)](_0x43f78c(0x13c),JSON[_0x43f78c(0x14c)](_0x17c481))[_0x43f78c(0x153)]('__devices__',JSON[_0x43f78c(0x14c)](this['config']['devices']));}};__decorate([(0x0,decorator_2[a10_0xacc7a4(0x13a)])('anncicapi'),__metadata(a10_0xacc7a4(0x12a),Object)],ApitestService[a10_0xacc7a4(0x15b)],a10_0xacc7a4(0x147),void 0x0),ApitestService=__decorate([(0x0,decorator_1[a10_0xacc7a4(0x133)])(a10_0xacc7a4(0x155)),(0x0,decorator_2[a10_0xacc7a4(0x14f)])(decorator_2[a10_0xacc7a4(0x13d)][a10_0xacc7a4(0x15f)])],ApitestService),exports[a10_0xacc7a4(0x12b)]=ApitestService;function a10_0x5259(){const _0x490ebb=['ctx','__param','object','3606032TdKsYI','11713910CWgFtM','filepath','Request','/apitest-:module','function','ApitestStaticController','push','defineProperty','cache-control','utf-8','summary','text/css;\x20charset=utf-8','../../public/index.html','design:paramtypes','design:type','ApitestService','51395yBHshY','metadata','/index.html','getRoutes','33064dVQxhR','design:returntype','application/javascript;\x20charset=utf-8','Provide','4442326WZovLC','module','join','path','routes','../../public/','Config','prefix','__apiList__','ScopeEnum','set','anncicapi','Controller','existsSync','getOwnPropertyDescriptor','.css','__esModule','request','apiteststatic','config','5100786OMxNDi','route','apitesthtml','extname','stringify','/apitest','apidoc','Scope','/apiteststatic/','Get','Environment','replace','substring','apitest','readFileSync','apitestmodule','url','isDevelopmentEnvironment','content-type','prototype','@midwayjs/decorator','__decorate','54TqZlFO','Singleton','length','@midwayjs/core','.js','5ziyUiD','decorate','354BPMvHf','248754xqsFyc','Inject','MidwayEnvironmentService'];a10_0x5259=function(){return _0x490ebb;};return a10_0x5259();}let ApitestStaticController=class ApitestStaticController{async[a10_0xacc7a4(0x14a)](){const _0x354fa8=a10_0xacc7a4;if(this[_0x354fa8(0x155)]){const _0x30ea31={'module':![]};return this[_0x354fa8(0x152)][_0x354fa8(0x159)]()&&(_0x30ea31[_0x354fa8(0x11d)]=!![]),await this[_0x354fa8(0x12b)][_0x354fa8(0x14e)](_0x30ea31);}return'';}async['apitestmodule'](_0x512bfd){const _0x279a75=a10_0xacc7a4;if(this['apitest']){const _0x1d440e={'module':_0x512bfd};return this['Environment'][_0x279a75(0x159)]()&&(_0x1d440e[_0x279a75(0x11d)]=!![]),await this['ApitestService'][_0x279a75(0x14e)](_0x1d440e);}return'';}async[a10_0xacc7a4(0x146)](){const _0x4f12bd=a10_0xacc7a4;if((0x0,path_1[_0x4f12bd(0x14b)])(this['ctx'][_0x4f12bd(0x145)][_0x4f12bd(0x158)])){var _0x8cd65a=(0x0,path_1[_0x4f12bd(0x136)])(__dirname,_0x4f12bd(0x139)+this[_0x4f12bd(0x118)][_0x4f12bd(0x145)][_0x4f12bd(0x158)][_0x4f12bd(0x153)]('/apiteststatic/','/'));if(_0x8cd65a[_0x4f12bd(0x154)](_0x8cd65a[_0x4f12bd(0x160)]-0xb)!=_0x4f12bd(0x12e)){this[_0x4f12bd(0x118)][_0x4f12bd(0x13e)](_0x4f12bd(0x124),'public,\x20max-age=604800');if((0x0,path_1[_0x4f12bd(0x14b)])(this[_0x4f12bd(0x118)][_0x4f12bd(0x145)][_0x4f12bd(0x158)])==_0x4f12bd(0x162))this[_0x4f12bd(0x118)]['set'](_0x4f12bd(0x15a),_0x4f12bd(0x132));else(0x0,path_1[_0x4f12bd(0x14b)])(this[_0x4f12bd(0x118)][_0x4f12bd(0x145)][_0x4f12bd(0x158)])==_0x4f12bd(0x143)&&this[_0x4f12bd(0x118)][_0x4f12bd(0x13e)](_0x4f12bd(0x15a),_0x4f12bd(0x127));return(0x0,fs_1[_0x4f12bd(0x141)])(_0x8cd65a)&&(0x0,fs_1[_0x4f12bd(0x156)])(_0x8cd65a,{'encoding':_0x4f12bd(0x125)});}}return'';}};__decorate([(0x0,decorator_2[a10_0xacc7a4(0x167)])(),__metadata(a10_0xacc7a4(0x12a),Object)],ApitestStaticController[a10_0xacc7a4(0x15b)],'ctx',void 0x0),__decorate([(0x0,decorator_2[a10_0xacc7a4(0x167)])(),__metadata('design:type',core_1[a10_0xacc7a4(0x117)])],ApitestStaticController[a10_0xacc7a4(0x15b)],'Environment',void 0x0),__decorate([(0x0,decorator_2[a10_0xacc7a4(0x167)])(),__metadata(a10_0xacc7a4(0x12a),ApitestService)],ApitestStaticController[a10_0xacc7a4(0x15b)],a10_0xacc7a4(0x12b),void 0x0),__decorate([(0x0,decorator_2[a10_0xacc7a4(0x13a)])(a10_0xacc7a4(0x155)),__metadata(a10_0xacc7a4(0x12a),Boolean)],ApitestStaticController[a10_0xacc7a4(0x15b)],a10_0xacc7a4(0x155),void 0x0),__decorate([(0x0,decorator_2[a10_0xacc7a4(0x13a)])(a10_0xacc7a4(0x13f)),__metadata(a10_0xacc7a4(0x12a),Object)],ApitestStaticController[a10_0xacc7a4(0x15b)],a10_0xacc7a4(0x147),void 0x0),__decorate([(0x0,decorator_1[a10_0xacc7a4(0x151)])(a10_0xacc7a4(0x14d)),__metadata('design:type',Function),__metadata(a10_0xacc7a4(0x129),[]),__metadata(a10_0xacc7a4(0x131),Promise)],ApitestStaticController['prototype'],a10_0xacc7a4(0x14a),null),__decorate([(0x0,decorator_1[a10_0xacc7a4(0x151)])(a10_0xacc7a4(0x11f)),__param(0x0,(0x0,decorator_1['Param'])(a10_0xacc7a4(0x135))),__metadata(a10_0xacc7a4(0x12a),Function),__metadata('design:paramtypes',[String]),__metadata(a10_0xacc7a4(0x131),Promise)],ApitestStaticController[a10_0xacc7a4(0x15b)],a10_0xacc7a4(0x157),null),__decorate([(0x0,decorator_1[a10_0xacc7a4(0x151)])('/apiteststatic/*'),__metadata(a10_0xacc7a4(0x12a),Function),__metadata('design:paramtypes',[]),__metadata(a10_0xacc7a4(0x131),Promise)],ApitestStaticController[a10_0xacc7a4(0x15b)],a10_0xacc7a4(0x146),null),ApitestStaticController=__decorate([(0x0,decorator_1[a10_0xacc7a4(0x140)])('/'),(0x0,decorator_2['Scope'])(decorator_2[a10_0xacc7a4(0x13d)][a10_0xacc7a4(0x11e)])],ApitestStaticController),exports[a10_0xacc7a4(0x121)]=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11_0x486760=a11_0x319a;function a11_0x25a8(){const _0x503234=['47935RCQOOb','app','log','handler','getRow','value','getAppDir','defineProperty','key','isNumber','frozen','xlsx','koa-send','Singleton','replace','findRows','columns','__esModule','__decorate','5666276zAyoVG','App','Provide','decorate','rowCount','386874bxkTsK','length','Scope','toString','getWorksheet','readFile','Sheet\x201','function','worksheets','download','38927328JJEGJW','6692189NjvUNj','design:type','substring','trim','addRow','2226075hKYAge','random','parse','startsWith','/public/xlsx','2615590Vtdltw','Api\x20Excel\x20Error:\x20','metadata','object','18MiKmrT','Workbook','public/xlsx','.xlsx','prototype','@midwayjs/decorator','ExcelService','getCell','endsWith','header','writeFile','/public/xlsx/','eachCell'];a11_0x25a8=function(){return _0x503234;};return a11_0x25a8();}(function(_0x10cd6d,_0x2164ac){const _0x5c18b3=a11_0x319a,_0x3da0b7=_0x10cd6d();while(!![]){try{const _0x3f2740=parseInt(_0x5c18b3(0x1c0))/0x1+-parseInt(_0x5c18b3(0x1d5))/0x2+-parseInt(_0x5c18b3(0x1d0))/0x3+-parseInt(_0x5c18b3(0x1bb))/0x4+-parseInt(_0x5c18b3(0x1e6))/0x5*(parseInt(_0x5c18b3(0x1d9))/0x6)+-parseInt(_0x5c18b3(0x1cb))/0x7+parseInt(_0x5c18b3(0x1ca))/0x8;if(_0x3f2740===_0x2164ac)break;else _0x3da0b7['push'](_0x3da0b7['shift']());}catch(_0xb6b295){_0x3da0b7['push'](_0x3da0b7['shift']());}}}(a11_0x25a8,0xc3b4d));var __decorate=this&&this[a11_0x486760(0x1ba)]||function(_0x30d4e6,_0x44d3c4,_0x5a1113,_0x1da441){const _0x256917=a11_0x486760;var _0x38eb7a=arguments[_0x256917(0x1c1)],_0x5d5c1f=_0x38eb7a<0x3?_0x44d3c4:_0x1da441===null?_0x1da441=Object['getOwnPropertyDescriptor'](_0x44d3c4,_0x5a1113):_0x1da441,_0x40eb7a;if(typeof Reflect==='object'&&typeof Reflect[_0x256917(0x1be)]===_0x256917(0x1c7))_0x5d5c1f=Reflect[_0x256917(0x1be)](_0x30d4e6,_0x44d3c4,_0x5a1113,_0x1da441);else{for(var _0x1d7d4e=_0x30d4e6[_0x256917(0x1c1)]-0x1;_0x1d7d4e>=0x0;_0x1d7d4e--)if(_0x40eb7a=_0x30d4e6[_0x1d7d4e])_0x5d5c1f=(_0x38eb7a<0x3?_0x40eb7a(_0x5d5c1f):_0x38eb7a>0x3?_0x40eb7a(_0x44d3c4,_0x5a1113,_0x5d5c1f):_0x40eb7a(_0x44d3c4,_0x5a1113))||_0x5d5c1f;}return _0x38eb7a>0x3&&_0x5d5c1f&&Object[_0x256917(0x1af)](_0x44d3c4,_0x5a1113,_0x5d5c1f),_0x5d5c1f;},__metadata=this&&this['__metadata']||function(_0x4048e5,_0x47da1d){const _0x2cffd9=a11_0x486760;if(typeof Reflect===_0x2cffd9(0x1d8)&&typeof Reflect[_0x2cffd9(0x1d7)]===_0x2cffd9(0x1c7))return Reflect[_0x2cffd9(0x1d7)](_0x4048e5,_0x47da1d);};Object[a11_0x486760(0x1af)](exports,a11_0x486760(0x1b9),{'value':!![]}),exports[a11_0x486760(0x1df)]=void 0x0;const fs=require('fs'),exceljs=require('exceljs'),koasend=require(a11_0x486760(0x1b4)),decorator_1=require(a11_0x486760(0x1de));function a11_0x319a(_0x3ba638,_0x2a9946){const _0x25a82a=a11_0x25a8();return a11_0x319a=function(_0x319a20,_0x5ac873){_0x319a20=_0x319a20-0x1ae;let _0x1f23d0=_0x25a82a[_0x319a20];return _0x1f23d0;},a11_0x319a(_0x3ba638,_0x2a9946);}let ExcelService=class ExcelService{async[a11_0x486760(0x1d2)](_0x488000,_0x939d68,_0x5248ae=[0x0]){const _0x39697d=a11_0x486760;var _0x1319bb,_0x2b319e;const _0xd7706c=new exceljs['Workbook'](),_0x51d4f3=[];let _0x24bc49=_0x488000[_0x39697d(0x1b6)](/(\\|\/)/g,'/')[_0x39697d(0x1b6)](/\/{2,}/g,'/');!(_0x24bc49===null||_0x24bc49===void 0x0?void 0x0:_0x24bc49[_0x39697d(0x1d3)]('/'))&&(_0x24bc49=this[_0x39697d(0x1e7)][_0x39697d(0x1ae)]()+'/'+_0x24bc49);try{await _0xd7706c[_0x39697d(0x1b3)][_0x39697d(0x1c5)](_0x24bc49);}catch(_0x105882){return console[_0x39697d(0x1e8)](_0x39697d(0x1d6)+_0x24bc49+'\x20is\x20read\x20fail'),_0x51d4f3;}for(const _0x15a610 of _0x5248ae){const _0x571b41=lodash[_0x39697d(0x1b1)](_0x15a610)?((_0x1319bb=_0xd7706c[_0x39697d(0x1c8)])===null||_0x1319bb===void 0x0?void 0x0:_0x1319bb[_0x15a610])||undefined:_0xd7706c[_0x39697d(0x1c4)](_0x15a610);if(_0x571b41){var _0x17ce38=0x1;const _0xe3ddfd=_0x571b41[_0x39697d(0x1ea)](0x1),_0x1069d8=await new Promise(_0x3d62e1=>{const _0x448da6=_0x39697d,_0x38c9d9={};_0xe3ddfd[_0x448da6(0x1e5)]((_0x152cd0,_0x52e7aa)=>{const _0x3754a9=_0x448da6;for(const _0x35ee90 of _0x939d68){if(_0x152cd0[_0x3754a9(0x1eb)]==_0x35ee90[_0x3754a9(0x1e2)])_0x17ce38=0x2,_0x38c9d9[_0x35ee90[_0x3754a9(0x1b0)]]={'header':_0x152cd0['col'],'handler':_0x35ee90[_0x3754a9(0x1e9)]};else{if(!_0x38c9d9[_0x35ee90[_0x3754a9(0x1b0)]])try{const _0x46b0ab=_0xe3ddfd[_0x3754a9(0x1e0)](_0x35ee90[_0x3754a9(0x1e2)]);_0x46b0ab&&(_0x38c9d9[_0x35ee90[_0x3754a9(0x1b0)]]={'header':_0x46b0ab['col'],'handler':_0x35ee90[_0x3754a9(0x1e9)]});}catch{}}}_0xe3ddfd['cellCount']==_0x52e7aa&&_0x3d62e1(_0x38c9d9);});});for(const _0x28e6a7 of _0x571b41[_0x39697d(0x1b7)](_0x17ce38,_0x571b41[_0x39697d(0x1bf)])){const _0x226ec3={};for(const _0x53886e in _0x1069d8){_0x1069d8[_0x53886e][_0x39697d(0x1e2)]&&(typeof((_0x2b319e=_0x1069d8[_0x53886e])===null||_0x2b319e===void 0x0?void 0x0:_0x2b319e[_0x39697d(0x1e9)])==_0x39697d(0x1c7)?_0x226ec3[_0x53886e]=_0x1069d8[_0x53886e][_0x39697d(0x1e9)](_0x28e6a7[_0x39697d(0x1e0)](lodash[_0x39697d(0x1ce)](''+_0x1069d8[_0x53886e]['header'],'\x20'))[_0x39697d(0x1c3)]()):_0x226ec3[_0x53886e]=_0x28e6a7[_0x39697d(0x1e0)](_0x1069d8[_0x53886e][_0x39697d(0x1e2)])[_0x39697d(0x1c3)]());}Object['keys'](_0x226ec3)['length']>0x0&&_0x51d4f3['push'](_0x226ec3);}}}return _0x51d4f3;}async['export'](_0x12d7f1,_0x48147c,_0xba5db1,_0x35ad93=a11_0x486760(0x1db)){const _0x274491=a11_0x486760;var _0x4cf75e,_0x5b21c;const _0x46f22c=new exceljs[(_0x274491(0x1da))](),_0x3af5da={},_0x207b15=[],_0x3156e3=_0x46f22c['addWorksheet'](_0x274491(0x1c6),{'views':[{'state':_0x274491(0x1b2),'xSplit':0x1}]});for(const _0x3cff62 in _0x48147c){_0x3af5da[_0x48147c[_0x3cff62][_0x274491(0x1b0)]]=_0x48147c[_0x3cff62][_0x274491(0x1e2)],_0x207b15['push']({'header':_0x48147c[_0x3cff62]['header'],'key':(_0x4cf75e=_0x48147c[_0x3cff62])===null||_0x4cf75e===void 0x0?void 0x0:_0x4cf75e[_0x274491(0x1b0)]['replace'](/\./g,'_')});}_0x3156e3[_0x274491(0x1b8)]=_0x207b15;for(const _0x277c21 of _0xba5db1){const _0x5f062e={};for(const _0x353269 in _0x48147c){typeof((_0x5b21c=_0x48147c[_0x353269])===null||_0x5b21c===void 0x0?void 0x0:_0x5b21c['handler'])=='function'?_0x5f062e[_0x48147c[_0x353269][_0x274491(0x1b0)][_0x274491(0x1b6)](/\./g,'_')]=await _0x48147c[_0x353269][_0x274491(0x1e9)](_0x277c21):_0x5f062e[_0x48147c[_0x353269][_0x274491(0x1b0)][_0x274491(0x1b6)](/\./g,'_')]=lodash['get'](_0x277c21,_0x48147c[_0x353269][_0x274491(0x1b0)],'');}_0x3156e3[_0x274491(0x1cf)](_0x5f062e);}let _0x5c56db='';const _0x4562ef=_0x12d7f1+'-'+lodash[_0x274491(0x1d1)](0x2710,0x1869f)+_0x274491(0x1dc);if(_0x35ad93&&_0x35ad93['startsWith']('/'))_0x5c56db=_0x35ad93+'/'+_0x4562ef;else _0x35ad93&&!_0x35ad93[_0x274491(0x1d3)]('/')&&!_0x35ad93['startsWith']('\x5c')?_0x5c56db=this[_0x274491(0x1e7)][_0x274491(0x1ae)]()+'/'+_0x35ad93+'/'+_0x4562ef:_0x5c56db=this[_0x274491(0x1e7)][_0x274491(0x1ae)]()+_0x274491(0x1d4);return(_0x5c56db[_0x274491(0x1e1)]('/')||_0x5c56db[_0x274491(0x1e1)]('\x5c'))&&(_0x5c56db=_0x5c56db[_0x274491(0x1cd)](0x0,_0x5c56db['length']-0x1)),_0x5c56db=_0x5c56db['replace'](/(\\|\/)/g,'/')[_0x274491(0x1b6)](/\/{2,}/g,'/'),!fs['existsSync'](_0x5c56db)&&fs['mkdirSync'](_0x5c56db,{'recursive':!![]}),await _0x46f22c[_0x274491(0x1b3)][_0x274491(0x1e3)]((_0x5c56db+'/'+_0x4562ef)['replace'](/(\\|\/)/g,'/')[_0x274491(0x1b6)](/\/{2,}/g,'/')),{'filename':_0x4562ef,'filepath':_0x5c56db};}async[a11_0x486760(0x1c9)](_0x32ec38,_0x33f50){const _0x5a27e8=a11_0x486760;await koasend(_0x32ec38,_0x5a27e8(0x1e4)+_0x33f50);}};__decorate([(0x0,decorator_1[a11_0x486760(0x1bc)])(),__metadata(a11_0x486760(0x1cc),Object)],ExcelService[a11_0x486760(0x1dd)],a11_0x486760(0x1e7),void 0x0),ExcelService=__decorate([(0x0,decorator_1[a11_0x486760(0x1bd)])(),(0x0,decorator_1[a11_0x486760(0x1c2)])(decorator_1['ScopeEnum'][a11_0x486760(0x1b5)])],ExcelService),exports[a11_0x486760(0x1df)]=ExcelService;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a12_0x166438=a12_0x1e0c;(function(_0x14a6c9,_0x4f9424){var _0x510df=a12_0x1e0c,_0x2e08e8=_0x14a6c9();while(!![]){try{var _0x3f7817=parseInt(_0x510df(0x99))/0x1+-parseInt(_0x510df(0x9f))/0x2+parseInt(_0x510df(0x9a))/0x3+parseInt(_0x510df(0xa1))/0x4+parseInt(_0x510df(0x96))/0x5*(-parseInt(_0x510df(0x9b))/0x6)+-parseInt(_0x510df(0xa0))/0x7*(parseInt(_0x510df(0x97))/0x8)+-parseInt(_0x510df(0x95))/0x9*(-parseInt(_0x510df(0x9e))/0xa);if(_0x3f7817===_0x4f9424)break;else _0x2e08e8['push'](_0x2e08e8['shift']());}catch(_0x4203ba){_0x2e08e8['push'](_0x2e08e8['shift']());}}}(a12_0x1a84,0x9d008));function a12_0x1a84(){var _0x1a9fa7=['ACTION_ROUTE_KEY','__esModule','10ZXfPGR','2431216maqWbV','7356881FtczUE','1950720RFlHLT','anncic-api:action:route','14540598RCeeWo','175UQszsZ','8PMXaXG','ACTION_KEY','384362guIsae','2679321bnJLKJ','80760fjJpZp'];a12_0x1a84=function(){return _0x1a9fa7;};return a12_0x1a84();}function a12_0x1e0c(_0x281f1c,_0x179513){var _0x1a844a=a12_0x1a84();return a12_0x1e0c=function(_0x1e0ceb,_0x4b6770){_0x1e0ceb=_0x1e0ceb-0x95;var _0x493e57=_0x1a844a[_0x1e0ceb];return _0x493e57;},a12_0x1e0c(_0x281f1c,_0x179513);}Object['defineProperty'](exports,a12_0x166438(0x9d),{'value':!![]}),exports[a12_0x166438(0x9c)]=exports[a12_0x166438(0x98)]=void 0x0,exports[a12_0x166438(0x98)]='anncic-api:action',exports[a12_0x166438(0x9c)]=a12_0x166438(0xa2);
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a13_0x29862c=a13_0x55be;(function(_0x5c357f,_0x5956b7){var _0x49cc5d=a13_0x55be,_0x22ab06=_0x5c357f();while(!![]){try{var _0x3e0830=parseInt(_0x49cc5d(0x1da))/0x1+parseInt(_0x49cc5d(0x1d5))/0x2*(parseInt(_0x49cc5d(0x1d6))/0x3)+parseInt(_0x49cc5d(0x1f1))/0x4+parseInt(_0x49cc5d(0x1e2))/0x5+-parseInt(_0x49cc5d(0x1de))/0x6*(-parseInt(_0x49cc5d(0x1ed))/0x7)+parseInt(_0x49cc5d(0x1d4))/0x8+-parseInt(_0x49cc5d(0x1e9))/0x9*(parseInt(_0x49cc5d(0x1dc))/0xa);if(_0x3e0830===_0x5956b7)break;else _0x22ab06['push'](_0x22ab06['shift']());}catch(_0x312edb){_0x22ab06['push'](_0x22ab06['shift']());}}}(a13_0x3f9a,0xdf721));var __decorate=this&&this[a13_0x29862c(0x1eb)]||function(_0x2a22ff,_0x34cc96,_0x16363b,_0x590b15){var _0x5f5756=a13_0x29862c,_0x120966=arguments['length'],_0x6f2474=_0x120966<0x3?_0x34cc96:_0x590b15===null?_0x590b15=Object[_0x5f5756(0x1e4)](_0x34cc96,_0x16363b):_0x590b15,_0x1b7fd1;if(typeof Reflect==='object'&&typeof Reflect[_0x5f5756(0x1ea)]===_0x5f5756(0x1cc))_0x6f2474=Reflect[_0x5f5756(0x1ea)](_0x2a22ff,_0x34cc96,_0x16363b,_0x590b15);else{for(var _0x38b5cd=_0x2a22ff[_0x5f5756(0x1e7)]-0x1;_0x38b5cd>=0x0;_0x38b5cd--)if(_0x1b7fd1=_0x2a22ff[_0x38b5cd])_0x6f2474=(_0x120966<0x3?_0x1b7fd1(_0x6f2474):_0x120966>0x3?_0x1b7fd1(_0x34cc96,_0x16363b,_0x6f2474):_0x1b7fd1(_0x34cc96,_0x16363b))||_0x6f2474;}return _0x120966>0x3&&_0x6f2474&&Object[_0x5f5756(0x1d9)](_0x34cc96,_0x16363b,_0x6f2474),_0x6f2474;},__metadata=this&&this[a13_0x29862c(0x1e3)]||function(_0x1d73bd,_0x4c5e23){var _0x3e4d63=a13_0x29862c;if(typeof Reflect===_0x3e4d63(0x1e8)&&typeof Reflect[_0x3e4d63(0x1cd)]===_0x3e4d63(0x1cc))return Reflect[_0x3e4d63(0x1cd)](_0x1d73bd,_0x4c5e23);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['PageDTO']=void 0x0;const validator_1=require(a13_0x29862c(0x1df));class PageDTO{}function a13_0x55be(_0x4f4531,_0x2a6a2d){var _0x3f9a5c=a13_0x3f9a();return a13_0x55be=function(_0x55be0b,_0x5563e1){_0x55be0b=_0x55be0b-0x1cb;var _0x3f5fb5=_0x3f9a5c[_0x55be0b];return _0x3f5fb5;},a13_0x55be(_0x4f4531,_0x2a6a2d);}function a13_0x3f9a(){var _0x472fba=['metadata','number','min','PageDTO','_size','1:是;0:否','_page','10398184qnxCrZ','3544bylsmx','75gZsMKg','第一页为1,第二页为2','design:type','defineProperty','368956VgdjQd','integer','43671770qoltEi','Rule','180NzkbNw','@anncic-api/validator','是否倒序','prototype','1445165RubnqT','__metadata','getOwnPropertyDescriptor','valid','trim','length','object','9TVHhvC','decorate','__decorate','RuleType','380317pinmYX','_isreverse','_order','分页数量','6601672YkjZjq','排序方式','function'];a13_0x3f9a=function(){return _0x472fba;};return a13_0x3f9a();}__decorate([(0x0,validator_1['Rule'])('分页',validator_1['RuleType'][a13_0x29862c(0x1ce)]()['integer']()[a13_0x29862c(0x1cf)](0x1),a13_0x29862c(0x1d7)),__metadata(a13_0x29862c(0x1d8),Number)],PageDTO[a13_0x29862c(0x1e1)],a13_0x29862c(0x1d3),void 0x0),__decorate([(0x0,validator_1[a13_0x29862c(0x1dd)])(a13_0x29862c(0x1f0),validator_1['RuleType'][a13_0x29862c(0x1ce)]()[a13_0x29862c(0x1db)]()[a13_0x29862c(0x1cf)](0x1)),__metadata(a13_0x29862c(0x1d8),Number)],PageDTO['prototype'],a13_0x29862c(0x1d1),void 0x0),__decorate([(0x0,validator_1['Rule'])(a13_0x29862c(0x1cb),validator_1['RuleType']['string']()[a13_0x29862c(0x1e6)]()),__metadata('design:type',String)],PageDTO['prototype'],a13_0x29862c(0x1ef),void 0x0),__decorate([(0x0,validator_1[a13_0x29862c(0x1dd)])(a13_0x29862c(0x1e0),validator_1[a13_0x29862c(0x1ec)]['number']()[a13_0x29862c(0x1db)]()[a13_0x29862c(0x1e5)](0x0,0x1),a13_0x29862c(0x1d2)),__metadata(a13_0x29862c(0x1d8),Number)],PageDTO[a13_0x29862c(0x1e1)],a13_0x29862c(0x1ee),void 0x0),exports[a13_0x29862c(0x1d0)]=PageDTO;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/cache": "^1.0.
|
|
21
|
-
"@anncic-api/core": "^1.0.
|
|
22
|
-
"@anncic-api/event": "^1.0.
|
|
23
|
-
"@anncic-api/typeorm": "^1.0.
|
|
24
|
-
"@anncic-api/validator": "^1.0.
|
|
25
|
-
"@midwayjs/cross-domain": "^3.4.
|
|
26
|
-
"@midwayjs/i18n": "^3.4.
|
|
27
|
-
"@midwayjs/koa": "^3.4.
|
|
28
|
-
"@midwayjs/static-file": "^3.4.
|
|
29
|
-
"@midwayjs/task": "^3.4.
|
|
30
|
-
"@midwayjs/upload": "^3.4.
|
|
20
|
+
"@anncic-api/cache": "^1.0.15",
|
|
21
|
+
"@anncic-api/core": "^1.0.15",
|
|
22
|
+
"@anncic-api/event": "^1.0.15",
|
|
23
|
+
"@anncic-api/typeorm": "^1.0.15",
|
|
24
|
+
"@anncic-api/validator": "^1.0.15",
|
|
25
|
+
"@midwayjs/cross-domain": "^3.4.12",
|
|
26
|
+
"@midwayjs/i18n": "^3.4.12",
|
|
27
|
+
"@midwayjs/koa": "^3.4.12",
|
|
28
|
+
"@midwayjs/static-file": "^3.4.12",
|
|
29
|
+
"@midwayjs/task": "^3.4.12",
|
|
30
|
+
"@midwayjs/upload": "^3.4.12",
|
|
31
31
|
"@types/bull": "^3.15.9",
|
|
32
|
-
"anncic-apihelper": "^1.0.
|
|
32
|
+
"anncic-apihelper": "^1.0.15",
|
|
33
33
|
"exceljs": "^4.3.0",
|
|
34
34
|
"koa-bodyparser": "^4.3.0",
|
|
35
35
|
"koa-send": "^5.0.1",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"javascript-obfuscator": "2.19.0",
|
|
42
42
|
"typescript": "^4.7.4"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "a13c29280dd3c6b411b873882e30df72a5e85c51"
|
|
45
45
|
}
|
package/public/apitest.js
CHANGED
|
@@ -265,14 +265,12 @@ function getPosts() {
|
|
|
265
265
|
return hasfile?_formdata:_data.join('&');
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
function reFormGroup(_formType, _formRequest) {
|
|
268
|
+
function reFormGroup(_formType, _formRequest,_formDevice) {
|
|
269
269
|
var _formGroup = null;
|
|
270
270
|
$('form').find('[form-type=' + _formType + ']').each(function () {
|
|
271
271
|
if ($(this).val() == _formRequest['key']) {
|
|
272
272
|
_formGroup = $(this).closest(".form-group");
|
|
273
|
-
|
|
274
273
|
}
|
|
275
|
-
|
|
276
274
|
});
|
|
277
275
|
if (_formGroup == null) {
|
|
278
276
|
var _firstNode = $('form').find('[form-type=' + _formType + ']').first().closest(".form-group");
|
|
@@ -281,6 +279,9 @@ function reFormGroup(_formType, _formRequest) {
|
|
|
281
279
|
|
|
282
280
|
}
|
|
283
281
|
|
|
282
|
+
if( typeof(_formDevice) == 'string' ){
|
|
283
|
+
_formGroup.attr('form-'+ _formType +'-devices',_formDevice)
|
|
284
|
+
}
|
|
284
285
|
_formGroup.attr('is-required', _formRequest['required'] ? 'true' : 'false').trigger('mouseenter').trigger('mouseleave').attr('title', (_formRequest['title'] || _formRequest['key'] || _formType) + "<br/>" + (_formRequest['description'] || '')).attr('data-html', "true").tooltip().show();
|
|
285
286
|
var _inputs = _formGroup.find('input,textarea');
|
|
286
287
|
_inputs.eq(0).val(_formRequest['key'])
|
|
@@ -303,10 +304,21 @@ function reFormGroup(_formType, _formRequest) {
|
|
|
303
304
|
dropdown.append('<li data-label="' + label + '" data-value="' + label + '" ><a href="javascript:void(0)">' + label + '</a></li>')
|
|
304
305
|
}
|
|
305
306
|
dropdown.children('li').bind('click', function () {
|
|
306
|
-
$(
|
|
307
|
+
let this_device = $(this).data('label');
|
|
308
|
+
for (let label in devices) {
|
|
309
|
+
$('form').find('[form-type="header"]').closest('.form-group[form-header-devices="'+label+'"]').remove();
|
|
310
|
+
if( label == this_device && Array.isArray(devices[label].headers) ){
|
|
311
|
+
for (var j in devices[label].headers) {
|
|
312
|
+
reFormGroup('header', devices[label].headers[j],label);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
$(_inputs.eq(1)).val(this_device);
|
|
307
317
|
})
|
|
308
|
-
|
|
309
|
-
|
|
318
|
+
setTimeout(function(){
|
|
319
|
+
dropdown.children('li').eq(0).trigger('click');
|
|
320
|
+
_inputs.eq(1).siblings('.input-group-btn').unbind().show().parent().addClass('input-group')
|
|
321
|
+
},10)
|
|
310
322
|
}
|
|
311
323
|
else if (_formRequest['type'] == 'md5') {
|
|
312
324
|
_inputs.eq(1).val(hex_md5(_formRequest['default'])).unbind().change(function () {
|
package/public/index.html
CHANGED
|
@@ -38,12 +38,6 @@
|
|
|
38
38
|
<div class="form-group">
|
|
39
39
|
<div class="col-sm-12">
|
|
40
40
|
<input type="text" class="form-control" id="link_api_url" placeholder="Enter the url" value="">
|
|
41
|
-
<!-- <div class="input-group">
|
|
42
|
-
<input type="text" class="form-control" id="link_api_url" placeholder="Enter the url" value="">
|
|
43
|
-
<span class="input-group-btn">
|
|
44
|
-
<a class="btn btn-default" type="button" href="?a=create">+</a>
|
|
45
|
-
</span>
|
|
46
|
-
</div> -->
|
|
47
41
|
</div>
|
|
48
42
|
|
|
49
43
|
</div>
|
|
File without changes
|
|
File without changes
|