anncic-api 1.4.10 → 1.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/config.default.js +1 -1
- package/dist/config/config.production.js +1 -1
- package/dist/configuration.d.ts +3 -0
- package/dist/configuration.js +1 -1
- package/dist/decorator/Action.js +1 -1
- package/dist/decorator/ActionApi.js +1 -1
- package/dist/decorator/ActionApitest.js +1 -1
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getAppsConfig.js +1 -1
- package/dist/helper/getRoutes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.js +1 -1
- package/dist/types/action.js +1 -1
- package/dist/types/common.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a0_0x4f45(){var _0x263907=['6025704ZGiIfq','2739429DfWbpu','xml','__esModule','11576ztVVYN','name','5089utydoW','defineProperty','20mb','549914XCFlFE','json','dhauo1234420123gg3234901','3vHBBaF','76555sVoyIg','172biGCXU','8447886pCAUdJ','form','/runtime/.upload','4497570joWQQf'];a0_0x4f45=function(){return _0x263907;};return a0_0x4f45();}function a0_0x19b9(_0x3f5915,_0x3f289d){var _0x4f4573=a0_0x4f45();return a0_0x19b9=function(_0x19b902,_0x3f79b4){_0x19b902=_0x19b902-0x13e;var _0x23d6f8=_0x4f4573[_0x19b902];return _0x23d6f8;},a0_0x19b9(_0x3f5915,_0x3f289d);}var a0_0x5bd8f8=a0_0x19b9;(function(_0x23ed0b,_0x1e3b52){var _0x27c0ba=a0_0x19b9,_0x1e97f6=_0x23ed0b();while(!![]){try{var _0x5affe6=parseInt(_0x27c0ba(0x14d))/0x1*(parseInt(_0x27c0ba(0x14a))/0x2)+parseInt(_0x27c0ba(0x142))/0x3+-parseInt(_0x27c0ba(0x14f))/0x4*(-parseInt(_0x27c0ba(0x14e))/0x5)+-parseInt(_0x27c0ba(0x141))/0x6+parseInt(_0x27c0ba(0x147))/0x7*(-parseInt(_0x27c0ba(0x145))/0x8)+parseInt(_0x27c0ba(0x150))/0x9+-parseInt(_0x27c0ba(0x140))/0xa;if(_0x5affe6===_0x1e3b52)break;else _0x1e97f6['push'](_0x1e97f6['shift']());}catch(_0x2aac3b){_0x1e97f6['push'](_0x1e97f6['shift']());}}}(a0_0x4f45,0xca667));Object[a0_0x5bd8f8(0x148)](exports,a0_0x5bd8f8(0x144),{'value':!![]}),exports['default']=_0x49b156=>{var _0x3ec30a=a0_0x5bd8f8;return{'apitest':!![],'keys':_0x49b156[_0x3ec30a(0x146)],'anncicapi':{'timeout':0x1388,'password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':_0x3ec30a(0x14c),'checkcode':_0x3ec30a(0x14c)}}},'bodyParser':{'enableTypes':[_0x3ec30a(0x14b),_0x3ec30a(0x13e),'text',_0x3ec30a(0x143)],'formLimit':_0x3ec30a(0x149),'jsonLimit':_0x3ec30a(0x149),'textLimit':'20mb','xmlLimit':_0x3ec30a(0x149)},'upload':{'tmpdir':_0x49b156['appDir']+_0x3ec30a(0x13f),'cleanTimeout':0x5265c00}};};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a1_0xf1eb(_0x4cf6d8,_0x5a9d37){var _0x1e1606=a1_0x1e16();return a1_0xf1eb=function(_0xf1ebe9,_0x4bded4){_0xf1ebe9=_0xf1ebe9-0x1e0;var _0x402dfa=_0x1e1606[_0xf1ebe9];return _0x402dfa;},a1_0xf1eb(_0x4cf6d8,_0x5a9d37);}var a1_0x28cb39=a1_0xf1eb;function a1_0x1e16(){var _0x55e695=['4098PwsjbQ','20952504CoovRd','__esModule','defineProperty','10hgMujn','176876fqlREO','85428ekOKTI','default','3166254NkZbRK','4970kLtDlf','176bTCPMh','13tZIPlQ','12mFudKG','1izrSEA','637456JQSfJl','233431acfVDZ'];a1_0x1e16=function(){return _0x55e695;};return a1_0x1e16();}(function(_0x3c4bc8,_0x2f2ecd){var _0xbababd=a1_0xf1eb,_0x586426=_0x3c4bc8();while(!![]){try{var _0x425d58=parseInt(_0xbababd(0x1e8))/0x1*(parseInt(_0xbababd(0x1e9))/0x2)+parseInt(_0xbababd(0x1e7))/0x3*(-parseInt(_0xbababd(0x1e1))/0x4)+-parseInt(_0xbababd(0x1e4))/0x5*(parseInt(_0xbababd(0x1eb))/0x6)+parseInt(_0xbababd(0x1e0))/0x7*(-parseInt(_0xbababd(0x1e5))/0x8)+-parseInt(_0xbababd(0x1e3))/0x9+parseInt(_0xbababd(0x1ef))/0xa*(parseInt(_0xbababd(0x1ea))/0xb)+parseInt(_0xbababd(0x1ec))/0xc*(parseInt(_0xbababd(0x1e6))/0xd);if(_0x425d58===_0x2f2ecd)break;else _0x586426['push'](_0x586426['shift']());}catch(_0x41aeb5){_0x586426['push'](_0x586426['shift']());}}}(a1_0x1e16,0x65107));Object[a1_0x28cb39(0x1ee)](exports,a1_0x28cb39(0x1ed),{'value':!![]}),exports[a1_0x28cb39(0x1e2)]={'apitest':![],'anncicapi':{'timeout':0x1388}};
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { IMidwayApplication } from '@midwayjs/core';
|
|
1
2
|
import { MidwayApplicationManager, MidwayConfigService, MidwayDecoratorService, MidwayEnvironmentService } from '@midwayjs/core';
|
|
2
3
|
import { ApiService } from './service/ApiService';
|
|
3
4
|
export declare class CustomConfiguration {
|
|
5
|
+
app: IMidwayApplication;
|
|
4
6
|
config: MidwayConfigService;
|
|
5
7
|
decorator: MidwayDecoratorService;
|
|
6
8
|
application: MidwayApplicationManager;
|
|
@@ -10,5 +12,6 @@ export declare class CustomConfiguration {
|
|
|
10
12
|
protected checkConfigKeys(): Promise<void>;
|
|
11
13
|
protected handlerActionRoute(): Promise<void>;
|
|
12
14
|
protected hanlderApplications(): Promise<void>;
|
|
15
|
+
protected loggerConfig(): Promise<void>;
|
|
13
16
|
protected filterConfig(): Promise<void>;
|
|
14
17
|
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a2_0x58a323=a2_0x569b;function a2_0x569b(_0x25bcdf,_0x5f4e7a){const _0x47c3f7=a2_0x47c3();return a2_0x569b=function(_0x569b8b,_0x2b1d2f){_0x569b8b=_0x569b8b-0x17a;let _0x2b2f2b=_0x47c3f7[_0x569b8b];return _0x2b2f2b;},a2_0x569b(_0x25bcdf,_0x5f4e7a);}(function(_0x19a4ae,_0x5f3159){const _0x22087d=a2_0x569b,_0x537355=_0x19a4ae();while(!![]){try{const _0x535197=-parseInt(_0x22087d(0x17d))/0x1+-parseInt(_0x22087d(0x1c6))/0x2+parseInt(_0x22087d(0x1d2))/0x3*(parseInt(_0x22087d(0x190))/0x4)+parseInt(_0x22087d(0x1bd))/0x5+parseInt(_0x22087d(0x17a))/0x6+-parseInt(_0x22087d(0x19c))/0x7+parseInt(_0x22087d(0x1d1))/0x8;if(_0x535197===_0x5f3159)break;else _0x537355['push'](_0x537355['shift']());}catch(_0x55ab3c){_0x537355['push'](_0x537355['shift']());}}}(a2_0x47c3,0xd419e));var __decorate=this&&this[a2_0x58a323(0x19a)]||function(_0x267d5c,_0x594883,_0x41bd54,_0x906295){const _0x104a85=a2_0x58a323;var _0x4d60dd=arguments[_0x104a85(0x1cb)],_0x432255=_0x4d60dd<0x3?_0x594883:_0x906295===null?_0x906295=Object[_0x104a85(0x1bf)](_0x594883,_0x41bd54):_0x906295,_0xb8931f;if(typeof Reflect==='object'&&typeof Reflect['decorate']===_0x104a85(0x1a7))_0x432255=Reflect[_0x104a85(0x1c9)](_0x267d5c,_0x594883,_0x41bd54,_0x906295);else{for(var _0x1ec749=_0x267d5c[_0x104a85(0x1cb)]-0x1;_0x1ec749>=0x0;_0x1ec749--)if(_0xb8931f=_0x267d5c[_0x1ec749])_0x432255=(_0x4d60dd<0x3?_0xb8931f(_0x432255):_0x4d60dd>0x3?_0xb8931f(_0x594883,_0x41bd54,_0x432255):_0xb8931f(_0x594883,_0x41bd54))||_0x432255;}return _0x4d60dd>0x3&&_0x432255&&Object['defineProperty'](_0x594883,_0x41bd54,_0x432255),_0x432255;},__metadata=this&&this[a2_0x58a323(0x193)]||function(_0x1a15cf,_0x2b237a){const _0x4c8384=a2_0x58a323;if(typeof Reflect===_0x4c8384(0x1cd)&&typeof Reflect[_0x4c8384(0x1b1)]===_0x4c8384(0x1a7))return Reflect[_0x4c8384(0x1b1)](_0x1a15cf,_0x2b237a);};Object[a2_0x58a323(0x19f)](exports,'__esModule',{'value':!![]}),exports['CustomConfiguration']=void 0x0;const core_1=require(a2_0x58a323(0x1ab)),core_2=require(a2_0x58a323(0x1ab)),ApiError_1=require('./exception/ApiError'),ApiService_1=require('./service/ApiService'),action_1=require(a2_0x58a323(0x1be)),fs=require('fs'),koa=require(a2_0x58a323(0x1ca)),i18n=require('@midwayjs/i18n'),upload=require(a2_0x58a323(0x17b)),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0x58a323(0x1ac)),ConfigDefault=require(a2_0x58a323(0x1c0)),ConfigProduction=require(a2_0x58a323(0x188)),anncic=require(a2_0x58a323(0x1c2)),anncicCache=require(a2_0x58a323(0x183)),anncicEvent=require(a2_0x58a323(0x192)),anncicTypeorm=require(a2_0x58a323(0x18d)),anncicValidator=require(a2_0x58a323(0x1d0)),anncicHelper=require(a2_0x58a323(0x1b6));function a2_0x47c3(){const _0x2e0dc2=['function','onReady','defineProperties','MidwayEnvironmentService','@midwayjs/core','@midwayjs/cross-domain','toLowerCase','MidwayDecoratorService','CustomConfiguration','anncicapi','metadata','addObject','request','headers','checksign','anncic-apihelper','Inject','key','target','mkdirSync','decorator','anncic-api','271120utJwXs','./types/action','getOwnPropertyDescriptor','./config/config.default','isString','@anncic-api/core','REQUEST_OBJ_CTX_KEY','prototype','ApiService','895622OKCVZA','body','intercept','decorate','@midwayjs/koa','length','filterConfig','object','existsSync','koa','@anncic-api/validator','5036952dmwEjf','950883IstWhT','upload','get','1757862BcjrnU','@midwayjs/upload','config','694559sOnIKj','query','checkConfigKeys','args','application','string','@anncic-api/cache','MidwayConfigService','device','devices','apimit','./config/config.production','dir','Types','Anncic-api\x20static-file\x20:\x20mkdir\x20','input','@anncic-api/typeorm','context','dirs','16ULgrqw','log','@anncic-api/event','__metadata','isNull','forEach','hanlderApplications','_matchedRoute','DEFAULT','isClass','__decorate','handler','1634696dNTxMV','staticFile','method','defineProperty','handlerActionRoute','proceed','design:type','isArray','ACTION_ROUTE_KEY','getConfiguration','tmpdir'];a2_0x47c3=function(){return _0x2e0dc2;};return a2_0x47c3();}let CustomConfiguration=class CustomConfiguration{async[a2_0x58a323(0x1a8)](){const _0x2da690=a2_0x58a323;await this[_0x2da690(0x1cc)](),await this[_0x2da690(0x17f)](),await this[_0x2da690(0x1a0)](),await this[_0x2da690(0x196)]();}async[a2_0x58a323(0x17f)](){}async[a2_0x58a323(0x1a0)](){const _0x281766=a2_0x58a323,_0x48bbba=this['config']['getConfiguration']();this['decorator']['registerMethodHandler'](action_1[_0x281766(0x1a4)],_0x24d29d=>{const _0x288272=_0x281766,_0x1501f6=_0x24d29d[_0x288272(0x1b1)];return{'before':async _0x2af82b=>{const _0x306118=_0x288272;var _0x35ddb6,_0x56df89;const _0x27f765=(_0x35ddb6=_0x2af82b===null||_0x2af82b===void 0x0?void 0x0:_0x2af82b[_0x306118(0x1b9)])===null||_0x35ddb6===void 0x0?void 0x0:_0x35ddb6[core_2[_0x306118(0x1c3)]];if(_0x27f765&&(_0x1501f6===null||_0x1501f6===void 0x0?void 0x0:_0x1501f6[_0x306118(0x187)])){if(!this['ApiService'][_0x306118(0x1b5)]((_0x56df89=_0x27f765===null||_0x27f765===void 0x0?void 0x0:_0x27f765[_0x306118(0x1b3)])===null||_0x56df89===void 0x0?void 0x0:_0x56df89[_0x306118(0x1b4)]))throw new AnnError(ApiError_1['ApiError']['HEADERS_SIGNATURE']);}},'around':async _0x5302e5=>{const _0x30a751=_0x288272;var _0x5a98d6,_0x54196b,_0x4733f6,_0x1fb14a,_0x7f34aa;const _0x565b50=(_0x5a98d6=_0x5302e5===null||_0x5302e5===void 0x0?void 0x0:_0x5302e5['target'])===null||_0x5a98d6===void 0x0?void 0x0:_0x5a98d6[core_2[_0x30a751(0x1c3)]];if(_0x565b50&&(_0x1501f6===null||_0x1501f6===void 0x0?void 0x0:_0x1501f6[_0x30a751(0x187)])){if(((_0x54196b=_0x565b50[_0x30a751(0x1b4)])===null||_0x54196b===void 0x0?void 0x0:_0x54196b[_0x30a751(0x185)])&&((_0x7f34aa=(_0x1fb14a=(_0x4733f6=_0x48bbba===null||_0x48bbba===void 0x0?void 0x0:_0x48bbba[_0x30a751(0x1b0)])===null||_0x4733f6===void 0x0?void 0x0:_0x4733f6[_0x30a751(0x186)])===null||_0x1fb14a===void 0x0?void 0x0:_0x1fb14a[_0x565b50[_0x30a751(0x1b4)][_0x30a751(0x185)]])===null||_0x7f34aa===void 0x0?void 0x0:_0x7f34aa[_0x30a751(0x1c8)])){const _0x43460d=Array[_0x30a751(0x1a3)](_0x48bbba[_0x30a751(0x1b0)]['devices'][_0x565b50[_0x30a751(0x1b4)][_0x30a751(0x185)]]['intercept'])?_0x48bbba[_0x30a751(0x1b0)][_0x30a751(0x186)][_0x565b50[_0x30a751(0x1b4)][_0x30a751(0x185)]][_0x30a751(0x1c8)]:[_0x48bbba[_0x30a751(0x1b0)]['devices'][_0x565b50[_0x30a751(0x1b4)]['device']]['intercept']];for(const _0x1ca061 of _0x43460d){if(core_1[_0x30a751(0x18a)][_0x30a751(0x199)](_0x1ca061)||typeof _0x1ca061==_0x30a751(0x182)){const _0x7899a=await _0x565b50['requestContext']['getAsync'](_0x1ca061);typeof(_0x7899a===null||_0x7899a===void 0x0?void 0x0:_0x7899a['handler'])=='function'&&await _0x7899a[_0x30a751(0x19b)](typeof(_0x565b50===null||_0x565b50===void 0x0?void 0x0:_0x565b50[_0x30a751(0x19e)])==_0x30a751(0x182)&&(_0x565b50===null||_0x565b50===void 0x0?void 0x0:_0x565b50['_matchedRoute'])?_0x565b50[_0x30a751(0x19e)][_0x30a751(0x1ad)]()+'@'+(_0x565b50===null||_0x565b50===void 0x0?void 0x0:_0x565b50[_0x30a751(0x197)]):undefined,_0x565b50,_0x1501f6);}else core_1['Types']['isFunction'](_0x1ca061)&&await _0x1ca061(typeof(_0x565b50===null||_0x565b50===void 0x0?void 0x0:_0x565b50[_0x30a751(0x19e)])==_0x30a751(0x182)&&(_0x565b50===null||_0x565b50===void 0x0?void 0x0:_0x565b50[_0x30a751(0x197)])?_0x565b50[_0x30a751(0x19e)][_0x30a751(0x1ad)]()+'@'+(_0x565b50===null||_0x565b50===void 0x0?void 0x0:_0x565b50[_0x30a751(0x197)]):undefined,_0x565b50,_0x1501f6);}}}return await _0x5302e5[_0x30a751(0x1a1)](..._0x5302e5[_0x30a751(0x180)]);},'afterThrow':(_0x562126,_0x426236)=>{throw _0x426236;}};});}async[a2_0x58a323(0x196)](){const _0x50c81b=a2_0x58a323;this[_0x50c81b(0x181)]['getApplications']([_0x50c81b(0x1cf)])[_0x50c81b(0x195)](_0x475670=>{const _0x51f263=_0x50c81b;(_0x475670===null||_0x475670===void 0x0?void 0x0:_0x475670[_0x51f263(0x18e)])&&Object[_0x51f263(0x1a9)](_0x475670[_0x51f263(0x18e)],{'ok':{'value':function(_0x296ae6,_0x342065,_0x2cedb4=0x0){return{'code':_0x2cedb4,'data':_0x296ae6,'extra':_0x342065};}},'input':{'value':function(_0x2d1b5f,_0x5e3cb2){const _0x2381aa=_0x51f263;var _0x1bdf36;const _0x1938df=lodash['defaultsDeep']({},this[_0x2381aa(0x1b3)][_0x2381aa(0x1c7)]||this[_0x2381aa(0x1b3)][((_0x1bdf36=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x1bdf36===void 0x0?void 0x0:_0x1bdf36[_0x2381aa(0x1b8)])||_0x2381aa(0x1c7)]||{},this[_0x2381aa(0x1b3)][_0x2381aa(0x17e)]||{});return _0x2d1b5f?lodash[_0x2381aa(0x1d4)](_0x1938df,_0x2d1b5f,_0x5e3cb2):_0x1938df;}},'when':{'value':async function(_0x43d9d3,_0x59df62){const _0x25d4cc=_0x51f263,_0x5b667e=this['input'](_0x43d9d3,null);if(!lodash[_0x25d4cc(0x194)](_0x5b667e))return await _0x59df62(_0x5b667e);}},'only':{'value':function(_0x538d56){const _0x39a545=_0x51f263,_0x9f1414={};for(let _0x3dacf3=0x0;_0x3dacf3<_0x538d56[_0x39a545(0x1cb)];_0x3dacf3++){lodash[_0x39a545(0x1a3)](_0x538d56[_0x3dacf3])&&_0x538d56[_0x3dacf3][_0x39a545(0x1cb)]>0x0&&lodash[_0x39a545(0x1c1)](_0x538d56[_0x3dacf3][0x0])&&(_0x9f1414[_0x538d56[_0x3dacf3][0x0]]=this[_0x39a545(0x18c)](_0x538d56[_0x3dacf3][0x0],_0x538d56[_0x3dacf3][_0x39a545(0x1cb)]>0x1?_0x538d56[_0x3dacf3][0x1]:null));}return _0x9f1414;}}});});}async['filterConfig'](){const _0x5a4286=a2_0x58a323;var _0x4f0071,_0x3284f8,_0x35845d,_0x146cf3,_0x59ec1a,_0x53d581;const _0x39fe16=this[_0x5a4286(0x17c)][_0x5a4286(0x1a5)]();((_0x3284f8=(_0x4f0071=_0x39fe16===null||_0x39fe16===void 0x0?void 0x0:_0x39fe16[_0x5a4286(0x1b0)])===null||_0x4f0071===void 0x0?void 0x0:_0x4f0071[_0x5a4286(0x186)])===null||_0x3284f8===void 0x0?void 0x0:_0x3284f8['DEFAULT'])&&Object['keys'](_0x39fe16[_0x5a4286(0x1b0)][_0x5a4286(0x186)])['length']>0x1&&delete _0x39fe16[_0x5a4286(0x1b0)][_0x5a4286(0x186)][_0x5a4286(0x198)];if((_0x35845d=_0x39fe16===null||_0x39fe16===void 0x0?void 0x0:_0x39fe16[_0x5a4286(0x19d)])===null||_0x35845d===void 0x0?void 0x0:_0x35845d[_0x5a4286(0x18f)])for(const _0x2ce97f in _0x39fe16[_0x5a4286(0x19d)][_0x5a4286(0x18f)]){((_0x146cf3=_0x39fe16[_0x5a4286(0x19d)][_0x5a4286(0x18f)][_0x2ce97f])===null||_0x146cf3===void 0x0?void 0x0:_0x146cf3[_0x5a4286(0x189)])&&typeof((_0x59ec1a=_0x39fe16['staticFile']['dirs'][_0x2ce97f])===null||_0x59ec1a===void 0x0?void 0x0:_0x59ec1a[_0x5a4286(0x189)])==_0x5a4286(0x182)&&!fs[_0x5a4286(0x1ce)](_0x39fe16[_0x5a4286(0x19d)][_0x5a4286(0x18f)][_0x2ce97f][_0x5a4286(0x189)])&&(fs[_0x5a4286(0x1ba)](_0x39fe16[_0x5a4286(0x19d)]['dirs'][_0x2ce97f][_0x5a4286(0x189)],{'recursive':!![]}),console['log'](_0x5a4286(0x18b)+_0x39fe16[_0x5a4286(0x19d)][_0x5a4286(0x18f)][_0x2ce97f]['dir']));}((_0x53d581=_0x39fe16===null||_0x39fe16===void 0x0?void 0x0:_0x39fe16[_0x5a4286(0x1d3)])===null||_0x53d581===void 0x0?void 0x0:_0x53d581[_0x5a4286(0x1a6)])&&!fs['existsSync'](_0x39fe16['upload'][_0x5a4286(0x1a6)])&&(fs[_0x5a4286(0x1ba)](_0x39fe16[_0x5a4286(0x1d3)][_0x5a4286(0x1a6)],{'recursive':!![]}),console[_0x5a4286(0x191)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0x39fe16[_0x5a4286(0x1d3)][_0x5a4286(0x1a6)])),this[_0x5a4286(0x17c)][_0x5a4286(0x1b2)](_0x39fe16);}};__decorate([(0x0,core_1[a2_0x58a323(0x1b7)])(),__metadata('design:type',core_2[a2_0x58a323(0x184)])],CustomConfiguration[a2_0x58a323(0x1c4)],a2_0x58a323(0x17c),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x58a323(0x1a2),core_2[a2_0x58a323(0x1ae)])],CustomConfiguration[a2_0x58a323(0x1c4)],a2_0x58a323(0x1bb),void 0x0),__decorate([(0x0,core_1[a2_0x58a323(0x1b7)])(),__metadata(a2_0x58a323(0x1a2),core_2['MidwayApplicationManager'])],CustomConfiguration[a2_0x58a323(0x1c4)],a2_0x58a323(0x181),void 0x0),__decorate([(0x0,core_1[a2_0x58a323(0x1b7)])(),__metadata('design:type',core_2[a2_0x58a323(0x1aa)])],CustomConfiguration['prototype'],'environment',void 0x0),__decorate([(0x0,core_1[a2_0x58a323(0x1b7)])(),__metadata(a2_0x58a323(0x1a2),ApiService_1[a2_0x58a323(0x1c5)])],CustomConfiguration[a2_0x58a323(0x1c4)],a2_0x58a323(0x1c5),void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x58a323(0x1bc),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x58a323(0x1af)]=CustomConfiguration;
|
|
1
|
+
'use strict';const a2_0x29d92d=a2_0x5838;function a2_0x5838(_0xfb8032,_0x235952){const _0x458ed4=a2_0x458e();return a2_0x5838=function(_0x5838e5,_0x2be8c5){_0x5838e5=_0x5838e5-0x76;let _0x288b4=_0x458ed4[_0x5838e5];return _0x288b4;},a2_0x5838(_0xfb8032,_0x235952);}function a2_0x458e(){const _0x146ad3=['@anncic-api/core','assign','MidwayEnvironmentService','registerMethodHandler','/apps','./service/ApiService','design:type','existsSync','@midwayjs/core','_matchedRoute','@midwayjs/i18n','ApiService','isDirectory','addObject','isString','function','ACTION_ROUTE_KEY','proceed','query','log','app','filterConfig','keys','object','application','get','145556bPdowh','handlerActionRoute','273246dwfzsK','__decorate','handler','request','default','defineProperty','450nltCPd','isClass','@anncic-api/cache','input','getConfiguration','/runtime/apps-','staticFile','method','dir','body','config','6Wncttz','defaultsDeep','anncicapi','isFunction','5VlsnwC','40UdQoft','prototype','length','@anncic-api/typeorm','checkConfigKeys','decorate','@midwayjs/koa','defineProperties','80bKNaRQ','toLowerCase','1233452AJJlTh','upload','./exception/ApiError','clients','__esModule','forEach','/apps/','Inject','metadata','-log','decorator','loggerConfig','anncic-apihelper','koa','27482IquUkG','isDevelopmentEnvironment','tmpdir','getAppDir','midwayLogger','device','headers','anncic-api','168672XFNpqy','mkdirSync','dirs','DEFAULT','key','requestContext','getBaseDir','9771612WOTqwu','environment','string','intercept','Types','@midwayjs/upload','46521gfyhHK','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','CustomConfiguration','args','getApplications','/runtime','context','checksign','devices','REQUEST_OBJ_CTX_KEY','hanlderApplications','isNull','App','apimit','Anncic-api\x20static-file\x20:\x20mkdir\x20','isArray','./config/config.default','@midwayjs/cross-domain'];a2_0x458e=function(){return _0x146ad3;};return a2_0x458e();}(function(_0x35f62f,_0x1c2e25){const _0x32cced=a2_0x5838,_0x3794ac=_0x35f62f();while(!![]){try{const _0x2b3287=parseInt(_0x32cced(0xd7))/0x1*(-parseInt(_0x32cced(0x7e))/0x2)+parseInt(_0x32cced(0xd2))/0x3*(-parseInt(_0x32cced(0xbf))/0x4)+-parseInt(_0x32cced(0xd6))/0x5*(-parseInt(_0x32cced(0xc1))/0x6)+parseInt(_0x32cced(0x86))/0x7*(parseInt(_0x32cced(0xdf))/0x8)+-parseInt(_0x32cced(0x93))/0x9*(parseInt(_0x32cced(0xc7))/0xa)+parseInt(_0x32cced(0xe1))/0xb+parseInt(_0x32cced(0x8d))/0xc;if(_0x2b3287===_0x1c2e25)break;else _0x3794ac['push'](_0x3794ac['shift']());}catch(_0x4788a2){_0x3794ac['push'](_0x3794ac['shift']());}}}(a2_0x458e,0x57617));var __decorate=this&&this[a2_0x29d92d(0xc2)]||function(_0x380fb6,_0x2eb1a8,_0x231207,_0x43dcf1){const _0x3a4428=a2_0x29d92d;var _0x17d33e=arguments[_0x3a4428(0xd9)],_0x237de5=_0x17d33e<0x3?_0x2eb1a8:_0x43dcf1===null?_0x43dcf1=Object['getOwnPropertyDescriptor'](_0x2eb1a8,_0x231207):_0x43dcf1,_0x467cc3;if(typeof Reflect==='object'&&typeof Reflect[_0x3a4428(0xdc)]==='function')_0x237de5=Reflect[_0x3a4428(0xdc)](_0x380fb6,_0x2eb1a8,_0x231207,_0x43dcf1);else{for(var _0x4c3f3d=_0x380fb6['length']-0x1;_0x4c3f3d>=0x0;_0x4c3f3d--)if(_0x467cc3=_0x380fb6[_0x4c3f3d])_0x237de5=(_0x17d33e<0x3?_0x467cc3(_0x237de5):_0x17d33e>0x3?_0x467cc3(_0x2eb1a8,_0x231207,_0x237de5):_0x467cc3(_0x2eb1a8,_0x231207))||_0x237de5;}return _0x17d33e>0x3&&_0x237de5&&Object[_0x3a4428(0xc6)](_0x2eb1a8,_0x231207,_0x237de5),_0x237de5;},__metadata=this&&this['__metadata']||function(_0x2bb259,_0x102a8e){const _0x39a8cb=a2_0x29d92d;if(typeof Reflect===_0x39a8cb(0xbc)&&typeof Reflect[_0x39a8cb(0x78)]===_0x39a8cb(0xb4))return Reflect[_0x39a8cb(0x78)](_0x2bb259,_0x102a8e);};Object[a2_0x29d92d(0xc6)](exports,a2_0x29d92d(0xe5),{'value':!![]}),exports['CustomConfiguration']=void 0x0;const core_1=require(a2_0x29d92d(0xad)),core_2=require(a2_0x29d92d(0xad)),ApiError_1=require(a2_0x29d92d(0xe3)),ApiService_1=require(a2_0x29d92d(0xaa)),action_1=require('./types/action'),fs=require('fs'),koa=require(a2_0x29d92d(0xdd)),i18n=require(a2_0x29d92d(0xaf)),upload=require(a2_0x29d92d(0x92)),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0x29d92d(0xa4)),ConfigDefault=require(a2_0x29d92d(0xa3)),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x29d92d(0xa5)),anncicCache=require(a2_0x29d92d(0xc9)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x29d92d(0xda)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require(a2_0x29d92d(0x7c));let CustomConfiguration=class CustomConfiguration{async['onReady'](){const _0x152273=a2_0x29d92d;await this['filterConfig'](),await this[_0x152273(0x7b)](),await this[_0x152273(0xdb)](),await this[_0x152273(0xc0)](),await this[_0x152273(0x9d)]();}async['checkConfigKeys'](){}async['handlerActionRoute'](){const _0x9971fe=a2_0x29d92d,_0x8287cd=this[_0x9971fe(0xd1)][_0x9971fe(0xcb)]();this[_0x9971fe(0x7a)][_0x9971fe(0xa8)](action_1[_0x9971fe(0xb5)],_0x2bfbc9=>{const _0x258ffc=_0x9971fe,_0x457d29=_0x2bfbc9[_0x258ffc(0x78)];return{'before':async _0xb684c2=>{const _0x299a34=_0x258ffc;var _0x448619,_0x2b4818;const _0x8697d8=(_0x448619=_0xb684c2===null||_0xb684c2===void 0x0?void 0x0:_0xb684c2['target'])===null||_0x448619===void 0x0?void 0x0:_0x448619[core_2[_0x299a34(0x9c)]];if(_0x8697d8&&(_0x457d29===null||_0x457d29===void 0x0?void 0x0:_0x457d29[_0x299a34(0xa0)])){if(!this[_0x299a34(0xb0)][_0x299a34(0x9a)]((_0x2b4818=_0x8697d8===null||_0x8697d8===void 0x0?void 0x0:_0x8697d8['request'])===null||_0x2b4818===void 0x0?void 0x0:_0x2b4818[_0x299a34(0x84)]))throw new AnnError(ApiError_1['ApiError']['HEADERS_SIGNATURE']);}},'around':async _0x23a484=>{const _0x17ebcd=_0x258ffc;var _0x4ae24b,_0x20a0ab,_0x5b979b,_0x56a3a7,_0x3d9752;const _0x9dd1e6=(_0x4ae24b=_0x23a484===null||_0x23a484===void 0x0?void 0x0:_0x23a484['target'])===null||_0x4ae24b===void 0x0?void 0x0:_0x4ae24b[core_2[_0x17ebcd(0x9c)]];if(_0x9dd1e6&&(_0x457d29===null||_0x457d29===void 0x0?void 0x0:_0x457d29['apimit'])){if(((_0x20a0ab=_0x9dd1e6[_0x17ebcd(0x84)])===null||_0x20a0ab===void 0x0?void 0x0:_0x20a0ab[_0x17ebcd(0x83)])&&((_0x3d9752=(_0x56a3a7=(_0x5b979b=_0x8287cd===null||_0x8287cd===void 0x0?void 0x0:_0x8287cd['anncicapi'])===null||_0x5b979b===void 0x0?void 0x0:_0x5b979b[_0x17ebcd(0x9b)])===null||_0x56a3a7===void 0x0?void 0x0:_0x56a3a7[_0x9dd1e6[_0x17ebcd(0x84)]['device']])===null||_0x3d9752===void 0x0?void 0x0:_0x3d9752['intercept'])){const _0x3a4738=Array[_0x17ebcd(0xa2)](_0x8287cd[_0x17ebcd(0xd4)][_0x17ebcd(0x9b)][_0x9dd1e6['headers']['device']][_0x17ebcd(0x90)])?_0x8287cd[_0x17ebcd(0xd4)][_0x17ebcd(0x9b)][_0x9dd1e6[_0x17ebcd(0x84)][_0x17ebcd(0x83)]][_0x17ebcd(0x90)]:[_0x8287cd[_0x17ebcd(0xd4)][_0x17ebcd(0x9b)][_0x9dd1e6[_0x17ebcd(0x84)][_0x17ebcd(0x83)]]['intercept']];for(const _0x12acf8 of _0x3a4738){if(core_1['Types'][_0x17ebcd(0xc8)](_0x12acf8)||typeof _0x12acf8=='string'){const _0x369dc1=await _0x9dd1e6[_0x17ebcd(0x8b)]['getAsync'](_0x12acf8);typeof(_0x369dc1===null||_0x369dc1===void 0x0?void 0x0:_0x369dc1[_0x17ebcd(0xc3)])==_0x17ebcd(0xb4)&&await _0x369dc1[_0x17ebcd(0xc3)](typeof(_0x9dd1e6===null||_0x9dd1e6===void 0x0?void 0x0:_0x9dd1e6[_0x17ebcd(0xce)])=='string'&&(_0x9dd1e6===null||_0x9dd1e6===void 0x0?void 0x0:_0x9dd1e6[_0x17ebcd(0xae)])?_0x9dd1e6['method'][_0x17ebcd(0xe0)]()+'@'+(_0x9dd1e6===null||_0x9dd1e6===void 0x0?void 0x0:_0x9dd1e6[_0x17ebcd(0xae)]):undefined,_0x9dd1e6,_0x457d29);}else core_1[_0x17ebcd(0x91)][_0x17ebcd(0xd5)](_0x12acf8)&&await _0x12acf8(typeof(_0x9dd1e6===null||_0x9dd1e6===void 0x0?void 0x0:_0x9dd1e6[_0x17ebcd(0xce)])=='string'&&(_0x9dd1e6===null||_0x9dd1e6===void 0x0?void 0x0:_0x9dd1e6[_0x17ebcd(0xae)])?_0x9dd1e6[_0x17ebcd(0xce)][_0x17ebcd(0xe0)]()+'@'+(_0x9dd1e6===null||_0x9dd1e6===void 0x0?void 0x0:_0x9dd1e6[_0x17ebcd(0xae)]):undefined,_0x9dd1e6,_0x457d29);}}}return await _0x23a484[_0x17ebcd(0xb6)](..._0x23a484[_0x17ebcd(0x96)]);},'afterThrow':(_0x2fe94f,_0x295cb2)=>{throw _0x295cb2;}};});}async[a2_0x29d92d(0x9d)](){const _0x5d8ad1=a2_0x29d92d;this[_0x5d8ad1(0xbd)][_0x5d8ad1(0x97)]([_0x5d8ad1(0x7d)])[_0x5d8ad1(0xe6)](_0x4c6fc4=>{const _0x519c6e=_0x5d8ad1;(_0x4c6fc4===null||_0x4c6fc4===void 0x0?void 0x0:_0x4c6fc4[_0x519c6e(0x99)])&&Object[_0x519c6e(0xde)](_0x4c6fc4[_0x519c6e(0x99)],{'ok':{'value':function(_0x50ae4b,_0x22b7ba,_0x2abc7a=0x0){return{'code':_0x2abc7a,'data':_0x50ae4b,'extra':_0x22b7ba};}},'input':{'value':function(_0x4882b2,_0x126ad4){const _0x461ca1=_0x519c6e;var _0x2f6f0a;const _0x473ea2=lodash[_0x461ca1(0xd3)]({},this['request'][_0x461ca1(0xd0)]||this['request'][((_0x2f6f0a=config===null||config===void 0x0?void 0x0:config['bodyXml'])===null||_0x2f6f0a===void 0x0?void 0x0:_0x2f6f0a[_0x461ca1(0x8a)])||_0x461ca1(0xd0)]||{},this[_0x461ca1(0xc4)][_0x461ca1(0xb7)]||{});return _0x4882b2?lodash[_0x461ca1(0xbe)](_0x473ea2,_0x4882b2,_0x126ad4):_0x473ea2;}},'when':{'value':async function(_0x1776a2,_0xeb8a66){const _0x5179af=_0x519c6e,_0x4d7f7f=this[_0x5179af(0xca)](_0x1776a2,null);if(!lodash[_0x5179af(0x9e)](_0x4d7f7f))return await _0xeb8a66(_0x4d7f7f);}},'only':{'value':function(_0x1a8d45){const _0x209e46=_0x519c6e,_0xe6c36={};for(let _0x15b24c=0x0;_0x15b24c<_0x1a8d45[_0x209e46(0xd9)];_0x15b24c++){lodash[_0x209e46(0xa2)](_0x1a8d45[_0x15b24c])&&_0x1a8d45[_0x15b24c][_0x209e46(0xd9)]>0x0&&lodash[_0x209e46(0xb3)](_0x1a8d45[_0x15b24c][0x0])&&(_0xe6c36[_0x1a8d45[_0x15b24c][0x0]]=this['input'](_0x1a8d45[_0x15b24c][0x0],_0x1a8d45[_0x15b24c]['length']>0x1?_0x1a8d45[_0x15b24c][0x1]:null));}return _0xe6c36;}}});});}async[a2_0x29d92d(0x7b)](){const _0x48e960=a2_0x29d92d;var _0x5c9cb8,_0x21525d;if(fs[_0x48e960(0xac)](this[_0x48e960(0xb9)][_0x48e960(0x8c)]()+_0x48e960(0xa9))&&fs['statSync'](this[_0x48e960(0xb9)][_0x48e960(0x8c)]()+'/apps')[_0x48e960(0xb1)]()){const _0x5233dc=this[_0x48e960(0xd1)][_0x48e960(0xcb)](),_0x3bf68d=((_0x5c9cb8=_0x5233dc===null||_0x5233dc===void 0x0?void 0x0:_0x5233dc[_0x48e960(0x82)])===null||_0x5c9cb8===void 0x0?void 0x0:_0x5c9cb8[_0x48e960(0xe4)])||{};for(const _0x4b32e9 of fs['readdirSync'](this[_0x48e960(0xb9)]['getBaseDir']()+_0x48e960(0xa9))){if(!fs['statSync'](this['app']['getBaseDir']()+_0x48e960(0x76)+_0x4b32e9)['isDirectory']())continue;if(_0x3bf68d===null||_0x3bf68d===void 0x0?void 0x0:_0x3bf68d[_0x4b32e9])continue;_0x3bf68d[_0x4b32e9]=Object[_0x48e960(0xa6)]({},((_0x21525d=_0x5233dc===null||_0x5233dc===void 0x0?void 0x0:_0x5233dc['midwayLogger'])===null||_0x21525d===void 0x0?void 0x0:_0x21525d[_0x48e960(0xc5)])||{'maxSize':'1m','dir':this[_0x48e960(0xb9)][_0x48e960(0x81)]()+_0x48e960(0x98)},{'enableJSON':!![],'enableConsole':this[_0x48e960(0x8e)][_0x48e960(0x7f)](),'fileLogName':_0x4b32e9+'.log','dir':this['app'][_0x48e960(0x81)]()+_0x48e960(0xcc)+_0x4b32e9+_0x48e960(0x79)});}Object[_0x48e960(0xbb)](_0x3bf68d)[_0x48e960(0xd9)]>0x0&&(!_0x5233dc[_0x48e960(0x82)]&&(_0x5233dc['midwayLogger']={'default':{'maxSize':'1m','dir':this[_0x48e960(0xb9)][_0x48e960(0x81)]()+'/runtime'}}),_0x5233dc['midwayLogger'][_0x48e960(0xe4)]=_0x3bf68d),this[_0x48e960(0xd1)]['addObject'](_0x5233dc);}}async[a2_0x29d92d(0xba)](){const _0x3224f4=a2_0x29d92d;var _0x10b1af,_0x501e28,_0x556007,_0x1d9258,_0x34ae3c,_0x394f7f;const _0x2efada=this[_0x3224f4(0xd1)][_0x3224f4(0xcb)]();((_0x501e28=(_0x10b1af=_0x2efada===null||_0x2efada===void 0x0?void 0x0:_0x2efada['anncicapi'])===null||_0x10b1af===void 0x0?void 0x0:_0x10b1af[_0x3224f4(0x9b)])===null||_0x501e28===void 0x0?void 0x0:_0x501e28[_0x3224f4(0x89)])&&Object[_0x3224f4(0xbb)](_0x2efada['anncicapi']['devices'])[_0x3224f4(0xd9)]>0x1&&delete _0x2efada[_0x3224f4(0xd4)][_0x3224f4(0x9b)][_0x3224f4(0x89)];if((_0x556007=_0x2efada===null||_0x2efada===void 0x0?void 0x0:_0x2efada[_0x3224f4(0xcd)])===null||_0x556007===void 0x0?void 0x0:_0x556007[_0x3224f4(0x88)])for(const _0x242e93 in _0x2efada[_0x3224f4(0xcd)]['dirs']){((_0x1d9258=_0x2efada[_0x3224f4(0xcd)][_0x3224f4(0x88)][_0x242e93])===null||_0x1d9258===void 0x0?void 0x0:_0x1d9258['dir'])&&typeof((_0x34ae3c=_0x2efada[_0x3224f4(0xcd)]['dirs'][_0x242e93])===null||_0x34ae3c===void 0x0?void 0x0:_0x34ae3c[_0x3224f4(0xcf)])==_0x3224f4(0x8f)&&!fs[_0x3224f4(0xac)](_0x2efada['staticFile'][_0x3224f4(0x88)][_0x242e93][_0x3224f4(0xcf)])&&(fs[_0x3224f4(0x87)](_0x2efada[_0x3224f4(0xcd)]['dirs'][_0x242e93][_0x3224f4(0xcf)],{'recursive':!![]}),console[_0x3224f4(0xb8)](_0x3224f4(0xa1)+_0x2efada[_0x3224f4(0xcd)]['dirs'][_0x242e93][_0x3224f4(0xcf)]));}((_0x394f7f=_0x2efada===null||_0x2efada===void 0x0?void 0x0:_0x2efada[_0x3224f4(0xe2)])===null||_0x394f7f===void 0x0?void 0x0:_0x394f7f['tmpdir'])&&!fs[_0x3224f4(0xac)](_0x2efada[_0x3224f4(0xe2)][_0x3224f4(0x80)])&&(fs[_0x3224f4(0x87)](_0x2efada[_0x3224f4(0xe2)]['tmpdir'],{'recursive':!![]}),console[_0x3224f4(0xb8)](_0x3224f4(0x94)+_0x2efada[_0x3224f4(0xe2)]['tmpdir'])),this[_0x3224f4(0xd1)][_0x3224f4(0xb2)](_0x2efada);}};__decorate([(0x0,core_1[a2_0x29d92d(0x9f)])(),__metadata(a2_0x29d92d(0xab),Object)],CustomConfiguration[a2_0x29d92d(0xd8)],a2_0x29d92d(0xb9),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x29d92d(0xab),core_2['MidwayConfigService'])],CustomConfiguration[a2_0x29d92d(0xd8)],a2_0x29d92d(0xd1),void 0x0),__decorate([(0x0,core_1[a2_0x29d92d(0x77)])(),__metadata(a2_0x29d92d(0xab),core_2['MidwayDecoratorService'])],CustomConfiguration['prototype'],a2_0x29d92d(0x7a),void 0x0),__decorate([(0x0,core_1[a2_0x29d92d(0x77)])(),__metadata('design:type',core_2['MidwayApplicationManager'])],CustomConfiguration[a2_0x29d92d(0xd8)],a2_0x29d92d(0xbd),void 0x0),__decorate([(0x0,core_1[a2_0x29d92d(0x77)])(),__metadata(a2_0x29d92d(0xab),core_2[a2_0x29d92d(0xa7)])],CustomConfiguration['prototype'],a2_0x29d92d(0x8e),void 0x0),__decorate([(0x0,core_1[a2_0x29d92d(0x77)])(),__metadata(a2_0x29d92d(0xab),ApiService_1['ApiService'])],CustomConfiguration[a2_0x29d92d(0xd8)],'ApiService',void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,i18n,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x29d92d(0x85),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x29d92d(0x95)]=CustomConfiguration;
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a3_0x214c84=a3_0x5eb9;(function(_0x3b9354,_0x4bee9e){const _0x45de25=a3_0x5eb9,_0x2965ab=_0x3b9354();while(!![]){try{const _0x2b3c8b=-parseInt(_0x45de25(0xa7))/0x1*(parseInt(_0x45de25(0x8b))/0x2)+parseInt(_0x45de25(0x96))/0x3*(-parseInt(_0x45de25(0x9b))/0x4)+parseInt(_0x45de25(0xbb))/0x5+parseInt(_0x45de25(0xbe))/0x6+parseInt(_0x45de25(0xb7))/0x7+parseInt(_0x45de25(0xad))/0x8+-parseInt(_0x45de25(0xb3))/0x9;if(_0x2b3c8b===_0x4bee9e)break;else _0x2965ab['push'](_0x2965ab['shift']());}catch(_0x2de899){_0x2965ab['push'](_0x2965ab['shift']());}}}(a3_0xf782,0xc27dd));Object[a3_0x214c84(0xbc)](exports,'__esModule',{'value':!![]}),exports['parseRoute']=exports[a3_0x214c84(0x9d)]=void 0x0;function a3_0x5eb9(_0x50bb5a,_0x5f14fc){const _0xf7824c=a3_0xf782();return a3_0x5eb9=function(_0x5eb96a,_0x433d5f){_0x5eb96a=_0x5eb96a-0x8b;let _0x15b09a=_0xf7824c[_0x5eb96a];return _0x15b09a;},a3_0x5eb9(_0x50bb5a,_0x5f14fc);}const fs=require('fs'),core_1=require(a3_0x214c84(0x8d)),action_1=require(a3_0x214c84(0xb9));function Action(_0x22e5ed,_0x20d5a,_0x7adcbf={'middleware':[],'sensitive':!![]}){return _0x117a4e=>{const _0x1066df=a3_0x5eb9;var _0x266d7e;_0x7adcbf[_0x1066df(0xa9)]=_0x20d5a;const _0x1bc2d0=parseRoute(_0x22e5ed);if(_0x1bc2d0['module']){_0x7adcbf['prefix']=_0x7adcbf[_0x1066df(0xba)]?'/'+_0x1bc2d0['module']+'/'+_0x7adcbf['prefix']:'/'+_0x1bc2d0[_0x1066df(0x97)];_0x1bc2d0[_0x1066df(0xba)]&&(_0x7adcbf['prefix']='/'+_0x1bc2d0['prefix']+'/'+_0x7adcbf[_0x1066df(0xba)]);if(fs[_0x1066df(0x94)](_0x1bc2d0[_0x1066df(0xa5)]+'/apps/'+_0x1bc2d0['module']+_0x1066df(0x9e)+(lodash[_0x1066df(0xb2)](_0x1bc2d0[_0x1066df(0x8c)],'ts')?'ts':'js'))){const _0x3b2b1f=include(_0x1bc2d0[_0x1066df(0xa5)]+_0x1066df(0xa6)+_0x1bc2d0[_0x1066df(0xc0)]+_0x1066df(0x9e)+(lodash[_0x1066df(0xb2)](_0x1bc2d0[_0x1066df(0x8c)],'ts')?'ts':'js'));if(_0x3b2b1f['middleware']&&lodash[_0x1066df(0xaa)](_0x3b2b1f['middleware'])&&_0x3b2b1f['middleware']['length']>0x0)for(let _0x592ed0 in _0x3b2b1f[_0x1066df(0x8f)]){if(((_0x266d7e=_0x3b2b1f===null||_0x3b2b1f===void 0x0?void 0x0:_0x3b2b1f[_0x1066df(0x98)])===null||_0x266d7e===void 0x0?void 0x0:_0x266d7e['length'])>0x0&&_0x3b2b1f[_0x1066df(0x98)][_0x1066df(0xb0)](_0x3b2b1f[_0x1066df(0x8f)][_0x592ed0])!=-0x1)continue;_0x7adcbf[_0x1066df(0x8f)][_0x1066df(0xa2)](_0x3b2b1f['middleware'][_0x592ed0]);}const _0x3bc74a=(0x0,core_1[_0x1066df(0xb8)])(action_1[_0x1066df(0x9f)],action_1['AppsConfigTmp'])||{};_0x3bc74a[''+_0x1bc2d0['module']]=_0x3b2b1f,(0x0,core_1[_0x1066df(0x8e)])(action_1[_0x1066df(0x9f)],_0x3bc74a,action_1['AppsConfigTmp']);}_0x7adcbf[_0x1066df(0xba)]=_0x7adcbf[_0x1066df(0xba)][_0x1066df(0x99)]()[_0x1066df(0xa3)](/\/{2,}/g,'/'),(0x0,core_1[_0x1066df(0xac)])(action_1[_0x1066df(0xa1)],_0x117a4e),(0x0,core_1[_0x1066df(0xbd)])(_0x7adcbf[_0x1066df(0xba)],_0x7adcbf)(_0x117a4e),(0x0,core_1['saveClassMetadata'])(action_1[_0x1066df(0xa1)],{'prefix':_0x7adcbf['prefix'],'pprefix':_0x1bc2d0[_0x1066df(0xba)],'module':_0x1bc2d0[_0x1066df(0xc0)],'filepath':_0x1bc2d0[_0x1066df(0x8c)],'routerOptions':_0x7adcbf},_0x117a4e);}else _0x7adcbf['prefix']=_0x7adcbf['prefix']?'/'+_0x7adcbf[_0x1066df(0xba)]:'/'+_0x1bc2d0[_0x1066df(0x97)],_0x1bc2d0[_0x1066df(0xba)]&&(_0x7adcbf[_0x1066df(0xba)]='/'+_0x1bc2d0[_0x1066df(0xba)]+'/'+_0x7adcbf[_0x1066df(0xba)]),_0x7adcbf[_0x1066df(0xba)]=_0x7adcbf[_0x1066df(0xba)][_0x1066df(0x99)]()[_0x1066df(0xa3)](/\/{2,}/g,'/'),(0x0,core_1[_0x1066df(0xac)])(action_1[_0x1066df(0xa1)],_0x117a4e),(0x0,core_1[_0x1066df(0xbd)])(_0x7adcbf[_0x1066df(0xba)],_0x7adcbf)(_0x117a4e),(0x0,core_1[_0x1066df(0x8e)])(action_1[_0x1066df(0xa1)],{'prefix':_0x7adcbf['prefix'],'module':_0x1bc2d0[_0x1066df(0xc0)],'pprefix':_0x1bc2d0[_0x1066df(0xba)],'filepath':_0x1bc2d0['filepath'],'routerOptions':_0x7adcbf},_0x117a4e);};}exports['Action']=Action;function parseRoute(_0x40f314){const _0x5412de=a3_0x214c84;_0x40f314=_0x40f314['replace'](/(\\|\/)/g,'/');const _0x2c1717=process[_0x5412de(0x92)]()[_0x5412de(0xa3)](/(\\|\/)/g,'/'),_0x197701=_0x40f314[_0x5412de(0x95)](0x0,_0x2c1717[_0x5412de(0xb4)]+_0x40f314[_0x5412de(0x95)](_0x2c1717[_0x5412de(0xb4)]+0x1)[_0x5412de(0xb0)]('/')+0x1),_0x316e45=_0x40f314[_0x5412de(0x95)](_0x197701['length']+0x1)['replace'](/(\\|\/)/g,'/'),_0x37915e={'route':'','prefix':![],'module':![],'rootpath':_0x197701,'filepath':_0x316e45};if(_0x316e45['startsWith'](_0x5412de(0xb6))){const _0x256781=_0x316e45[_0x5412de(0x95)](_0x5412de(0xb6)[_0x5412de(0xb4)])['split']('/')[_0x5412de(0xab)](_0x5e223c=>_0x5e223c&&_0x5e223c[_0x5412de(0x90)]());return _0x256781[_0x5412de(0xb4)]>0x1&&(_0x37915e[_0x5412de(0xba)]=_0x256781[0x0][_0x5412de(0x99)](),_0x256781[_0x5412de(0x91)](0x0,0x1)),_0x37915e[_0x5412de(0x97)]=('/'+_0x256781[_0x5412de(0x9c)]('/'))[_0x5412de(0xa3)](/(\.ts|\.js)$/,'')[_0x5412de(0xa3)](/\/{2,}/g,'/')[_0x5412de(0xa8)](/[\/|A-Z]*[^A-Z]+/g)[_0x5412de(0x9c)]('-')[_0x5412de(0x99)]()['replace'](/\/\-/g,'/'),_0x37915e[_0x5412de(0x97)][_0x5412de(0xb2)]('-action')&&(_0x37915e['route']=_0x37915e[_0x5412de(0x97)][_0x5412de(0x95)](0x0,_0x37915e[_0x5412de(0x97)][_0x5412de(0xb4)]-0x7)),_0x37915e[_0x5412de(0x97)][_0x5412de(0xb2)](_0x5412de(0xae))&&(_0x37915e['route']=_0x37915e['route'][_0x5412de(0x95)](0x0,_0x37915e[_0x5412de(0x97)][_0x5412de(0xb4)]-0xb)),_0x37915e;}else{if(_0x316e45[_0x5412de(0xb5)](_0x5412de(0xaf))){const _0x4be558=_0x316e45[_0x5412de(0x95)](0x0,_0x316e45[_0x5412de(0xb0)](_0x5412de(0xa6))+0x5),_0x4d040f=_0x316e45[_0x5412de(0x95)](_0x4be558[_0x5412de(0xb4)]+0x1)['replace'](/(\\|\/)/g,'/')[_0x5412de(0x93)]('/')[0x0];if(_0x316e45[_0x5412de(0xb5)]('apps/'+_0x4d040f+_0x5412de(0xb1))){const _0x241452=_0x316e45[_0x5412de(0x95)]((_0x4be558+'/'+_0x4d040f+_0x5412de(0xb1))['length'])[_0x5412de(0x93)]('/')[_0x5412de(0xab)](_0x328da3=>_0x328da3&&_0x328da3[_0x5412de(0x90)]());return _0x241452[_0x5412de(0xb4)]>0x1&&(_0x37915e[_0x5412de(0xba)]=_0x241452[0x0][_0x5412de(0x99)](),_0x241452[_0x5412de(0x91)](0x0,0x1)),_0x37915e[_0x5412de(0xc0)]=_0x4d040f,_0x37915e['route']=('/'+_0x4d040f+'/'+_0x241452[_0x5412de(0x9c)]('/'))[_0x5412de(0xa3)](/(\.ts|\.js)$/,'')[_0x5412de(0xa3)](/\/{2,}/,'/')[_0x5412de(0xa8)](/[\/|A-Z]*[^A-Z]+/g)[_0x5412de(0x9c)]('-')[_0x5412de(0x99)]()[_0x5412de(0xa3)](/\/\-/g,'/'),_0x37915e[_0x5412de(0x97)][_0x5412de(0xb2)]('-action')&&(_0x37915e[_0x5412de(0x97)]=_0x37915e[_0x5412de(0x97)][_0x5412de(0x95)](0x0,_0x37915e['route'][_0x5412de(0xb4)]-0x7)),_0x37915e['route'][_0x5412de(0xb2)](_0x5412de(0xae))&&(_0x37915e[_0x5412de(0x97)]=_0x37915e[_0x5412de(0x97)][_0x5412de(0x95)](0x0,_0x37915e[_0x5412de(0x97)][_0x5412de(0xb4)]-0xb)),_0x37915e;}throw new Error(_0x316e45+_0x5412de(0xa4)+_0x4d040f+_0x5412de(0xa0));}}throw new Error(_0x316e45+_0x5412de(0x9a));}exports[a3_0x214c84(0xbf)]=parseRoute;function a3_0xf782(){const _0x119031=['defineProperty','Controller','9368880XepKaC','parseRoute','module','849226jeVlRd','filepath','@midwayjs/core','saveClassMetadata','middleware','trim','splice','cwd','split','existsSync','substring','32259ZCmxUX','route','middlewareIgnore','toLowerCase','\x20文件请放在app/controller/文件下','100wqKgMq','join','Action','/config.','APPSCONFIG_KEY','/controller/文件下','ACTION_KEY','push','replace','\x20文件请放在apps/','rootpath','/apps/','1YqHcaI','match','tagName','isArray','filter','saveModule','7115880fxvexa','-controller','apps/','indexOf','/controller/','endsWith','25069113ZrQBiP','length','startsWith','app/controller/','7461153RWEAdM','getClassMetadata','../types/action','prefix','3793440wWeyqn'];a3_0xf782=function(){return _0x119031;};return a3_0xf782();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x453e56=a4_0x2e33;function a4_0x2e33(_0x1739f2,_0x38d12f){const _0x3ce87a=a4_0x3ce8();return a4_0x2e33=function(_0x2e3305,_0x38b514){_0x2e3305=_0x2e3305-0x19b;let _0x2b6b1b=_0x3ce87a[_0x2e3305];return _0x2b6b1b;},a4_0x2e33(_0x1739f2,_0x38d12f);}(function(_0x90d07,_0x3282ba){const _0x41e911=a4_0x2e33,_0x22822f=_0x90d07();while(!![]){try{const _0x1735cc=parseInt(_0x41e911(0x1b7))/0x1*(parseInt(_0x41e911(0x1a1))/0x2)+parseInt(_0x41e911(0x19c))/0x3+-parseInt(_0x41e911(0x1bb))/0x4+-parseInt(_0x41e911(0x19d))/0x5*(-parseInt(_0x41e911(0x1a0))/0x6)+parseInt(_0x41e911(0x1bc))/0x7+-parseInt(_0x41e911(0x1b6))/0x8+parseInt(_0x41e911(0x1a2))/0x9*(-parseInt(_0x41e911(0x1aa))/0xa);if(_0x1735cc===_0x3282ba)break;else _0x22822f['push'](_0x22822f['shift']());}catch(_0x1d8d1f){_0x22822f['push'](_0x22822f['shift']());}}}(a4_0x3ce8,0x5e7aa));Object[a4_0x453e56(0x1a7)](exports,a4_0x453e56(0x1a8),{'value':!![]}),exports[a4_0x453e56(0x1b8)]=void 0x0;function a4_0x3ce8(){const _0x26ebce=['assign','501888XFOYxS','120086EBqLwO','Api','toLowerCase','@anncic-api/validator','1343364cvQAho','2859122HDmfqX','Validator','1714611QgGsGy','410WMQQXU','filter','routerName','46974RHqMwm','10GiBmhQ','12931452MEDhzx','RequestMapping','attachClassMetadata','../types/action','description','defineProperty','__esModule','middlewareIgnore','10rLbSsL','apimit','@midwayjs/core','length','validate','validationOptions','string','delete','ACTION_ROUTE_KEY','indexOf','middleware'];a4_0x3ce8=function(){return _0x26ebce;};return a4_0x3ce8();}const validator_1=require(a4_0x453e56(0x1ba)),core_1=require(a4_0x453e56(0x1ac)),action_1=require(a4_0x453e56(0x1a5));function Api(_0x5e6229,_0x4a516f='get',_0x4d9c09='/',_0x4a5c42={'apimit':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x50e1d4,_0x17862d,_0x4ace4b)=>{const _0x4d7265=a4_0x2e33;var _0x47bde8,_0x46b135,_0x3ec675;!_0x4a5c42[_0x4d7265(0x1b4)]&&(_0x4a5c42[_0x4d7265(0x1b4)]=[]);!((_0x47bde8=_0x4a5c42===null||_0x4a5c42===void 0x0?void 0x0:_0x4a5c42[_0x4d7265(0x1ae)])===null||_0x47bde8===void 0x0?void 0x0:_0x47bde8[_0x4d7265(0x1af)])&&(_0x4a5c42[_0x4d7265(0x1ae)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x4d7265(0x1b0)}});if(((_0x46b135=_0x4a5c42===null||_0x4a5c42===void 0x0?void 0x0:_0x4a5c42['middleware'])===null||_0x46b135===void 0x0?void 0x0:_0x46b135[_0x4d7265(0x1ad)])>0x0&&((_0x3ec675=_0x4a5c42===null||_0x4a5c42===void 0x0?void 0x0:_0x4a5c42[_0x4d7265(0x1a9)])===null||_0x3ec675===void 0x0?void 0x0:_0x3ec675[_0x4d7265(0x1ad)])>0x0)for(let _0x245d97 in _0x4a5c42[_0x4d7265(0x1b4)]){_0x4a5c42['middlewareIgnore'][_0x4d7265(0x1b3)](_0x4a5c42['middleware'][_0x245d97])!==-0x1&&(_0x4a5c42['middleware'][_0x245d97]=null);}_0x4a5c42[_0x4d7265(0x19f)]=_0x5e6229,(0x0,validator_1[_0x4d7265(0x19b)])(_0x4a5c42[_0x4d7265(0x1ae)])(_0x50e1d4,_0x17862d,_0x4ace4b),(0x0,core_1[_0x4d7265(0x1a3)])(Object[_0x4d7265(0x1b5)](_0x4a5c42,{'path':_0x4d9c09,'requestMethod':(_0x4a516f=='del'?_0x4d7265(0x1b1):_0x4a516f)['toLowerCase']()}))(_0x50e1d4,_0x17862d,_0x4ace4b),(0x0,core_1[_0x4d7265(0x1a4)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x4d9c09,'method':_0x17862d,'apimit':_0x4a5c42['apimit'],'routerName':_0x4a5c42[_0x4d7265(0x19f)],'description':_0x4a5c42[_0x4d7265(0x1a6)],'middleware':(_0x4a5c42['middleware']||[])[_0x4d7265(0x19e)](_0x1b0bb0=>!!_0x1b0bb0),'requestMethod':(_0x4a516f=='del'?_0x4d7265(0x1b1):_0x4a516f)[_0x4d7265(0x1b9)]()},_0x50e1d4),(0x0,core_1['createCustomMethodDecorator'])(action_1[_0x4d7265(0x1b2)],{'path':_0x4d9c09,'method':_0x17862d,'apimit':_0x4a5c42[_0x4d7265(0x1ab)],'routerName':_0x4a5c42['routerName'],'description':_0x4a5c42[_0x4d7265(0x1a6)],'middleware':(_0x4a5c42[_0x4d7265(0x1b4)]||[])['filter'](_0x2e450c=>!!_0x2e450c),'requestMethod':(_0x4a516f=='del'?_0x4d7265(0x1b1):_0x4a516f)[_0x4d7265(0x1b9)]()})(_0x50e1d4,_0x17862d,_0x4ace4b);};}exports[a4_0x453e56(0x1b8)]=Api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function a5_0x56ad(_0x3aa320,_0x4755c3){const _0x157c93=a5_0x157c();return a5_0x56ad=function(_0x56adf5,_0x1b1385){_0x56adf5=_0x56adf5-0xb3;let _0x54cfe9=_0x157c93[_0x56adf5];return _0x54cfe9;},a5_0x56ad(_0x3aa320,_0x4755c3);}const a5_0xb998c6=a5_0x56ad;function a5_0x157c(){const _0xd4ce0a=['RequestMapping','apitest','app','filepath','408DOysnj','2DkMEaa','/apitest','getAsync','MidwayEnvironmentService','value','Apitest','398650ZDGYIl','262857qyWzPd','REQUEST_OBJ_CTX_KEY','1201284BqOsTS','../service/ApitestService','getConfig','defineProperty','765861snREmt','1397344SxKZQE','getApplicationContext','162zZgUrL','123774acVZGf','13985djXnlK','apidoc','@midwayjs/core','ApitestService'];a5_0x157c=function(){return _0xd4ce0a;};return a5_0x157c();}(function(_0x2a0d21,_0x2802ba){const _0x19120b=a5_0x56ad,_0x4ef913=_0x2a0d21();while(!![]){try{const _0xa5c0e8=-parseInt(_0x19120b(0xca))/0x1+-parseInt(_0x19120b(0xc3))/0x2*(parseInt(_0x19120b(0xb5))/0x3)+parseInt(_0x19120b(0xcc))/0x4+-parseInt(_0x19120b(0xba))/0x5*(parseInt(_0x19120b(0xc2))/0x6)+parseInt(_0x19120b(0xb9))/0x7+-parseInt(_0x19120b(0xb6))/0x8+-parseInt(_0x19120b(0xb8))/0x9*(-parseInt(_0x19120b(0xc9))/0xa);if(_0xa5c0e8===_0x2802ba)break;else _0x4ef913['push'](_0x4ef913['shift']());}catch(_0x47e467){_0x4ef913['push'](_0x4ef913['shift']());}}}(a5_0x157c,0x253f5));Object[a5_0xb998c6(0xb4)](exports,'__esModule',{'value':!![]}),exports[a5_0xb998c6(0xc8)]=void 0x0;const core_1=require(a5_0xb998c6(0xbc)),ApitestService_1=require(a5_0xb998c6(0xcd));function Apitest(_0x5dac97=a5_0xb998c6(0xc4),_0x20cccc){return(_0x428a1a,_0x4f3275,_0x3355f8)=>{const _0x577d15=a5_0x56ad;return(0x0,core_1[_0x577d15(0xbe)])({'path':_0x5dac97,'requestMethod':'get'})(_0x428a1a,_0x4f3275,_0x3355f8),_0x3355f8[_0x577d15(0xc7)]=async function(..._0x1ea688){const _0x3cdf80=_0x577d15;var _0x31e3cc;const _0x123506=(_0x31e3cc=this[core_1[_0x3cdf80(0xcb)]])===null||_0x31e3cc===void 0x0?void 0x0:_0x31e3cc[_0x3cdf80(0xc0)];if(_0x123506&&_0x123506[_0x3cdf80(0xb3)](_0x3cdf80(0xbf))){const _0x3c2fb2=await _0x123506[_0x3cdf80(0xb7)]()[_0x3cdf80(0xc5)](ApitestService_1[_0x3cdf80(0xbd)]),_0x4c0a2f=await _0x123506[_0x3cdf80(0xb7)]()[_0x3cdf80(0xc5)](core_1[_0x3cdf80(0xc6)]);return _0x4c0a2f['isDevelopmentEnvironment']()&&(_0x20cccc[_0x3cdf80(0xc1)]=!![]),await _0x3c2fb2[_0x3cdf80(0xbb)](_0x20cccc);}return'';},_0x3355f8;};}exports[a5_0xb998c6(0xc8)]=Apitest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a6_0x5eab36=a6_0x3af9;(function(_0x207b73,_0x163fae){var _0x395601=a6_0x3af9,_0x1a5227=_0x207b73();while(!![]){try{var _0x1d68bb=-parseInt(_0x395601(0x1d2))/0x1+parseInt(_0x395601(0x1cf))/0x2+-parseInt(_0x395601(0x1d4))/0x3+parseInt(_0x395601(0x1de))/0x4*(parseInt(_0x395601(0x1d7))/0x5)+parseInt(_0x395601(0x1e7))/0x6+parseInt(_0x395601(0x1e4))/0x7*(parseInt(_0x395601(0x1d5))/0x8)+-parseInt(_0x395601(0x1dd))/0x9*(parseInt(_0x395601(0x1e1))/0xa);if(_0x1d68bb===_0x163fae)break;else _0x1a5227['push'](_0x1a5227['shift']());}catch(_0xc9f32f){_0x1a5227['push'](_0x1a5227['shift']());}}}(a6_0x5e52,0x1e125));function a6_0x5e52(){var _0x32645d=['TIMEOUT','630300oEsYiW','162872XbtJzU','HEADERS_LACK','415015efHaoJ','请使用正确的设备','ApiError','function','object','HEADERS_DEVICE','27RzvimB','4yvGTuo','defineProperty','decorate','30270ZYMhTm','HEADERS_CHECKCODE','请求头信息不完整','77gWjQuI','design:type','__decorate','333366iOLISK','metadata','87560xBdaJj','网络繁忙,请稍后重试','HEADERS_SIGNATURE','63939yoPmQY'];a6_0x5e52=function(){return _0x32645d;};return a6_0x5e52();}function a6_0x3af9(_0x1d3038,_0x6b16d8){var _0x5e52e8=a6_0x5e52();return a6_0x3af9=function(_0x3af923,_0xf51e67){_0x3af923=_0x3af923-0x1cf;var _0x1e6574=_0x5e52e8[_0x3af923];return _0x1e6574;},a6_0x3af9(_0x1d3038,_0x6b16d8);}var __decorate=this&&this[a6_0x5eab36(0x1e6)]||function(_0x5348e8,_0x224a46,_0x257c8e,_0x30dc57){var _0x1cf9f8=a6_0x5eab36,_0xf9c2eb=arguments['length'],_0x534f60=_0xf9c2eb<0x3?_0x224a46:_0x30dc57===null?_0x30dc57=Object['getOwnPropertyDescriptor'](_0x224a46,_0x257c8e):_0x30dc57,_0x1a9d0e;if(typeof Reflect==='object'&&typeof Reflect[_0x1cf9f8(0x1e0)]===_0x1cf9f8(0x1da))_0x534f60=Reflect[_0x1cf9f8(0x1e0)](_0x5348e8,_0x224a46,_0x257c8e,_0x30dc57);else{for(var _0x7ba99b=_0x5348e8['length']-0x1;_0x7ba99b>=0x0;_0x7ba99b--)if(_0x1a9d0e=_0x5348e8[_0x7ba99b])_0x534f60=(_0xf9c2eb<0x3?_0x1a9d0e(_0x534f60):_0xf9c2eb>0x3?_0x1a9d0e(_0x224a46,_0x257c8e,_0x534f60):_0x1a9d0e(_0x224a46,_0x257c8e))||_0x534f60;}return _0xf9c2eb>0x3&&_0x534f60&&Object[_0x1cf9f8(0x1df)](_0x224a46,_0x257c8e,_0x534f60),_0x534f60;},__metadata=this&&this['__metadata']||function(_0x3b70c1,_0x16a05e){var _0x21627a=a6_0x5eab36;if(typeof Reflect===_0x21627a(0x1db)&&typeof Reflect['metadata']===_0x21627a(0x1da))return Reflect[_0x21627a(0x1e8)](_0x3b70c1,_0x16a05e);};Object[a6_0x5eab36(0x1df)](exports,'__esModule',{'value':!![]}),exports['ApiError']=void 0x0;class ApiError{}ApiError[a6_0x5eab36(0x1d3)]=0x3d7e31,ApiError['HEADERS_LACK']=0x3d7e32,ApiError[a6_0x5eab36(0x1dc)]=0x3d7e33,ApiError[a6_0x5eab36(0x1e2)]=0x3d7e34,ApiError[a6_0x5eab36(0x1d1)]=0x3d7e35,__decorate([AnnErrorMsg(a6_0x5eab36(0x1d0)),__metadata(a6_0x5eab36(0x1e5),Object)],ApiError,a6_0x5eab36(0x1d3),void 0x0),__decorate([AnnErrorMsg(a6_0x5eab36(0x1e3)),__metadata('design:type',Object)],ApiError,a6_0x5eab36(0x1d6),void 0x0),__decorate([AnnErrorMsg(a6_0x5eab36(0x1d8)),__metadata(a6_0x5eab36(0x1e5),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg('验证失败,请重新登录'),__metadata('design:type',Object)],ApiError,a6_0x5eab36(0x1e2),void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a6_0x5eab36(0x1e5),Object)],ApiError,'HEADERS_SIGNATURE',void 0x0),exports[a6_0x5eab36(0x1d9)]=ApiError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a7_0x4d21d3=a7_0x433d;(function(_0x5a3589,_0x42c979){const _0x193525=a7_0x433d,_0x392a64=_0x5a3589();while(!![]){try{const _0x150d2d=-parseInt(_0x193525(0xd1))/0x1+-parseInt(_0x193525(0xcc))/0x2*(parseInt(_0x193525(0xd3))/0x3)+parseInt(_0x193525(0xdb))/0x4+-parseInt(_0x193525(0xd7))/0x5+parseInt(_0x193525(0xd0))/0x6*(parseInt(_0x193525(0xcd))/0x7)+parseInt(_0x193525(0xd2))/0x8*(-parseInt(_0x193525(0xd9))/0x9)+-parseInt(_0x193525(0xce))/0xa*(-parseInt(_0x193525(0xd4))/0xb);if(_0x150d2d===_0x42c979)break;else _0x392a64['push'](_0x392a64['shift']());}catch(_0x1b3e10){_0x392a64['push'](_0x392a64['shift']());}}}(a7_0x5272,0xa9c66));function a7_0x433d(_0x17ac1c,_0x248d5b){const _0x5272dd=a7_0x5272();return a7_0x433d=function(_0x433db0,_0x5679a2){_0x433db0=_0x433db0-0xca;let _0x15631b=_0x5272dd[_0x433db0];return _0x15631b;},a7_0x433d(_0x17ac1c,_0x248d5b);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a7_0x4d21d3(0xda)]=void 0x0;const core_1=require(a7_0x4d21d3(0xd5)),action_1=require(a7_0x4d21d3(0xd6));function getAppsConfig(_0xb871e3){const _0x4de6f3=a7_0x4d21d3,_0x2a4bf5=(0x0,core_1[_0x4de6f3(0xd8)])(action_1[_0x4de6f3(0xcb)],action_1[_0x4de6f3(0xcf)])||{};return _0xb871e3?lodash[_0x4de6f3(0xca)](_0x2a4bf5,_0xb871e3):_0x2a4bf5;}function a7_0x5272(){const _0x1d239e=['1987536mCHMbS','get','APPSCONFIG_KEY','6FYvfeg','7osotuN','130qKfgpk','AppsConfigTmp','6604266ukiHBr','396843xSXGlW','2232200INMBMn','709533zgymvm','963622Xuatos','@midwayjs/core','../types/action','487860kshVpK','getClassMetadata','27OCtOAK','getAppsConfig'];a7_0x5272=function(){return _0x1d239e;};return a7_0x5272();}exports['getAppsConfig']=getAppsConfig;
|
package/dist/helper/getRoutes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a8_0x5c79(){const _0x3a9d42=['@anncic-api/validator','String','args','name','pprefix','-array','type','min','propertyData','array','tagName','test','request','log','required','flags.label','file','default','function','get','getClassMetadata','body','metadata','getRoutes','flags.description','string','items','文件上传-','QUERY','limit','filepath','RouteParamTypes','filter','RULES_KEY','FILESTREAM','find','title','join','describe','flags.default','1122457PciGNv','allow','concat','description','summary','number','只允许:[','split','getMethodParamTypes','205194WtWPhh','__esModule','module','header','prefix','ACTION_ROUTE_KEY','rules','FILESSTREAM','requestMethod','getClassExtendedMetadata','2301270uDwRwY','max','INJECT_CUSTOM_PARAM','flags.presence','ACTION_KEY','method','indexOf','PARAM','routerOptions','iterator','45459rglIdn','27HySxtn','3435402RzbdvG','length','@midwayjs/core','static/apitest','BODY','object','2397200VtYWPQ','FIELDS','Boolean','24cTqepA','route','boolean','routes','parameterIndex','HEADERS','startsWith','children','query','push','../types/action','File','6834163IMlqHf','key','isArray'];a8_0x5c79=function(){return _0x3a9d42;};return a8_0x5c79();}const a8_0xe5309c=a8_0x37a7;(function(_0x4293d2,_0x29edf8){const _0x25c7e6=a8_0x37a7,_0x50d531=_0x4293d2();while(!![]){try{const _0x51d994=parseInt(_0x25c7e6(0x12c))/0x1+-parseInt(_0x25c7e6(0x135))/0x2*(-parseInt(_0x25c7e6(0x14a))/0x3)+parseInt(_0x25c7e6(0x151))/0x4+-parseInt(_0x25c7e6(0x13f))/0x5+-parseInt(_0x25c7e6(0x14b))/0x6+-parseInt(_0x25c7e6(0x160))/0x7+parseInt(_0x25c7e6(0x154))/0x8*(-parseInt(_0x25c7e6(0x149))/0x9);if(_0x51d994===_0x29edf8)break;else _0x50d531['push'](_0x50d531['shift']());}catch(_0x1a4c0e){_0x50d531['push'](_0x50d531['shift']());}}}(a8_0x5c79,0x9792f));function a8_0x37a7(_0x5b2d9f,_0x158b12){const _0x5c7970=a8_0x5c79();return a8_0x37a7=function(_0x37a77c,_0xa4fa02){_0x37a77c=_0x37a77c-0x10c;let _0x3dd53e=_0x5c7970[_0x37a77c];return _0x3dd53e;},a8_0x37a7(_0x5b2d9f,_0x158b12);}Object['defineProperty'](exports,a8_0xe5309c(0x136),{'value':!![]}),exports[a8_0xe5309c(0x11b)]=void 0x0;const lodash_1=require('lodash'),validator_1=require(a8_0xe5309c(0x163)),core_1=require(a8_0xe5309c(0x14d)),core_2=require(a8_0xe5309c(0x14d)),core_3=require('@midwayjs/core'),action_1=require(a8_0xe5309c(0x15e));function getRoutes(_0x1b4715={'prefix':'/','module':![]}){const _0x1e3bf9=a8_0xe5309c;var _0x5cd932,_0x3e7040;const _0x52f913=(0x0,core_3['listModule'])(action_1['ACTION_KEY']),_0xc676ff={},_0x4dc1a9=Array[_0x1e3bf9(0x162)](_0x1b4715[_0x1e3bf9(0x124)]||[])?_0x1b4715[_0x1e3bf9(0x124)]||[]:[_0x1b4715[_0x1e3bf9(0x124)]];_0x4bb3ef:for(const _0x263917 of _0x52f913){let _0x2613f6=(0x0,core_3[_0x1e3bf9(0x118)])(action_1[_0x1e3bf9(0x143)],_0x263917),_0x14de03=(0x0,core_3[_0x1e3bf9(0x118)])(action_1[_0x1e3bf9(0x13a)],_0x263917);if(_0x2613f6&&_0x14de03){let _0x41692c=_0x2613f6[_0x1e3bf9(0x139)],_0x1451bf={};if(_0x1b4715[_0x1e3bf9(0x137)]&&(0x0,lodash_1['get'])(_0x2613f6,_0x1e3bf9(0x137),![])!=_0x1b4715['module'])continue _0x4bb3ef;else{if(_0x1b4715[_0x1e3bf9(0x137)]===![]&&!!(0x0,lodash_1['get'])(_0x2613f6,'module',null))continue _0x4bb3ef;}if(_0x1b4715[_0x1e3bf9(0x139)]&&!_0x41692c[_0x1e3bf9(0x15a)](_0x1b4715[_0x1e3bf9(0x139)]))continue _0x4bb3ef;_0x41692c!=='/'?(_0x1451bf[_0x1e3bf9(0x130)]=(_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6[_0x1e3bf9(0x147)][_0x1e3bf9(0x10e)])||(/^\//[_0x1e3bf9(0x10f)](_0x41692c)?_0x41692c[_0x1e3bf9(0x133)]('/')[0x1]:_0x41692c),_0x1451bf[_0x1e3bf9(0x12f)]=(_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6['routerOptions'][_0x1e3bf9(0x12f)])||_0x1451bf[_0x1e3bf9(0x130)],_0x1451bf[_0x1e3bf9(0x157)]=[]):(_0x1451bf[_0x1e3bf9(0x130)]=(_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6['routerOptions'][_0x1e3bf9(0x10e)])||_0x1e3bf9(0x115),_0x1451bf[_0x1e3bf9(0x12f)]=(_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6[_0x1e3bf9(0x147)][_0x1e3bf9(0x12f)])||'',_0x1451bf['routes']=[]);_0x1b4715[_0x1e3bf9(0x122)]&&(_0x1451bf[_0x1e3bf9(0x122)]=_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6[_0x1e3bf9(0x122)]);(_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6[_0x1e3bf9(0x167)])&&(_0x1451bf['prefix']=_0x2613f6['pprefix']);(_0x2613f6===null||_0x2613f6===void 0x0?void 0x0:_0x2613f6['module'])&&(_0x1451bf[_0x1e3bf9(0x137)]=_0x2613f6[_0x1e3bf9(0x137)]);let _0x3448e0=(0x0,core_3[_0x1e3bf9(0x118)])(core_2[_0x1e3bf9(0x141)],_0x263917)||{};if(typeof _0x14de03[Symbol[_0x1e3bf9(0x148)]]===_0x1e3bf9(0x116))for(let _0x113373 of _0x14de03){let _0x2e4225={};_0x2e4225[_0x1e3bf9(0x144)]=_0x113373[_0x1e3bf9(0x13d)],_0x2e4225[_0x1e3bf9(0x155)]=(_0x41692c+_0x113373['path'])['replace'](/\/{1,}/,'/'),_0x2e4225[_0x1e3bf9(0x130)]=(_0x113373===null||_0x113373===void 0x0?void 0x0:_0x113373['routerName'])||_0x1451bf[_0x1e3bf9(0x130)]||_0x1e3bf9(0x115),_0x2e4225['description']=(_0x113373===null||_0x113373===void 0x0?void 0x0:_0x113373[_0x1e3bf9(0x12f)])||'',_0x2e4225[_0x1e3bf9(0x110)]=[];if(!(0x0,lodash_1[_0x1e3bf9(0x15a)])(_0x2e4225[_0x1e3bf9(0x155)],_0x1e3bf9(0x14e))&&!(0x0,lodash_1[_0x1e3bf9(0x15a)])(_0x2e4225[_0x1e3bf9(0x155)],'/static/apitest')&&_0x4dc1a9[_0x1e3bf9(0x145)](_0x2e4225[_0x1e3bf9(0x155)])===-0x1){if(!(_0x1b4715===null||_0x1b4715===void 0x0?void 0x0:_0x1b4715['noreq'])){let _0x5534c3=(0x0,core_3[_0x1e3bf9(0x134)])(new _0x263917(),_0x113373[_0x1e3bf9(0x144)]);for(const _0xa16657 in _0x5534c3){let _0xf52464=(_0x5cd932=_0x3448e0[_0x113373[_0x1e3bf9(0x144)]])===null||_0x5cd932===void 0x0?void 0x0:_0x5cd932[_0x1e3bf9(0x127)](_0x4901ce=>_0x4901ce['parameterIndex']==_0xa16657&&_0x4901ce[_0x1e3bf9(0x161)]===core_2['WEB_ROUTER_PARAM_KEY']&&(_0x4901ce===null||_0x4901ce===void 0x0?void 0x0:_0x4901ce[_0x1e3bf9(0x11a)]));if(_0xf52464===null||_0xf52464===void 0x0?void 0x0:_0xf52464[_0x1e3bf9(0x11a)]){let _0x4da808=convertTypeToString(_0xf52464[_0x1e3bf9(0x11a)]['type']||0x0);if([_0x1e3bf9(0x15c),_0x1e3bf9(0x119)][_0x1e3bf9(0x145)](_0x4da808)!=-0x1&&_0xf52464[_0x1e3bf9(0x11a)]['propertyData'][_0x1e3bf9(0x145)](':')==-0x1&&!_0x2e4225['request'][_0x1e3bf9(0x127)](_0xadfdc0=>_0xadfdc0['key']==_0xf52464['metadata'][_0x1e3bf9(0x10c)]))_0x2e4225[_0x1e3bf9(0x110)]['push']({'key':_0xf52464[_0x1e3bf9(0x11a)]['propertyData'],'title':_0xf52464[_0x1e3bf9(0x11a)]['propertyData'],'type':convertSchemaType(_0x5534c3[_0xf52464[_0x1e3bf9(0x158)]][_0x1e3bf9(0x166)]),'required':![],'default':'','desc':''});else{if(_0x4da808==_0x1e3bf9(0x114)){let _0x2c03ba=((_0x3e7040=_0xf52464===null||_0xf52464===void 0x0?void 0x0:_0xf52464['metadata'])===null||_0x3e7040===void 0x0?void 0x0:_0x3e7040[_0x1e3bf9(0x10c)])||_0x1e3bf9(0x114);_0x2c03ba[_0x1e3bf9(0x145)](':')==-0x1&&!_0x2e4225[_0x1e3bf9(0x110)][_0x1e3bf9(0x127)](_0x2dd3a5=>_0x2dd3a5[_0x1e3bf9(0x161)]==_0x2c03ba&&_0x2dd3a5[_0x1e3bf9(0x169)]==_0x1e3bf9(0x114))&&_0x2e4225['request'][_0x1e3bf9(0x15d)]({'key':_0x2c03ba,'title':_0x1e3bf9(0x11f)+_0x2c03ba,'type':_0x1e3bf9(0x114),'required':!![],'default':'','desc':''});}}}else{const _0x39fc84=(0x0,core_3[_0x1e3bf9(0x13e)])(validator_1[_0x1e3bf9(0x125)],_0x5534c3[_0xa16657]);_0x39fc84&&_0x2e4225[_0x1e3bf9(0x110)][_0x1e3bf9(0x15d)](...getJoiRequest(_0x39fc84));}}}_0x1451bf[_0x1e3bf9(0x157)][_0x1e3bf9(0x15d)](_0x2e4225);}}if(_0x1451bf[_0x1e3bf9(0x157)]['length']>0x0){let _0xe689c=_0xc676ff[_0x41692c];_0xe689c?(_0xe689c[_0x1e3bf9(0x130)]!=_0x1451bf[_0x1e3bf9(0x130)]&&(_0xe689c[_0x1e3bf9(0x130)]=_0xe689c['summary']+','+_0x1451bf[_0x1e3bf9(0x130)]),_0xe689c[_0x1e3bf9(0x12f)]!=_0x1451bf[_0x1e3bf9(0x12f)]&&(_0xe689c[_0x1e3bf9(0x12f)]=_0xe689c[_0x1e3bf9(0x12f)]+','+_0x1451bf[_0x1e3bf9(0x12f)]),_0xe689c[_0x1e3bf9(0x157)]=_0xe689c[_0x1e3bf9(0x157)][_0x1e3bf9(0x12e)](_0x1451bf[_0x1e3bf9(0x157)]),_0xc676ff[_0x41692c]=_0xe689c):_0xc676ff[_0x41692c]=_0x1451bf;}}}return _0xc676ff;}exports[a8_0xe5309c(0x11b)]=getRoutes;function getJoiRequest(_0x310e66){const _0x492db7=a8_0xe5309c,_0x569acb=[];for(let _0x274b05 in _0x310e66){const _0x1dcb4c={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0xa774b9=typeof _0x310e66[_0x274b05][_0x492db7(0x12a)]==_0x492db7(0x116)?_0x310e66[_0x274b05][_0x492db7(0x12a)]():_0x310e66[_0x274b05];_0x1dcb4c['key']=_0x274b05,_0x1dcb4c[_0x492db7(0x169)]=_0xa774b9[_0x492db7(0x169)],_0x1dcb4c[_0x492db7(0x128)]=(0x0,lodash_1[_0x492db7(0x117)])(_0xa774b9,_0x492db7(0x113),_0x274b05),_0x1dcb4c[_0x492db7(0x115)]=(0x0,lodash_1['get'])(_0xa774b9,_0x492db7(0x12b),''),_0x1dcb4c['required']=(0x0,lodash_1[_0x492db7(0x117)])(_0xa774b9,_0x492db7(0x142),'')==_0x492db7(0x112),_0x1dcb4c[_0x492db7(0x12f)]=(0x0,lodash_1['get'])(_0xa774b9,_0x492db7(0x11c),'');if(_0xa774b9['type']==_0x492db7(0x150))_0x1dcb4c[_0x492db7(0x15b)]=getJoiRequest(_0xa774b9['keys']);else _0xa774b9[_0x492db7(0x169)]==_0x492db7(0x10d)&&_0xa774b9[_0x492db7(0x11e)]&&Array['isArray'](_0xa774b9[_0x492db7(0x11e)])&&_0xa774b9[_0x492db7(0x11e)][0x0]&&console[_0x492db7(0x111)](_0x274b05+_0x492db7(0x168),_0xa774b9);_0xa774b9[_0x492db7(0x12d)]&&Array[_0x492db7(0x162)](_0xa774b9[_0x492db7(0x12d)])&&_0xa774b9['allow'][_0x492db7(0x14c)]>0x0&&(_0x1dcb4c[_0x492db7(0x12f)]=_0x492db7(0x132)+_0xa774b9[_0x492db7(0x12d)][_0x492db7(0x129)](',')+'];'+_0x1dcb4c[_0x492db7(0x12f)]);if(_0x1dcb4c['key']&&_0x1dcb4c[_0x492db7(0x169)]){const _0x2c92b8={};for(const _0x3321cc of _0xa774b9[_0x492db7(0x13b)]||[]){if(_0x3321cc[_0x492db7(0x166)]===_0x492db7(0x16a)&&_0x3321cc[_0x492db7(0x165)])_0x2c92b8['min']=_0x3321cc[_0x492db7(0x165)][_0x492db7(0x121)];else _0x3321cc[_0x492db7(0x166)]===_0x492db7(0x140)&&(_0x2c92b8[_0x492db7(0x140)]=_0x3321cc['args'][_0x492db7(0x121)]);}_0x1dcb4c[_0x492db7(0x13b)]=_0x2c92b8;}_0x1dcb4c[_0x492db7(0x161)]&&_0x1dcb4c[_0x492db7(0x128)]&&_0x569acb[_0x492db7(0x15d)](_0x1dcb4c);}return _0x569acb;}function convertSchemaType(_0x4ff04d){const _0x506e72=a8_0xe5309c;switch(_0x4ff04d){case'Object':return'object';case _0x506e72(0x153):return _0x506e72(0x156);case'Number':return _0x506e72(0x131);case _0x506e72(0x164):return _0x506e72(0x11d);case _0x506e72(0x15f):return _0x506e72(0x114);default:return _0x506e72(0x11d);}}function convertTypeToString(_0x50be88){const _0x436d77=a8_0xe5309c;switch(_0x50be88){case core_1['RouteParamTypes'][_0x436d77(0x159)]:return _0x436d77(0x138);case core_1[_0x436d77(0x123)][_0x436d77(0x120)]:return _0x436d77(0x15c);case core_1['RouteParamTypes'][_0x436d77(0x146)]:return'path';case core_1[_0x436d77(0x123)][_0x436d77(0x14f)]:return'body';case core_1[_0x436d77(0x123)][_0x436d77(0x152)]:case core_1[_0x436d77(0x123)][_0x436d77(0x13c)]:case core_1[_0x436d77(0x123)][_0x436d77(0x126)]:return _0x436d77(0x114);default:return _0x436d77(0x138);}}
|
|
1
|
+
'use strict';function a8_0x1de3(_0x444686,_0x4a0e06){const _0x328b9f=a8_0x328b();return a8_0x1de3=function(_0x1de3f3,_0x12b287){_0x1de3f3=_0x1de3f3-0x79;let _0x476e98=_0x328b9f[_0x1de3f3];return _0x476e98;},a8_0x1de3(_0x444686,_0x4a0e06);}const a8_0x51ee2a=a8_0x1de3;(function(_0x5c47cb,_0x1631b2){const _0x2816c4=a8_0x1de3,_0xc00e99=_0x5c47cb();while(!![]){try{const _0x1f7f01=-parseInt(_0x2816c4(0xb3))/0x1*(-parseInt(_0x2816c4(0x83))/0x2)+-parseInt(_0x2816c4(0xcb))/0x3+-parseInt(_0x2816c4(0xc8))/0x4*(parseInt(_0x2816c4(0x96))/0x5)+parseInt(_0x2816c4(0x91))/0x6*(-parseInt(_0x2816c4(0x8c))/0x7)+parseInt(_0x2816c4(0xb1))/0x8*(-parseInt(_0x2816c4(0x92))/0x9)+parseInt(_0x2816c4(0xba))/0xa*(parseInt(_0x2816c4(0xc1))/0xb)+parseInt(_0x2816c4(0xd2))/0xc;if(_0x1f7f01===_0x1631b2)break;else _0xc00e99['push'](_0xc00e99['shift']());}catch(_0x6bea9e){_0xc00e99['push'](_0xc00e99['shift']());}}}(a8_0x328b,0x1adb0));function a8_0x328b(){const _0x5452f0=['description','prefix','max','flags.presence','string','flags.description','object','rules','isArray','type','tagName','8ZCMFxD','FILESTREAM','29cKbMfS','summary','header','args','static/apitest','route','Boolean','10GzkMJP','array','number','@anncic-api/validator','push','listModule','split','1402973tRIxec','routes','describe','RULES_KEY','getMethodParamTypes','method','default','12jOMMhE','indexOf','routerOptions','438591JnMybH','propertyData','title','filter','function','limit','INJECT_CUSTOM_PARAM','4833624mLhDJF','body','min','flags.default','/static/apitest','module','pprefix','文件上传-','startsWith','RouteParamTypes','ACTION_ROUTE_KEY','query','path','noreq','10084NJNNBt','getClassMetadata','ACTION_KEY','iterator','metadata','request','log','allow','replace','7IXzsUF','parameterIndex','items','required','File','594042mSBQcL','914049ltxPOq','PARAM','join','name','366330jxrLey','BODY','Object','filepath','requestMethod','getClassExtendedMetadata','file','__esModule','@midwayjs/core','get','length','key','只允许:[','concat','getRoutes','boolean'];a8_0x328b=function(){return _0x5452f0;};return a8_0x328b();}Object['defineProperty'](exports,a8_0x51ee2a(0x9d),{'value':!![]}),exports[a8_0x51ee2a(0xa4)]=void 0x0;const lodash_1=require('lodash'),validator_1=require(a8_0x51ee2a(0xbd)),core_1=require(a8_0x51ee2a(0x9e)),core_2=require(a8_0x51ee2a(0x9e)),core_3=require(a8_0x51ee2a(0x9e)),action_1=require('../types/action');function getRoutes(_0x18aa9a={'prefix':'/','module':![]}){const _0x57bf76=a8_0x51ee2a;var _0x2b1c32,_0x3105be;const _0x4d1936=(0x0,core_3[_0x57bf76(0xbf)])(action_1[_0x57bf76(0x85)]),_0x3a18ea={},_0x2e200=Array[_0x57bf76(0xae)](_0x18aa9a[_0x57bf76(0xce)]||[])?_0x18aa9a['filter']||[]:[_0x18aa9a[_0x57bf76(0xce)]];_0x48a5f4:for(const _0x3740be of _0x4d1936){let _0x561976=(0x0,core_3['getClassMetadata'])(action_1[_0x57bf76(0x85)],_0x3740be),_0x4b1e4d=(0x0,core_3[_0x57bf76(0x84)])(action_1[_0x57bf76(0x7f)],_0x3740be);if(_0x561976&&_0x4b1e4d){let _0x1b8c52=_0x561976[_0x57bf76(0xa7)],_0x44c4ff={};if(_0x18aa9a[_0x57bf76(0x7a)]&&(0x0,lodash_1['get'])(_0x561976,_0x57bf76(0x7a),![])!=_0x18aa9a['module'])continue _0x48a5f4;else{if(_0x18aa9a[_0x57bf76(0x7a)]===![]&&!!(0x0,lodash_1['get'])(_0x561976,_0x57bf76(0x7a),null))continue _0x48a5f4;}if(_0x18aa9a['prefix']&&!_0x1b8c52[_0x57bf76(0x7d)](_0x18aa9a['prefix']))continue _0x48a5f4;_0x1b8c52!=='/'?(_0x44c4ff[_0x57bf76(0xb4)]=(_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0xca)][_0x57bf76(0xb0)])||(/^\//['test'](_0x1b8c52)?_0x1b8c52[_0x57bf76(0xc0)]('/')[0x1]:_0x1b8c52),_0x44c4ff['description']=(_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0xca)][_0x57bf76(0xa6)])||_0x44c4ff[_0x57bf76(0xb4)],_0x44c4ff['routes']=[]):(_0x44c4ff[_0x57bf76(0xb4)]=(_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0xca)][_0x57bf76(0xb0)])||'default',_0x44c4ff[_0x57bf76(0xa6)]=(_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0xca)]['description'])||'',_0x44c4ff[_0x57bf76(0xc2)]=[]);_0x18aa9a[_0x57bf76(0x99)]&&(_0x44c4ff[_0x57bf76(0x99)]=_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0x99)]);(_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0x7b)])&&(_0x44c4ff['prefix']=_0x561976['pprefix']);(_0x561976===null||_0x561976===void 0x0?void 0x0:_0x561976[_0x57bf76(0x7a)])&&(_0x44c4ff['module']=_0x561976[_0x57bf76(0x7a)]);let _0x4ec178=(0x0,core_3[_0x57bf76(0x84)])(core_2[_0x57bf76(0xd1)],_0x3740be)||{};if(typeof _0x4b1e4d[Symbol[_0x57bf76(0x86)]]===_0x57bf76(0xcf))for(let _0x54f4ab of _0x4b1e4d){let _0x530213={};_0x530213[_0x57bf76(0xc6)]=_0x54f4ab[_0x57bf76(0x9a)],_0x530213[_0x57bf76(0xb8)]=(_0x1b8c52+_0x54f4ab[_0x57bf76(0x81)])[_0x57bf76(0x8b)](/\/{1,}/,'/'),_0x530213[_0x57bf76(0xb4)]=(_0x54f4ab===null||_0x54f4ab===void 0x0?void 0x0:_0x54f4ab['routerName'])||_0x44c4ff['summary']||_0x57bf76(0xc7),_0x530213['description']=(_0x54f4ab===null||_0x54f4ab===void 0x0?void 0x0:_0x54f4ab[_0x57bf76(0xa6)])||'',_0x530213[_0x57bf76(0x88)]=[];if(!(0x0,lodash_1[_0x57bf76(0x7d)])(_0x530213[_0x57bf76(0xb8)],_0x57bf76(0xb7))&&!(0x0,lodash_1['startsWith'])(_0x530213[_0x57bf76(0xb8)],_0x57bf76(0x79))&&_0x2e200[_0x57bf76(0xc9)](_0x530213['route'])===-0x1){if(!(_0x18aa9a===null||_0x18aa9a===void 0x0?void 0x0:_0x18aa9a[_0x57bf76(0x82)])){let _0x137ff4=(0x0,core_3[_0x57bf76(0xc5)])(new _0x3740be(),_0x54f4ab[_0x57bf76(0xc6)]);for(const _0x171494 in _0x137ff4){let _0x40d188=(_0x2b1c32=_0x4ec178[_0x54f4ab[_0x57bf76(0xc6)]])===null||_0x2b1c32===void 0x0?void 0x0:_0x2b1c32['find'](_0x5a3cc2=>_0x5a3cc2[_0x57bf76(0x8d)]==_0x171494&&_0x5a3cc2[_0x57bf76(0xa1)]===core_2['WEB_ROUTER_PARAM_KEY']&&(_0x5a3cc2===null||_0x5a3cc2===void 0x0?void 0x0:_0x5a3cc2[_0x57bf76(0x87)]));if(_0x40d188===null||_0x40d188===void 0x0?void 0x0:_0x40d188['metadata']){let _0x1b994c=convertTypeToString(_0x40d188[_0x57bf76(0x87)][_0x57bf76(0xaf)]||0x0);if(['query',_0x57bf76(0xd3)]['indexOf'](_0x1b994c)!=-0x1&&_0x40d188['metadata'][_0x57bf76(0xcc)][_0x57bf76(0xc9)](':')==-0x1&&!_0x530213[_0x57bf76(0x88)]['find'](_0x466d55=>_0x466d55[_0x57bf76(0xa1)]==_0x40d188[_0x57bf76(0x87)][_0x57bf76(0xcc)]))_0x530213['request'][_0x57bf76(0xbe)]({'key':_0x40d188[_0x57bf76(0x87)]['propertyData'],'title':_0x40d188[_0x57bf76(0x87)][_0x57bf76(0xcc)],'type':convertSchemaType(_0x137ff4[_0x40d188[_0x57bf76(0x8d)]][_0x57bf76(0x95)]),'required':![],'default':'','desc':''});else{if(_0x1b994c==_0x57bf76(0x9c)){let _0xb9ed8=((_0x3105be=_0x40d188===null||_0x40d188===void 0x0?void 0x0:_0x40d188[_0x57bf76(0x87)])===null||_0x3105be===void 0x0?void 0x0:_0x3105be[_0x57bf76(0xcc)])||_0x57bf76(0x9c);_0xb9ed8[_0x57bf76(0xc9)](':')==-0x1&&!_0x530213[_0x57bf76(0x88)]['find'](_0x24d237=>_0x24d237[_0x57bf76(0xa1)]==_0xb9ed8&&_0x24d237[_0x57bf76(0xaf)]==_0x57bf76(0x9c))&&_0x530213['request']['push']({'key':_0xb9ed8,'title':_0x57bf76(0x7c)+_0xb9ed8,'type':_0x57bf76(0x9c),'required':!![],'default':'','desc':''});}}}else{const _0x5c3252=(0x0,core_3[_0x57bf76(0x9b)])(validator_1[_0x57bf76(0xc4)],_0x137ff4[_0x171494]);_0x5c3252&&_0x530213[_0x57bf76(0x88)][_0x57bf76(0xbe)](...getJoiRequest(_0x5c3252));}}}_0x44c4ff[_0x57bf76(0xc2)][_0x57bf76(0xbe)](_0x530213);}}if(_0x44c4ff[_0x57bf76(0xc2)]['length']>0x0){let _0x4ed94f=_0x3a18ea[_0x1b8c52];_0x4ed94f?(_0x4ed94f[_0x57bf76(0xb4)]!=_0x44c4ff['summary']&&(_0x4ed94f[_0x57bf76(0xb4)]=_0x4ed94f[_0x57bf76(0xb4)]+','+_0x44c4ff[_0x57bf76(0xb4)]),_0x4ed94f[_0x57bf76(0xa6)]!=_0x44c4ff[_0x57bf76(0xa6)]&&(_0x4ed94f[_0x57bf76(0xa6)]=_0x4ed94f[_0x57bf76(0xa6)]+','+_0x44c4ff[_0x57bf76(0xa6)]),_0x4ed94f['routes']=_0x4ed94f[_0x57bf76(0xc2)][_0x57bf76(0xa3)](_0x44c4ff['routes']),_0x3a18ea[_0x1b8c52]=_0x4ed94f):_0x3a18ea[_0x1b8c52]=_0x44c4ff;}}}return _0x3a18ea;}exports[a8_0x51ee2a(0xa4)]=getRoutes;function getJoiRequest(_0x539557){const _0x3c45b5=a8_0x51ee2a,_0x2efb15=[];for(let _0x4c29ac in _0x539557){const _0x22d064={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x21cab=typeof _0x539557[_0x4c29ac]['describe']==_0x3c45b5(0xcf)?_0x539557[_0x4c29ac][_0x3c45b5(0xc3)]():_0x539557[_0x4c29ac];_0x22d064[_0x3c45b5(0xa1)]=_0x4c29ac,_0x22d064[_0x3c45b5(0xaf)]=_0x21cab[_0x3c45b5(0xaf)],_0x22d064[_0x3c45b5(0xcd)]=(0x0,lodash_1['get'])(_0x21cab,'flags.label',_0x4c29ac),_0x22d064['default']=(0x0,lodash_1[_0x3c45b5(0x9f)])(_0x21cab,_0x3c45b5(0xd5),''),_0x22d064[_0x3c45b5(0x8f)]=(0x0,lodash_1[_0x3c45b5(0x9f)])(_0x21cab,_0x3c45b5(0xa9),'')==_0x3c45b5(0x8f),_0x22d064[_0x3c45b5(0xa6)]=(0x0,lodash_1[_0x3c45b5(0x9f)])(_0x21cab,_0x3c45b5(0xab),'');if(_0x21cab[_0x3c45b5(0xaf)]==_0x3c45b5(0xac))_0x22d064['children']=getJoiRequest(_0x21cab['keys']);else _0x21cab[_0x3c45b5(0xaf)]==_0x3c45b5(0xbb)&&_0x21cab[_0x3c45b5(0x8e)]&&Array[_0x3c45b5(0xae)](_0x21cab[_0x3c45b5(0x8e)])&&_0x21cab[_0x3c45b5(0x8e)][0x0]&&console[_0x3c45b5(0x89)](_0x4c29ac+'-array',_0x21cab);_0x21cab['allow']&&Array[_0x3c45b5(0xae)](_0x21cab['allow'])&&_0x21cab[_0x3c45b5(0x8a)][_0x3c45b5(0xa0)]>0x0&&(_0x22d064['description']=_0x3c45b5(0xa2)+_0x21cab[_0x3c45b5(0x8a)][_0x3c45b5(0x94)](',')+'];'+_0x22d064['description']);if(_0x22d064[_0x3c45b5(0xa1)]&&_0x22d064[_0x3c45b5(0xaf)]){const _0x45706c={};for(const _0x28445c of _0x21cab['rules']||[]){if(_0x28445c[_0x3c45b5(0x95)]===_0x3c45b5(0xd4)&&_0x28445c[_0x3c45b5(0xb6)])_0x45706c[_0x3c45b5(0xd4)]=_0x28445c[_0x3c45b5(0xb6)][_0x3c45b5(0xd0)];else _0x28445c[_0x3c45b5(0x95)]===_0x3c45b5(0xa8)&&(_0x45706c[_0x3c45b5(0xa8)]=_0x28445c['args'][_0x3c45b5(0xd0)]);}_0x22d064[_0x3c45b5(0xad)]=_0x45706c;}_0x22d064[_0x3c45b5(0xa1)]&&_0x22d064[_0x3c45b5(0xcd)]&&_0x2efb15[_0x3c45b5(0xbe)](_0x22d064);}return _0x2efb15;}function convertSchemaType(_0xb45f1){const _0x5e2107=a8_0x51ee2a;switch(_0xb45f1){case _0x5e2107(0x98):return _0x5e2107(0xac);case _0x5e2107(0xb9):return _0x5e2107(0xa5);case'Number':return _0x5e2107(0xbc);case'String':return _0x5e2107(0xaa);case _0x5e2107(0x90):return'file';default:return _0x5e2107(0xaa);}}function convertTypeToString(_0x3c9613){const _0x4b6c1d=a8_0x51ee2a;switch(_0x3c9613){case core_1[_0x4b6c1d(0x7e)]['HEADERS']:return _0x4b6c1d(0xb5);case core_1[_0x4b6c1d(0x7e)]['QUERY']:return _0x4b6c1d(0x80);case core_1[_0x4b6c1d(0x7e)][_0x4b6c1d(0x93)]:return _0x4b6c1d(0x81);case core_1[_0x4b6c1d(0x7e)][_0x4b6c1d(0x97)]:return _0x4b6c1d(0xd3);case core_1[_0x4b6c1d(0x7e)]['FIELDS']:case core_1[_0x4b6c1d(0x7e)]['FILESSTREAM']:case core_1[_0x4b6c1d(0x7e)][_0x4b6c1d(0xb2)]:return _0x4b6c1d(0x9c);default:return'header';}}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a9_0x266024=a9_0x5050;(function(_0x6d53a1,_0xb79758){var _0x606c82=a9_0x5050,_0x58404b=_0x6d53a1();while(!![]){try{var _0xfd2e71=-parseInt(_0x606c82(0x1c0))/0x1+parseInt(_0x606c82(0x1e0))/0x2+parseInt(_0x606c82(0x1f1))/0x3+-parseInt(_0x606c82(0x1ea))/0x4+parseInt(_0x606c82(0x1e6))/0x5+-parseInt(_0x606c82(0x1d4))/0x6*(parseInt(_0x606c82(0x1e2))/0x7)+parseInt(_0x606c82(0x1ef))/0x8*(parseInt(_0x606c82(0x1c5))/0x9);if(_0xfd2e71===_0xb79758)break;else _0x58404b['push'](_0x58404b['shift']());}catch(_0x40a516){_0x58404b['push'](_0x58404b['shift']());}}}(a9_0x244b,0xd3bee));function a9_0x244b(){var _0x9950a2=['CacheService','Files','Param','6771138yrkUeh','configurable','prototype','Headers','ValidatorService','./service/ExcelService','./service/ApitestService','Logger','./decorator/ActionApitest','ScopeEnum','Apitest','@anncic-api/event','3292352xFbpyp','./configuration','7yqPXIY','Body','writable','@anncic-api/validator','1599200pMdoPV','File','getOwnPropertyDescriptor','Inject','5762756xpmwSN','Api','./service/ApiService','EventService','Provide','8mtoQWA','call','3375366QdseJU','getAppsConfig','defineProperty','Fields','default','ValidatorError','Config','Configuration','get','918289rYtfUU','create','App','__esModule','ExcelService','11373057FtNdGG','@midwayjs/core','ApiService','Init','Scope','Query','./decorator/Action','ApiError','./types/common','Action','__exportStar','./helper/getRoutes'];a9_0x244b=function(){return _0x9950a2;};return a9_0x244b();}var __createBinding=this&&this['__createBinding']||(Object[a9_0x266024(0x1c1)]?function(_0x11f088,_0x44f495,_0x3e568e,_0x58eae4){var _0x1dc4f9=a9_0x266024;if(_0x58eae4===undefined)_0x58eae4=_0x3e568e;var _0xe3c2f1=Object[_0x1dc4f9(0x1e8)](_0x44f495,_0x3e568e);(!_0xe3c2f1||(_0x1dc4f9(0x1bf)in _0xe3c2f1?!_0x44f495[_0x1dc4f9(0x1c3)]:_0xe3c2f1[_0x1dc4f9(0x1e4)]||_0xe3c2f1[_0x1dc4f9(0x1d5)]))&&(_0xe3c2f1={'enumerable':!![],'get':function(){return _0x44f495[_0x3e568e];}}),Object[_0x1dc4f9(0x1f3)](_0x11f088,_0x58eae4,_0xe3c2f1);}:function(_0x4dec99,_0x5dcc27,_0x270acf,_0x37e375){if(_0x37e375===undefined)_0x37e375=_0x270acf;_0x4dec99[_0x37e375]=_0x5dcc27[_0x270acf];}),__exportStar=this&&this[a9_0x266024(0x1cf)]||function(_0x16fbf9,_0x9834da){var _0x12633f=a9_0x266024;for(var _0x4b7bc0 in _0x16fbf9)if(_0x4b7bc0!==_0x12633f(0x1f5)&&!Object[_0x12633f(0x1d6)]['hasOwnProperty'][_0x12633f(0x1f0)](_0x9834da,_0x4b7bc0))__createBinding(_0x9834da,_0x16fbf9,_0x4b7bc0);};Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1c3),{'value':!![]}),exports['getAppsConfig']=exports['ScopeEnum']=exports[a9_0x266024(0x1c9)]=exports[a9_0x266024(0x1e9)]=exports[a9_0x266024(0x1ee)]=exports[a9_0x266024(0x1db)]=exports[a9_0x266024(0x1f7)]=exports['App']=exports[a9_0x266024(0x1c8)]=exports[a9_0x266024(0x1d7)]=exports[a9_0x266024(0x1ca)]=exports[a9_0x266024(0x1d3)]=exports['Body']=exports[a9_0x266024(0x1f4)]=exports[a9_0x266024(0x1d2)]=exports[a9_0x266024(0x1e7)]=exports[a9_0x266024(0x1f8)]=exports['ValidatorService']=exports[a9_0x266024(0x1f6)]=exports[a9_0x266024(0x1c4)]=exports[a9_0x266024(0x1c7)]=exports[a9_0x266024(0x1ed)]=exports[a9_0x266024(0x1d1)]=exports['ApiError']=exports['getRoutes']=exports[a9_0x266024(0x1de)]=exports[a9_0x266024(0x1ce)]=exports[a9_0x266024(0x1eb)]=void 0x0;const getAppsConfig_1=require('./helper/getAppsConfig');Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1f2),{'enumerable':!![],'get':function(){var _0x432377=a9_0x266024;return getAppsConfig_1[_0x432377(0x1f2)];}}),__exportStar(require(a9_0x266024(0x1cd)),exports),__exportStar(require(a9_0x266024(0x1da)),exports);var ActionApi_1=require('./decorator/ActionApi');Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1eb),{'enumerable':!![],'get':function(){var _0x42f8e5=a9_0x266024;return ActionApi_1[_0x42f8e5(0x1eb)];}});var Action_1=require(a9_0x266024(0x1cb));Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1ce),{'enumerable':!![],'get':function(){return Action_1['Action'];}});var ActionApitest_1=require(a9_0x266024(0x1dc));Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1de),{'enumerable':!![],'get':function(){var _0x39f2fd=a9_0x266024;return ActionApitest_1[_0x39f2fd(0x1de)];}});var getRoutes_1=require(a9_0x266024(0x1d0));Object[a9_0x266024(0x1f3)](exports,'getRoutes',{'enumerable':!![],'get':function(){return getRoutes_1['getRoutes'];}});function a9_0x5050(_0x29c0a4,_0x9e4215){var _0x244bff=a9_0x244b();return a9_0x5050=function(_0x5050b6,_0x284c29){_0x5050b6=_0x5050b6-0x1bf;var _0x4e106e=_0x244bff[_0x5050b6];return _0x4e106e;},a9_0x5050(_0x29c0a4,_0x9e4215);}var ApiError_1=require('./exception/ApiError');Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1cc),{'enumerable':!![],'get':function(){var _0x100f2a=a9_0x266024;return ApiError_1[_0x100f2a(0x1cc)];}});var cache_1=require('@anncic-api/cache');Object['defineProperty'](exports,'CacheService',{'enumerable':!![],'get':function(){var _0x1d17d6=a9_0x266024;return cache_1[_0x1d17d6(0x1d1)];}});var event_1=require(a9_0x266024(0x1df));Object[a9_0x266024(0x1f3)](exports,'EventService',{'enumerable':!![],'get':function(){var _0x52de4e=a9_0x266024;return event_1[_0x52de4e(0x1ed)];}});var ApiService_1=require(a9_0x266024(0x1ec));Object['defineProperty'](exports,a9_0x266024(0x1c7),{'enumerable':!![],'get':function(){var _0x19bd72=a9_0x266024;return ApiService_1[_0x19bd72(0x1c7)];}});var ExcelService_1=require(a9_0x266024(0x1d9));Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1c4),{'enumerable':!![],'get':function(){return ExcelService_1['ExcelService'];}});var validator_1=require(a9_0x266024(0x1e5));Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1f6),{'enumerable':!![],'get':function(){var _0x46a4fa=a9_0x266024;return validator_1[_0x46a4fa(0x1f6)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1d8),{'enumerable':!![],'get':function(){var _0x59e0d3=a9_0x266024;return validator_1[_0x59e0d3(0x1d8)];}});var configuration_1=require(a9_0x266024(0x1e1));Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1f8),{'enumerable':!![],'get':function(){return configuration_1['CustomConfiguration'];}});var core_1=require('@midwayjs/core');Object[a9_0x266024(0x1f3)](exports,'File',{'enumerable':!![],'get':function(){var _0x648626=a9_0x266024;return core_1[_0x648626(0x1e7)];}}),Object['defineProperty'](exports,a9_0x266024(0x1d2),{'enumerable':!![],'get':function(){var _0x27d08b=a9_0x266024;return core_1[_0x27d08b(0x1d2)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1f4),{'enumerable':!![],'get':function(){var _0x491bbb=a9_0x266024;return core_1[_0x491bbb(0x1f4)];}}),Object['defineProperty'](exports,a9_0x266024(0x1e3),{'enumerable':!![],'get':function(){var _0x2e164c=a9_0x266024;return core_1[_0x2e164c(0x1e3)];}}),Object['defineProperty'](exports,a9_0x266024(0x1d3),{'enumerable':!![],'get':function(){var _0x42cf16=a9_0x266024;return core_1[_0x42cf16(0x1d3)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1ca),{'enumerable':!![],'get':function(){var _0x1de21a=a9_0x266024;return core_1[_0x1de21a(0x1ca)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1d7),{'enumerable':!![],'get':function(){var _0x5da143=a9_0x266024;return core_1[_0x5da143(0x1d7)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1c8),{'enumerable':!![],'get':function(){var _0x21749e=a9_0x266024;return core_1[_0x21749e(0x1c8)];}});var core_2=require(a9_0x266024(0x1c6));Object['defineProperty'](exports,a9_0x266024(0x1c2),{'enumerable':!![],'get':function(){var _0x4b2025=a9_0x266024;return core_2[_0x4b2025(0x1c2)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1f7),{'enumerable':!![],'get':function(){var _0x42393e=a9_0x266024;return core_2[_0x42393e(0x1f7)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1db),{'enumerable':!![],'get':function(){var _0xfcf1a1=a9_0x266024;return core_2[_0xfcf1a1(0x1db)];}}),Object[a9_0x266024(0x1f3)](exports,'Provide',{'enumerable':!![],'get':function(){var _0x1de999=a9_0x266024;return core_2[_0x1de999(0x1ee)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1e9),{'enumerable':!![],'get':function(){var _0x110b11=a9_0x266024;return core_2[_0x110b11(0x1e9)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1c9),{'enumerable':!![],'get':function(){var _0x124959=a9_0x266024;return core_2[_0x124959(0x1c9)];}}),Object[a9_0x266024(0x1f3)](exports,a9_0x266024(0x1dd),{'enumerable':!![],'get':function(){var _0x55647c=a9_0x266024;return core_2[_0x55647c(0x1dd)];}}),global[a9_0x266024(0x1f2)]=getAppsConfig_1[a9_0x266024(0x1f2)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a10_0x291c(){var _0x396965=['54BtRYfN','design:type','prototype','HEADERS_CHECKCODE','abs','device','../exception/ApiError','__esModule','requesttime','toLowerCase','defineProperty','Provide','HEADERS_SIGNATURE','15575HgErMQ','HEADERS_LACK','TIMEOUT','checkcode','token','function','877149pXQeNA','@midwayjs/core','sort','2088LkHpXz','1809Sehpal','push','undefined','3RLPohX','secret','getcheck','entries','缺少头信息:signature','HEADERS_DEVICE','45110gQSDNh','__metadata','logintime','ApiError','Singleton','metadata','toString','password','ApiService','join','config','22gzJRkW','383098Yhpfnl','map','secret=','5211696ORStDg','fromEntries','devices','signature','MD5','checksign','length','getOwnPropertyDescriptor','24745WInRjT','3566940HiWHCb','__decorate','decorate','now'];a10_0x291c=function(){return _0x396965;};return a10_0x291c();}var a10_0x5d405d=a10_0x439e;(function(_0x101693,_0x34566b){var _0x52cc71=a10_0x439e,_0x51138b=_0x101693();while(!![]){try{var _0x48299c=parseInt(_0x52cc71(0x1e7))/0x1*(parseInt(_0x52cc71(0x1bd))/0x2)+-parseInt(_0x52cc71(0x1e0))/0x3+parseInt(_0x52cc71(0x1c9))/0x4+-parseInt(_0x52cc71(0x1c8))/0x5*(parseInt(_0x52cc71(0x1cd))/0x6)+-parseInt(_0x52cc71(0x1da))/0x7*(parseInt(_0x52cc71(0x1e3))/0x8)+-parseInt(_0x52cc71(0x1e4))/0x9*(parseInt(_0x52cc71(0x1b1))/0xa)+-parseInt(_0x52cc71(0x1bc))/0xb*(-parseInt(_0x52cc71(0x1c0))/0xc);if(_0x48299c===_0x34566b)break;else _0x51138b['push'](_0x51138b['shift']());}catch(_0xbe9237){_0x51138b['push'](_0x51138b['shift']());}}}(a10_0x291c,0x7caae));function a10_0x439e(_0x183ee8,_0x568996){var _0x291c72=a10_0x291c();return a10_0x439e=function(_0x439eed,_0x57562e){_0x439eed=_0x439eed-0x1ac;var _0x3e11e5=_0x291c72[_0x439eed];return _0x3e11e5;},a10_0x439e(_0x183ee8,_0x568996);}var __decorate=this&&this[a10_0x5d405d(0x1ca)]||function(_0x14e4f9,_0x1bc51d,_0x11462b,_0x3b4eb3){var _0x192877=a10_0x5d405d,_0xe85865=arguments['length'],_0x1cb396=_0xe85865<0x3?_0x1bc51d:_0x3b4eb3===null?_0x3b4eb3=Object[_0x192877(0x1c7)](_0x1bc51d,_0x11462b):_0x3b4eb3,_0x57d03f;if(typeof Reflect==='object'&&typeof Reflect[_0x192877(0x1cb)]===_0x192877(0x1df))_0x1cb396=Reflect[_0x192877(0x1cb)](_0x14e4f9,_0x1bc51d,_0x11462b,_0x3b4eb3);else{for(var _0xb0d994=_0x14e4f9[_0x192877(0x1c6)]-0x1;_0xb0d994>=0x0;_0xb0d994--)if(_0x57d03f=_0x14e4f9[_0xb0d994])_0x1cb396=(_0xe85865<0x3?_0x57d03f(_0x1cb396):_0xe85865>0x3?_0x57d03f(_0x1bc51d,_0x11462b,_0x1cb396):_0x57d03f(_0x1bc51d,_0x11462b))||_0x1cb396;}return _0xe85865>0x3&&_0x1cb396&&Object[_0x192877(0x1d7)](_0x1bc51d,_0x11462b,_0x1cb396),_0x1cb396;},__metadata=this&&this[a10_0x5d405d(0x1b2)]||function(_0x262f56,_0x171507){var _0x5926fb=a10_0x5d405d;if(typeof Reflect==='object'&&typeof Reflect[_0x5926fb(0x1b6)]===_0x5926fb(0x1df))return Reflect[_0x5926fb(0x1b6)](_0x262f56,_0x171507);};Object['defineProperty'](exports,a10_0x5d405d(0x1d4),{'value':!![]}),exports[a10_0x5d405d(0x1b9)]=void 0x0;const crypto_js_1=require('crypto-js'),core_1=require(a10_0x5d405d(0x1e1)),ApiError_1=require(a10_0x5d405d(0x1d3));let ApiService=class ApiService{[a10_0x5d405d(0x1b8)](_0x2ca76d){var _0x34f312=a10_0x5d405d,_0x534abf;return _0x2ca76d?(0x0,crypto_js_1['MD5'])(_0x2ca76d+(0x0,crypto_js_1[_0x34f312(0x1c4)])((0x0,crypto_js_1['MD5'])(_0x2ca76d)[_0x34f312(0x1b7)]()+((_0x534abf=this[_0x34f312(0x1bb)])===null||_0x534abf===void 0x0?void 0x0:_0x534abf['password']))[_0x34f312(0x1b7)]())[_0x34f312(0x1b7)]():'';}[a10_0x5d405d(0x1ad)](_0x5c1b4b,_0x3f4b23,_0x7f7746=Date[a10_0x5d405d(0x1cc)]()){var _0x3a7fc2=a10_0x5d405d;return{'Token':_0x5c1b4b,'Logintime':_0x7f7746,'Checkcode':this[_0x3a7fc2(0x1dd)](_0x5c1b4b,_0x3f4b23,_0x7f7746)};}['getsign'](_0x2d0188={}){var _0x10de71=a10_0x5d405d;const _0x33d610=[],_0x34bbd3=Object[_0x10de71(0x1c1)](Object[_0x10de71(0x1ae)](_0x2d0188)[_0x10de71(0x1be)](_0x5ceed3=>[_0x5ceed3[0x0]['toLowerCase'](),_0x5ceed3[0x1]]));for(let _0x500139 of[_0x10de71(0x1d2),'requesttime',_0x10de71(0x1de),'logintime',_0x10de71(0x1dd)]){if(typeof _0x34bbd3[_0x500139]==_0x10de71(0x1e6))throw new AnnError(ApiError_1['ApiError'][_0x10de71(0x1db)],{'message':'缺少头信息:'+_0x500139});_0x33d610['push'](_0x500139+'='+_0x34bbd3[_0x500139]);}if(Math[_0x10de71(0x1d1)](_0x34bbd3[_0x10de71(0x1d5)])-Date[_0x10de71(0x1cc)]()>this[_0x10de71(0x1bb)]['timeout'])throw new AnnError(ApiError_1['ApiError'][_0x10de71(0x1dc)]);if(!this[_0x10de71(0x1bb)][_0x10de71(0x1c2)][_0x34bbd3[_0x10de71(0x1d2)]]||!this[_0x10de71(0x1bb)][_0x10de71(0x1c2)][_0x34bbd3[_0x10de71(0x1d2)]][_0x10de71(0x1ac)]||!this[_0x10de71(0x1bb)][_0x10de71(0x1c2)][_0x34bbd3['device']]['checkcode'])throw new AnnError(ApiError_1[_0x10de71(0x1b4)][_0x10de71(0x1b0)]);if(_0x34bbd3[_0x10de71(0x1de)]&&_0x34bbd3[_0x10de71(0x1dd)]!=this['checkcode'](_0x34bbd3[_0x10de71(0x1de)],_0x34bbd3['device'],_0x34bbd3[_0x10de71(0x1b3)]))throw new AnnError(ApiError_1['ApiError'][_0x10de71(0x1d0)]);return _0x33d610[_0x10de71(0x1e5)](_0x10de71(0x1bf)+this[_0x10de71(0x1bb)][_0x10de71(0x1c2)][_0x34bbd3['device']][_0x10de71(0x1ac)]),(0x0,crypto_js_1[_0x10de71(0x1c4)])(_0x33d610[_0x10de71(0x1e2)]()[_0x10de71(0x1ba)](''))[_0x10de71(0x1b7)]();}[a10_0x5d405d(0x1dd)](_0x1457e0,_0xcf6deb,_0x1b1640=Date['now']()){var _0x241bd2=a10_0x5d405d,_0x3bc93d,_0x28106b,_0x9e09d6;if(!((_0x3bc93d=this[_0x241bd2(0x1bb)])===null||_0x3bc93d===void 0x0?void 0x0:_0x3bc93d[_0x241bd2(0x1c2)][_0xcf6deb])||!((_0x9e09d6=(_0x28106b=this[_0x241bd2(0x1bb)])===null||_0x28106b===void 0x0?void 0x0:_0x28106b[_0x241bd2(0x1c2)][_0xcf6deb])===null||_0x9e09d6===void 0x0?void 0x0:_0x9e09d6['checkcode']))throw new AnnError(ApiError_1[_0x241bd2(0x1b4)][_0x241bd2(0x1b0)]);return(0x0,crypto_js_1[_0x241bd2(0x1c4)])(_0x1457e0+(0x0,crypto_js_1[_0x241bd2(0x1c4)])(_0x1b1640+this[_0x241bd2(0x1bb)]['devices'][_0xcf6deb][_0x241bd2(0x1dd)])[_0x241bd2(0x1b7)]())[_0x241bd2(0x1b7)]();}[a10_0x5d405d(0x1c5)](_0x117b01={}){var _0x1062bb=a10_0x5d405d;const _0x2dac1f=Object[_0x1062bb(0x1c1)](Object['entries'](_0x117b01)[_0x1062bb(0x1be)](_0x3361c2=>[_0x3361c2[0x0][_0x1062bb(0x1d6)](),_0x3361c2[0x1]]));if(!(_0x2dac1f===null||_0x2dac1f===void 0x0?void 0x0:_0x2dac1f[_0x1062bb(0x1c3)]))throw new AnnError(ApiError_1['ApiError'][_0x1062bb(0x1db)],{'message':_0x1062bb(0x1af)});if((_0x2dac1f===null||_0x2dac1f===void 0x0?void 0x0:_0x2dac1f['signature'])!=this['getsign'](_0x2dac1f))throw new AnnError(ApiError_1[_0x1062bb(0x1b4)][_0x1062bb(0x1d9)]);return!![];}};__decorate([(0x0,core_1['Config'])('anncicapi'),__metadata(a10_0x5d405d(0x1ce),Object)],ApiService[a10_0x5d405d(0x1cf)],a10_0x5d405d(0x1bb),void 0x0),ApiService=__decorate([(0x0,core_1[a10_0x5d405d(0x1d8)])(),(0x0,core_1['Scope'])(core_1['ScopeEnum'][a10_0x5d405d(0x1b5)])],ApiService),exports[a10_0x5d405d(0x1b9)]=ApiService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a11_0xa488bb=a11_0x5047;(function(_0x58debf,_0x5a3dc9){const _0x38e4c8=a11_0x5047,_0x5f1db4=_0x58debf();while(!![]){try{const _0x2da56c=-parseInt(_0x38e4c8(0x7f))/0x1*(-parseInt(_0x38e4c8(0x8d))/0x2)+-parseInt(_0x38e4c8(0xa0))/0x3*(parseInt(_0x38e4c8(0xbb))/0x4)+parseInt(_0x38e4c8(0x95))/0x5*(parseInt(_0x38e4c8(0x7a))/0x6)+-parseInt(_0x38e4c8(0xa6))/0x7*(parseInt(_0x38e4c8(0x8e))/0x8)+-parseInt(_0x38e4c8(0x70))/0x9+parseInt(_0x38e4c8(0x73))/0xa*(parseInt(_0x38e4c8(0x98))/0xb)+parseInt(_0x38e4c8(0xb6))/0xc*(-parseInt(_0x38e4c8(0xa3))/0xd);if(_0x2da56c===_0x5a3dc9)break;else _0x5f1db4['push'](_0x5f1db4['shift']());}catch(_0x41b8c2){_0x5f1db4['push'](_0x5f1db4['shift']());}}}(a11_0x4fb4,0xbaa15));function a11_0x5047(_0x305a27,_0x125a75){const _0x4fb408=a11_0x4fb4();return a11_0x5047=function(_0x5047f7,_0x5e97dc){_0x5047f7=_0x5047f7-0x6a;let _0x147444=_0x4fb408[_0x5047f7];return _0x147444;},a11_0x5047(_0x305a27,_0x125a75);}var __decorate=this&&this['__decorate']||function(_0x3abe94,_0x117bb9,_0x5735c4,_0x347b04){const _0x50f625=a11_0x5047;var _0x4bd620=arguments['length'],_0x1c2cad=_0x4bd620<0x3?_0x117bb9:_0x347b04===null?_0x347b04=Object[_0x50f625(0x6d)](_0x117bb9,_0x5735c4):_0x347b04,_0x427047;if(typeof Reflect===_0x50f625(0x91)&&typeof Reflect[_0x50f625(0x92)]===_0x50f625(0x93))_0x1c2cad=Reflect[_0x50f625(0x92)](_0x3abe94,_0x117bb9,_0x5735c4,_0x347b04);else{for(var _0x47a509=_0x3abe94[_0x50f625(0x7d)]-0x1;_0x47a509>=0x0;_0x47a509--)if(_0x427047=_0x3abe94[_0x47a509])_0x1c2cad=(_0x4bd620<0x3?_0x427047(_0x1c2cad):_0x4bd620>0x3?_0x427047(_0x117bb9,_0x5735c4,_0x1c2cad):_0x427047(_0x117bb9,_0x5735c4))||_0x1c2cad;}return _0x4bd620>0x3&&_0x1c2cad&&Object[_0x50f625(0x76)](_0x117bb9,_0x5735c4,_0x1c2cad),_0x1c2cad;},__metadata=this&&this['__metadata']||function(_0x4b8f45,_0x16259d){const _0x42cdd2=a11_0x5047;if(typeof Reflect===_0x42cdd2(0x91)&&typeof Reflect[_0x42cdd2(0x9b)]==='function')return Reflect[_0x42cdd2(0x9b)](_0x4b8f45,_0x16259d);},__param=this&&this[a11_0xa488bb(0x8f)]||function(_0x2ce1c5,_0x55be41){return function(_0x29a331,_0x289ea7){_0x55be41(_0x29a331,_0x289ea7,_0x2ce1c5);};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ApitestStaticController']=exports[a11_0xa488bb(0x89)]=void 0x0;const path_1=require(a11_0xa488bb(0xa1)),fs_1=require('fs'),core_1=require(a11_0xa488bb(0x78)),core_2=require(a11_0xa488bb(0x78)),core_3=require(a11_0xa488bb(0x78)),getRoutes_1=require(a11_0xa488bb(0x9c));let ApitestService=class ApitestService{async[a11_0xa488bb(0xae)](_0x48b8dd){const _0x5e8d93=a11_0xa488bb,_0x6f716b=(0x0,getRoutes_1['getRoutes'])(_0x48b8dd),_0x2d1517=[];for(let _0x4b720d in _0x6f716b){for(let _0x1f9066 in _0x6f716b[_0x4b720d][_0x5e8d93(0xb3)]){let _0x3845d0=_0x6f716b[_0x4b720d]['routes'][_0x1f9066],_0x12b309=[];for(let _0x40715e in _0x3845d0['request']){_0x12b309[_0x5e8d93(0xba)](_0x3845d0[_0x5e8d93(0xb0)][_0x40715e]);}_0x2d1517[_0x5e8d93(0xba)]({'title':_0x6f716b[_0x4b720d][_0x5e8d93(0x6b)]+':'+_0x3845d0['summary'],'prefix':_0x6f716b[_0x4b720d]['prefix'],'router':_0x3845d0[_0x5e8d93(0xa5)],'method':_0x3845d0[_0x5e8d93(0x6e)],'describe':_0x3845d0[_0x5e8d93(0x8c)]||'','filepath':_0x6f716b[_0x4b720d][_0x5e8d93(0x9d)]||'','request':_0x12b309});}}const _0x4bf147=(0x0,path_1[_0x5e8d93(0x94)])(__dirname,'../../public/index.html');return(0x0,fs_1['readFileSync'])(_0x4bf147,{'encoding':_0x5e8d93(0xb8)})[_0x5e8d93(0x9e)](/__res__/g,_0x5e8d93(0xb4))[_0x5e8d93(0x9e)](_0x5e8d93(0x74),JSON[_0x5e8d93(0x97)](_0x2d1517))[_0x5e8d93(0x9e)](_0x5e8d93(0xa7),JSON[_0x5e8d93(0x97)](this[_0x5e8d93(0x9a)][_0x5e8d93(0xb2)]));}};__decorate([(0x0,core_3[a11_0xa488bb(0xaa)])(a11_0xa488bb(0xb9)),__metadata('design:type',Object)],ApitestService[a11_0xa488bb(0xbc)],a11_0xa488bb(0x9a),void 0x0),ApitestService=__decorate([(0x0,core_2[a11_0xa488bb(0x7c)])(a11_0xa488bb(0x90)),(0x0,core_3[a11_0xa488bb(0xa2)])(core_3[a11_0xa488bb(0x96)][a11_0xa488bb(0x79)])],ApitestService),exports[a11_0xa488bb(0x89)]=ApitestService;function a11_0x4fb4(){const _0xe8832a=['devices','routes','/apiteststatic/','../../public/','24ZeRoJB','Environment','utf-8','anncicapi','push','16tmcOsV','prototype','application/javascript;\x20charset=utf-8','summary','design:type','getOwnPropertyDescriptor','method','content-type','957996FTzsdN','.js','ctx','161410eWxxtn','__apiList__','readFileSync','defineProperty','/apitest','@midwayjs/core','Singleton','7793706uVbaFJ','public,\x20max-age=604800','Provide','length','Request','21uYNfkK','url','design:paramtypes','/apitest-:module','Controller','apitestmodule','design:returntype','ApitestStaticController','substring','Inject','ApitestService','apiteststatic','/index.html','description','35878ITWnoS','872OlhfIu','__param','apitest','object','decorate','function','join','5CoPTMw','ScopeEnum','stringify','869hVWhkR','isDevelopmentEnvironment','config','metadata','../helper/getRoutes','filepath','replace','MidwayEnvironmentService','553659RjutYh','path','Scope','4225013sbMOeC','existsSync','route','44422KJQyoM','__devices__','Param','text/css;\x20charset=utf-8','Config','extname','Get','apitesthtml','apidoc','cache-control','request','set'];a11_0x4fb4=function(){return _0xe8832a;};return a11_0x4fb4();}let ApitestStaticController=class ApitestStaticController{async[a11_0xa488bb(0xad)](){const _0x163451=a11_0xa488bb;if(this[_0x163451(0x90)]){const _0x9b9604={'module':![]};return this[_0x163451(0xb7)][_0x163451(0x99)]()&&(_0x9b9604[_0x163451(0x9d)]=!![]),await this[_0x163451(0x89)]['apidoc'](_0x9b9604);}return'';}async[a11_0xa488bb(0x84)](_0x24df92){const _0x3a1043=a11_0xa488bb;if(this['apitest']){const _0x3aa9c2={'module':_0x24df92};return this[_0x3a1043(0xb7)][_0x3a1043(0x99)]()&&(_0x3aa9c2[_0x3a1043(0x9d)]=!![]),await this['ApitestService'][_0x3a1043(0xae)](_0x3aa9c2);}return'';}async['apiteststatic'](){const _0x1f25b8=a11_0xa488bb;if((0x0,path_1[_0x1f25b8(0xab)])(this[_0x1f25b8(0x72)]['request'][_0x1f25b8(0x80)])){var _0x26daa1=(0x0,path_1[_0x1f25b8(0x94)])(__dirname,_0x1f25b8(0xb5)+this['ctx']['request'][_0x1f25b8(0x80)]['replace']('/apiteststatic/','/'));if(_0x26daa1[_0x1f25b8(0x87)](_0x26daa1[_0x1f25b8(0x7d)]-0xb)!=_0x1f25b8(0x8b)){this[_0x1f25b8(0x72)]['set'](_0x1f25b8(0xaf),_0x1f25b8(0x7b));if((0x0,path_1[_0x1f25b8(0xab)])(this[_0x1f25b8(0x72)][_0x1f25b8(0xb0)]['url'])==_0x1f25b8(0x71))this[_0x1f25b8(0x72)][_0x1f25b8(0xb1)](_0x1f25b8(0x6f),_0x1f25b8(0x6a));else(0x0,path_1[_0x1f25b8(0xab)])(this[_0x1f25b8(0x72)][_0x1f25b8(0xb0)][_0x1f25b8(0x80)])=='.css'&&this[_0x1f25b8(0x72)][_0x1f25b8(0xb1)](_0x1f25b8(0x6f),_0x1f25b8(0xa9));return(0x0,fs_1[_0x1f25b8(0xa4)])(_0x26daa1)&&(0x0,fs_1[_0x1f25b8(0x75)])(_0x26daa1,{'encoding':_0x1f25b8(0xb8)});}}return'';}};__decorate([(0x0,core_3[a11_0xa488bb(0x88)])(),__metadata(a11_0xa488bb(0x6c),Object)],ApitestStaticController[a11_0xa488bb(0xbc)],a11_0xa488bb(0x72),void 0x0),__decorate([(0x0,core_3[a11_0xa488bb(0x88)])(),__metadata(a11_0xa488bb(0x6c),core_1[a11_0xa488bb(0x9f)])],ApitestStaticController['prototype'],a11_0xa488bb(0xb7),void 0x0),__decorate([(0x0,core_3[a11_0xa488bb(0x88)])(),__metadata(a11_0xa488bb(0x6c),ApitestService)],ApitestStaticController['prototype'],'ApitestService',void 0x0),__decorate([(0x0,core_3[a11_0xa488bb(0xaa)])(a11_0xa488bb(0x90)),__metadata(a11_0xa488bb(0x6c),Boolean)],ApitestStaticController[a11_0xa488bb(0xbc)],a11_0xa488bb(0x90),void 0x0),__decorate([(0x0,core_3['Config'])('anncicapi'),__metadata(a11_0xa488bb(0x6c),Object)],ApitestStaticController[a11_0xa488bb(0xbc)],a11_0xa488bb(0x9a),void 0x0),__decorate([(0x0,core_2[a11_0xa488bb(0xac)])(a11_0xa488bb(0x77)),__metadata(a11_0xa488bb(0x6c),Function),__metadata(a11_0xa488bb(0x81),[]),__metadata('design:returntype',Promise)],ApitestStaticController[a11_0xa488bb(0xbc)],'apitesthtml',null),__decorate([(0x0,core_2[a11_0xa488bb(0xac)])(a11_0xa488bb(0x82)),__param(0x0,(0x0,core_2[a11_0xa488bb(0xa8)])('module')),__metadata(a11_0xa488bb(0x6c),Function),__metadata(a11_0xa488bb(0x81),[String]),__metadata('design:returntype',Promise)],ApitestStaticController[a11_0xa488bb(0xbc)],a11_0xa488bb(0x84),null),__decorate([(0x0,core_2[a11_0xa488bb(0xac)])('/apiteststatic/*'),__metadata(a11_0xa488bb(0x6c),Function),__metadata(a11_0xa488bb(0x81),[]),__metadata(a11_0xa488bb(0x85),Promise)],ApitestStaticController[a11_0xa488bb(0xbc)],a11_0xa488bb(0x8a),null),ApitestStaticController=__decorate([(0x0,core_2[a11_0xa488bb(0x83)])('/'),(0x0,core_3[a11_0xa488bb(0xa2)])(core_3[a11_0xa488bb(0x96)][a11_0xa488bb(0x7e)])],ApitestStaticController),exports[a11_0xa488bb(0x86)]=ApitestStaticController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const a12_0x2d420b=a12_0x1f30;(function(_0x1bb75e,_0x53caba){const _0x728184=a12_0x1f30,_0x12319b=_0x1bb75e();while(!![]){try{const _0x58073e=parseInt(_0x728184(0x142))/0x1*(-parseInt(_0x728184(0x155))/0x2)+parseInt(_0x728184(0x166))/0x3*(-parseInt(_0x728184(0x148))/0x4)+-parseInt(_0x728184(0x13f))/0x5+parseInt(_0x728184(0x140))/0x6+-parseInt(_0x728184(0x143))/0x7+parseInt(_0x728184(0x16c))/0x8*(-parseInt(_0x728184(0x154))/0x9)+parseInt(_0x728184(0x156))/0xa;if(_0x58073e===_0x53caba)break;else _0x12319b['push'](_0x12319b['shift']());}catch(_0x2b5761){_0x12319b['push'](_0x12319b['shift']());}}}(a12_0x4831,0x5f8ea));function a12_0x1f30(_0x348ad7,_0x2fb51d){const _0x483181=a12_0x4831();return a12_0x1f30=function(_0x1f3009,_0x3ed62d){_0x1f3009=_0x1f3009-0x13c;let _0x20b68c=_0x483181[_0x1f3009];return _0x20b68c;},a12_0x1f30(_0x348ad7,_0x2fb51d);}function a12_0x4831(){const _0x190cf1=['function','key','header','856hrtREe','toString','replace','xlsx','frozen','Singleton','columns','__metadata','download','addWorksheet','metadata','koa-send','app','addRow','decorate','endsWith','Api\x20Excel\x20Error:\x20','parse','value','length','startsWith','rowCount','getCell','2359750cgKzYZ','638106MgyoFe','findRows','1713RpMAeg','1061809ockDtu','Sheet\x201','public/xlsx','prototype','object','49684AXmInw','writeFile','cellCount','__esModule','worksheets','random','Provide','App','push','col','mkdirSync','readFile','8172GfNtkH','734UwvDLq','21313550wVWGoa','handler','keys','defineProperty','getWorksheet','getAppDir','model','exceljs','isNumber','substring','ExcelService','Workbook','__decorate','log','getRow','export','120vufVsI','getOwnPropertyDescriptor','design:type'];a12_0x4831=function(){return _0x190cf1;};return a12_0x4831();}var __decorate=this&&this[a12_0x2d420b(0x162)]||function(_0xc3221f,_0x52a3d0,_0x289b0b,_0x485982){const _0x5af574=a12_0x2d420b;var _0x3dc470=arguments[_0x5af574(0x17f)],_0x38c909=_0x3dc470<0x3?_0x52a3d0:_0x485982===null?_0x485982=Object[_0x5af574(0x167)](_0x52a3d0,_0x289b0b):_0x485982,_0x48ced8;if(typeof Reflect==='object'&&typeof Reflect[_0x5af574(0x17a)]===_0x5af574(0x169))_0x38c909=Reflect[_0x5af574(0x17a)](_0xc3221f,_0x52a3d0,_0x289b0b,_0x485982);else{for(var _0x5c74ab=_0xc3221f[_0x5af574(0x17f)]-0x1;_0x5c74ab>=0x0;_0x5c74ab--)if(_0x48ced8=_0xc3221f[_0x5c74ab])_0x38c909=(_0x3dc470<0x3?_0x48ced8(_0x38c909):_0x3dc470>0x3?_0x48ced8(_0x52a3d0,_0x289b0b,_0x38c909):_0x48ced8(_0x52a3d0,_0x289b0b))||_0x38c909;}return _0x3dc470>0x3&&_0x38c909&&Object[_0x5af574(0x159)](_0x52a3d0,_0x289b0b,_0x38c909),_0x38c909;},__metadata=this&&this[a12_0x2d420b(0x173)]||function(_0x50bba0,_0x3f507e){const _0x51c1ad=a12_0x2d420b;if(typeof Reflect===_0x51c1ad(0x147)&&typeof Reflect[_0x51c1ad(0x176)]===_0x51c1ad(0x169))return Reflect[_0x51c1ad(0x176)](_0x50bba0,_0x3f507e);};Object['defineProperty'](exports,a12_0x2d420b(0x14b),{'value':!![]}),exports[a12_0x2d420b(0x160)]=void 0x0;const fs=require('fs'),exceljs=require(a12_0x2d420b(0x15d)),koasend=require(a12_0x2d420b(0x177)),core_1=require('@midwayjs/core');let ExcelService=class ExcelService{async[a12_0x2d420b(0x17d)](_0x271b39,_0x5eaefb,_0xc836a2=[0x0]){const _0x3156a0=a12_0x2d420b;var _0x30ccaa,_0x9e6b1b;const _0x4efb0b=new exceljs[(_0x3156a0(0x161))](),_0x128bea=[];let _0x298423=_0x271b39['replace'](/(\\|\/)/g,'/')[_0x3156a0(0x16e)](/\/{2,}/g,'/');!(_0x298423===null||_0x298423===void 0x0?void 0x0:_0x298423['startsWith']('/'))&&(_0x298423=this[_0x3156a0(0x178)]['getAppDir']()+'/'+_0x298423);try{await _0x4efb0b[_0x3156a0(0x16f)][_0x3156a0(0x153)](_0x298423);}catch(_0x170e20){return console[_0x3156a0(0x163)](_0x3156a0(0x17c)+_0x298423+'\x20is\x20read\x20fail'),_0x128bea;}for(const _0x55f2a4 of _0xc836a2){const _0x463da1=lodash[_0x3156a0(0x15e)](_0x55f2a4)?((_0x30ccaa=_0x4efb0b[_0x3156a0(0x14c)])===null||_0x30ccaa===void 0x0?void 0x0:_0x30ccaa[_0x55f2a4])||undefined:_0x4efb0b[_0x3156a0(0x15a)](_0x55f2a4);if(_0x463da1){var _0x1693aa=0x1;const _0x10902a=_0x463da1[_0x3156a0(0x164)](0x1),_0x290d15=await new Promise(_0x42bc7e=>{const _0x54e283={};_0x10902a['eachCell']((_0x364265,_0x3097f0)=>{const _0x458fc1=a12_0x1f30;for(const _0x2ce7b2 of _0x5eaefb){if(_0x364265[_0x458fc1(0x17e)]==_0x2ce7b2[_0x458fc1(0x16b)])_0x1693aa=0x2,_0x54e283[_0x2ce7b2['key']]={'header':_0x364265['col'],'handler':_0x2ce7b2[_0x458fc1(0x157)]};else{if(!_0x54e283[_0x2ce7b2['key']])try{const _0x59c640=_0x10902a[_0x458fc1(0x13e)](_0x2ce7b2['header']);_0x59c640&&(_0x54e283[_0x2ce7b2[_0x458fc1(0x16a)]]={'header':_0x59c640[_0x458fc1(0x151)],'handler':_0x2ce7b2[_0x458fc1(0x157)]});}catch{}}}_0x10902a[_0x458fc1(0x14a)]==_0x3097f0&&_0x42bc7e(_0x54e283);});});for(const _0x497a09 of _0x463da1[_0x3156a0(0x141)](_0x1693aa,_0x463da1[_0x3156a0(0x13d)])){const _0x16a238={};for(const _0x55ac60 in _0x290d15){if(_0x290d15[_0x55ac60][_0x3156a0(0x16b)]){const _0xccc0c2=_0x497a09['getCell'](_0x290d15[_0x55ac60][_0x3156a0(0x16b)]);typeof((_0x9e6b1b=_0x290d15[_0x55ac60])===null||_0x9e6b1b===void 0x0?void 0x0:_0x9e6b1b[_0x3156a0(0x157)])=='function'?_0x16a238[_0x55ac60]=await _0x290d15[_0x55ac60][_0x3156a0(0x157)]((_0xccc0c2===null||_0xccc0c2===void 0x0?void 0x0:_0xccc0c2[_0x3156a0(0x16d)]())||'',_0xccc0c2[_0x3156a0(0x15c)]):_0x16a238[_0x55ac60]=(_0xccc0c2===null||_0xccc0c2===void 0x0?void 0x0:_0xccc0c2[_0x3156a0(0x16d)]())||'';}}Object[_0x3156a0(0x158)](_0x16a238)['length']>0x0&&_0x128bea[_0x3156a0(0x150)](_0x16a238);}}}return _0x128bea;}async[a12_0x2d420b(0x165)](_0x57f3f4,_0xaf0ad0,_0x182215,_0x2c59f7=a12_0x2d420b(0x145)){const _0x630fd8=a12_0x2d420b;var _0x1dcb4f,_0x308dc7;const _0x1cda9d=new exceljs[(_0x630fd8(0x161))](),_0x43bd1={},_0x3bd135=[],_0x119411=_0x1cda9d[_0x630fd8(0x175)](_0x630fd8(0x144),{'views':[{'state':_0x630fd8(0x170),'xSplit':0x1}]});for(const _0x230a42 in _0xaf0ad0){_0x43bd1[_0xaf0ad0[_0x230a42][_0x630fd8(0x16a)]]=_0xaf0ad0[_0x230a42]['header'],_0x3bd135[_0x630fd8(0x150)]({'header':_0xaf0ad0[_0x230a42][_0x630fd8(0x16b)],'key':(_0x1dcb4f=_0xaf0ad0[_0x230a42])===null||_0x1dcb4f===void 0x0?void 0x0:_0x1dcb4f[_0x630fd8(0x16a)][_0x630fd8(0x16e)](/\./g,'_')});}_0x119411[_0x630fd8(0x172)]=_0x3bd135;for(const _0x55c4e4 of _0x182215){const _0x5ba72b={};for(const _0x45a5b0 in _0xaf0ad0){typeof((_0x308dc7=_0xaf0ad0[_0x45a5b0])===null||_0x308dc7===void 0x0?void 0x0:_0x308dc7[_0x630fd8(0x157)])==_0x630fd8(0x169)?_0x5ba72b[_0xaf0ad0[_0x45a5b0][_0x630fd8(0x16a)][_0x630fd8(0x16e)](/\./g,'_')]=await _0xaf0ad0[_0x45a5b0][_0x630fd8(0x157)](_0x55c4e4):_0x5ba72b[_0xaf0ad0[_0x45a5b0][_0x630fd8(0x16a)][_0x630fd8(0x16e)](/\./g,'_')]=lodash['get'](_0x55c4e4,_0xaf0ad0[_0x45a5b0][_0x630fd8(0x16a)],'');}_0x119411[_0x630fd8(0x179)](_0x5ba72b);}let _0x4c0938='';const _0x58b888=_0x57f3f4+'-'+lodash[_0x630fd8(0x14d)](0x2710,0x1869f)+'.xlsx';if(_0x2c59f7&&_0x2c59f7['startsWith']('/'))_0x4c0938=''+_0x2c59f7;else _0x2c59f7&&!_0x2c59f7[_0x630fd8(0x13c)]('/')&&!_0x2c59f7['startsWith']('\x5c')?_0x4c0938=this['app'][_0x630fd8(0x15b)]()+'/'+_0x2c59f7:_0x4c0938=this[_0x630fd8(0x178)][_0x630fd8(0x15b)]()+'/public/xlsx';return(_0x4c0938[_0x630fd8(0x17b)]('/')||_0x4c0938[_0x630fd8(0x17b)]('\x5c'))&&(_0x4c0938=_0x4c0938[_0x630fd8(0x15f)](0x0,_0x4c0938['length']-0x1)),_0x4c0938=_0x4c0938[_0x630fd8(0x16e)](/(\\|\/)/g,'/')[_0x630fd8(0x16e)](/\/{2,}/g,'/'),!fs['existsSync'](_0x4c0938)&&fs[_0x630fd8(0x152)](_0x4c0938,{'recursive':!![]}),await _0x1cda9d[_0x630fd8(0x16f)][_0x630fd8(0x149)]((_0x4c0938+'/'+_0x58b888)[_0x630fd8(0x16e)](/(\\|\/)/g,'/')[_0x630fd8(0x16e)](/\/{2,}/g,'/')),{'filename':_0x58b888,'filepath':(_0x4c0938[_0x630fd8(0x15f)]((''+this[_0x630fd8(0x178)][_0x630fd8(0x15b)]())[_0x630fd8(0x17f)])+'/'+_0x58b888)[_0x630fd8(0x16e)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/')};}async[a12_0x2d420b(0x174)](_0x12eb3a,_0x1e835a){return await koasend(_0x12eb3a,''+_0x1e835a);}};__decorate([(0x0,core_1[a12_0x2d420b(0x14f)])(),__metadata(a12_0x2d420b(0x168),Object)],ExcelService[a12_0x2d420b(0x146)],a12_0x2d420b(0x178),void 0x0),ExcelService=__decorate([(0x0,core_1[a12_0x2d420b(0x14e)])(),(0x0,core_1['Scope'])(core_1['ScopeEnum'][a12_0x2d420b(0x171)])],ExcelService),exports['ExcelService']=ExcelService;
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a13_0x2f70bb=a13_0x11b6;(function(_0x2d1d7d,_0x2ca165){var _0x6f5e38=a13_0x11b6,_0x35a98e=_0x2d1d7d();while(!![]){try{var _0x566935=parseInt(_0x6f5e38(0xee))/0x1+parseInt(_0x6f5e38(0xe0))/0x2+parseInt(_0x6f5e38(0xdf))/0x3+parseInt(_0x6f5e38(0xeb))/0x4+-parseInt(_0x6f5e38(0xde))/0x5*(-parseInt(_0x6f5e38(0xe5))/0x6)+-parseInt(_0x6f5e38(0xe2))/0x7*(-parseInt(_0x6f5e38(0xe6))/0x8)+-parseInt(_0x6f5e38(0xe3))/0x9*(parseInt(_0x6f5e38(0xec))/0xa);if(_0x566935===_0x2ca165)break;else _0x35a98e['push'](_0x35a98e['shift']());}catch(_0xe055e1){_0x35a98e['push'](_0x35a98e['shift']());}}}(a13_0x3a57,0xa3a13));function a13_0x3a57(){var _0x3ba685=['1576884HOeGIJ','544630HatRJz','ACTION_KEY','980434OagQkd','9cCNVbi','APPSCONFIG_KEY','146706FLAGeS','24WcFZew','anncic-api:action','ACTION_ROUTE_KEY','__esModule','defineProperty','2773512OhtSyZ','25783250vEyLia','anncic-api:action:route','872476UeYndk','AppsConfigTmp','95mURJJH'];a13_0x3a57=function(){return _0x3ba685;};return a13_0x3a57();}Object[a13_0x2f70bb(0xea)](exports,a13_0x2f70bb(0xe9),{'value':!![]}),exports[a13_0x2f70bb(0xdd)]=exports['APPSCONFIG_KEY']=exports[a13_0x2f70bb(0xe8)]=exports[a13_0x2f70bb(0xe1)]=void 0x0,exports['ACTION_KEY']=a13_0x2f70bb(0xe7),exports[a13_0x2f70bb(0xe8)]=a13_0x2f70bb(0xed),exports[a13_0x2f70bb(0xe4)]='anncic-api:apps:config';class AppsConfigTmp{}function a13_0x11b6(_0xcea46d,_0x552fa3){var _0x3a57a9=a13_0x3a57();return a13_0x11b6=function(_0x11b6fe,_0x4a933d){_0x11b6fe=_0x11b6fe-0xdd;var _0x1fdf4f=_0x3a57a9[_0x11b6fe];return _0x1fdf4f;},a13_0x11b6(_0xcea46d,_0x552fa3);}exports[a13_0x2f70bb(0xdd)]=AppsConfigTmp;
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a14_0x3b9057=a14_0x3d03;function a14_0x3d03(_0x114647,_0x551741){var _0x3852c5=a14_0x3852();return a14_0x3d03=function(_0x3d036c,_0x4f1e08){_0x3d036c=_0x3d036c-0x182;var _0xf19c10=_0x3852c5[_0x3d036c];return _0xf19c10;},a14_0x3d03(_0x114647,_0x551741);}(function(_0x39e1f2,_0x20bae2){var _0xea3a3d=a14_0x3d03,_0x1bd379=_0x39e1f2();while(!![]){try{var _0x585955=-parseInt(_0xea3a3d(0x194))/0x1*(-parseInt(_0xea3a3d(0x18a))/0x2)+-parseInt(_0xea3a3d(0x19a))/0x3+-parseInt(_0xea3a3d(0x197))/0x4*(-parseInt(_0xea3a3d(0x1a3))/0x5)+parseInt(_0xea3a3d(0x18c))/0x6*(-parseInt(_0xea3a3d(0x190))/0x7)+parseInt(_0xea3a3d(0x18f))/0x8*(parseInt(_0xea3a3d(0x1a5))/0x9)+parseInt(_0xea3a3d(0x186))/0xa*(parseInt(_0xea3a3d(0x1a2))/0xb)+parseInt(_0xea3a3d(0x19c))/0xc*(parseInt(_0xea3a3d(0x18b))/0xd);if(_0x585955===_0x20bae2)break;else _0x1bd379['push'](_0x1bd379['shift']());}catch(_0xe7ebe1){_0x1bd379['push'](_0x1bd379['shift']());}}}(a14_0x3852,0x343f1));var __decorate=this&&this[a14_0x3b9057(0x199)]||function(_0x437f98,_0x55de56,_0x406924,_0xf22584){var _0xc580=a14_0x3b9057,_0x70e7ee=arguments[_0xc580(0x1a0)],_0xde7f1f=_0x70e7ee<0x3?_0x55de56:_0xf22584===null?_0xf22584=Object[_0xc580(0x184)](_0x55de56,_0x406924):_0xf22584,_0x4b5c40;if(typeof Reflect===_0xc580(0x1a6)&&typeof Reflect['decorate']==='function')_0xde7f1f=Reflect[_0xc580(0x19d)](_0x437f98,_0x55de56,_0x406924,_0xf22584);else{for(var _0x321236=_0x437f98['length']-0x1;_0x321236>=0x0;_0x321236--)if(_0x4b5c40=_0x437f98[_0x321236])_0xde7f1f=(_0x70e7ee<0x3?_0x4b5c40(_0xde7f1f):_0x70e7ee>0x3?_0x4b5c40(_0x55de56,_0x406924,_0xde7f1f):_0x4b5c40(_0x55de56,_0x406924))||_0xde7f1f;}return _0x70e7ee>0x3&&_0xde7f1f&&Object[_0xc580(0x189)](_0x55de56,_0x406924,_0xde7f1f),_0xde7f1f;},__metadata=this&&this[a14_0x3b9057(0x1a4)]||function(_0x20115f,_0x27b0c0){var _0x45555d=a14_0x3b9057;if(typeof Reflect===_0x45555d(0x1a6)&&typeof Reflect['metadata']===_0x45555d(0x18d))return Reflect['metadata'](_0x20115f,_0x27b0c0);};Object[a14_0x3b9057(0x189)](exports,'__esModule',{'value':!![]}),exports['PageDTO']=void 0x0;const validator_1=require(a14_0x3b9057(0x191));class PageDTO{}__decorate([(0x0,validator_1['Rule'])('分页',validator_1[a14_0x3b9057(0x19e)]['number']()['integer']()[a14_0x3b9057(0x196)](0x1),a14_0x3b9057(0x193)),__metadata(a14_0x3b9057(0x18e),Number)],PageDTO['prototype'],'_page',void 0x0),__decorate([(0x0,validator_1[a14_0x3b9057(0x185)])('分页数量',validator_1[a14_0x3b9057(0x19e)][a14_0x3b9057(0x183)]()[a14_0x3b9057(0x188)]()['min'](0x1)),__metadata(a14_0x3b9057(0x18e),Number)],PageDTO[a14_0x3b9057(0x19b)],a14_0x3b9057(0x182),void 0x0),__decorate([(0x0,validator_1[a14_0x3b9057(0x185)])('排序方式',validator_1[a14_0x3b9057(0x19e)][a14_0x3b9057(0x1a8)]()[a14_0x3b9057(0x192)]()),__metadata(a14_0x3b9057(0x18e),String)],PageDTO[a14_0x3b9057(0x19b)],a14_0x3b9057(0x195),void 0x0),__decorate([(0x0,validator_1[a14_0x3b9057(0x185)])(a14_0x3b9057(0x19f),validator_1[a14_0x3b9057(0x19e)]['number']()[a14_0x3b9057(0x188)]()[a14_0x3b9057(0x1a1)](0x0,0x1),a14_0x3b9057(0x1a7)),__metadata(a14_0x3b9057(0x18e),Number)],PageDTO['prototype'],a14_0x3b9057(0x198),void 0x0),exports[a14_0x3b9057(0x187)]=PageDTO;function a14_0x3852(){var _0x465c60=['5709XgDNvX','535070euIZnQ','__metadata','7902dpmupJ','object','1:是;0:否','string','_size','number','getOwnPropertyDescriptor','Rule','5480EUZCiv','PageDTO','integer','defineProperty','43570VbZEfQ','913055pyjaZj','140016POJlCg','function','design:type','1856MaDbmU','119eSvfGW','@anncic-api/validator','trim','第一页为1,第二页为2','14YnUUzy','_order','min','4BakFzc','_isreverse','__decorate','1078902aSbOmw','prototype','12fSwGNx','decorate','RuleType','是否倒序','length','valid'];a14_0x3852=function(){return _0x465c60;};return a14_0x3852();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.12",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@anncic-api/cache": "^1.4.
|
|
21
|
-
"@anncic-api/core": "^1.4.
|
|
22
|
-
"@anncic-api/event": "^1.4.
|
|
23
|
-
"@anncic-api/typeorm": "^1.4.
|
|
24
|
-
"@anncic-api/validator": "^1.4.
|
|
20
|
+
"@anncic-api/cache": "^1.4.12",
|
|
21
|
+
"@anncic-api/core": "^1.4.12",
|
|
22
|
+
"@anncic-api/event": "^1.4.12",
|
|
23
|
+
"@anncic-api/typeorm": "^1.4.12",
|
|
24
|
+
"@anncic-api/validator": "^1.4.12",
|
|
25
25
|
"@midwayjs/cross-domain": "^3.8.0",
|
|
26
26
|
"@midwayjs/i18n": "^3.8.0",
|
|
27
27
|
"@midwayjs/koa": "^3.8.0",
|
|
28
28
|
"@midwayjs/static-file": "^3.8.0",
|
|
29
29
|
"@midwayjs/upload": "^3.8.0",
|
|
30
|
-
"anncic-apihelper": "^1.4.
|
|
30
|
+
"anncic-apihelper": "^1.4.12",
|
|
31
31
|
"exceljs": "^4.3.0",
|
|
32
32
|
"koa-send": "^5.0.1"
|
|
33
33
|
},
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"cross-env": "^7.0.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "7bdd9be96d43d085128a64bb2121ebf37696468b"
|
|
43
43
|
}
|