anvero-api 0.0.0-stage → 3.0.1
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.d.ts +47 -0
- package/dist/config/config.default.js +1 -0
- package/dist/config/config.local.d.ts +6 -0
- package/dist/config/config.local.js +1 -0
- package/dist/config/config.production.d.ts +5 -0
- package/dist/config/config.production.js +1 -0
- package/dist/configuration.d.ts +17 -0
- package/dist/configuration.js +1 -0
- package/dist/decorator/Action.d.ts +14 -0
- package/dist/decorator/Action.js +1 -0
- package/dist/decorator/ActionApitest.d.ts +2 -0
- package/dist/decorator/ActionApitest.js +1 -0
- package/dist/decorator/Intercept.d.ts +5 -0
- package/dist/decorator/Intercept.js +1 -0
- package/dist/exception/ApiError.d.ts +8 -0
- package/dist/exception/ApiError.js +1 -0
- package/dist/helper/getAppsConfig.d.ts +1 -0
- package/dist/helper/getAppsConfig.js +1 -0
- package/dist/helper/getRoutes.d.ts +13 -0
- package/dist/helper/getRoutes.js +1 -0
- package/dist/helper/getSwaggerJson.d.ts +40 -0
- package/dist/helper/getSwaggerJson.js +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +1 -0
- package/dist/service/ApiService.d.ts +12 -0
- package/dist/service/ApiService.js +1 -0
- package/dist/service/ApitestService.d.ts +19 -0
- package/dist/service/ApitestService.js +1 -0
- package/dist/service/ExcelService.d.ts +46 -0
- package/dist/service/ExcelService.js +1 -0
- package/dist/service/ExcelStream.d.ts +52 -0
- package/dist/service/ExcelStream.js +1 -0
- package/dist/types/action.d.ts +47 -0
- package/dist/types/action.js +1 -0
- package/dist/types/common.d.ts +13 -0
- package/dist/types/common.js +1 -0
- package/dist/types/intercept.d.ts +3 -0
- package/dist/types/intercept.js +1 -0
- package/index.d.ts +50 -0
- package/package.json +40 -3
- package/public/apitest.js +946 -0
- package/public/config.js +95 -0
- package/public/index.html +110 -0
- package/public/style/apitest.css +128 -0
- package/public/style/bootstrap/bootstrap.css +6799 -0
- package/public/style/bootstrap/bootstrap.js +2363 -0
- package/public/style/bootstrap.css +6799 -0
- package/public/style/bootstrap.css.map +1 -0
- package/public/style/jquery/jquery.min.js +6 -0
- package/public/style/md5/md5.js +1 -0
- package/public/style/pinyin.js +45 -0
- package/public/style/pretty-json/backbone-min.js +2 -0
- package/public/style/pretty-json/pretty-json-min.js +334 -0
- package/public/style/pretty-json/pretty-json.css +48 -0
- package/public/style/pretty-json/underscore-min.js +6 -0
- package/public/style/pretty-json.css +48 -0
- package/README.md +0 -3
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
declare const _default: (appinfo: any) => {
|
|
2
|
+
apitest: boolean;
|
|
3
|
+
keys: any;
|
|
4
|
+
anveroapi: {
|
|
5
|
+
requestKey: string;
|
|
6
|
+
password: string;
|
|
7
|
+
devices: {
|
|
8
|
+
DEFAULT: {
|
|
9
|
+
secret: string;
|
|
10
|
+
checkcode: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
koa: {
|
|
15
|
+
proxy: boolean;
|
|
16
|
+
};
|
|
17
|
+
midwayLogger: {
|
|
18
|
+
default: {
|
|
19
|
+
maxSize: string;
|
|
20
|
+
maxFiles: string;
|
|
21
|
+
dir: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
bodyParser: {
|
|
25
|
+
enableTypes: string[];
|
|
26
|
+
formLimit: string;
|
|
27
|
+
jsonLimit: string;
|
|
28
|
+
textLimit: string;
|
|
29
|
+
xmlLimit: string;
|
|
30
|
+
enable: boolean;
|
|
31
|
+
};
|
|
32
|
+
upload: {
|
|
33
|
+
tmpdir: string;
|
|
34
|
+
cleanTimeout: number;
|
|
35
|
+
};
|
|
36
|
+
busboy: {
|
|
37
|
+
mode: string;
|
|
38
|
+
tmpdir: string;
|
|
39
|
+
cleanTimeout: number;
|
|
40
|
+
};
|
|
41
|
+
bull: {
|
|
42
|
+
defaultQueueOptions: {
|
|
43
|
+
prefix: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a0_0x5124(){var _0x53939a=['defineProperty','constructor','/runtime/.upload','8IsLoef','1654000WzfDiX','appDir','form','env','3831183ZfeamL','20mb','390768BQTplu','dhauo1234420123gg3234901','52080wSAara','16XBUDPp','file','621269XCrtvc','_token','270d','name','/runtime','779043hjAPPh','search','(((.+)+)+)+$','text','648cDGuiN','{midway-bull}{','330vMYIGK','55986dPkpIw','xml','default','zhiulanuiy7892387985hnoi'];a0_0x5124=function(){return _0x53939a;};return a0_0x5124();}var a0_0x3d95f4=a0_0x23dd;(function(_0x2b4944,_0x3d7fe6){var _0x2cb32d=a0_0x23dd,_0x4582d3=_0x2b4944();while(!![]){try{var _0x3b5448=parseInt(_0x2cb32d(0x188))/0x1+-parseInt(_0x2cb32d(0x196))/0x2*(parseInt(_0x2cb32d(0x19d))/0x3)+parseInt(_0x2cb32d(0x19f))/0x4+parseInt(_0x2cb32d(0x197))/0x5+-parseInt(_0x2cb32d(0x18c))/0x6*(-parseInt(_0x2cb32d(0x18f))/0x7)+-parseInt(_0x2cb32d(0x181))/0x8*(-parseInt(_0x2cb32d(0x19b))/0x9)+-parseInt(_0x2cb32d(0x18e))/0xa*(parseInt(_0x2cb32d(0x183))/0xb);if(_0x3b5448===_0x3d7fe6)break;else _0x4582d3['push'](_0x4582d3['shift']());}catch(_0x3803e3){_0x4582d3['push'](_0x4582d3['shift']());}}}(a0_0x5124,0x6ea46));var a0_0x40d4e2=(function(){var _0x4ea69e=!![];return function(_0x1645d3,_0x30ba3c){var _0x386088=_0x4ea69e?function(){if(_0x30ba3c){var _0x43b266=_0x30ba3c['apply'](_0x1645d3,arguments);return _0x30ba3c=null,_0x43b266;}}:function(){};return _0x4ea69e=![],_0x386088;};}()),a0_0x53d608=a0_0x40d4e2(this,function(){var _0x1ad2aa=a0_0x23dd;return a0_0x53d608['toString']()[_0x1ad2aa(0x189)](_0x1ad2aa(0x18a))['toString']()[_0x1ad2aa(0x194)](a0_0x53d608)['search'](_0x1ad2aa(0x18a));});a0_0x53d608();'use strict';function a0_0x23dd(_0x482cd7,_0x5a4ce2){_0x482cd7=_0x482cd7-0x181;var _0x212b98=a0_0x5124();var _0x53d608=_0x212b98[_0x482cd7];return _0x53d608;}Object[a0_0x3d95f4(0x193)](exports,'__esModule',{'value':!![]}),exports[a0_0x3d95f4(0x191)]=_0x33b5e0=>{var _0x2efe89=a0_0x3d95f4;return{'apitest':!![],'keys':_0x33b5e0[_0x2efe89(0x186)],'anveroapi':{'requestKey':_0x2efe89(0x184),'password':_0x2efe89(0x192),'devices':{'DEFAULT':{'secret':_0x2efe89(0x19e),'checkcode':_0x2efe89(0x19e)}}},'koa':{'proxy':!![]},'midwayLogger':{'default':{'maxSize':'1m','maxFiles':_0x2efe89(0x185),'dir':_0x33b5e0['appDir']+_0x2efe89(0x187)}},'bodyParser':{'enableTypes':['json',_0x2efe89(0x199),_0x2efe89(0x18b),_0x2efe89(0x190)],'formLimit':'20mb','jsonLimit':'20mb','textLimit':_0x2efe89(0x19c),'xmlLimit':_0x2efe89(0x19c),'enable':!![]},'upload':{'tmpdir':_0x33b5e0['appDir']+_0x2efe89(0x195),'cleanTimeout':0x5265c00},'busboy':{'mode':_0x2efe89(0x182),'tmpdir':_0x33b5e0[_0x2efe89(0x198)]+'/runtime/.upload','cleanTimeout':0x5265c00},'bull':{'defaultQueueOptions':{'prefix':_0x2efe89(0x18d)+_0x33b5e0['name']+':'+((_0x33b5e0===null||_0x33b5e0===void 0x0?void 0x0:_0x33b5e0[_0x2efe89(0x19a)])?_0x33b5e0[_0x2efe89(0x19a)]+':':'')+')'}}};};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a1_0x3d2d63=a1_0x478d;(function(_0x5191a0,_0x8f2447){var _0x15c60b=a1_0x478d,_0x3dabeb=_0x5191a0();while(!![]){try{var _0x5c0952=parseInt(_0x15c60b(0xf1))/0x1*(parseInt(_0x15c60b(0xeb))/0x2)+parseInt(_0x15c60b(0xe6))/0x3*(-parseInt(_0x15c60b(0xed))/0x4)+parseInt(_0x15c60b(0xf0))/0x5*(-parseInt(_0x15c60b(0xf7))/0x6)+-parseInt(_0x15c60b(0xf9))/0x7+parseInt(_0x15c60b(0xea))/0x8*(-parseInt(_0x15c60b(0xe9))/0x9)+-parseInt(_0x15c60b(0xee))/0xa+-parseInt(_0x15c60b(0xec))/0xb*(-parseInt(_0x15c60b(0xef))/0xc);if(_0x5c0952===_0x8f2447)break;else _0x3dabeb['push'](_0x3dabeb['shift']());}catch(_0x7d0d77){_0x3dabeb['push'](_0x3dabeb['shift']());}}}(a1_0x3d35,0x93979));var a1_0x3ea87c=(function(){var _0x29f84e=!![];return function(_0x20cfbb,_0x2a9366){var _0x304052=_0x29f84e?function(){var _0x1f3201=a1_0x478d;if(_0x2a9366){var _0x377482=_0x2a9366[_0x1f3201(0xf4)](_0x20cfbb,arguments);return _0x2a9366=null,_0x377482;}}:function(){};return _0x29f84e=![],_0x304052;};}()),a1_0x165352=a1_0x3ea87c(this,function(){var _0x7cf5ea=a1_0x478d;return a1_0x165352[_0x7cf5ea(0xf3)]()[_0x7cf5ea(0xf8)]('(((.+)+)+)+$')[_0x7cf5ea(0xf3)]()[_0x7cf5ea(0xf5)](a1_0x165352)[_0x7cf5ea(0xf8)](_0x7cf5ea(0xe8));});a1_0x165352();function a1_0x478d(_0x284820,_0x57903e){_0x284820=_0x284820-0xe6;var _0x1550f4=a1_0x3d35();var _0x165352=_0x1550f4[_0x284820];return _0x165352;}'use strict';Object[a1_0x3d2d63(0xf6)](exports,a1_0x3d2d63(0xf2),{'value':!![]}),exports[a1_0x3d2d63(0xe7)]=_0x269fc2=>{return{'koa':{'proxy':![]}};};function a1_0x3d35(){var _0x598519=['209028cmtkIH','9091350BAmwLv','14184gTXslm','5HaHhXY','1SzuUei','__esModule','toString','apply','constructor','defineProperty','4512402WRJIKp','search','5475092VAtTEM','21LItwCu','default','(((.+)+)+)+$','8715699vATBgC','8hPLhfO','1809322AQDkTa','32362IpPpLE'];a1_0x3d35=function(){return _0x598519;};return a1_0x3d35();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a2_0x158155=a2_0x21e2;(function(_0xe4700e,_0xee5031){var _0x1b8476=a2_0x21e2,_0x376599=_0xe4700e();while(!![]){try{var _0x5d3f03=-parseInt(_0x1b8476(0x1a0))/0x1*(parseInt(_0x1b8476(0x1a4))/0x2)+parseInt(_0x1b8476(0x1ae))/0x3+-parseInt(_0x1b8476(0x1a8))/0x4+-parseInt(_0x1b8476(0x1a5))/0x5*(-parseInt(_0x1b8476(0x19f))/0x6)+parseInt(_0x1b8476(0x1a1))/0x7+parseInt(_0x1b8476(0x1a3))/0x8*(parseInt(_0x1b8476(0x19e))/0x9)+-parseInt(_0x1b8476(0x1ac))/0xa;if(_0x5d3f03===_0xee5031)break;else _0x376599['push'](_0x376599['shift']());}catch(_0x294b89){_0x376599['push'](_0x376599['shift']());}}}(a2_0x45ce,0x2b7e4));var a2_0x1255a8=(function(){var _0x3487d7=!![];return function(_0x4d7feb,_0xe35391){var _0x52ade6=_0x3487d7?function(){var _0xb65d21=a2_0x21e2;if(_0xe35391){var _0x1256b5=_0xe35391[_0xb65d21(0x1a7)](_0x4d7feb,arguments);return _0xe35391=null,_0x1256b5;}}:function(){};return _0x3487d7=![],_0x52ade6;};}()),a2_0x3fb9cd=a2_0x1255a8(this,function(){var _0x2dabb1=a2_0x21e2;return a2_0x3fb9cd[_0x2dabb1(0x1a9)]()[_0x2dabb1(0x1aa)]('(((.+)+)+)+$')[_0x2dabb1(0x1a9)]()[_0x2dabb1(0x1a2)](a2_0x3fb9cd)['search'](_0x2dabb1(0x1a6));});a2_0x3fb9cd();'use strict';function a2_0x45ce(){var _0x985ae2=['12SgXvVU','1mFvrFh','2008713tuSEIQ','constructor','451184xEgWmB','667762ghHSRi','883390VBDpxX','(((.+)+)+)+$','apply','1029932bkMLMS','toString','search','defineProperty','270310FxgaqE','default','130296MaCRkA','18DtFgcR'];a2_0x45ce=function(){return _0x985ae2;};return a2_0x45ce();}function a2_0x21e2(_0x408344,_0x3e8770){_0x408344=_0x408344-0x19e;var _0x187276=a2_0x45ce();var _0x3fb9cd=_0x187276[_0x408344];return _0x3fb9cd;}Object[a2_0x158155(0x1ab)](exports,'__esModule',{'value':!![]}),exports[a2_0x158155(0x1ad)]={'apitest':![],'anveroapi':{}};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IMidwayApplication, MidwayLoggerService } from '@midwayjs/core';
|
|
2
|
+
import { MidwayApplicationManager, MidwayConfigService, MidwayDecoratorService, MidwayEnvironmentService } from '@midwayjs/core';
|
|
3
|
+
import { ApiService } from './service/ApiService';
|
|
4
|
+
export declare class CustomConfiguration {
|
|
5
|
+
app: IMidwayApplication;
|
|
6
|
+
config: MidwayConfigService;
|
|
7
|
+
decorator: MidwayDecoratorService;
|
|
8
|
+
application: MidwayApplicationManager;
|
|
9
|
+
environment: MidwayEnvironmentService;
|
|
10
|
+
loggerService: MidwayLoggerService;
|
|
11
|
+
ApiService: ApiService;
|
|
12
|
+
onReady(): Promise<void>;
|
|
13
|
+
protected handlerActionRoute(): Promise<void>;
|
|
14
|
+
protected hanlderApplications(): Promise<void>;
|
|
15
|
+
protected loggerConfig(): Promise<void>;
|
|
16
|
+
protected filterConfig(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a3_0x4a4389=a3_0x4831;(function(_0x150d30,_0x59b4f9){const _0x3c4d96=a3_0x4831,_0x1470bf=_0x150d30();while(!![]){try{const _0x548a7b=parseInt(_0x3c4d96(0x1fb))/0x1+-parseInt(_0x3c4d96(0x27f))/0x2*(-parseInt(_0x3c4d96(0x239))/0x3)+parseInt(_0x3c4d96(0x20d))/0x4+-parseInt(_0x3c4d96(0x236))/0x5*(-parseInt(_0x3c4d96(0x26d))/0x6)+parseInt(_0x3c4d96(0x276))/0x7+-parseInt(_0x3c4d96(0x283))/0x8+-parseInt(_0x3c4d96(0x232))/0x9*(parseInt(_0x3c4d96(0x248))/0xa);if(_0x548a7b===_0x59b4f9)break;else _0x1470bf['push'](_0x1470bf['shift']());}catch(_0x4fbeef){_0x1470bf['push'](_0x1470bf['shift']());}}}(a3_0x15a5,0x7539c));const a3_0x358c10=(function(){let _0x572ec1=!![];return function(_0x83c43c,_0x4c71f3){const _0x28886a=_0x572ec1?function(){if(_0x4c71f3){const _0x38777c=_0x4c71f3['apply'](_0x83c43c,arguments);return _0x4c71f3=null,_0x38777c;}}:function(){};return _0x572ec1=![],_0x28886a;};}()),a3_0x4b4722=a3_0x358c10(this,function(){const _0x578d8e=a3_0x4831;return a3_0x4b4722[_0x578d8e(0x212)]()['search'](_0x578d8e(0x22b))[_0x578d8e(0x212)]()['constructor'](a3_0x4b4722)[_0x578d8e(0x25d)](_0x578d8e(0x22b));});function a3_0x4831(_0x438c35,_0x1d987d){_0x438c35=_0x438c35-0x1ea;const _0x1dfed5=a3_0x15a5();let _0x4b4722=_0x1dfed5[_0x438c35];return _0x4b4722;}a3_0x4b4722();'use strict';var __decorate=this&&this[a3_0x4a4389(0x273)]||function(_0x47bb59,_0x37c89e,_0x254698,_0x1c8349){const _0x225964=a3_0x4a4389;var _0x3b8173=arguments['length'],_0x147f91=_0x3b8173<0x3?_0x37c89e:_0x1c8349===null?_0x1c8349=Object['getOwnPropertyDescriptor'](_0x37c89e,_0x254698):_0x1c8349,_0x299a31;if(typeof Reflect===_0x225964(0x210)&&typeof Reflect[_0x225964(0x27b)]==='function')_0x147f91=Reflect[_0x225964(0x27b)](_0x47bb59,_0x37c89e,_0x254698,_0x1c8349);else{for(var _0x37dd28=_0x47bb59[_0x225964(0x20b)]-0x1;_0x37dd28>=0x0;_0x37dd28--)if(_0x299a31=_0x47bb59[_0x37dd28])_0x147f91=(_0x3b8173<0x3?_0x299a31(_0x147f91):_0x3b8173>0x3?_0x299a31(_0x37c89e,_0x254698,_0x147f91):_0x299a31(_0x37c89e,_0x254698))||_0x147f91;}return _0x3b8173>0x3&&_0x147f91&&Object[_0x225964(0x1ef)](_0x37c89e,_0x254698,_0x147f91),_0x147f91;},__metadata=this&&this['__metadata']||function(_0x1410d8,_0x169734){const _0x3f86df=a3_0x4a4389;if(typeof Reflect===_0x3f86df(0x210)&&typeof Reflect[_0x3f86df(0x1ff)]==='function')return Reflect['metadata'](_0x1410d8,_0x169734);};Object['defineProperty'](exports,a3_0x4a4389(0x238),{'value':!![]}),exports[a3_0x4a4389(0x24b)]=void 0x0;const core_1=require('@midwayjs/core'),core_2=require(a3_0x4a4389(0x27d)),ApiError_1=require(a3_0x4a4389(0x226)),ApiService_1=require(a3_0x4a4389(0x267)),intercept_1=require('./types/intercept'),action_1=require(a3_0x4a4389(0x21f)),fs=require('fs'),path=require('path'),koasend=require(a3_0x4a4389(0x272)),koa=require(a3_0x4a4389(0x219)),upload=require(a3_0x4a4389(0x211)),staticFile=require(a3_0x4a4389(0x1ed)),crossDomain=require('@midwayjs/cross-domain'),ConfigDefault=require(a3_0x4a4389(0x26a)),ConfigProduction=require(a3_0x4a4389(0x218)),anvero=require(a3_0x4a4389(0x234)),anveroCache=require('@anveroapi/cache'),anveroEvent=require('@anveroapi/event'),anveroTypeorm=require(a3_0x4a4389(0x253)),anveroValidator=require(a3_0x4a4389(0x274)),anveroHelper=require(a3_0x4a4389(0x25e));function a3_0x15a5(){const _0x462122=['query','ApiError','registerMethodHandler','search','anvero-apihelper','basic','MidwayConfigService','getClassMetadata','target','filterConfig','clients','MidwayEnvironmentService','/app','./service/ApiService','decorator','includes','./config/config.default','connection','loggerService','246bHZiZO','args','/apps/','keys','description','koa-send','__decorate','@anveroapi/validator','context','984977MBjjNM','parse','config','anveroapi','apimit','decorate','apps-','@midwayjs/core','path','266hxjroO','midwayLogger','filepath','_UNKNOW_','567136oWEcIi','routerOptions','REQUEST_OBJ_CTX_KEY','app','@midwayjs/static-file','upload','defineProperty','log','https://','substring','requestKey','createLogger','http://','Inject','isNull','undefined','http','getBaseDir','277710eKnGtd','prototype','name','environment','metadata','AppsConfigTmp','getAppDir','existsSync','design:type','Anvero-api\x20upload-tmpdir\x20:\x20mkdir\x20','statSync','ACTION_ROUTE_KEY','requestContext','key','match','join','length','Anvero-api\x20static-file\x20:\x20mkdir\x20','1592332YZopUO','mkdirSync','Types','object','@midwayjs/busboy','toString','handler','get','addObject','270d','toLowerCase','./config/config.production','@midwayjs/koa','runtime','handlerActionRoute','devices','INTERCEPT_KEY','hanlderApplications','./types/action','isDevelopmentEnvironment','defineProperties','module','basic.log','ApiService','readdirSync','./exception/ApiError','staticFile','proceed','getConfiguration','application','(((.+)+)+)+$','string','loggerConfig','HEADERS_SIGNATURE','input','defaultsDeep','split','306yHSTIC','req','@anveroapi/core','.log','24785YpYkGd','forEach','__esModule','20403uTbmdL','_matchedRoute','isString','device','host','_matchedRouteMeta','encrypted','tmpdir','bodyXml','request','checksign','/apps','443','DEFAULT','ACTION_KEY','403890oHysEs','headers','文件不存在','CustomConfiguration','dir','routerName','startsWith','anvero-api','isDirectory','onReady','lastIndexOf','@anveroapi/typeorm','getApplications','intercept','body','method','dirs','MidwayApplicationManager'];a3_0x15a5=function(){return _0x462122;};return a3_0x15a5();}let CustomConfiguration=class CustomConfiguration{async[a3_0x4a4389(0x251)](){const _0x1df248=a3_0x4a4389;await this[_0x1df248(0x263)](),await this[_0x1df248(0x22d)](),await this[_0x1df248(0x21b)](),await this['hanlderApplications']();}async[a3_0x4a4389(0x21b)](){const _0x413795=a3_0x4a4389,_0x99f8f0=this['config'][_0x413795(0x229)](),_0x55c2a7=(0x0,core_1['getClassMetadata'])(intercept_1[_0x413795(0x21d)],intercept_1['InterceptTargetTmp'])||{};this[_0x413795(0x268)][_0x413795(0x25c)](action_1[_0x413795(0x206)],_0x3adbd8=>{const _0x434798=_0x413795;var _0x49fbe4;const _0x95f190=(0x0,core_1[_0x434798(0x261)])(action_1['APPSCONFIG_KEY'],action_1[_0x434798(0x200)])||{},_0x1eb466=_0x3adbd8[_0x434798(0x1ff)],_0x52b1e8=(0x0,core_1[_0x434798(0x261)])(action_1[_0x434798(0x247)],_0x3adbd8['target'])||{},_0x4b1328=((_0x49fbe4=_0x52b1e8===null||_0x52b1e8===void 0x0?void 0x0:_0x52b1e8[_0x434798(0x281)])===null||_0x49fbe4===void 0x0?void 0x0:_0x49fbe4[_0x434798(0x1f2)](0x0,_0x52b1e8[_0x434798(0x281)][_0x434798(0x252)]('.')))||'',_0x36262e=(_0x52b1e8===null||_0x52b1e8===void 0x0?void 0x0:_0x52b1e8[_0x434798(0x222)])?(_0x95f190===null||_0x95f190===void 0x0?void 0x0:_0x95f190[_0x52b1e8['module']])||{}:{};return{'before':async _0x149e92=>{const _0x34db26=_0x434798;var _0x7ff24c,_0x1e840c,_0x1aa200,_0x79f34b;const _0x43393e=(_0x7ff24c=_0x149e92===null||_0x149e92===void 0x0?void 0x0:_0x149e92[_0x34db26(0x262)])===null||_0x7ff24c===void 0x0?void 0x0:_0x7ff24c[core_2[_0x34db26(0x1eb)]],_0x2bfe4e=lodash[_0x34db26(0x230)]({},_0x43393e[_0x34db26(0x242)]['body']||_0x43393e['request'][((_0x1e840c=_0x99f8f0===null||_0x99f8f0===void 0x0?void 0x0:_0x99f8f0[_0x34db26(0x241)])===null||_0x1e840c===void 0x0?void 0x0:_0x1e840c[_0x34db26(0x208)])||_0x34db26(0x256)]||{},_0x43393e[_0x34db26(0x242)][_0x34db26(0x25a)]||{});_0x43393e[_0x34db26(0x23e)]={'module':(_0x36262e===null||_0x36262e===void 0x0?void 0x0:_0x36262e[_0x34db26(0x1fd)])||'','routePath':''+_0x43393e[_0x34db26(0x27e)],'routeName':_0x52b1e8[_0x34db26(0x1ea)]['tagName']+'@'+_0x1eb466[_0x34db26(0x24d)],'routeMethod':((_0x1eb466===null||_0x1eb466===void 0x0?void 0x0:_0x1eb466['requestMethod'])||_0x43393e[_0x34db26(0x257)]||'')['toLowerCase'](),'routeDescription':(_0x1eb466===null||_0x1eb466===void 0x0?void 0x0:_0x1eb466[_0x34db26(0x271)])||'','filemethod':_0x4b1328+'@'+(_0x1eb466[_0x34db26(0x257)]||'')};if(_0x43393e&&(_0x1eb466===null||_0x1eb466===void 0x0?void 0x0:_0x1eb466[_0x34db26(0x27a)]))try{const _0x3f5d14=((_0x1aa200=_0x99f8f0===null||_0x99f8f0===void 0x0?void 0x0:_0x99f8f0[_0x34db26(0x279)])===null||_0x1aa200===void 0x0?void 0x0:_0x1aa200[_0x34db26(0x1f3)])&&typeof(_0x2bfe4e===null||_0x2bfe4e===void 0x0?void 0x0:_0x2bfe4e[_0x99f8f0[_0x34db26(0x279)][_0x34db26(0x1f3)]])==_0x34db26(0x22c)?JSON[_0x34db26(0x277)](base64_decode(_0x2bfe4e[_0x99f8f0[_0x34db26(0x279)][_0x34db26(0x1f3)]])||'{}')||{}:((_0x79f34b=_0x43393e===null||_0x43393e===void 0x0?void 0x0:_0x43393e[_0x34db26(0x242)])===null||_0x79f34b===void 0x0?void 0x0:_0x79f34b[_0x34db26(0x249)])||{};if(!this[_0x34db26(0x224)][_0x34db26(0x243)](_0x3f5d14))throw new AnnError(ApiError_1[_0x34db26(0x25b)][_0x34db26(0x22e)]);for(const _0x41ab9c in _0x3f5d14||{}){_0x43393e[_0x34db26(0x249)][_0x41ab9c]=_0x3f5d14[_0x41ab9c];}}catch(_0x256df8){if(_0x256df8 instanceof AnnError)throw _0x256df8;else throw new AnnError(ApiError_1['ApiError'][_0x34db26(0x282)]);}},'around':async _0x3fe5d8=>{const _0x58e727=_0x434798;var _0x2f4519,_0x1a07f7,_0xb5c8c5;const _0x306562=(_0x2f4519=_0x3fe5d8===null||_0x3fe5d8===void 0x0?void 0x0:_0x3fe5d8['target'])===null||_0x2f4519===void 0x0?void 0x0:_0x2f4519[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x306562&&(_0x1eb466===null||_0x1eb466===void 0x0?void 0x0:_0x1eb466['apimit'])&&((_0x1eb466===null||_0x1eb466===void 0x0?void 0x0:_0x1eb466[_0x58e727(0x255)])||typeof(_0x1eb466===null||_0x1eb466===void 0x0?void 0x0:_0x1eb466[_0x58e727(0x255)])==_0x58e727(0x1f8))){if(((_0x1a07f7=_0x306562[_0x58e727(0x249)])===null||_0x1a07f7===void 0x0?void 0x0:_0x1a07f7['device'])&&((_0xb5c8c5=_0x55c2a7===null||_0x55c2a7===void 0x0?void 0x0:_0x55c2a7[_0x306562[_0x58e727(0x249)][_0x58e727(0x23c)]])===null||_0xb5c8c5===void 0x0?void 0x0:_0xb5c8c5['length'])>0x0)for(const _0x48d397 of _0x55c2a7[_0x306562[_0x58e727(0x249)][_0x58e727(0x23c)]]||[]){if(core_1[_0x58e727(0x20f)]['isClass'](_0x48d397)){const _0x43ea1d=await _0x306562[_0x58e727(0x207)]['getAsync'](_0x48d397);typeof(_0x43ea1d===null||_0x43ea1d===void 0x0?void 0x0:_0x43ea1d[_0x58e727(0x209)])=='function'?await _0x43ea1d['match'](_0x306562,typeof(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x257)])==_0x58e727(0x22c)&&(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x23a)])?_0x306562['method'][_0x58e727(0x217)]()+'@'+(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562['_matchedRoute']):undefined,_0x1eb466)&&await _0x43ea1d[_0x58e727(0x213)](_0x306562,typeof(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x257)])==_0x58e727(0x22c)&&(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562['_matchedRoute'])?_0x306562['method']['toLowerCase']()+'@'+(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x23a)]):undefined,_0x1eb466):await _0x43ea1d[_0x58e727(0x213)](_0x306562,typeof(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x257)])=='string'&&(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x23a)])?_0x306562[_0x58e727(0x257)][_0x58e727(0x217)]()+'@'+(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x23a)]):undefined,_0x1eb466);}else core_1[_0x58e727(0x20f)]['isFunction'](_0x48d397)&&await _0x48d397(_0x306562,typeof(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x257)])==_0x58e727(0x22c)&&(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562[_0x58e727(0x23a)])?_0x306562[_0x58e727(0x257)][_0x58e727(0x217)]()+'@'+(_0x306562===null||_0x306562===void 0x0?void 0x0:_0x306562['_matchedRoute']):undefined,_0x1eb466);}}return await _0x3fe5d8[_0x58e727(0x228)](..._0x3fe5d8[_0x58e727(0x26e)]);},'afterThrow':(_0x56ea71,_0x31305e)=>{throw _0x31305e;}};});}async[a3_0x4a4389(0x21e)](){const _0x503340=a3_0x4a4389,_0x2f7b53=this[_0x503340(0x278)][_0x503340(0x229)]();this[_0x503340(0x22a)][_0x503340(0x254)](['koa'])[_0x503340(0x237)](_0x435df1=>{const _0x10e306=_0x503340;(_0x435df1===null||_0x435df1===void 0x0?void 0x0:_0x435df1['context'])&&Object[_0x10e306(0x221)](_0x435df1[_0x10e306(0x275)],{'hosturl':{'configurable':![],'get':function(){const _0x126d17=_0x10e306;var _0x5506cd,_0xbad1e8,_0x394a26,_0x1228e7;if((this===null||this===void 0x0?void 0x0:this[_0x126d17(0x23d)])&&!this[_0x126d17(0x23d)][_0x126d17(0x24e)](_0x126d17(0x1f9))){let _0x2250ce=this['host'][_0x126d17(0x231)](':');return['80',_0x126d17(0x245)][_0x126d17(0x269)](_0x2250ce===null||_0x2250ce===void 0x0?void 0x0:_0x2250ce[0x1])?''+(!!((_0xbad1e8=(_0x5506cd=this===null||this===void 0x0?void 0x0:this[_0x126d17(0x233)])===null||_0x5506cd===void 0x0?void 0x0:_0x5506cd[_0x126d17(0x26b)])===null||_0xbad1e8===void 0x0?void 0x0:_0xbad1e8[_0x126d17(0x23f)])||(_0x2250ce===null||_0x2250ce===void 0x0?void 0x0:_0x2250ce[0x1])==_0x126d17(0x245)?'https://':_0x126d17(0x1f5))+_0x2250ce[0x0]:''+(!!((_0x1228e7=(_0x394a26=this===null||this===void 0x0?void 0x0:this[_0x126d17(0x233)])===null||_0x394a26===void 0x0?void 0x0:_0x394a26['connection'])===null||_0x1228e7===void 0x0?void 0x0:_0x1228e7['encrypted'])?_0x126d17(0x1f1):_0x126d17(0x1f5))+this[_0x126d17(0x23d)];}return'';}},'ok':{'value':function(_0x9749ae,_0x4c9f58,_0x1bfb9a=0x0){return{'code':_0x1bfb9a,'data':_0x9749ae,'extra':_0x4c9f58};}},'input':{'value':function(_0x4b0574,_0x4ba44a){const _0x6355e8=_0x10e306;var _0x3a6113;const _0x453442=lodash['defaultsDeep']({},this[_0x6355e8(0x242)]['body']||this[_0x6355e8(0x242)][((_0x3a6113=_0x2f7b53===null||_0x2f7b53===void 0x0?void 0x0:_0x2f7b53[_0x6355e8(0x241)])===null||_0x3a6113===void 0x0?void 0x0:_0x3a6113[_0x6355e8(0x208)])||_0x6355e8(0x256)]||{},this[_0x6355e8(0x242)][_0x6355e8(0x25a)]||{});return _0x4b0574?lodash[_0x6355e8(0x214)](_0x453442,_0x4b0574,_0x4ba44a):_0x453442;}},'when':{'value':async function(_0x27a31d,_0x1ad2f7){const _0x42580b=_0x10e306,_0xf8b04a=this[_0x42580b(0x22f)](_0x27a31d,null);if(!lodash[_0x42580b(0x1f7)](_0xf8b04a))return await _0x1ad2f7(_0xf8b04a);}},'only':{'value':function(_0x57f401){const _0x9066e9=_0x10e306,_0x3fc466={};for(let _0x594898=0x0;_0x594898<_0x57f401[_0x9066e9(0x20b)];_0x594898++){lodash['isArray'](_0x57f401[_0x594898])&&_0x57f401[_0x594898][_0x9066e9(0x20b)]>0x0&&lodash[_0x9066e9(0x23b)](_0x57f401[_0x594898][0x0])&&(_0x3fc466[_0x57f401[_0x594898][0x0]]=this[_0x9066e9(0x22f)](_0x57f401[_0x594898][0x0],_0x57f401[_0x594898][_0x9066e9(0x20b)]>0x1?_0x57f401[_0x594898][0x1]:null));}return _0x3fc466;}},'koasend':{'value':async function(_0x2217ee,_0x471c8a){const _0x407ef2=_0x10e306;if(_0x2217ee&&!fs[_0x407ef2(0x202)](_0x2217ee)&&!fs[_0x407ef2(0x202)](this['app'][_0x407ef2(0x201)]()+'/'+_0x2217ee))return _0x407ef2(0x24a);return _0x2217ee=fs[_0x407ef2(0x202)](_0x2217ee)?_0x2217ee:this['app'][_0x407ef2(0x201)]()+'/'+_0x2217ee,this['attachment'](_0x471c8a||_0x2217ee),await koasend(this,_0x2217ee);}}});});}async[a3_0x4a4389(0x22d)](){const _0x2279f6=a3_0x4a4389;var _0x12c08d;if(fs[_0x2279f6(0x202)](this[_0x2279f6(0x1ec)][_0x2279f6(0x1fa)]()+_0x2279f6(0x244))&&fs[_0x2279f6(0x205)](this[_0x2279f6(0x1ec)][_0x2279f6(0x1fa)]()+_0x2279f6(0x244))[_0x2279f6(0x250)]()){const _0x9fee85=this[_0x2279f6(0x278)][_0x2279f6(0x229)](),_0x16bc5a=((_0x12c08d=_0x9fee85===null||_0x9fee85===void 0x0?void 0x0:_0x9fee85[_0x2279f6(0x280)])===null||_0x12c08d===void 0x0?void 0x0:_0x12c08d[_0x2279f6(0x264)])||{};!fs[_0x2279f6(0x202)](this[_0x2279f6(0x1ec)][_0x2279f6(0x1fa)]()+_0x2279f6(0x266))&&(_0x16bc5a[_0x2279f6(0x1ec)]={'lazyLoad':!![],'enableJSON':!![],'enableConsole':this['environment']['isDevelopmentEnvironment'](),'fileLogName':'app.log','dir':path[_0x2279f6(0x20a)](this[_0x2279f6(0x1ec)][_0x2279f6(0x201)](),_0x2279f6(0x21a),'app')});!fs[_0x2279f6(0x202)](this[_0x2279f6(0x1ec)][_0x2279f6(0x1fa)]()+'/basic')&&(_0x16bc5a['basic']={'lazyLoad':!![],'enableJSON':!![],'enableConsole':this[_0x2279f6(0x1fe)][_0x2279f6(0x220)](),'fileLogName':_0x2279f6(0x223),'dir':path[_0x2279f6(0x20a)](this[_0x2279f6(0x1ec)]['getAppDir'](),_0x2279f6(0x21a),_0x2279f6(0x25f))});for(const _0x1bc785 of fs[_0x2279f6(0x225)](this['app'][_0x2279f6(0x1fa)]()+_0x2279f6(0x244))){if(!fs['statSync'](this['app'][_0x2279f6(0x1fa)]()+_0x2279f6(0x26f)+_0x1bc785)[_0x2279f6(0x250)]())continue;!(_0x16bc5a===null||_0x16bc5a===void 0x0?void 0x0:_0x16bc5a[_0x1bc785])&&(_0x16bc5a[_0x1bc785]={'lazyLoad':!![],'enableJSON':!![],'enableConsole':this[_0x2279f6(0x1fe)][_0x2279f6(0x220)](),'fileLogName':_0x1bc785+_0x2279f6(0x235),'dir':path[_0x2279f6(0x20a)](this['app'][_0x2279f6(0x201)](),'runtime',_0x2279f6(0x27c)+_0x1bc785)}),this[_0x2279f6(0x26c)][_0x2279f6(0x1f4)](_0x1bc785,_0x16bc5a[_0x1bc785]);}Object[_0x2279f6(0x270)](_0x16bc5a)[_0x2279f6(0x20b)]>0x0&&(!_0x9fee85[_0x2279f6(0x280)]&&(_0x9fee85[_0x2279f6(0x280)]={'default':{'maxSize':'1m','maxFiles':_0x2279f6(0x216),'dir':path[_0x2279f6(0x20a)](this[_0x2279f6(0x1ec)][_0x2279f6(0x201)](),'runtime')}}),_0x9fee85[_0x2279f6(0x280)][_0x2279f6(0x264)]=_0x16bc5a),this[_0x2279f6(0x278)][_0x2279f6(0x215)](_0x9fee85);}}async['filterConfig'](){const _0x21a4f9=a3_0x4a4389;var _0x1e01ec,_0x4fe46a,_0x400a84,_0x39e2e9,_0x15a345,_0x3a1817;const _0x162a34=this[_0x21a4f9(0x278)][_0x21a4f9(0x229)]();((_0x4fe46a=(_0x1e01ec=_0x162a34===null||_0x162a34===void 0x0?void 0x0:_0x162a34['anveroapi'])===null||_0x1e01ec===void 0x0?void 0x0:_0x1e01ec['devices'])===null||_0x4fe46a===void 0x0?void 0x0:_0x4fe46a[_0x21a4f9(0x246)])&&Object[_0x21a4f9(0x270)](_0x162a34[_0x21a4f9(0x279)]['devices'])['length']>0x1&&delete _0x162a34[_0x21a4f9(0x279)][_0x21a4f9(0x21c)][_0x21a4f9(0x246)];if((_0x400a84=_0x162a34===null||_0x162a34===void 0x0?void 0x0:_0x162a34[_0x21a4f9(0x227)])===null||_0x400a84===void 0x0?void 0x0:_0x400a84['dirs'])for(const _0x22ad66 in _0x162a34[_0x21a4f9(0x227)][_0x21a4f9(0x258)]){((_0x39e2e9=_0x162a34[_0x21a4f9(0x227)][_0x21a4f9(0x258)][_0x22ad66])===null||_0x39e2e9===void 0x0?void 0x0:_0x39e2e9[_0x21a4f9(0x24c)])&&typeof((_0x15a345=_0x162a34['staticFile'][_0x21a4f9(0x258)][_0x22ad66])===null||_0x15a345===void 0x0?void 0x0:_0x15a345['dir'])==_0x21a4f9(0x22c)&&!fs['existsSync'](_0x162a34['staticFile']['dirs'][_0x22ad66][_0x21a4f9(0x24c)])&&(fs[_0x21a4f9(0x20e)](_0x162a34[_0x21a4f9(0x227)][_0x21a4f9(0x258)][_0x22ad66]['dir'],{'recursive':!![]}),console[_0x21a4f9(0x1f0)](_0x21a4f9(0x20c)+_0x162a34[_0x21a4f9(0x227)]['dirs'][_0x22ad66][_0x21a4f9(0x24c)]));}((_0x3a1817=_0x162a34===null||_0x162a34===void 0x0?void 0x0:_0x162a34['upload'])===null||_0x3a1817===void 0x0?void 0x0:_0x3a1817[_0x21a4f9(0x240)])&&!fs[_0x21a4f9(0x202)](_0x162a34[_0x21a4f9(0x1ee)][_0x21a4f9(0x240)])&&(fs[_0x21a4f9(0x20e)](_0x162a34['upload'][_0x21a4f9(0x240)],{'recursive':!![]}),console['log'](_0x21a4f9(0x204)+_0x162a34['upload']['tmpdir'])),this[_0x21a4f9(0x278)][_0x21a4f9(0x215)](_0x162a34);}};exports[a3_0x4a4389(0x24b)]=CustomConfiguration,__decorate([(0x0,core_1['App'])(),__metadata(a3_0x4a4389(0x203),Object)],CustomConfiguration['prototype'],'app',void 0x0),__decorate([(0x0,core_1[a3_0x4a4389(0x1f6)])(),__metadata(a3_0x4a4389(0x203),core_2[a3_0x4a4389(0x260)])],CustomConfiguration[a3_0x4a4389(0x1fc)],a3_0x4a4389(0x278),void 0x0),__decorate([(0x0,core_1[a3_0x4a4389(0x1f6)])(),__metadata('design:type',core_2['MidwayDecoratorService'])],CustomConfiguration[a3_0x4a4389(0x1fc)],a3_0x4a4389(0x268),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a3_0x4a4389(0x203),core_2[a3_0x4a4389(0x259)])],CustomConfiguration['prototype'],a3_0x4a4389(0x22a),void 0x0),__decorate([(0x0,core_1[a3_0x4a4389(0x1f6)])(),__metadata(a3_0x4a4389(0x203),core_2[a3_0x4a4389(0x265)])],CustomConfiguration[a3_0x4a4389(0x1fc)],a3_0x4a4389(0x1fe),void 0x0),__decorate([(0x0,core_1[a3_0x4a4389(0x1f6)])(),__metadata(a3_0x4a4389(0x203),core_1['MidwayLoggerService'])],CustomConfiguration[a3_0x4a4389(0x1fc)],a3_0x4a4389(0x26c),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a3_0x4a4389(0x203),ApiService_1[a3_0x4a4389(0x224)])],CustomConfiguration[a3_0x4a4389(0x1fc)],a3_0x4a4389(0x224),void 0x0),exports[a3_0x4a4389(0x24b)]=CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,upload,staticFile,crossDomain,anvero,anveroCache,anveroEvent,anveroTypeorm,anveroValidator,anveroHelper],'namespace':a3_0x4a4389(0x24f),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ActionOption, ActionApiOption } from '../types/action';
|
|
2
|
+
export declare function Action(filename: string, tagName: string, routerOptions?: ActionOption): ClassDecorator;
|
|
3
|
+
export declare namespace Action {
|
|
4
|
+
var get: (routerName: string, path?: string, options?: ActionApiOption) => MethodDecorator;
|
|
5
|
+
var post: (routerName: string, path?: string, options?: ActionApiOption) => MethodDecorator;
|
|
6
|
+
}
|
|
7
|
+
export declare function ActionApi(routerName: string, requestMethod?: "all" | "get" | "post", path?: string, options?: ActionApiOption): MethodDecorator;
|
|
8
|
+
export declare function parseRoute(filename: any): {
|
|
9
|
+
prefix: boolean | string;
|
|
10
|
+
route: string;
|
|
11
|
+
module: false | string;
|
|
12
|
+
rootpath: string;
|
|
13
|
+
filepath: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a4_0x3dd84a=a4_0x402d;(function(_0xad8dba,_0x5b78d9){const _0x305716=a4_0x402d,_0x44131f=_0xad8dba();while(!![]){try{const _0x4ac76e=-parseInt(_0x305716(0x1ea))/0x1+-parseInt(_0x305716(0x1e5))/0x2*(parseInt(_0x305716(0x1df))/0x3)+-parseInt(_0x305716(0x1e7))/0x4*(-parseInt(_0x305716(0x20d))/0x5)+-parseInt(_0x305716(0x1d5))/0x6+parseInt(_0x305716(0x219))/0x7+parseInt(_0x305716(0x1d7))/0x8*(parseInt(_0x305716(0x200))/0x9)+-parseInt(_0x305716(0x1fb))/0xa*(-parseInt(_0x305716(0x210))/0xb);if(_0x4ac76e===_0x5b78d9)break;else _0x44131f['push'](_0x44131f['shift']());}catch(_0x31aca4){_0x44131f['push'](_0x44131f['shift']());}}}(a4_0xda7b,0xc7eb1));const a4_0x304cea=(function(){let _0x3ee43c=!![];return function(_0x3b506c,_0x3ca3cc){const _0x552bdd=_0x3ee43c?function(){if(_0x3ca3cc){const _0x64edf7=_0x3ca3cc['apply'](_0x3b506c,arguments);return _0x3ca3cc=null,_0x64edf7;}}:function(){};return _0x3ee43c=![],_0x552bdd;};}()),a4_0x381b6d=a4_0x304cea(this,function(){const _0x1f7c6d=a4_0x402d;return a4_0x381b6d['toString']()[_0x1f7c6d(0x21a)](_0x1f7c6d(0x1d0))[_0x1f7c6d(0x207)]()[_0x1f7c6d(0x1fd)](a4_0x381b6d)[_0x1f7c6d(0x21a)](_0x1f7c6d(0x1d0));});function a4_0x402d(_0x24beef,_0xe5fc39){_0x24beef=_0x24beef-0x1ce;const _0x23a820=a4_0xda7b();let _0x381b6d=_0x23a820[_0x24beef];return _0x381b6d;}a4_0x381b6d();'use strict';var _a,_b;Object[a4_0x3dd84a(0x1f9)](exports,a4_0x3dd84a(0x1dc),{'value':!![]}),exports[a4_0x3dd84a(0x206)]=Action,exports['ActionApi']=ActionApi,exports[a4_0x3dd84a(0x1ee)]=parseRoute;function a4_0xda7b(){const _0x5c4382=['saveClassMetadata','attachClassMetadata','split','12275wQKslU','apps/','push','1430DkPDsj','filter','endsWith','trim','intercept','keys','indexOf','NODE_ENV','prefix','5900265RjRBdO','search','ACTION_ROUTE_KEY','env','route','/apps','get','module','isArray','middlewareIgnore','assign','\x20文件请放在apps/','(((.+)+)+)+$','../types/action','AppsConfigTmp','values','splice','8156880KBrHOj','length','32xmFMuX','response','startsWith','join','/controller/','__esModule','existsSync','getClassMetadata','6VxNIsA','apimit','description','routerName','Validator','filepath','695064RFZekP','substring','1552ZTkoGB','saveModule','-action','783734ieKRYU','validate','undefined','toLowerCase','parseRoute','RequestMapping','/config.default.','MIDWAY_SERVER_ENV','middleware','createCustomMethodDecorator','Controller','basic/controller/','string','/config.','-controller','defineProperty','replace','142360nruddb','match','constructor','app/controller/','ACTION_KEY','24813csWyTX','@midwayjs/core','/apps/','ACTION_RESPONSE_KEY','defaultsDeep','/controller/文件下','Action','toString','APPSCONFIG_KEY','\x20文件请放在app/controller/文件下'];a4_0xda7b=function(){return _0x5c4382;};return a4_0xda7b();}const fs=require('fs'),validator_1=require('@anveroapi/validator'),core_1=require(a4_0x3dd84a(0x201)),core_2=require('@midwayjs/core'),action_1=require(a4_0x3dd84a(0x1d1)),NODE_ENV=((_a=process===null||process===void 0x0?void 0x0:process['env'])===null||_a===void 0x0?void 0x0:_a[a4_0x3dd84a(0x1f1)])||((_b=process===null||process===void 0x0?void 0x0:process[a4_0x3dd84a(0x21c)])===null||_b===void 0x0?void 0x0:_b[a4_0x3dd84a(0x217)]);function Action(_0x3294af,_0x84592c,_0x5588fd={'middleware':[],'sensitive':!![]}){return _0x10a1a8=>{const _0x3f4c38=a4_0x402d;var _0x66bf31;_0x5588fd['tagName']=_0x84592c;const _0x5dedc1=parseRoute(_0x3294af);if(_0x5dedc1['module']){_0x5588fd['prefix']=_0x5588fd[_0x3f4c38(0x218)]?'/'+_0x5dedc1[_0x3f4c38(0x220)]+'/'+_0x5588fd['prefix']:'/'+_0x5dedc1[_0x3f4c38(0x21d)];_0x5dedc1[_0x3f4c38(0x218)]&&(_0x5588fd[_0x3f4c38(0x218)]='/'+_0x5dedc1[_0x3f4c38(0x218)]+'/'+_0x5588fd[_0x3f4c38(0x218)]);_0x5588fd[_0x3f4c38(0x218)]=_0x5588fd[_0x3f4c38(0x218)][_0x3f4c38(0x1ed)]()[_0x3f4c38(0x1fa)](/\/{2,}/g,'/');const _0x258be=getModuleConfig(_0x5dedc1['rootpath']+_0x3f4c38(0x21e),_0x5dedc1['module'],lodash['endsWith'](_0x5dedc1[_0x3f4c38(0x1e4)],'ts')?'ts':'js');if(lodash[_0x3f4c38(0x221)](_0x258be[_0x3f4c38(0x1f2)])&&_0x258be[_0x3f4c38(0x1f2)][_0x3f4c38(0x1d6)]>0x0)for(let _0x5851ad in _0x258be['middleware']){if(((_0x66bf31=_0x258be===null||_0x258be===void 0x0?void 0x0:_0x258be[_0x3f4c38(0x222)])===null||_0x66bf31===void 0x0?void 0x0:_0x66bf31[_0x3f4c38(0x1d6)])>0x0&&_0x258be[_0x3f4c38(0x222)]['indexOf'](_0x258be[_0x3f4c38(0x1f2)][_0x5851ad])!=-0x1)continue;_0x5588fd[_0x3f4c38(0x1f2)][_0x3f4c38(0x20f)](_0x258be[_0x3f4c38(0x1f2)][_0x5851ad]);}(0x0,core_1[_0x3f4c38(0x1e8)])(action_1[_0x3f4c38(0x1ff)],_0x10a1a8),(0x0,core_1['Controller'])(_0x5588fd['prefix'],_0x5588fd)(_0x10a1a8),(0x0,core_1['saveClassMetadata'])(action_1[_0x3f4c38(0x1ff)],{'prefix':_0x5588fd['prefix'],'pprefix':_0x5dedc1['prefix'],'module':_0x5dedc1[_0x3f4c38(0x220)],'filepath':_0x5dedc1[_0x3f4c38(0x1e4)],'routerOptions':_0x5588fd},_0x10a1a8);}else _0x5588fd[_0x3f4c38(0x218)]=_0x5588fd[_0x3f4c38(0x218)]?'/'+_0x5588fd[_0x3f4c38(0x218)]:'/'+_0x5dedc1[_0x3f4c38(0x21d)],_0x5dedc1['prefix']&&(_0x5588fd['prefix']='/'+_0x5dedc1[_0x3f4c38(0x218)]+'/'+_0x5588fd[_0x3f4c38(0x218)]),_0x5588fd['prefix']=_0x5588fd[_0x3f4c38(0x218)][_0x3f4c38(0x1ed)]()[_0x3f4c38(0x1fa)](/\/{2,}/g,'/'),(0x0,core_1['saveModule'])(action_1['ACTION_KEY'],_0x10a1a8),(0x0,core_1[_0x3f4c38(0x1f4)])(_0x5588fd[_0x3f4c38(0x218)],_0x5588fd)(_0x10a1a8),(0x0,core_1[_0x3f4c38(0x20a)])(action_1[_0x3f4c38(0x1ff)],{'prefix':_0x5588fd['prefix'],'module':_0x5dedc1[_0x3f4c38(0x220)],'pprefix':_0x5dedc1['prefix'],'filepath':_0x5dedc1[_0x3f4c38(0x1e4)],'routerOptions':_0x5588fd},_0x10a1a8);};}Action['get']=function(_0x2656d5,_0x55c407='/',_0x51a6c9={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x522a43,_0x31509d,_0x21b756)=>{const _0x1d2bbd=a4_0x402d;ActionApi(_0x2656d5,_0x1d2bbd(0x21f),_0x55c407,_0x51a6c9)(_0x522a43,_0x31509d,_0x21b756);};},Action['post']=function(_0x4c20b5,_0x244ace='/',_0x513ca1={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x26b69f,_0x1a75c2,_0x432b6d)=>{ActionApi(_0x4c20b5,'post',_0x244ace,_0x513ca1)(_0x26b69f,_0x1a75c2,_0x432b6d);};};function ActionApi(_0x833655,_0x3098f6=a4_0x3dd84a(0x21f),_0x4a8f2c='/',_0x402355={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2aea54,_0x3e6ec7,_0x3f87f0)=>{const _0x3f0771=a4_0x402d;var _0x1978ba,_0x2f5a37,_0x10e523;!_0x402355[_0x3f0771(0x1f2)]&&(_0x402355[_0x3f0771(0x1f2)]=[]);!((_0x1978ba=_0x402355===null||_0x402355===void 0x0?void 0x0:_0x402355[_0x3f0771(0x1eb)])===null||_0x1978ba===void 0x0?void 0x0:_0x1978ba['validationOptions'])&&(_0x402355['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x3f0771(0x1f6)}});if(!_0x4a8f2c)_0x4a8f2c='/';else typeof _0x4a8f2c=='string'&&(!_0x4a8f2c['startsWith']('/')&&!_0x4a8f2c['startsWith']('-')&&(_0x4a8f2c='/'+_0x4a8f2c));typeof _0x402355['apimit']==_0x3f0771(0x1ec)&&(_0x402355[_0x3f0771(0x1e0)]=!![]);if(((_0x2f5a37=_0x402355===null||_0x402355===void 0x0?void 0x0:_0x402355[_0x3f0771(0x1f2)])===null||_0x2f5a37===void 0x0?void 0x0:_0x2f5a37[_0x3f0771(0x1d6)])>0x0&&((_0x10e523=_0x402355===null||_0x402355===void 0x0?void 0x0:_0x402355[_0x3f0771(0x222)])===null||_0x10e523===void 0x0?void 0x0:_0x10e523[_0x3f0771(0x1d6)])>0x0)for(let _0x2bc3ce in _0x402355[_0x3f0771(0x1f2)]){_0x402355[_0x3f0771(0x222)][_0x3f0771(0x216)](_0x402355[_0x3f0771(0x1f2)][_0x2bc3ce])!==-0x1&&(_0x402355['middleware'][_0x2bc3ce]=null);}_0x402355[_0x3f0771(0x1e2)]=_0x833655,(0x0,validator_1[_0x3f0771(0x1e3)])(_0x402355[_0x3f0771(0x1eb)])(_0x2aea54,_0x3e6ec7,_0x3f87f0),(0x0,core_2[_0x3f0771(0x1ef)])(Object[_0x3f0771(0x1ce)](_0x402355,{'path':_0x4a8f2c,'requestMethod':(_0x3098f6||'get')['toLowerCase']()}))(_0x2aea54,_0x3e6ec7,_0x3f87f0),(0x0,core_2[_0x3f0771(0x20b)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x4a8f2c,'method':_0x3e6ec7,'apimit':_0x402355[_0x3f0771(0x1e0)],'intercept':_0x402355['intercept'],'routerName':_0x402355['routerName'],'description':_0x402355[_0x3f0771(0x1e1)],'middleware':(_0x402355[_0x3f0771(0x1f2)]||[])[_0x3f0771(0x211)](_0x128338=>!!_0x128338),'requestMethod':(_0x3098f6||_0x3f0771(0x21f))['toLowerCase']()},_0x2aea54),(0x0,core_2[_0x3f0771(0x1f3)])(action_1[_0x3f0771(0x21b)],{'path':_0x4a8f2c,'method':_0x3e6ec7,'apimit':_0x402355['apimit'],'intercept':_0x402355[_0x3f0771(0x214)],'routerName':_0x402355[_0x3f0771(0x1e2)],'description':_0x402355[_0x3f0771(0x1e1)],'middleware':(_0x402355[_0x3f0771(0x1f2)]||[])[_0x3f0771(0x211)](_0x31f353=>!!_0x31f353),'requestMethod':(_0x3098f6||_0x3f0771(0x21f))[_0x3f0771(0x1ed)]()})(_0x2aea54,_0x3e6ec7,_0x3f87f0),_0x402355[_0x3f0771(0x1d8)]&&(0x0,core_2['attachClassMetadata'])(action_1[_0x3f0771(0x203)],{'method':_0x3e6ec7,..._0x402355[_0x3f0771(0x1d8)]},_0x2aea54);};}function parseRoute(_0x1fcbd5){const _0x4fbd86=a4_0x3dd84a;_0x1fcbd5=_0x1fcbd5[_0x4fbd86(0x1fa)](/(\\|\/)/g,'/');const _0xf6200f=process['cwd']()[_0x4fbd86(0x1fa)](/(\\|\/)/g,'/'),_0x848397=_0x1fcbd5[_0x4fbd86(0x1e6)](0x0,_0xf6200f[_0x4fbd86(0x1d6)]+_0x1fcbd5['substring'](_0xf6200f[_0x4fbd86(0x1d6)]+0x1)[_0x4fbd86(0x216)]('/')+0x1),_0x16b99c=_0x1fcbd5['substring'](_0x848397[_0x4fbd86(0x1d6)]+0x1)[_0x4fbd86(0x1fa)](/(\\|\/)/g,'/'),_0x524d56={'route':'','prefix':![],'module':![],'rootpath':_0x848397,'filepath':_0x16b99c};if(_0x16b99c['startsWith'](_0x4fbd86(0x1fe))||_0x16b99c[_0x4fbd86(0x1d9)](_0x4fbd86(0x1f5))){const _0x37cd4d=_0x16b99c[_0x4fbd86(0x1e6)]((_0x16b99c[_0x4fbd86(0x1d9)](_0x4fbd86(0x1fe))?_0x4fbd86(0x1fe):_0x4fbd86(0x1f5))[_0x4fbd86(0x1d6)])[_0x4fbd86(0x20c)]('/')['filter'](_0x20cb15=>_0x20cb15&&_0x20cb15['trim']());return _0x37cd4d[_0x4fbd86(0x1d6)]>0x1&&(_0x524d56[_0x4fbd86(0x218)]=_0x37cd4d[0x0]['toLowerCase'](),_0x37cd4d[_0x4fbd86(0x1d4)](0x0,0x1)),_0x524d56['route']=('/'+_0x37cd4d[_0x4fbd86(0x1da)]('/'))[_0x4fbd86(0x1fa)](/(\.ts|\.js)$/,'')[_0x4fbd86(0x1fa)](/\/{2,}/g,'/')[_0x4fbd86(0x1fc)](/[\/|A-Z]*[^A-Z]+/g)[_0x4fbd86(0x1da)]('-')[_0x4fbd86(0x1ed)]()['replace'](/\/\-/g,'/'),_0x524d56[_0x4fbd86(0x21d)]['endsWith'](_0x4fbd86(0x1e9))&&(_0x524d56[_0x4fbd86(0x21d)]=_0x524d56['route'][_0x4fbd86(0x1e6)](0x0,_0x524d56['route'][_0x4fbd86(0x1d6)]-0x7)),_0x524d56[_0x4fbd86(0x21d)][_0x4fbd86(0x212)]('-controller')&&(_0x524d56[_0x4fbd86(0x21d)]=_0x524d56['route'][_0x4fbd86(0x1e6)](0x0,_0x524d56[_0x4fbd86(0x21d)][_0x4fbd86(0x1d6)]-0xb)),_0x524d56;}else{if(_0x16b99c['startsWith'](_0x4fbd86(0x20e))){const _0xeb8095=_0x16b99c[_0x4fbd86(0x1e6)](0x0,_0x16b99c[_0x4fbd86(0x216)](_0x4fbd86(0x202))+0x5),_0x430bad=_0x16b99c[_0x4fbd86(0x1e6)](_0xeb8095[_0x4fbd86(0x1d6)]+0x1)[_0x4fbd86(0x1fa)](/(\\|\/)/g,'/')[_0x4fbd86(0x20c)]('/')[0x0];if(_0x16b99c[_0x4fbd86(0x1d9)](_0x4fbd86(0x20e)+_0x430bad+'/controller/')){const _0x4195d8=_0x16b99c['substring']((_0xeb8095+'/'+_0x430bad+_0x4fbd86(0x1db))[_0x4fbd86(0x1d6)])[_0x4fbd86(0x20c)]('/')[_0x4fbd86(0x211)](_0x3195aa=>_0x3195aa&&_0x3195aa[_0x4fbd86(0x213)]());return _0x4195d8[_0x4fbd86(0x1d6)]>0x1&&(_0x524d56[_0x4fbd86(0x218)]=_0x4195d8[0x0][_0x4fbd86(0x1ed)](),_0x4195d8[_0x4fbd86(0x1d4)](0x0,0x1)),_0x524d56[_0x4fbd86(0x220)]=_0x430bad,_0x524d56[_0x4fbd86(0x21d)]=('/'+_0x430bad+'/'+_0x4195d8[_0x4fbd86(0x1da)]('/'))[_0x4fbd86(0x1fa)](/(\.ts|\.js)$/,'')[_0x4fbd86(0x1fa)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x4fbd86(0x1ed)]()[_0x4fbd86(0x1fa)](/\/\-/g,'/'),_0x524d56['route'][_0x4fbd86(0x212)](_0x4fbd86(0x1e9))&&(_0x524d56[_0x4fbd86(0x21d)]=_0x524d56[_0x4fbd86(0x21d)]['substring'](0x0,_0x524d56[_0x4fbd86(0x21d)]['length']-0x7)),_0x524d56[_0x4fbd86(0x21d)]['endsWith'](_0x4fbd86(0x1f8))&&(_0x524d56['route']=_0x524d56[_0x4fbd86(0x21d)]['substring'](0x0,_0x524d56[_0x4fbd86(0x21d)]['length']-0xb)),_0x524d56;}throw new Error(_0x16b99c+_0x4fbd86(0x1cf)+_0x430bad+_0x4fbd86(0x205));}}throw new Error(_0x16b99c+_0x4fbd86(0x209));}const moduleConfigTmp=(0x0,core_1[a4_0x3dd84a(0x1de)])(action_1[a4_0x3dd84a(0x208)],action_1[a4_0x3dd84a(0x1d2)])||{};function getModuleConfig(_0x374ed8,_0x1aa560,_0x4d8193){const _0x46a25f=a4_0x3dd84a;if(Object[_0x46a25f(0x1d3)]((moduleConfigTmp===null||moduleConfigTmp===void 0x0?void 0x0:moduleConfigTmp[_0x1aa560])||{})[_0x46a25f(0x1d6)]==0x0){let _0x1cb3c4={};if(NODE_ENV&&fs[_0x46a25f(0x1dd)](_0x374ed8+'/'+_0x1aa560+_0x46a25f(0x1f7)+NODE_ENV+'.'+_0x4d8193)){const _0xf0d00=include(_0x374ed8+'/'+_0x1aa560+_0x46a25f(0x1f7)+NODE_ENV+'.'+_0x4d8193);Object['keys'](_0xf0d00)['length']>0x0&&(_0x1cb3c4=lodash['defaultsDeep'](_0x1cb3c4,_0xf0d00));}if(fs[_0x46a25f(0x1dd)](_0x374ed8+'/'+_0x1aa560+_0x46a25f(0x1f0)+_0x4d8193)){const _0x22e89d=include(_0x374ed8+'/'+_0x1aa560+'/config.default.'+_0x4d8193);Object[_0x46a25f(0x215)](_0x22e89d)[_0x46a25f(0x1d6)]>0x0&&(_0x1cb3c4=lodash[_0x46a25f(0x204)](_0x1cb3c4,_0x22e89d));}if(fs[_0x46a25f(0x1dd)](_0x374ed8+'/'+_0x1aa560+_0x46a25f(0x1f7)+_0x4d8193)){const _0xcd02c9=include(_0x374ed8+'/'+_0x1aa560+_0x46a25f(0x1f7)+_0x4d8193);Object[_0x46a25f(0x215)](_0xcd02c9)[_0x46a25f(0x1d6)]>0x0&&(_0x1cb3c4=lodash[_0x46a25f(0x204)](_0x1cb3c4,_0xcd02c9));}moduleConfigTmp[_0x1aa560]=_0x1cb3c4,(0x0,core_1['saveClassMetadata'])(action_1[_0x46a25f(0x208)],moduleConfigTmp,action_1[_0x46a25f(0x1d2)]);}return moduleConfigTmp[_0x1aa560];}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a5_0x500a38=a5_0x1dcd;(function(_0x25476e,_0x3bfce2){const _0x456653=a5_0x1dcd,_0x5de1d0=_0x25476e();while(!![]){try{const _0x708d07=-parseInt(_0x456653(0x15a))/0x1+-parseInt(_0x456653(0x14a))/0x2+-parseInt(_0x456653(0x160))/0x3*(parseInt(_0x456653(0x14b))/0x4)+-parseInt(_0x456653(0x147))/0x5+parseInt(_0x456653(0x151))/0x6*(parseInt(_0x456653(0x153))/0x7)+parseInt(_0x456653(0x158))/0x8*(-parseInt(_0x456653(0x159))/0x9)+parseInt(_0x456653(0x155))/0xa;if(_0x708d07===_0x3bfce2)break;else _0x5de1d0['push'](_0x5de1d0['shift']());}catch(_0x464a4d){_0x5de1d0['push'](_0x5de1d0['shift']());}}}(a5_0x3f60,0x9f32a));const a5_0x33db46=(function(){let _0x215141=!![];return function(_0x1e12b8,_0x450522){const _0x2a56ee=_0x215141?function(){if(_0x450522){const _0x34fe1b=_0x450522['apply'](_0x1e12b8,arguments);return _0x450522=null,_0x34fe1b;}}:function(){};return _0x215141=![],_0x2a56ee;};}()),a5_0x2315da=a5_0x33db46(this,function(){const _0x23ab1b=a5_0x1dcd;return a5_0x2315da[_0x23ab1b(0x148)]()[_0x23ab1b(0x14c)]('(((.+)+)+)+$')[_0x23ab1b(0x148)]()['constructor'](a5_0x2315da)['search'](_0x23ab1b(0x15f));});function a5_0x3f60(){const _0x413805=['/apitest','1565249rToOTd','../service/ApitestService','36439300TKSwUA','getAsync','getApplicationContext','160336VhYKvG','18PsURnv','522707GEJUkI','ApitestService','RequestMapping','apitest','@midwayjs/core','(((.+)+)+)+$','11379bjDWcl','__esModule','3416190rnnGca','toString','get','1837546bQUqLY','1108yLDDsx','search','filepath','getConfig','isDevelopmentEnvironment','app','6QADXSo'];a5_0x3f60=function(){return _0x413805;};return a5_0x3f60();}a5_0x2315da();function a5_0x1dcd(_0x231f7f,_0x2b58ce){_0x231f7f=_0x231f7f-0x146;const _0x45c1a7=a5_0x3f60();let _0x2315da=_0x45c1a7[_0x231f7f];return _0x2315da;}'use strict';Object['defineProperty'](exports,a5_0x500a38(0x146),{'value':!![]}),exports['Apitest']=Apitest;const core_1=require(a5_0x500a38(0x15e)),ApitestService_1=require(a5_0x500a38(0x154));function Apitest(_0x1d3c7f=a5_0x500a38(0x152),_0x4cd785){return(_0x1960ab,_0x49e5c8,_0x465e21)=>{const _0x10836f=a5_0x1dcd;return(0x0,core_1[_0x10836f(0x15c)])({'path':_0x1d3c7f,'requestMethod':_0x10836f(0x149)})(_0x1960ab,_0x49e5c8,_0x465e21),_0x465e21['value']=async function(..._0x2a0b83){const _0x33dedf=_0x10836f;var _0x51ed35;const _0x3f2680=(_0x51ed35=this[core_1['REQUEST_OBJ_CTX_KEY']])===null||_0x51ed35===void 0x0?void 0x0:_0x51ed35[_0x33dedf(0x150)];if(_0x3f2680&&_0x3f2680[_0x33dedf(0x14e)](_0x33dedf(0x15d))){const _0x526d3c=await _0x3f2680[_0x33dedf(0x157)]()[_0x33dedf(0x156)](ApitestService_1[_0x33dedf(0x15b)]),_0x25377c=await _0x3f2680[_0x33dedf(0x157)]()['getAsync'](core_1['MidwayEnvironmentService']);return _0x25377c[_0x33dedf(0x14f)]()&&(_0x4cd785[_0x33dedf(0x14d)]=!![]),await _0x526d3c['apidoc'](_0x4cd785);}return'';},_0x465e21;};}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function Intercept(devices: string | string[]): ClassDecorator;
|
|
2
|
+
export declare abstract class IIntercept {
|
|
3
|
+
abstract handler(ctx: any, matchedRoute: string, metadata: any): Promise<void>;
|
|
4
|
+
match(ctx: any, matchedRoute: string, metadata: any): Promise<boolean>;
|
|
5
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a6_0x13a6fe=a6_0x433a;function a6_0xc6a8(){const _0x1584f1=['Provide','getClassMetadata','ScopeEnum','INTERCEPT_KEY','2293116BHTEDI','76YJGFgC','413qBNBgf','defineProperty','Scope','push','toString','InterceptTargetTmp','354762tJTHse','Singleton','IIntercept','315pcuWZp','@midwayjs/core','constructor','(((.+)+)+)+$','search','20412wdrpne','5992230jGWRsh','isArray','14286MXjFQw','apply','8296vufxrW','__esModule','Intercept','../types/intercept','saveClassMetadata','match','1591470NAkFbo','toUpperCase'];a6_0xc6a8=function(){return _0x1584f1;};return a6_0xc6a8();}(function(_0x3a1699,_0x1141f4){const _0x1c27e8=a6_0x433a,_0x5839ec=_0x3a1699();while(!![]){try{const _0x16274f=-parseInt(_0x1c27e8(0x14b))/0x1+-parseInt(_0x1c27e8(0x144))/0x2*(parseInt(_0x1c27e8(0x156))/0x3)+-parseInt(_0x1c27e8(0x153))/0x4*(-parseInt(_0x1c27e8(0x14e))/0x5)+-parseInt(_0x1c27e8(0x143))/0x6+-parseInt(_0x1c27e8(0x145))/0x7*(-parseInt(_0x1c27e8(0x158))/0x8)+parseInt(_0x1c27e8(0x15e))/0x9+parseInt(_0x1c27e8(0x154))/0xa;if(_0x16274f===_0x1141f4)break;else _0x5839ec['push'](_0x5839ec['shift']());}catch(_0x22b73a){_0x5839ec['push'](_0x5839ec['shift']());}}}(a6_0xc6a8,0x3acb5));const a6_0x5c20b4=(function(){let _0x41c700=!![];return function(_0x402f02,_0x252fef){const _0x159255=_0x41c700?function(){const _0x555056=a6_0x433a;if(_0x252fef){const _0x48b3e6=_0x252fef[_0x555056(0x157)](_0x402f02,arguments);return _0x252fef=null,_0x48b3e6;}}:function(){};return _0x41c700=![],_0x159255;};}()),a6_0x4acf55=a6_0x5c20b4(this,function(){const _0x2bca44=a6_0x433a;return a6_0x4acf55[_0x2bca44(0x149)]()['search']('(((.+)+)+)+$')[_0x2bca44(0x149)]()[_0x2bca44(0x150)](a6_0x4acf55)[_0x2bca44(0x152)](_0x2bca44(0x151));});a6_0x4acf55();'use strict';Object[a6_0x13a6fe(0x146)](exports,a6_0x13a6fe(0x159),{'value':!![]}),exports[a6_0x13a6fe(0x14d)]=void 0x0,exports[a6_0x13a6fe(0x15a)]=Intercept;const core_1=require(a6_0x13a6fe(0x14f)),intercept_1=require(a6_0x13a6fe(0x15b));function Intercept(_0x41ed53){return _0x47a9e4=>{const _0x4b4b2a=a6_0x433a,_0x5afcef=(0x0,core_1[_0x4b4b2a(0x140)])(intercept_1['INTERCEPT_KEY'],intercept_1[_0x4b4b2a(0x14a)])||{};for(let _0x3e83c9 of Array[_0x4b4b2a(0x155)](_0x41ed53)?_0x41ed53:[_0x41ed53]){_0x3e83c9=_0x3e83c9[_0x4b4b2a(0x15f)]();!(_0x5afcef===null||_0x5afcef===void 0x0?void 0x0:_0x5afcef[_0x3e83c9])&&(_0x5afcef[_0x3e83c9]=[]);if(_0x5afcef[_0x3e83c9]['includes'](_0x47a9e4))continue;_0x5afcef[_0x3e83c9][_0x4b4b2a(0x148)](_0x47a9e4);}(0x0,core_1[_0x4b4b2a(0x13f)])()(_0x47a9e4),(0x0,core_1[_0x4b4b2a(0x147)])(core_1[_0x4b4b2a(0x141)][_0x4b4b2a(0x14c)])(_0x47a9e4),(0x0,core_1[_0x4b4b2a(0x15c)])(intercept_1[_0x4b4b2a(0x142)],_0x5afcef,intercept_1[_0x4b4b2a(0x14a)]);};}function a6_0x433a(_0x10ab4f,_0x1c8c14){_0x10ab4f=_0x10ab4f-0x13f;const _0x4a2bf5=a6_0xc6a8();let _0x4acf55=_0x4a2bf5[_0x10ab4f];return _0x4acf55;}class IIntercept{async[a6_0x13a6fe(0x15d)](_0x2e6a9a,_0x597928,_0x9c702a){return!![];}}exports[a6_0x13a6fe(0x14d)]=IIntercept;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare class ApiError extends AnnError {
|
|
2
|
+
static readonly TIMEOUT = 102403;
|
|
3
|
+
static readonly HEADERS_LACK = 102002;
|
|
4
|
+
static readonly HEADERS_DEVICE = 102003;
|
|
5
|
+
static readonly HEADERS_SIGNATURE = 102004;
|
|
6
|
+
static readonly HEADERS_CHECKCODE = 102005;
|
|
7
|
+
static readonly TIMEOUT_LOGINTIME = 102006;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a7_0x252fff=a7_0x28d1;(function(_0x35dd01,_0x5d85f1){var _0x1ebe0a=a7_0x28d1,_0x337ba0=_0x35dd01();while(!![]){try{var _0x28ded7=-parseInt(_0x1ebe0a(0x1b2))/0x1+-parseInt(_0x1ebe0a(0x1aa))/0x2+-parseInt(_0x1ebe0a(0x1b0))/0x3*(-parseInt(_0x1ebe0a(0x1ca))/0x4)+-parseInt(_0x1ebe0a(0x1c5))/0x5+parseInt(_0x1ebe0a(0x1bd))/0x6+-parseInt(_0x1ebe0a(0x1ae))/0x7+-parseInt(_0x1ebe0a(0x1bb))/0x8;if(_0x28ded7===_0x5d85f1)break;else _0x337ba0['push'](_0x337ba0['shift']());}catch(_0x3507d7){_0x337ba0['push'](_0x337ba0['shift']());}}}(a7_0x42bf,0xdc272));function a7_0x42bf(){var _0x450935=['6473152VLfFED','ApiError','30YJGoMo','function','769009kmEtCS','HEADERS_CHECKCODE','object','constructor','TIMEOUT_LOGINTIME','design:type','toString','apply','HEADERS_SIGNATURE','1375336HteXTw','(((.+)+)+)+$','10747164eVcjjB','HEADERS_LACK','decorate','请使用正确的设备','验证失败,请重新登录','__metadata','请求头信息不完整','__decorate','856685ocZQEE','HEADERS_DEVICE','getOwnPropertyDescriptor','length','defineProperty','506148awRQXS','登录超时,请重新登录','235638PoZJmr','search','TIMEOUT','请求超时,请重试'];a7_0x42bf=function(){return _0x450935;};return a7_0x42bf();}var a7_0x30bc43=(function(){var _0x15c893=!![];return function(_0x332df6,_0x5349b7){var _0x439c8d=_0x15c893?function(){var _0x255674=a7_0x28d1;if(_0x5349b7){var _0x53a362=_0x5349b7[_0x255674(0x1b9)](_0x332df6,arguments);return _0x5349b7=null,_0x53a362;}}:function(){};return _0x15c893=![],_0x439c8d;};}()),a7_0xa1a3ea=a7_0x30bc43(this,function(){var _0x5015f2=a7_0x28d1;return a7_0xa1a3ea[_0x5015f2(0x1b8)]()[_0x5015f2(0x1ab)]('(((.+)+)+)+$')[_0x5015f2(0x1b8)]()[_0x5015f2(0x1b5)](a7_0xa1a3ea)[_0x5015f2(0x1ab)](_0x5015f2(0x1bc));});a7_0xa1a3ea();'use strict';var __decorate=this&&this[a7_0x252fff(0x1c4)]||function(_0x4df4b9,_0x5c13d2,_0x823cf1,_0x818e){var _0x70a41d=a7_0x252fff,_0x5dbd5b=arguments[_0x70a41d(0x1c8)],_0x465a27=_0x5dbd5b<0x3?_0x5c13d2:_0x818e===null?_0x818e=Object[_0x70a41d(0x1c7)](_0x5c13d2,_0x823cf1):_0x818e,_0x5574d4;if(typeof Reflect==='object'&&typeof Reflect[_0x70a41d(0x1bf)]==='function')_0x465a27=Reflect[_0x70a41d(0x1bf)](_0x4df4b9,_0x5c13d2,_0x823cf1,_0x818e);else{for(var _0x43d938=_0x4df4b9[_0x70a41d(0x1c8)]-0x1;_0x43d938>=0x0;_0x43d938--)if(_0x5574d4=_0x4df4b9[_0x43d938])_0x465a27=(_0x5dbd5b<0x3?_0x5574d4(_0x465a27):_0x5dbd5b>0x3?_0x5574d4(_0x5c13d2,_0x823cf1,_0x465a27):_0x5574d4(_0x5c13d2,_0x823cf1))||_0x465a27;}return _0x5dbd5b>0x3&&_0x465a27&&Object['defineProperty'](_0x5c13d2,_0x823cf1,_0x465a27),_0x465a27;},__metadata=this&&this[a7_0x252fff(0x1c2)]||function(_0x39dcfd,_0x20647f){var _0x3c6369=a7_0x252fff;if(typeof Reflect===_0x3c6369(0x1b4)&&typeof Reflect['metadata']===_0x3c6369(0x1b1))return Reflect['metadata'](_0x39dcfd,_0x20647f);};Object[a7_0x252fff(0x1c9)](exports,'__esModule',{'value':!![]}),exports[a7_0x252fff(0x1af)]=void 0x0;function a7_0x28d1(_0x5bee74,_0x33ad14){_0x5bee74=_0x5bee74-0x1a9;var _0x4a51ff=a7_0x42bf();var _0xa1a3ea=_0x4a51ff[_0x5bee74];return _0xa1a3ea;}class ApiError extends AnnError{}exports['ApiError']=ApiError,ApiError['TIMEOUT']=0x19003,ApiError[a7_0x252fff(0x1be)]=0x18e72,ApiError['HEADERS_DEVICE']=0x18e73,ApiError[a7_0x252fff(0x1ba)]=0x18e74,ApiError['HEADERS_CHECKCODE']=0x18e75,ApiError['TIMEOUT_LOGINTIME']=0x18e76,__decorate([AnnErrorMsg(a7_0x252fff(0x1ad)),__metadata(a7_0x252fff(0x1b7),Object)],ApiError,a7_0x252fff(0x1ac),void 0x0),__decorate([AnnErrorMsg(a7_0x252fff(0x1c3)),__metadata(a7_0x252fff(0x1b7),Object)],ApiError,'HEADERS_LACK',void 0x0),__decorate([AnnErrorMsg(a7_0x252fff(0x1c0)),__metadata('design:type',Object)],ApiError,a7_0x252fff(0x1c6),void 0x0),__decorate([AnnErrorMsg('signature验证失败'),__metadata(a7_0x252fff(0x1b7),Object)],ApiError,a7_0x252fff(0x1ba),void 0x0),__decorate([AnnErrorMsg(a7_0x252fff(0x1c1)),__metadata('design:type',Object)],ApiError,a7_0x252fff(0x1b3),void 0x0),__decorate([AnnErrorMsg(a7_0x252fff(0x1a9)),__metadata(a7_0x252fff(0x1b7),Object)],ApiError,a7_0x252fff(0x1b6),void 0x0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAppsConfig(appName?: string, defaultValue?: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a8_0x3c4dc5=a8_0x5136;(function(_0x3540dc,_0x471529){const _0x280292=a8_0x5136,_0x45a4c6=_0x3540dc();while(!![]){try{const _0x14974f=-parseInt(_0x280292(0x101))/0x1*(-parseInt(_0x280292(0xfa))/0x2)+-parseInt(_0x280292(0xf3))/0x3*(parseInt(_0x280292(0x100))/0x4)+-parseInt(_0x280292(0xf7))/0x5+-parseInt(_0x280292(0xf2))/0x6*(parseInt(_0x280292(0xee))/0x7)+-parseInt(_0x280292(0xf4))/0x8*(-parseInt(_0x280292(0xf5))/0x9)+parseInt(_0x280292(0xed))/0xa*(parseInt(_0x280292(0xf0))/0xb)+parseInt(_0x280292(0xef))/0xc;if(_0x14974f===_0x471529)break;else _0x45a4c6['push'](_0x45a4c6['shift']());}catch(_0x1218ea){_0x45a4c6['push'](_0x45a4c6['shift']());}}}(a8_0x5c07,0x44367));const a8_0x34a0e0=(function(){let _0x30551f=!![];return function(_0x40c972,_0x10c1f0){const _0x36ca33=_0x30551f?function(){const _0x58ca81=a8_0x5136;if(_0x10c1f0){const _0x3a8687=_0x10c1f0[_0x58ca81(0xfc)](_0x40c972,arguments);return _0x10c1f0=null,_0x3a8687;}}:function(){};return _0x30551f=![],_0x36ca33;};}()),a8_0xf71ff=a8_0x34a0e0(this,function(){const _0xdb9762=a8_0x5136;return a8_0xf71ff[_0xdb9762(0xff)]()['search'](_0xdb9762(0x102))[_0xdb9762(0xff)]()[_0xdb9762(0xf9)](a8_0xf71ff)[_0xdb9762(0xfd)](_0xdb9762(0x102));});a8_0xf71ff();'use strict';function a8_0x5136(_0x5ac1b2,_0x543c5c){_0x5ac1b2=_0x5ac1b2-0xed;const _0x307212=a8_0x5c07();let _0xf71ff=_0x307212[_0x5ac1b2];return _0xf71ff;}Object['defineProperty'](exports,a8_0x3c4dc5(0xf8),{'value':!![]}),exports['getAppsConfig']=getAppsConfig;function a8_0x5c07(){const _0x57f699=['2589zHgmtM','546904Dozmgy','18fgASwD','APPSCONFIG_KEY','1154880CdxEsE','__esModule','constructor','596026NWZqzV','@midwayjs/core','apply','search','getClassMetadata','toString','2272uHVroA','1NFzFGt','(((.+)+)+)+$','get','10yYyzCZ','119frjcQi','5090292cdjmsY','3309548QPMYtw','AppsConfigTmp','56202ZXMIAe'];a8_0x5c07=function(){return _0x57f699;};return a8_0x5c07();}const core_1=require(a8_0x3c4dc5(0xfb)),action_1=require('../types/action');function getAppsConfig(_0x106abf,_0x253e58){const _0x39d7f9=a8_0x3c4dc5,_0x4fbf5c=(0x0,core_1[_0x39d7f9(0xfe)])(action_1[_0x39d7f9(0xf6)],action_1[_0x39d7f9(0xf1)])||{};return _0x106abf?lodash[_0x39d7f9(0x103)](_0x4fbf5c,_0x106abf,_0x253e58):_0x4fbf5c;}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface getRouteOption {
|
|
2
|
+
noreq?: boolean;
|
|
3
|
+
prefix?: string | Array<string>;
|
|
4
|
+
module?: string | boolean;
|
|
5
|
+
filter?: string[];
|
|
6
|
+
filepath?: boolean;
|
|
7
|
+
filterprefix?: string | Array<string>;
|
|
8
|
+
filtercustom?: (route: any) => boolean | void;
|
|
9
|
+
intercept?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function getRoutes(filter?: getRouteOption): {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a9_0x336f80=a9_0x1d77;(function(_0x1ca4cf,_0x5853dd){const _0x51d2dd=a9_0x1d77,_0x1b9dfd=_0x1ca4cf();while(!![]){try{const _0x12cd45=-parseInt(_0x51d2dd(0x129))/0x1+-parseInt(_0x51d2dd(0x10f))/0x2+parseInt(_0x51d2dd(0x159))/0x3*(-parseInt(_0x51d2dd(0x12c))/0x4)+-parseInt(_0x51d2dd(0x152))/0x5+-parseInt(_0x51d2dd(0x13b))/0x6*(-parseInt(_0x51d2dd(0x142))/0x7)+parseInt(_0x51d2dd(0x103))/0x8*(parseInt(_0x51d2dd(0x14a))/0x9)+parseInt(_0x51d2dd(0x144))/0xa;if(_0x12cd45===_0x5853dd)break;else _0x1b9dfd['push'](_0x1b9dfd['shift']());}catch(_0x1b3e96){_0x1b9dfd['push'](_0x1b9dfd['shift']());}}}(a9_0x3312,0xc56df));const a9_0x3cf2a1=(function(){let _0x37f26e=!![];return function(_0x3c939f,_0x49910f){const _0x2246ab=_0x37f26e?function(){if(_0x49910f){const _0x578673=_0x49910f['apply'](_0x3c939f,arguments);return _0x49910f=null,_0x578673;}}:function(){};return _0x37f26e=![],_0x2246ab;};}()),a9_0x3b5d47=a9_0x3cf2a1(this,function(){const _0x4d135e=a9_0x1d77;return a9_0x3b5d47[_0x4d135e(0x101)]()[_0x4d135e(0x153)](_0x4d135e(0x100))[_0x4d135e(0x101)]()[_0x4d135e(0x127)](a9_0x3b5d47)[_0x4d135e(0x153)](_0x4d135e(0x100));});function a9_0x3312(){const _0x475b73=['route','49OhElsN','FILESSTREAM','25769360LOjDes','propertyData','FILESTREAM','tagName','type','pprefix','9423846FIsmDZ','getClassMetadata','substring','boolean','path','required','key','getMethodParamTypes','3873215KTDmVa','search','some','filter','filterprefix','flags.label','WEB_ROUTER_PARAM_KEY','3yzwWrA','test','response','ACTION_RESPONSE_KEY','args','name','object','routes','defineProperty','indexOf','parameterIndex','split','routerName','RouteParamTypes','flags.default','isArray','listModule','(((.+)+)+)+$','toString','static/apitest','8lvbpKk','describe','flags.description','noreq','INJECT_CUSTOM_PARAM','PARAM','max','summary','children','ACTION_KEY','module','filtercustom','2443824EsBXRa','description','metadata','min','File','Number','Object','format','header','limit','request','只允许:[','allow','push','keys','文件上传-','get','number','HEADERS','title','__esModule','../types/action','iterator','@midwayjs/core','constructor','file','1455122VzbdoL','items','query','1316852nXGCjq','lodash','startsWith','method','string','length','QUERY','find','replace','requestMethod','rules','function','concat','@anveroapi/validator','ACTION_ROUTE_KEY','827598stEywf','filepath','default','prefix','getRoutes','Boolean'];a9_0x3312=function(){return _0x475b73;};return a9_0x3312();}a9_0x3b5d47();'use strict';Object[a9_0x336f80(0xf7)](exports,a9_0x336f80(0x123),{'value':!![]}),exports[a9_0x336f80(0x13f)]=getRoutes;const lodash_1=require(a9_0x336f80(0x12d)),validator_1=require(a9_0x336f80(0x139)),core_1=require(a9_0x336f80(0x126)),core_2=require('@midwayjs/core'),core_3=require(a9_0x336f80(0x126)),action_1=require(a9_0x336f80(0x124));function getRoutes(_0x22c8e3={'prefix':'/','module':![]}){const _0x4cf682=a9_0x336f80;var _0x2d17d6,_0x1211b9;const _0x256b4b=(0x0,core_3[_0x4cf682(0xff)])(action_1['ACTION_KEY']),_0x1b625d={},_0x3db506=Array[_0x4cf682(0xfe)](_0x22c8e3[_0x4cf682(0x155)]||[])?_0x22c8e3['filter']||[]:[_0x22c8e3[_0x4cf682(0x155)]];_0x22c8e3[_0x4cf682(0x13e)]&&(_0x22c8e3[_0x4cf682(0x13e)]=Array[_0x4cf682(0xfe)](_0x22c8e3[_0x4cf682(0x13e)])?_0x22c8e3['prefix']:[_0x22c8e3[_0x4cf682(0x13e)]]);_0x22c8e3[_0x4cf682(0x156)]&&(_0x22c8e3[_0x4cf682(0x156)]=Array[_0x4cf682(0xfe)](_0x22c8e3[_0x4cf682(0x156)])?_0x22c8e3[_0x4cf682(0x156)]:[_0x22c8e3[_0x4cf682(0x156)]]);_0x520ba7:for(const _0x1c0942 of _0x256b4b){let _0x16a5ff=(0x0,core_3[_0x4cf682(0x14b)])(action_1[_0x4cf682(0x10c)],_0x1c0942),_0x3ab335=(0x0,core_3[_0x4cf682(0x14b)])(action_1[_0x4cf682(0x13a)],_0x1c0942);if(_0x16a5ff&&_0x3ab335){let _0x1a9a6b=_0x16a5ff[_0x4cf682(0x13e)],_0x29fef5={};if(_0x22c8e3['module']){if(typeof _0x22c8e3['module']===_0x4cf682(0x130)&&(0x0,lodash_1[_0x4cf682(0x11f)])(_0x16a5ff,'module',![])!=_0x22c8e3[_0x4cf682(0x10d)])continue _0x520ba7;}else{if(_0x22c8e3[_0x4cf682(0x10d)]===![]&&!!(0x0,lodash_1[_0x4cf682(0x11f)])(_0x16a5ff,_0x4cf682(0x10d),null))continue _0x520ba7;}if(_0x22c8e3[_0x4cf682(0x13e)]&&!_0x22c8e3[_0x4cf682(0x13e)][_0x4cf682(0x154)](_0x576d41=>_0x1a9a6b[_0x4cf682(0x12e)](_0x576d41)))continue _0x520ba7;if(_0x22c8e3[_0x4cf682(0x156)]&&_0x22c8e3['filterprefix'][_0x4cf682(0x154)](_0x5cc417=>_0x1a9a6b[_0x4cf682(0x12e)](_0x5cc417)))continue _0x520ba7;if(_0x22c8e3[_0x4cf682(0x10e)]&&typeof _0x22c8e3[_0x4cf682(0x10e)]==_0x4cf682(0x137)&&_0x22c8e3[_0x4cf682(0x10e)](_0x16a5ff))continue _0x520ba7;_0x1a9a6b!=='/'?(_0x29fef5[_0x4cf682(0x10a)]=(_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff['routerOptions'][_0x4cf682(0x147)])||(/^\//[_0x4cf682(0x15a)](_0x1a9a6b)?_0x1a9a6b[_0x4cf682(0xfa)]('/')[0x1]:_0x1a9a6b),_0x29fef5[_0x4cf682(0x110)]=(_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff['routerOptions']['description'])||_0x29fef5[_0x4cf682(0x10a)],_0x29fef5[_0x4cf682(0xf6)]=[]):(_0x29fef5['summary']=(_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff['routerOptions'][_0x4cf682(0x147)])||_0x4cf682(0x13d),_0x29fef5[_0x4cf682(0x110)]=(_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff['routerOptions'][_0x4cf682(0x110)])||'',_0x29fef5['routes']=[]);_0x22c8e3[_0x4cf682(0x13c)]&&(_0x29fef5[_0x4cf682(0x13c)]=_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff[_0x4cf682(0x13c)]);(_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff['pprefix'])&&(_0x29fef5[_0x4cf682(0x13e)]=_0x16a5ff[_0x4cf682(0x149)]);(_0x16a5ff===null||_0x16a5ff===void 0x0?void 0x0:_0x16a5ff[_0x4cf682(0x10d)])&&(_0x29fef5[_0x4cf682(0x10d)]=_0x16a5ff[_0x4cf682(0x10d)]);let _0x2d5d52=(0x0,core_3[_0x4cf682(0x14b)])(core_2[_0x4cf682(0x107)],_0x1c0942)||{};if(typeof _0x3ab335[Symbol[_0x4cf682(0x125)]]===_0x4cf682(0x137))for(let _0xe3e135 of _0x3ab335){if((_0x22c8e3===null||_0x22c8e3===void 0x0?void 0x0:_0x22c8e3['intercept'])&&!(_0xe3e135===null||_0xe3e135===void 0x0?void 0x0:_0xe3e135['intercept']))continue;let _0xffbaf3={};_0xffbaf3['method']=_0xe3e135[_0x4cf682(0x135)],_0xffbaf3['route']=(_0x1a9a6b+_0xe3e135[_0x4cf682(0x14e)])[_0x4cf682(0x134)](/\/{2,}/g,'/'),_0xffbaf3[_0x4cf682(0x10a)]=(_0xe3e135===null||_0xe3e135===void 0x0?void 0x0:_0xe3e135[_0x4cf682(0xfb)])||_0x29fef5[_0x4cf682(0x10a)]||_0x4cf682(0x13d),_0xffbaf3[_0x4cf682(0x110)]=(_0xe3e135===null||_0xe3e135===void 0x0?void 0x0:_0xe3e135[_0x4cf682(0x110)])||'',_0xffbaf3[_0x4cf682(0x119)]=[],_0xffbaf3[_0x4cf682(0xf1)]=getMethodResponse(_0x1c0942,_0xe3e135[_0x4cf682(0x12f)]);_0xffbaf3[_0x4cf682(0x141)]['endsWith']('/')&&(_0xffbaf3[_0x4cf682(0x141)]=_0xffbaf3[_0x4cf682(0x141)][_0x4cf682(0x14c)](0x0,_0xffbaf3[_0x4cf682(0x141)][_0x4cf682(0x131)]-0x1));if(!(0x0,lodash_1[_0x4cf682(0x12e)])(_0xffbaf3[_0x4cf682(0x141)],_0x4cf682(0x102))&&!(0x0,lodash_1['startsWith'])(_0xffbaf3[_0x4cf682(0x141)],'/static/apitest')&&_0x3db506[_0x4cf682(0xf8)](_0xffbaf3[_0x4cf682(0x141)])===-0x1){if(!(_0x22c8e3===null||_0x22c8e3===void 0x0?void 0x0:_0x22c8e3[_0x4cf682(0x106)])){let _0x95c3a0=(0x0,core_3[_0x4cf682(0x151)])(new _0x1c0942(),_0xe3e135[_0x4cf682(0x12f)]);for(const _0x5d0e4c in _0x95c3a0){let _0x2bcb3a=(_0x2d17d6=_0x2d5d52[_0xe3e135[_0x4cf682(0x12f)]])===null||_0x2d17d6===void 0x0?void 0x0:_0x2d17d6[_0x4cf682(0x133)](_0x1053e7=>_0x1053e7[_0x4cf682(0xf9)]==_0x5d0e4c&&_0x1053e7['key']===core_2[_0x4cf682(0x158)]&&(_0x1053e7===null||_0x1053e7===void 0x0?void 0x0:_0x1053e7[_0x4cf682(0x111)]));if(_0x2bcb3a===null||_0x2bcb3a===void 0x0?void 0x0:_0x2bcb3a[_0x4cf682(0x111)]){let _0x302b07=convertTypeToString(_0x2bcb3a[_0x4cf682(0x111)][_0x4cf682(0x148)]||0x0);if([_0x4cf682(0x12b),'body'][_0x4cf682(0xf8)](_0x302b07)!=-0x1&&_0x2bcb3a['metadata']['propertyData'][_0x4cf682(0xf8)](':')==-0x1&&!_0xffbaf3[_0x4cf682(0x119)][_0x4cf682(0x133)](_0x43546a=>_0x43546a[_0x4cf682(0x150)]==_0x2bcb3a[_0x4cf682(0x111)][_0x4cf682(0x145)]))_0xffbaf3[_0x4cf682(0x119)][_0x4cf682(0x11c)]({'key':_0x2bcb3a[_0x4cf682(0x111)][_0x4cf682(0x145)],'title':_0x2bcb3a[_0x4cf682(0x111)][_0x4cf682(0x145)],'type':convertSchemaType(_0x95c3a0[_0x2bcb3a[_0x4cf682(0xf9)]][_0x4cf682(0xf4)]),'required':![],'default':'','desc':''});else{if(_0x302b07==_0x4cf682(0x128)){let _0x2d5e4d=((_0x1211b9=_0x2bcb3a===null||_0x2bcb3a===void 0x0?void 0x0:_0x2bcb3a['metadata'])===null||_0x1211b9===void 0x0?void 0x0:_0x1211b9[_0x4cf682(0x145)])||_0x4cf682(0x128);_0x2d5e4d[_0x4cf682(0xf8)](':')==-0x1&&!_0xffbaf3['request'][_0x4cf682(0x133)](_0x185479=>_0x185479[_0x4cf682(0x150)]==_0x2d5e4d&&_0x185479[_0x4cf682(0x148)]==_0x4cf682(0x128))&&_0xffbaf3[_0x4cf682(0x119)][_0x4cf682(0x11c)]({'key':_0x2d5e4d,'title':_0x4cf682(0x11e)+_0x2d5e4d,'type':_0x4cf682(0x128),'required':!![],'default':'','desc':''});}}}else{const _0x54c0f1=(0x0,core_3['getClassExtendedMetadata'])(validator_1['RULES_KEY'],_0x95c3a0[_0x5d0e4c]);_0x54c0f1&&_0xffbaf3[_0x4cf682(0x119)][_0x4cf682(0x11c)](...getJoiRequest(_0x54c0f1));}}}_0x29fef5[_0x4cf682(0xf6)][_0x4cf682(0x11c)](_0xffbaf3);}}if(_0x29fef5[_0x4cf682(0xf6)][_0x4cf682(0x131)]>0x0){let _0x23eee1=_0x1b625d[_0x1a9a6b];_0x23eee1?(_0x23eee1[_0x4cf682(0x10a)]!=_0x29fef5[_0x4cf682(0x10a)]&&(_0x23eee1[_0x4cf682(0x10a)]=_0x23eee1[_0x4cf682(0x10a)]+','+_0x29fef5[_0x4cf682(0x10a)]),_0x23eee1['description']!=_0x29fef5[_0x4cf682(0x110)]&&(_0x23eee1[_0x4cf682(0x110)]=_0x23eee1['description']+','+_0x29fef5['description']),_0x23eee1['routes']=_0x23eee1[_0x4cf682(0xf6)][_0x4cf682(0x138)](_0x29fef5[_0x4cf682(0xf6)]),_0x1b625d[_0x1a9a6b]=_0x23eee1):_0x1b625d[_0x1a9a6b]=_0x29fef5;}}}return _0x1b625d;}function getJoiRequest(_0x2845ca){const _0xa3cd6f=a9_0x336f80;var _0x6e64ae,_0x12feee;const _0x33df99=[];for(let _0xe4c13d in _0x2845ca){const _0x1867b4={'title':'','key':'','type':'','description':'','rules':{},'children':[]},_0x23428f=typeof _0x2845ca[_0xe4c13d][_0xa3cd6f(0x104)]==_0xa3cd6f(0x137)?_0x2845ca[_0xe4c13d][_0xa3cd6f(0x104)]():_0x2845ca[_0xe4c13d];_0x1867b4['key']=_0xe4c13d,_0x1867b4[_0xa3cd6f(0x148)]=_0x23428f['type'],_0x1867b4[_0xa3cd6f(0x122)]=(0x0,lodash_1[_0xa3cd6f(0x11f)])(_0x23428f,_0xa3cd6f(0x157),_0xe4c13d),_0x1867b4[_0xa3cd6f(0x13d)]=(0x0,lodash_1[_0xa3cd6f(0x11f)])(_0x23428f,_0xa3cd6f(0xfd),''),_0x1867b4[_0xa3cd6f(0x14f)]=(0x0,lodash_1[_0xa3cd6f(0x11f)])(_0x23428f,'flags.presence','')==_0xa3cd6f(0x14f),_0x1867b4[_0xa3cd6f(0x110)]=(0x0,lodash_1[_0xa3cd6f(0x11f)])(_0x23428f,_0xa3cd6f(0x105),'');if(_0x23428f[_0xa3cd6f(0x148)]==_0xa3cd6f(0xf5))(_0x23428f===null||_0x23428f===void 0x0?void 0x0:_0x23428f['keys'])&&(_0x1867b4['children']=getJoiRequest(_0x23428f[_0xa3cd6f(0x11d)]));else _0x23428f[_0xa3cd6f(0x148)]=='array'&&_0x23428f['items']&&Array['isArray'](_0x23428f[_0xa3cd6f(0x12a)])&&(((_0x12feee=(_0x6e64ae=_0x23428f===null||_0x23428f===void 0x0?void 0x0:_0x23428f[_0xa3cd6f(0x12a)])===null||_0x6e64ae===void 0x0?void 0x0:_0x6e64ae[0x0])===null||_0x12feee===void 0x0?void 0x0:_0x12feee[_0xa3cd6f(0x11d)])&&(_0x1867b4[_0xa3cd6f(0x10b)]=getJoiRequest(_0x23428f[_0xa3cd6f(0x12a)][0x0][_0xa3cd6f(0x11d)])));_0x23428f[_0xa3cd6f(0x11b)]&&Array['isArray'](_0x23428f[_0xa3cd6f(0x11b)])&&_0x23428f[_0xa3cd6f(0x11b)][_0xa3cd6f(0x131)]>0x0&&(_0x1867b4[_0xa3cd6f(0x110)]=_0xa3cd6f(0x11a)+_0x23428f['allow']['join'](',')+'];'+_0x1867b4[_0xa3cd6f(0x110)]);if(_0x1867b4[_0xa3cd6f(0x150)]&&_0x1867b4[_0xa3cd6f(0x148)]){const _0x5515de={};for(const _0x7819eb of _0x23428f[_0xa3cd6f(0x136)]||[]){if(_0x7819eb[_0xa3cd6f(0xf4)]===_0xa3cd6f(0x112)&&_0x7819eb['args'])_0x5515de[_0xa3cd6f(0x112)]=_0x7819eb[_0xa3cd6f(0xf3)][_0xa3cd6f(0x118)];else _0x7819eb['name']===_0xa3cd6f(0x109)&&(_0x5515de[_0xa3cd6f(0x109)]=_0x7819eb[_0xa3cd6f(0xf3)]['limit']);}_0x1867b4['rules']=_0x5515de;}_0x1867b4['key']&&_0x1867b4['title']&&_0x33df99[_0xa3cd6f(0x11c)](_0x1867b4);}return _0x33df99;}function convertSchemaType(_0x1d96eb){const _0x568869=a9_0x336f80;switch(_0x1d96eb){case _0x568869(0x115):return _0x568869(0xf5);case _0x568869(0x140):return _0x568869(0x14d);case _0x568869(0x114):return _0x568869(0x120);case'String':return'string';case _0x568869(0x113):return _0x568869(0x128);default:return'string';}}function a9_0x1d77(_0x1e96ff,_0x465ef7){_0x1e96ff=_0x1e96ff-0xf1;const _0x52df28=a9_0x3312();let _0x3b5d47=_0x52df28[_0x1e96ff];return _0x3b5d47;}function convertTypeToString(_0x9e4466){const _0x78da9e=a9_0x336f80;switch(_0x9e4466){case core_1['RouteParamTypes'][_0x78da9e(0x121)]:return _0x78da9e(0x117);case core_1[_0x78da9e(0xfc)][_0x78da9e(0x132)]:return _0x78da9e(0x12b);case core_1[_0x78da9e(0xfc)][_0x78da9e(0x108)]:return _0x78da9e(0x14e);case core_1[_0x78da9e(0xfc)]['BODY']:return'body';case core_1[_0x78da9e(0xfc)]['FIELDS']:case core_1[_0x78da9e(0xfc)][_0x78da9e(0x143)]:case core_1[_0x78da9e(0xfc)][_0x78da9e(0x146)]:return'file';default:return _0x78da9e(0x117);}}function getMethodResponse(_0x52e881,_0x2080b6){const _0x21aa8a=a9_0x336f80,_0x350394=(0x0,core_3[_0x21aa8a(0x14b)])(action_1[_0x21aa8a(0xf2)],_0x52e881);if(!_0x350394)return null;const _0x202b5b=_0x350394[_0x21aa8a(0x133)](_0x19d458=>_0x19d458['method']===_0x2080b6);if(!_0x202b5b)return null;return{'format':_0x202b5b[_0x21aa8a(0x116)]||'default','type':_0x202b5b[_0x21aa8a(0x148)],'description':_0x202b5b[_0x21aa8a(0x110)]||'','properties':_0x202b5b['properties']||[],'errors':_0x202b5b['errors']||[]};}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { getRouteOption } from "./getRoutes";
|
|
2
|
+
export interface SwaggerDefinition {
|
|
3
|
+
type: string;
|
|
4
|
+
properties?: {
|
|
5
|
+
[key: string]: SchemaObject;
|
|
6
|
+
};
|
|
7
|
+
required?: string[];
|
|
8
|
+
description?: string;
|
|
9
|
+
items?: SchemaObject;
|
|
10
|
+
}
|
|
11
|
+
export interface SwaggerJsonOption extends getRouteOption {
|
|
12
|
+
host?: string;
|
|
13
|
+
basePath?: string;
|
|
14
|
+
schemes?: string[];
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
version?: string;
|
|
18
|
+
definitions?: {
|
|
19
|
+
[key: string]: SwaggerDefinition;
|
|
20
|
+
};
|
|
21
|
+
extraDefinitions?: {
|
|
22
|
+
[key: string]: SwaggerDefinition;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
interface SchemaObject {
|
|
26
|
+
type?: string;
|
|
27
|
+
format?: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
default?: string | number | boolean;
|
|
30
|
+
properties?: Record<string, SchemaObject>;
|
|
31
|
+
items?: SchemaObject;
|
|
32
|
+
required?: string[];
|
|
33
|
+
minimum?: number;
|
|
34
|
+
maximum?: number;
|
|
35
|
+
enum?: (string | number)[];
|
|
36
|
+
oneOf?: SchemaObject[];
|
|
37
|
+
$ref?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function getSwaggerJson(filter?: SwaggerJsonOption): Record<string, any>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a10_0x1bcc7f=a10_0x5341;(function(_0x58b65b,_0x3b6e36){const _0x45d04d=a10_0x5341,_0x1bd368=_0x58b65b();while(!![]){try{const _0x152c44=parseInt(_0x45d04d(0x115))/0x1*(-parseInt(_0x45d04d(0x113))/0x2)+-parseInt(_0x45d04d(0x11c))/0x3+parseInt(_0x45d04d(0x168))/0x4*(-parseInt(_0x45d04d(0x12e))/0x5)+parseInt(_0x45d04d(0x10d))/0x6*(parseInt(_0x45d04d(0x14c))/0x7)+-parseInt(_0x45d04d(0x120))/0x8*(parseInt(_0x45d04d(0x14a))/0x9)+parseInt(_0x45d04d(0x131))/0xa*(parseInt(_0x45d04d(0x109))/0xb)+parseInt(_0x45d04d(0x124))/0xc*(-parseInt(_0x45d04d(0x151))/0xd);if(_0x152c44===_0x3b6e36)break;else _0x1bd368['push'](_0x1bd368['shift']());}catch(_0x4630e5){_0x1bd368['push'](_0x1bd368['shift']());}}}(a10_0x1bf2,0x3f949));const a10_0x7d5d56=(function(){let _0x7b5d81=!![];return function(_0x1d1b72,_0x2a9639){const _0x3323b4=_0x7b5d81?function(){if(_0x2a9639){const _0x3c6fff=_0x2a9639['apply'](_0x1d1b72,arguments);return _0x2a9639=null,_0x3c6fff;}}:function(){};return _0x7b5d81=![],_0x3323b4;};}()),a10_0x3a1ae9=a10_0x7d5d56(this,function(){const _0xa5064e=a10_0x5341;return a10_0x3a1ae9[_0xa5064e(0x135)]()[_0xa5064e(0x10a)]('(((.+)+)+)+$')[_0xa5064e(0x135)]()['constructor'](a10_0x3a1ae9)[_0xa5064e(0x10a)](_0xa5064e(0x145));});function a10_0x5341(_0x1e11ae,_0x1fa814){_0x1e11ae=_0x1e11ae-0xfd;const _0x5a23fa=a10_0x1bf2();let _0x3a1ae9=_0x5a23fa[_0x1e11ae];return _0x3a1ae9;}a10_0x3a1ae9();'use strict';Object['defineProperty'](exports,a10_0x1bcc7f(0x161),{'value':!![]}),exports[a10_0x1bcc7f(0x155)]=getSwaggerJson;const getRoutes_1=require(a10_0x1bcc7f(0x160)),MEDIA_TYPE_JSON=a10_0x1bcc7f(0x158),MEDIA_TYPE_FORM_DATA='multipart/form-data',PARAM_IN_PATH='path',PARAM_IN_QUERY=a10_0x1bcc7f(0x14b);function convertRouteToSwaggerFormat(_0x1dd3ef){const _0x381b51=a10_0x1bcc7f;return _0x1dd3ef[_0x381b51(0x13a)](/:([^\/]+)/g,_0x381b51(0x10e));}const DEFAULT_DEFINITIONS={'ApiResponse':{'type':a10_0x1bcc7f(0xfd),'properties':{'code':{'type':a10_0x1bcc7f(0x121),'description':a10_0x1bcc7f(0x14f)},'message':{'type':a10_0x1bcc7f(0x15b),'description':a10_0x1bcc7f(0x11a)},'data':{'type':a10_0x1bcc7f(0x106),'description':a10_0x1bcc7f(0x13b)},'extra':{'type':a10_0x1bcc7f(0x106),'description':a10_0x1bcc7f(0x165)}},'required':[a10_0x1bcc7f(0x15f)]},'ApiResponseList':{'type':'object','properties':{'code':{'type':a10_0x1bcc7f(0x121),'description':a10_0x1bcc7f(0x14f)},'message':{'type':a10_0x1bcc7f(0x15b),'description':a10_0x1bcc7f(0x11a)},'data':{'type':'array','items':{'type':'any'},'description':'返回数据列表'},'extra':{'type':a10_0x1bcc7f(0xfd),'properties':{'pageinfo':{'type':'any','description':a10_0x1bcc7f(0x16a)},'pagetotal':{'type':a10_0x1bcc7f(0x121),'description':a10_0x1bcc7f(0x164)}},'description':a10_0x1bcc7f(0x165)}},'required':['code']},'ApiError':{'type':a10_0x1bcc7f(0xfd),'properties':{'code':{'type':a10_0x1bcc7f(0x121),'description':a10_0x1bcc7f(0x14d)},'message':{'type':a10_0x1bcc7f(0x15b),'description':a10_0x1bcc7f(0x111)}},'required':[a10_0x1bcc7f(0x15f),a10_0x1bcc7f(0x157)]}},BASE_RESPONSE_PROPERTIES={'code':{'type':a10_0x1bcc7f(0x121),'description':a10_0x1bcc7f(0x107)}};function a10_0x1bf2(){const _0x15d55e=['join','root','summary','1.0.0','page','(((.+)+)+)+$','response','host','路由参数:\x20','file','2597877ZNyJTu','query','7XDFWPc','错误码','sort','状态码,0表示成功,其他为错误码','forEach','359983ukyGji','push','trim','type','getSwaggerJson','includes','message','application/json','default','children','string','maximum','map','name','code','./getRoutes','__esModule','错误码:\x20','tags','总数量','附加数据,如分页信息','module','array','787076rFFsdb','返回数据列表','分页参数','some','format','object','max','definitions','http','min','schemes','filter','get','from','any','状态码,0表示成功','has','22YMGsLy','search','GET','toUpperCase','2893734icZJWG','{$1}','errors','split','错误信息','basePath','376214taoRew','PUT','1HWdHUL','请求成功','date','paths','routes','提示信息','key','37206TcqsXE','localeCompare','indexOf','charAt','8wHmstu','integer','request','title','12Dknnzh','method','://','binary','#/components/schemas/ApiResponse','slice','localhost:7001','rules','match','PATCH','5OrzocB','3.0.0','route','2458790eXZdpr','本接口文档由API自动解析生成','version','required','toString','length','getRoutes','description','path','replace','返回数据','POST','extraDefinitions','接口文档','custom'];a10_0x1bf2=function(){return _0x15d55e;};return a10_0x1bf2();}function getSwaggerJson(_0x5cf29e={'prefix':'/','module':![]}){const _0x3f9e4d=a10_0x1bcc7f,_0x1f5a74=(0x0,getRoutes_1[_0x3f9e4d(0x137)])(_0x5cf29e),_0x11cb30=new Map(),_0x2feb95=new Map(),_0x2dff70=_0x5cf29e[_0x3f9e4d(0xff)]?_0x5cf29e[_0x3f9e4d(0xff)]:{...DEFAULT_DEFINITIONS,..._0x5cf29e[_0x3f9e4d(0x13d)]||{}},_0x157d6a=_0x5cf29e[_0x3f9e4d(0x147)]||_0x3f9e4d(0x12a),_0x3d07af=_0x5cf29e[_0x3f9e4d(0x112)]||'/',_0x2ff573=(_0x5cf29e[_0x3f9e4d(0x102)]||[_0x3f9e4d(0x100)])[0x0],_0xceb2bf={'openapi':_0x3f9e4d(0x12f),'info':{'title':_0x5cf29e['title']||_0x3f9e4d(0x13e),'description':_0x5cf29e[_0x3f9e4d(0x138)]||_0x3f9e4d(0x132),'version':_0x5cf29e[_0x3f9e4d(0x133)]||_0x3f9e4d(0x143)},'servers':[{'url':_0x2ff573+_0x3f9e4d(0x126)+_0x157d6a+_0x3d07af,'description':'默认服务器'}],'tags':[],'paths':{},'components':{'schemas':_0x2dff70}};for(const _0x2ae6dd in _0x1f5a74){const _0x1c3672=_0x1f5a74[_0x2ae6dd],_0x7cb2c5=(_0x1c3672===null||_0x1c3672===void 0x0?void 0x0:_0x1c3672['description'])||(_0x1c3672===null||_0x1c3672===void 0x0?void 0x0:_0x1c3672['summary'])||'default',_0x467b7c=buildTagHierarchy(_0x2ae6dd,_0x1c3672);addTagsToMap(_0x11cb30,_0x467b7c,_0x7cb2c5);const _0x30cbb7=_0x467b7c[_0x467b7c[_0x3f9e4d(0x136)]-0x1]||'';for(const _0x118aeb of(_0x1c3672===null||_0x1c3672===void 0x0?void 0x0:_0x1c3672[_0x3f9e4d(0x119)])||[]){if(!_0x118aeb[_0x3f9e4d(0x130)])continue;const _0x3dfd72=convertRouteToSwaggerFormat(_0x118aeb['route']);!_0xceb2bf['paths'][_0x3dfd72]&&(_0xceb2bf['paths'][_0x3dfd72]={});if(!_0xceb2bf['paths'][_0x3dfd72][_0x118aeb[_0x3f9e4d(0x125)]]){const {parameters:_0x707039,requestBody:_0x204c48,hasBody:_0x25ee63}=buildParameters(_0x118aeb[_0x3f9e4d(0x122)]||[],_0x3dfd72,_0x118aeb['method']);_0xceb2bf[_0x3f9e4d(0x118)][_0x3dfd72][_0x118aeb['method']]={'summary':_0x118aeb[_0x3f9e4d(0x142)],'description':(_0x118aeb===null||_0x118aeb===void 0x0?void 0x0:_0x118aeb[_0x3f9e4d(0x138)])||'','tags':_0x30cbb7?[_0x30cbb7]:[],'operationId':buildOperationId(_0x3dfd72,_0x118aeb['method'],_0x2feb95),'parameters':_0x707039,..._0x25ee63&&{'requestBody':_0x204c48},'responses':buildRouteResponse(_0x118aeb===null||_0x118aeb===void 0x0?void 0x0:_0x118aeb[_0x3f9e4d(0x146)])};}}}return _0xceb2bf[_0x3f9e4d(0x163)]=Array[_0x3f9e4d(0x105)](_0x11cb30['values']())['filter'](_0x21b07a=>{const _0x36db85=_0x3f9e4d;var _0x3fe87c;return((_0x3fe87c=_0x21b07a[_0x36db85(0x15e)])===null||_0x3fe87c===void 0x0?void 0x0:_0x3fe87c[_0x36db85(0x153)]())&&_0x21b07a[_0x36db85(0x15e)]!=='/';})['map'](_0x359eea=>{const _0x252d19=_0x3f9e4d;var _0x3939f8;return{'name':_0x359eea[_0x252d19(0x15e)][_0x252d19(0x153)](),'description':((_0x3939f8=_0x359eea['description'])===null||_0x3939f8===void 0x0?void 0x0:_0x3939f8[_0x252d19(0x153)]())||_0x359eea[_0x252d19(0x15e)]['trim']()};})[_0x3f9e4d(0x14e)]((_0x3bea39,_0x3485b4)=>_0x3bea39['name'][_0x3f9e4d(0x11d)](_0x3485b4['name'])),_0xceb2bf;}function buildTagHierarchy(_0x853588,_0x2acb23){const _0x4724ed=a10_0x1bcc7f,_0x545362=(_0x2acb23===null||_0x2acb23===void 0x0?void 0x0:_0x2acb23['prefix'])||null,_0x211ae9=(_0x2acb23===null||_0x2acb23===void 0x0?void 0x0:_0x2acb23[_0x4724ed(0x166)])||null,_0xd92d1c=(_0x853588===null||_0x853588===void 0x0?void 0x0:_0x853588[_0x4724ed(0x153)]())||'';if(!_0xd92d1c||_0xd92d1c==='/')return[];if(!_0x545362&&!_0x211ae9)return[_0xd92d1c];const _0x5b2a07=[];_0x545362&&_0x545362!=='/'&&_0x545362!==''&&_0x5b2a07[_0x4724ed(0x152)](..._0x545362[_0x4724ed(0x13a)](/^\/|\/$/g,'')[_0x4724ed(0x110)]('/')[_0x4724ed(0x103)](Boolean));if(_0x211ae9&&_0x211ae9!==''){const _0x1a4c95=_0x211ae9['trim']();!_0x5b2a07['includes'](_0x1a4c95)&&_0x5b2a07[_0x4724ed(0x152)](_0x1a4c95);}let _0x3aeab3=_0xd92d1c;const _0x5d0aa2=_0x5b2a07[_0x4724ed(0x140)]('/');_0x5d0aa2&&_0x3aeab3[_0x4724ed(0x156)](_0x5d0aa2)&&(_0x3aeab3=_0x3aeab3[_0x4724ed(0x129)](_0x3aeab3[_0x4724ed(0x11e)](_0x5d0aa2)+_0x5d0aa2[_0x4724ed(0x136)]));_0x3aeab3=_0x3aeab3[_0x4724ed(0x13a)](/^\/|\/$/g,'')[_0x4724ed(0x153)]();_0x3aeab3&&_0x5b2a07[_0x4724ed(0x152)](_0x3aeab3);const _0x16f764=[];let _0x4cf922='';for(const _0xcaaa1 of _0x5b2a07){_0x4cf922=_0x4cf922?_0x4cf922+'/'+_0xcaaa1:_0xcaaa1,_0x16f764[_0x4724ed(0x152)](_0x4cf922);}return _0x16f764[_0x4724ed(0x136)]>0x0?_0x16f764:[_0xd92d1c];}function addTagsToMap(_0x4bd0ac,_0x433101,_0x2aff95){const _0x28b7ab=a10_0x1bcc7f;_0x433101[_0x28b7ab(0x150)]((_0x4d30a3,_0x363f97)=>{const _0x49396d=_0x28b7ab;if(!_0x4d30a3||_0x4d30a3==='/')return;!_0x4bd0ac[_0x49396d(0x108)](_0x4d30a3)&&_0x4bd0ac['set'](_0x4d30a3,{'name':_0x4d30a3,'description':_0x363f97===_0x433101['length']-0x1?_0x2aff95:_0x4d30a3});});}function buildOperationId(_0x480ba8,_0x31ee30,_0x3ad031){const _0x263238=a10_0x1bcc7f,_0x36639e=_0x480ba8[_0x263238(0x110)]('/')['filter'](Boolean)[_0x263238(0x15d)](_0x3f6715=>{const _0x34191b=_0x263238,_0x1dbbc0=_0x3f6715[_0x34191b(0x12c)](/(?<=\{)[^\/]+(?=\})/);return _0x1dbbc0?_0x1dbbc0[0x0]:_0x3f6715;})[_0x263238(0x103)](_0x301d39=>_0x301d39[_0x263238(0x13a)](/[^a-zA-Z0-9]/g,'')),_0x120e53=_0x36639e[_0x263238(0x15d)](_0x3d6ed6=>_0x3d6ed6['charAt'](0x0)[_0x263238(0x10c)]()+_0x3d6ed6[_0x263238(0x129)](0x1))[_0x263238(0x140)]('.'),_0x5cd622=_0x120e53||_0x263238(0x141),_0x1b057c=_0x3ad031[_0x263238(0x104)](_0x5cd622)||0x0;return _0x3ad031['set'](_0x5cd622,_0x1b057c+0x1),_0x1b057c>0x0?''+_0x5cd622+(_0x31ee30[_0x263238(0x11f)](0x0)[_0x263238(0x10c)]()+_0x31ee30[_0x263238(0x129)](0x1)):_0x5cd622;}function buildParameters(_0x1776fc,_0x58ec9a,_0x124cb1=a10_0x1bcc7f(0x10b)){const _0x3712c4=a10_0x1bcc7f;var _0xbb2e09;const _0x168388=[],_0x31f104=[],_0x3c56e4=[],_0x120b07=[_0x3712c4(0x13c),_0x3712c4(0x114),_0x3712c4(0x12d)][_0x3712c4(0x156)](_0x124cb1['toUpperCase']()),_0x5a8440=_0x58ec9a['match'](/(?<=\{)[^\/]+(?=\})/g)||[];for(const _0x420e81 of _0x5a8440){_0x168388[_0x3712c4(0x152)]({'name':_0x420e81,'in':PARAM_IN_PATH,'required':!![],'schema':{'type':'string'},'description':_0x3712c4(0x148)+_0x420e81});}for(const _0xf88369 of _0x1776fc){switch(_0xf88369[_0x3712c4(0x154)]){case'file':_0x3c56e4[_0x3712c4(0x152)](_0xf88369);break;case'query':_0x168388['push']({'name':_0xf88369[_0x3712c4(0x11b)],'in':PARAM_IN_QUERY,'required':_0xf88369[_0x3712c4(0x134)]||![],'schema':normalizeTypeSchema(_0xf88369,![]),'description':_0xf88369['description']||_0xf88369[_0x3712c4(0x123)]||_0xf88369[_0x3712c4(0x11b)]});break;case _0x3712c4(0x139):break;case'body':_0x31f104[_0x3712c4(0x152)](_0xf88369);break;default:if(((_0xbb2e09=_0xf88369[_0x3712c4(0x15a)])===null||_0xbb2e09===void 0x0?void 0x0:_0xbb2e09[_0x3712c4(0x136)])>0x0)_0x31f104[_0x3712c4(0x152)](_0xf88369);else _0x120b07?_0x31f104['push'](_0xf88369):_0x168388[_0x3712c4(0x152)]({'name':_0xf88369['key'],'in':PARAM_IN_QUERY,'required':_0xf88369[_0x3712c4(0x134)]||![],'schema':normalizeTypeSchema(_0xf88369,![]),'description':_0xf88369[_0x3712c4(0x138)]||_0xf88369[_0x3712c4(0x123)]||_0xf88369[_0x3712c4(0x11b)]});}}if(_0x3c56e4['length']>0x0)return{'parameters':_0x168388,'requestBody':{'content':{[MEDIA_TYPE_FORM_DATA]:{'schema':buildMultipartFormDataSchema([..._0x3c56e4,..._0x31f104])}},'required':!![]},'hasBody':!![]};if(_0x31f104['length']>0x0){const _0xc85c28=_0x31f104[_0x3712c4(0x103)](_0x5782f2=>_0x5782f2[_0x3712c4(0x134)])[_0x3712c4(0x15d)](_0x35b469=>_0x35b469[_0x3712c4(0x11b)]),_0x3bb52c=buildProperties(_0x31f104,![]);return{'parameters':_0x168388,'requestBody':{'content':{[MEDIA_TYPE_JSON]:{'schema':{'type':_0x3712c4(0xfd),'properties':_0x3bb52c,..._0xc85c28[_0x3712c4(0x136)]>0x0&&{'required':_0xc85c28}}}},'required':_0x31f104[_0x3712c4(0x16b)](_0x307a46=>_0x307a46[_0x3712c4(0x134)])},'hasBody':!![]};}return{'parameters':_0x168388,'hasBody':![]};}function buildMultipartFormDataSchema(_0x6b29ef){const _0x41fabc=a10_0x1bcc7f,_0xb67c85={},_0x1328c5=[];for(const _0x429807 of _0x6b29ef){const _0x382d95=_0x429807['type']===_0x41fabc(0x149);_0xb67c85[_0x429807[_0x41fabc(0x11b)]]=_0x382d95?{'type':'string','format':_0x41fabc(0x127)}:normalizeTypeSchema(_0x429807,![]);if(_0x429807['required'])_0x1328c5['push'](_0x429807[_0x41fabc(0x11b)]);}const _0x447bd5={'type':_0x41fabc(0xfd),'properties':_0xb67c85};if(_0x1328c5[_0x41fabc(0x136)]>0x0)_0x447bd5['required']=_0x1328c5;return _0x447bd5;}function buildRouteResponse(_0x3c31ff){const _0x1588d9=()=>{const _0x382816=a10_0x5341;var _0x1233f9;if(!_0x3c31ff)return{'description':_0x382816(0x116),'content':{[MEDIA_TYPE_JSON]:{'schema':{'$ref':_0x382816(0x128)}}}};const _0x3af09d=_0x3c31ff[_0x382816(0x16c)]||_0x382816(0x159),_0x4f468d=[];return _0x3af09d===_0x382816(0x13f)?_0x4f468d[_0x382816(0x152)]({'type':_0x382816(0xfd),'properties':buildProperties(_0x3c31ff['properties']||[],!![])}):_0x4f468d[_0x382816(0x152)](buildDefaultResponseSchema(_0x3c31ff)),((_0x1233f9=_0x3c31ff[_0x382816(0x10f)])===null||_0x1233f9===void 0x0?void 0x0:_0x1233f9['length'])>0x0&&_0x4f468d['push'](..._0x3c31ff['errors'][_0x382816(0x15d)](_0x127373=>({'type':_0x382816(0xfd),'properties':{'code':{'type':_0x382816(0x121),'description':_0x382816(0x162)+_0x127373[_0x382816(0x15f)]},'message':{'type':_0x382816(0x15b),'description':_0x127373['message']}},'example':{'code':_0x127373[_0x382816(0x15f)],'message':_0x127373['message']}}))),{'description':_0x3c31ff[_0x382816(0x138)]||_0x382816(0x116),'content':{[MEDIA_TYPE_JSON]:{'schema':_0x4f468d['length']===0x1?_0x4f468d[0x0]:{'oneOf':_0x4f468d}}}};};return{'200':_0x1588d9()};}function buildDefaultResponseSchema(_0x4647b5){const _0x5cf268=a10_0x1bcc7f,_0x408075=buildProperties(_0x4647b5['properties']||[],!![]);if(_0x4647b5[_0x5cf268(0x154)]===_0x5cf268(0x144))return{'type':'object','properties':{...BASE_RESPONSE_PROPERTIES,'data':{'type':_0x5cf268(0x167),'items':_0x408075,'description':_0x5cf268(0x169)},'extra':{'type':'object','properties':{'pageinfo':{'type':_0x5cf268(0xfd),'description':'分页参数'},'pagetotal':{'type':_0x5cf268(0x121),'description':'总数量'}}}},'required':['code']};if(_0x4647b5['type']===_0x5cf268(0x167))return{'type':_0x5cf268(0xfd),'properties':{...BASE_RESPONSE_PROPERTIES,'data':{'type':_0x5cf268(0x167),'items':_0x408075,'description':_0x5cf268(0x169)}},'required':[_0x5cf268(0x15f)]};return{'type':_0x5cf268(0xfd),'properties':{...BASE_RESPONSE_PROPERTIES,'data':_0x408075},'required':[_0x5cf268(0x15f)]};}function normalizeTypeSchema(_0x72a538,_0x3759a9=![]){const _0x57b04a=a10_0x1bcc7f;var _0x4f9066,_0x6a4eeb,_0x59f483,_0x5d1b4e;const _0x595241=_0x72a538['type']||_0x57b04a(0x15b),_0x1b5bde=_0x3759a9?_0x72a538[_0x57b04a(0x138)]||_0x72a538['key']:_0x72a538[_0x57b04a(0x138)]||_0x72a538['title']||_0x72a538[_0x57b04a(0x11b)];if(_0x595241===_0x57b04a(0x117)){const _0x2f0d53={'type':'string','format':_0x57b04a(0x117),'description':_0x1b5bde};return _0x72a538[_0x57b04a(0x159)]!==undefined&&_0x72a538[_0x57b04a(0x159)]!==''&&(_0x2f0d53['default']=_0x72a538[_0x57b04a(0x159)]),_0x2f0d53;}if(_0x595241===_0x57b04a(0x167)){const _0x76e06c=((_0x4f9066=_0x72a538[_0x57b04a(0x15a)])===null||_0x4f9066===void 0x0?void 0x0:_0x4f9066[_0x57b04a(0x136)])>0x0?buildProperties(_0x72a538[_0x57b04a(0x15a)],_0x3759a9):{'type':_0x57b04a(0x15b)};return{'type':_0x57b04a(0x167),'items':_0x76e06c,'description':_0x1b5bde};}if(_0x595241===_0x57b04a(0xfd)){const _0x12530c=((_0x6a4eeb=_0x72a538[_0x57b04a(0x15a)])===null||_0x6a4eeb===void 0x0?void 0x0:_0x6a4eeb[_0x57b04a(0x136)])>0x0?buildProperties(_0x72a538[_0x57b04a(0x15a)],_0x3759a9):{};return{'type':_0x57b04a(0xfd),'properties':_0x12530c,'description':_0x1b5bde};}const _0x3e6ebc={'type':_0x595241,'description':_0x1b5bde};return _0x72a538[_0x57b04a(0x159)]!==undefined&&_0x72a538[_0x57b04a(0x159)]!==''&&(_0x3e6ebc[_0x57b04a(0x159)]=_0x72a538[_0x57b04a(0x159)]),((_0x59f483=_0x72a538[_0x57b04a(0x12b)])===null||_0x59f483===void 0x0?void 0x0:_0x59f483['min'])!==undefined&&(_0x3e6ebc['minimum']=_0x72a538[_0x57b04a(0x12b)][_0x57b04a(0x101)]),((_0x5d1b4e=_0x72a538['rules'])===null||_0x5d1b4e===void 0x0?void 0x0:_0x5d1b4e[_0x57b04a(0xfe)])!==undefined&&(_0x3e6ebc[_0x57b04a(0x15c)]=_0x72a538['rules'][_0x57b04a(0xfe)]),_0x3e6ebc;}function buildProperties(_0x440929,_0x398e00=![]){const _0x2b0335=a10_0x1bcc7f;if(!_0x440929||_0x440929[_0x2b0335(0x136)]===0x0)return{};const _0x1d7b0e={};for(const _0x666786 of _0x440929){_0x1d7b0e[_0x666786['key']]=normalizeTypeSchema(_0x666786,_0x398e00);}return _0x1d7b0e;}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getAppsConfig } from './helper/getAppsConfig';
|
|
2
|
+
export * from './types/common';
|
|
3
|
+
export * from './service/ApitestService';
|
|
4
|
+
export { Application } from '@midwayjs/koa';
|
|
5
|
+
export { Action } from './decorator/Action';
|
|
6
|
+
export { Apitest } from './decorator/ActionApitest';
|
|
7
|
+
export { Intercept, IIntercept } from './decorator/Intercept';
|
|
8
|
+
export { ActionResponseOption, ResponseProperty, ErrorResponse } from './types/action';
|
|
9
|
+
export { ILogger } from '@midwayjs/logger';
|
|
10
|
+
export { getRoutes } from './helper/getRoutes';
|
|
11
|
+
export { getSwaggerJson } from './helper/getSwaggerJson';
|
|
12
|
+
export { ApiError } from './exception/ApiError';
|
|
13
|
+
export { CacheService } from '@anveroapi/cache';
|
|
14
|
+
export { EventService } from '@anveroapi/event';
|
|
15
|
+
export { ApiService } from './service/ApiService';
|
|
16
|
+
export { ExcelStream } from './service/ExcelStream';
|
|
17
|
+
export { ExcelService } from './service/ExcelService';
|
|
18
|
+
export { ValidatorError, ValidatorService } from '@anveroapi/validator';
|
|
19
|
+
export { CustomConfiguration as Configuration } from './configuration';
|
|
20
|
+
export { File, Files, Fields, Body, Param, Query, Headers, Init } from "@midwayjs/core";
|
|
21
|
+
export { App, Config, Logger, Provide, Inject, Scope, Singleton, ScopeEnum } from "@midwayjs/core";
|
|
22
|
+
export { getAppsConfig };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a11_0x1e6e63=a11_0x13b0;function a11_0x13b0(_0x5a90b6,_0x2ce3ed){_0x5a90b6=_0x5a90b6-0x1a1;var _0x39af24=a11_0x6796();var _0x4cd60c=_0x39af24[_0x5a90b6];return _0x4cd60c;}(function(_0x3ab9bf,_0x5d9d64){var _0x3b7ea1=a11_0x13b0,_0x1b238c=_0x3ab9bf();while(!![]){try{var _0x422919=-parseInt(_0x3b7ea1(0x1b0))/0x1+parseInt(_0x3b7ea1(0x1a5))/0x2+parseInt(_0x3b7ea1(0x1ae))/0x3+parseInt(_0x3b7ea1(0x1db))/0x4+parseInt(_0x3b7ea1(0x1dc))/0x5*(parseInt(_0x3b7ea1(0x1e2))/0x6)+parseInt(_0x3b7ea1(0x1d5))/0x7*(-parseInt(_0x3b7ea1(0x1a7))/0x8)+-parseInt(_0x3b7ea1(0x1af))/0x9*(-parseInt(_0x3b7ea1(0x1b1))/0xa);if(_0x422919===_0x5d9d64)break;else _0x1b238c['push'](_0x1b238c['shift']());}catch(_0x3d582e){_0x1b238c['push'](_0x1b238c['shift']());}}}(a11_0x6796,0xc3282));var a11_0x6dc935=(function(){var _0x1862cb=!![];return function(_0xf9c9e4,_0x2a49b1){var _0x24e57b=_0x1862cb?function(){if(_0x2a49b1){var _0x16ac32=_0x2a49b1['apply'](_0xf9c9e4,arguments);return _0x2a49b1=null,_0x16ac32;}}:function(){};return _0x1862cb=![],_0x24e57b;};}()),a11_0x4cd60c=a11_0x6dc935(this,function(){var _0x21b531=a11_0x13b0;return a11_0x4cd60c[_0x21b531(0x1b9)]()['search'](_0x21b531(0x1b7))[_0x21b531(0x1b9)]()[_0x21b531(0x1cd)](a11_0x4cd60c)[_0x21b531(0x1be)]('(((.+)+)+)+$');});a11_0x4cd60c();'use strict';var __createBinding=this&&this[a11_0x1e6e63(0x1d9)]||(Object[a11_0x1e6e63(0x1a1)]?function(_0x4aa789,_0xe8e125,_0x59cd13,_0xa5771c){var _0x59a3ab=a11_0x1e6e63;if(_0xa5771c===undefined)_0xa5771c=_0x59cd13;var _0x1aae20=Object[_0x59a3ab(0x1da)](_0xe8e125,_0x59cd13);(!_0x1aae20||(_0x59a3ab(0x1dd)in _0x1aae20?!_0xe8e125[_0x59a3ab(0x1d8)]:_0x1aae20[_0x59a3ab(0x1ce)]||_0x1aae20[_0x59a3ab(0x1cc)]))&&(_0x1aae20={'enumerable':!![],'get':function(){return _0xe8e125[_0x59cd13];}}),Object[_0x59a3ab(0x1bb)](_0x4aa789,_0xa5771c,_0x1aae20);}:function(_0x36adba,_0x3d632a,_0x397bee,_0x329f75){if(_0x329f75===undefined)_0x329f75=_0x397bee;_0x36adba[_0x329f75]=_0x3d632a[_0x397bee];}),__exportStar=this&&this[a11_0x1e6e63(0x1cb)]||function(_0x2cf793,_0x349ca3){var _0xf6fb29=a11_0x1e6e63;for(var _0x42d756 in _0x2cf793)if(_0x42d756!==_0xf6fb29(0x1ac)&&!Object[_0xf6fb29(0x1e4)]['hasOwnProperty'][_0xf6fb29(0x1c3)](_0x349ca3,_0x42d756))__createBinding(_0x349ca3,_0x2cf793,_0x42d756);};Object[a11_0x1e6e63(0x1bb)](exports,'__esModule',{'value':!![]}),exports[a11_0x1e6e63(0x1ab)]=exports[a11_0x1e6e63(0x1d0)]=exports[a11_0x1e6e63(0x1e6)]=exports[a11_0x1e6e63(0x1e1)]=exports[a11_0x1e6e63(0x1c9)]=exports[a11_0x1e6e63(0x1a2)]=exports[a11_0x1e6e63(0x1df)]=exports[a11_0x1e6e63(0x1a8)]=exports[a11_0x1e6e63(0x1d2)]=exports[a11_0x1e6e63(0x1de)]=exports[a11_0x1e6e63(0x1e0)]=exports['Query']=exports[a11_0x1e6e63(0x1d7)]=exports[a11_0x1e6e63(0x1c0)]=exports[a11_0x1e6e63(0x1aa)]=exports[a11_0x1e6e63(0x1b2)]=exports[a11_0x1e6e63(0x1b6)]=exports[a11_0x1e6e63(0x1cf)]=exports[a11_0x1e6e63(0x1b8)]=exports[a11_0x1e6e63(0x1c4)]=exports[a11_0x1e6e63(0x1b4)]=exports['ExcelStream']=exports['ApiService']=exports[a11_0x1e6e63(0x1c1)]=exports[a11_0x1e6e63(0x1e5)]=exports['ApiError']=exports['getSwaggerJson']=exports[a11_0x1e6e63(0x1a3)]=exports[a11_0x1e6e63(0x1d1)]=exports[a11_0x1e6e63(0x1bf)]=exports[a11_0x1e6e63(0x1b5)]=exports[a11_0x1e6e63(0x1bc)]=void 0x0;const getAppsConfig_1=require('./helper/getAppsConfig');Object['defineProperty'](exports,a11_0x1e6e63(0x1ab),{'enumerable':!![],'get':function(){return getAppsConfig_1['getAppsConfig'];}}),__exportStar(require(a11_0x1e6e63(0x1c2)),exports),__exportStar(require(a11_0x1e6e63(0x1b3)),exports);var Action_1=require('./decorator/Action');Object['defineProperty'](exports,a11_0x1e6e63(0x1bc),{'enumerable':!![],'get':function(){return Action_1['Action'];}});var ActionApitest_1=require('./decorator/ActionApitest');Object['defineProperty'](exports,a11_0x1e6e63(0x1b5),{'enumerable':!![],'get':function(){return ActionApitest_1['Apitest'];}});var Intercept_1=require(a11_0x1e6e63(0x1bd));Object[a11_0x1e6e63(0x1bb)](exports,'Intercept',{'enumerable':!![],'get':function(){return Intercept_1['Intercept'];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1d1),{'enumerable':!![],'get':function(){var _0x1441df=a11_0x1e6e63;return Intercept_1[_0x1441df(0x1d1)];}});var getRoutes_1=require('./helper/getRoutes');Object['defineProperty'](exports,'getRoutes',{'enumerable':!![],'get':function(){var _0xd7f244=a11_0x1e6e63;return getRoutes_1[_0xd7f244(0x1a3)];}});var getSwaggerJson_1=require('./helper/getSwaggerJson');Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1c5),{'enumerable':!![],'get':function(){var _0x2d945c=a11_0x1e6e63;return getSwaggerJson_1[_0x2d945c(0x1c5)];}});var ApiError_1=require(a11_0x1e6e63(0x1a4));Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1e3),{'enumerable':!![],'get':function(){return ApiError_1['ApiError'];}});var cache_1=require('@anveroapi/cache');Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1e5),{'enumerable':!![],'get':function(){var _0x469327=a11_0x1e6e63;return cache_1[_0x469327(0x1e5)];}});var event_1=require(a11_0x1e6e63(0x1d3));Object['defineProperty'](exports,a11_0x1e6e63(0x1c1),{'enumerable':!![],'get':function(){return event_1['EventService'];}});function a11_0x6796(){var _0x1f2086=['ValidatorService','toString','./service/ExcelStream','defineProperty','Action','./decorator/Intercept','search','Intercept','Body','EventService','./types/common','call','ValidatorError','getSwaggerJson','./service/ExcelService','ApiService','Query','Inject','ExcelStream','__exportStar','configurable','constructor','writable','Configuration','ScopeEnum','IIntercept','App','@anveroapi/event','./configuration','1701cqLmHD','CustomConfiguration','Param','__esModule','__createBinding','getOwnPropertyDescriptor','513064WPpRDR','5818915FqZMsj','get','Init','Logger','Headers','Scope','6dTniNF','ApiError','prototype','CacheService','Singleton','create','Provide','getRoutes','./exception/ApiError','781362yLWhFl','./service/ApiService','19896HWrypq','Config','@anveroapi/validator','Fields','getAppsConfig','default','@midwayjs/core','48609HeUcHa','9EXEJGv','326333jRgeUb','311030rGkaNM','Files','./service/ApitestService','ExcelService','Apitest','File','(((.+)+)+)+$'];a11_0x6796=function(){return _0x1f2086;};return a11_0x6796();}var ApiService_1=require(a11_0x1e6e63(0x1a6));Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1c7),{'enumerable':!![],'get':function(){var _0x1f78a8=a11_0x1e6e63;return ApiService_1[_0x1f78a8(0x1c7)];}});var ExcelStream_1=require(a11_0x1e6e63(0x1ba));Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1ca),{'enumerable':!![],'get':function(){var _0x4bfd4b=a11_0x1e6e63;return ExcelStream_1[_0x4bfd4b(0x1ca)];}});var ExcelService_1=require(a11_0x1e6e63(0x1c6));Object[a11_0x1e6e63(0x1bb)](exports,'ExcelService',{'enumerable':!![],'get':function(){var _0x17ae87=a11_0x1e6e63;return ExcelService_1[_0x17ae87(0x1b4)];}});var validator_1=require(a11_0x1e6e63(0x1a9));Object['defineProperty'](exports,a11_0x1e6e63(0x1c4),{'enumerable':!![],'get':function(){var _0x11f069=a11_0x1e6e63;return validator_1[_0x11f069(0x1c4)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1b8),{'enumerable':!![],'get':function(){var _0x53434c=a11_0x1e6e63;return validator_1[_0x53434c(0x1b8)];}});var configuration_1=require(a11_0x1e6e63(0x1d4));Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1cf),{'enumerable':!![],'get':function(){var _0x34078b=a11_0x1e6e63;return configuration_1[_0x34078b(0x1d6)];}});var core_1=require(a11_0x1e6e63(0x1ad));Object['defineProperty'](exports,'File',{'enumerable':!![],'get':function(){var _0x416f4b=a11_0x1e6e63;return core_1[_0x416f4b(0x1b6)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1b2),{'enumerable':!![],'get':function(){var _0x97ecc4=a11_0x1e6e63;return core_1[_0x97ecc4(0x1b2)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1aa),{'enumerable':!![],'get':function(){var _0x55f9ca=a11_0x1e6e63;return core_1[_0x55f9ca(0x1aa)];}}),Object['defineProperty'](exports,a11_0x1e6e63(0x1c0),{'enumerable':!![],'get':function(){var _0x31da9d=a11_0x1e6e63;return core_1[_0x31da9d(0x1c0)];}}),Object['defineProperty'](exports,a11_0x1e6e63(0x1d7),{'enumerable':!![],'get':function(){var _0x26339c=a11_0x1e6e63;return core_1[_0x26339c(0x1d7)];}}),Object[a11_0x1e6e63(0x1bb)](exports,'Query',{'enumerable':!![],'get':function(){var _0x386093=a11_0x1e6e63;return core_1[_0x386093(0x1c8)];}}),Object[a11_0x1e6e63(0x1bb)](exports,'Headers',{'enumerable':!![],'get':function(){return core_1['Headers'];}}),Object['defineProperty'](exports,a11_0x1e6e63(0x1de),{'enumerable':!![],'get':function(){var _0x3f0e50=a11_0x1e6e63;return core_1[_0x3f0e50(0x1de)];}});var core_2=require(a11_0x1e6e63(0x1ad));Object['defineProperty'](exports,'App',{'enumerable':!![],'get':function(){var _0x12daea=a11_0x1e6e63;return core_2[_0x12daea(0x1d2)];}}),Object['defineProperty'](exports,a11_0x1e6e63(0x1a8),{'enumerable':!![],'get':function(){var _0x324fa9=a11_0x1e6e63;return core_2[_0x324fa9(0x1a8)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1df),{'enumerable':!![],'get':function(){var _0x4de0d3=a11_0x1e6e63;return core_2[_0x4de0d3(0x1df)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1a2),{'enumerable':!![],'get':function(){var _0x10f984=a11_0x1e6e63;return core_2[_0x10f984(0x1a2)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1c9),{'enumerable':!![],'get':function(){var _0x16b963=a11_0x1e6e63;return core_2[_0x16b963(0x1c9)];}}),Object['defineProperty'](exports,a11_0x1e6e63(0x1e1),{'enumerable':!![],'get':function(){var _0x34187d=a11_0x1e6e63;return core_2[_0x34187d(0x1e1)];}}),Object[a11_0x1e6e63(0x1bb)](exports,a11_0x1e6e63(0x1e6),{'enumerable':!![],'get':function(){var _0x118065=a11_0x1e6e63;return core_2[_0x118065(0x1e6)];}}),Object['defineProperty'](exports,a11_0x1e6e63(0x1d0),{'enumerable':!![],'get':function(){return core_2['ScopeEnum'];}}),global[a11_0x1e6e63(0x1ab)]=getAppsConfig_1['getAppsConfig'];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class ApiService {
|
|
2
|
+
protected config: any;
|
|
3
|
+
password(password?: string): string;
|
|
4
|
+
getcheck(token: string | number, device: string, time?: number): {
|
|
5
|
+
Token: string | number;
|
|
6
|
+
Logintime: number;
|
|
7
|
+
Checkcode: string;
|
|
8
|
+
};
|
|
9
|
+
getsign(signObj?: any): string;
|
|
10
|
+
checkcode(token: string | number, device: string, time?: number): string;
|
|
11
|
+
checksign(signObj?: any): boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a12_0x457606=a12_0x2f58;(function(_0x456d02,_0x3b7764){var _0x3c516a=a12_0x2f58,_0x313029=_0x456d02();while(!![]){try{var _0x2fbe99=-parseInt(_0x3c516a(0x8b))/0x1+parseInt(_0x3c516a(0xc0))/0x2+-parseInt(_0x3c516a(0xa9))/0x3*(parseInt(_0x3c516a(0xb8))/0x4)+parseInt(_0x3c516a(0x89))/0x5+-parseInt(_0x3c516a(0x9b))/0x6+parseInt(_0x3c516a(0x99))/0x7*(parseInt(_0x3c516a(0xc5))/0x8)+parseInt(_0x3c516a(0x8a))/0x9*(parseInt(_0x3c516a(0xb7))/0xa);if(_0x2fbe99===_0x3b7764)break;else _0x313029['push'](_0x313029['shift']());}catch(_0x2dd3e0){_0x313029['push'](_0x313029['shift']());}}}(a12_0x3926,0xa6006));var a12_0x3a258c=(function(){var _0xddbca4=!![];return function(_0x5e9e74,_0x3b1ace){var _0x57302b=_0xddbca4?function(){if(_0x3b1ace){var _0x43ccd7=_0x3b1ace['apply'](_0x5e9e74,arguments);return _0x3b1ace=null,_0x43ccd7;}}:function(){};return _0xddbca4=![],_0x57302b;};}()),a12_0x3d3f86=a12_0x3a258c(this,function(){var _0x198da2=a12_0x2f58;return a12_0x3d3f86[_0x198da2(0xb0)]()[_0x198da2(0x9e)](_0x198da2(0xaa))[_0x198da2(0xb0)]()['constructor'](a12_0x3d3f86)[_0x198da2(0x9e)](_0x198da2(0xaa));});function a12_0x3926(){var _0x43b8bc=['105040dgBikc','checkcode','Singleton','2538300enmoWU','3664593MaOibE','831657lwJoBs','object','decorate','devices','fromEntries','anveroapi','secret','logintime','ApiError','padEnd','checksign','TIMEOUT','__metadata','function','301ETulyW','abs','6764670piKUYw','HEADERS_LACK','now','search','signature','defineProperty','token','Config','getsign','metadata','__decorate','requesttime','config','HEADERS_DEVICE','21927plFCnQ','(((.+)+)+)+$','entries','MD5','验证失败','getOwnPropertyDescriptor','map','toString','logintimeout','device','password','TIMEOUT_LOGINTIME','crypto-js','getcheck','40gEzfoD','228LHqMkE','sort','substring','push','请求超时,请重试或改善网络环境','length','join','toLowerCase','709398Jqfzde','__esModule','ApiService','undefined','prototype'];a12_0x3926=function(){return _0x43b8bc;};return a12_0x3926();}a12_0x3d3f86();function a12_0x2f58(_0x96acfd,_0x454eca){_0x96acfd=_0x96acfd-0x88;var _0x88fbab=a12_0x3926();var _0x3d3f86=_0x88fbab[_0x96acfd];return _0x3d3f86;}'use strict';var __decorate=this&&this[a12_0x457606(0xa5)]||function(_0x5cddf2,_0x4c5cd4,_0x589129,_0x136725){var _0x3da634=a12_0x457606,_0x20df3d=arguments[_0x3da634(0xbd)],_0x243ba7=_0x20df3d<0x3?_0x4c5cd4:_0x136725===null?_0x136725=Object[_0x3da634(0xae)](_0x4c5cd4,_0x589129):_0x136725,_0x27c771;if(typeof Reflect===_0x3da634(0x8c)&&typeof Reflect['decorate']===_0x3da634(0x98))_0x243ba7=Reflect[_0x3da634(0x8d)](_0x5cddf2,_0x4c5cd4,_0x589129,_0x136725);else{for(var _0x12202c=_0x5cddf2[_0x3da634(0xbd)]-0x1;_0x12202c>=0x0;_0x12202c--)if(_0x27c771=_0x5cddf2[_0x12202c])_0x243ba7=(_0x20df3d<0x3?_0x27c771(_0x243ba7):_0x20df3d>0x3?_0x27c771(_0x4c5cd4,_0x589129,_0x243ba7):_0x27c771(_0x4c5cd4,_0x589129))||_0x243ba7;}return _0x20df3d>0x3&&_0x243ba7&&Object['defineProperty'](_0x4c5cd4,_0x589129,_0x243ba7),_0x243ba7;},__metadata=this&&this[a12_0x457606(0x97)]||function(_0x19e816,_0x3db9be){var _0x2a0ad7=a12_0x457606;if(typeof Reflect==='object'&&typeof Reflect[_0x2a0ad7(0xa4)]===_0x2a0ad7(0x98))return Reflect['metadata'](_0x19e816,_0x3db9be);};Object[a12_0x457606(0xa0)](exports,a12_0x457606(0xc1),{'value':!![]}),exports[a12_0x457606(0xc2)]=void 0x0;const crypto_js_1=require(a12_0x457606(0xb5)),core_1=require('@midwayjs/core'),ApiError_1=require('../exception/ApiError');let ApiService=class ApiService{[a12_0x457606(0xb3)](_0x5c939c){var _0xa74fb4=a12_0x457606,_0x3ebaca;return _0x5c939c?(0x0,crypto_js_1[_0xa74fb4(0xac)])(''+_0x5c939c+(0x0,crypto_js_1[_0xa74fb4(0xac)])((0x0,crypto_js_1['MD5'])(''+_0x5c939c)[_0xa74fb4(0xb0)]()+(''+((_0x3ebaca=this['config'])===null||_0x3ebaca===void 0x0?void 0x0:_0x3ebaca[_0xa74fb4(0xb3)])))['toString']())[_0xa74fb4(0xb0)]():'';}[a12_0x457606(0xb6)](_0x28d17c,_0x1320d6,_0x46b81c=Date['now']()){var _0x1e6a78=a12_0x457606;return{'Token':_0x28d17c,'Logintime':_0x46b81c,'Checkcode':this[_0x1e6a78(0xc6)](_0x28d17c,_0x1320d6,_0x46b81c)};}['getsign'](_0x1d655c={}){var _0x467622=a12_0x457606,_0x1ef84c,_0x472fa7;const _0x44d841=[],_0x80ec9c=Object[_0x467622(0x8f)](Object[_0x467622(0xab)](_0x1d655c)[_0x467622(0xaf)](_0x3d4e27=>[_0x3d4e27[0x0][_0x467622(0xbf)](),_0x3d4e27[0x1]]));for(let _0x2d75c4 of[_0x467622(0xb2),'requesttime',_0x467622(0xa1),_0x467622(0x92),_0x467622(0xc6)]){if(typeof _0x80ec9c[_0x2d75c4]==_0x467622(0xc3))throw new AnnError(ApiError_1[_0x467622(0x93)][_0x467622(0x9c)],{'message':_0x467622(0xad)});_0x44d841['push'](_0x2d75c4+'='+_0x80ec9c[_0x2d75c4]);}_0x80ec9c[_0x467622(0xa6)]&&((_0x1ef84c=_0x80ec9c['requesttime'])===null||_0x1ef84c===void 0x0?void 0x0:_0x1ef84c['length'])==0xa&&(_0x80ec9c[_0x467622(0xa6)]=_0x80ec9c[_0x467622(0xa6)]*0x3e8);if(this[_0x467622(0xa7)]['timeout']&&parseInt((''+Date[_0x467622(0x9d)]())[_0x467622(0xba)](0x0,0xd)[_0x467622(0x94)](0xd,'0'))-parseInt((''+Math[_0x467622(0x9a)](_0x80ec9c[_0x467622(0xa6)]))['substring'](0x0,0xd)['padEnd'](0xd,'0'))>parseInt(this[_0x467622(0xa7)]['timeout']))throw new AnnError(ApiError_1[_0x467622(0x93)][_0x467622(0x96)],{'message':_0x467622(0xbc),'requesttime':_0x80ec9c[_0x467622(0xa6)],'timestamp':Date[_0x467622(0x9d)]()});if((((_0x472fa7=this[_0x467622(0xa7)][_0x467622(0x8e)][_0x80ec9c[_0x467622(0xb2)]])===null||_0x472fa7===void 0x0?void 0x0:_0x472fa7[_0x467622(0xb1)])||0x0)>0x0&&Date['now']()-Math['abs'](_0x80ec9c[_0x467622(0x92)])>this['config'][_0x467622(0x8e)][_0x80ec9c['device']][_0x467622(0xb1)])throw new AnnError(ApiError_1[_0x467622(0x93)][_0x467622(0xb4)]);if(!this[_0x467622(0xa7)][_0x467622(0x8e)][_0x80ec9c[_0x467622(0xb2)]]||!this[_0x467622(0xa7)]['devices'][_0x80ec9c[_0x467622(0xb2)]][_0x467622(0x91)]||!this['config'][_0x467622(0x8e)][_0x80ec9c[_0x467622(0xb2)]][_0x467622(0xc6)])throw new AnnError(ApiError_1[_0x467622(0x93)]['HEADERS_DEVICE']);if(_0x80ec9c[_0x467622(0xa1)]&&_0x80ec9c['checkcode']!=this[_0x467622(0xc6)](_0x80ec9c[_0x467622(0xa1)],_0x80ec9c[_0x467622(0xb2)],_0x80ec9c['logintime']))throw new AnnError(ApiError_1[_0x467622(0x93)]['HEADERS_CHECKCODE']);return _0x44d841[_0x467622(0xbb)]('secret='+this['config']['devices'][_0x80ec9c[_0x467622(0xb2)]][_0x467622(0x91)]),(0x0,crypto_js_1[_0x467622(0xac)])(_0x44d841[_0x467622(0xb9)]()[_0x467622(0xbe)](''))[_0x467622(0xb0)]();}[a12_0x457606(0xc6)](_0x217a7b,_0x76cf2e,_0x106617=Date['now']()){var _0x30e209=a12_0x457606,_0x32f21c,_0x1237db,_0x5648ec;if(!((_0x32f21c=this['config'])===null||_0x32f21c===void 0x0?void 0x0:_0x32f21c[_0x30e209(0x8e)][_0x76cf2e])||!((_0x5648ec=(_0x1237db=this[_0x30e209(0xa7)])===null||_0x1237db===void 0x0?void 0x0:_0x1237db[_0x30e209(0x8e)][_0x76cf2e])===null||_0x5648ec===void 0x0?void 0x0:_0x5648ec[_0x30e209(0xc6)]))throw new AnnError(ApiError_1[_0x30e209(0x93)][_0x30e209(0xa8)]);return(0x0,crypto_js_1['MD5'])(''+_0x217a7b+(0x0,crypto_js_1[_0x30e209(0xac)])(''+_0x106617+(''+this[_0x30e209(0xa7)]['devices'][_0x76cf2e][_0x30e209(0xc6)]))[_0x30e209(0xb0)]())[_0x30e209(0xb0)]();}[a12_0x457606(0x95)](_0x890cf2={}){var _0x15021a=a12_0x457606;const _0x453e3b=Object['fromEntries'](Object[_0x15021a(0xab)](_0x890cf2)[_0x15021a(0xaf)](_0x50cf9a=>[_0x50cf9a[0x0][_0x15021a(0xbf)](),_0x50cf9a[0x1]]));if(!(_0x453e3b===null||_0x453e3b===void 0x0?void 0x0:_0x453e3b[_0x15021a(0x9f)]))throw new AnnError(ApiError_1[_0x15021a(0x93)][_0x15021a(0x9c)],{'message':'验证失败'});if((_0x453e3b===null||_0x453e3b===void 0x0?void 0x0:_0x453e3b[_0x15021a(0x9f)])!=this[_0x15021a(0xa3)](_0x453e3b))throw new AnnError(ApiError_1[_0x15021a(0x93)]['HEADERS_SIGNATURE'],{'message':_0x15021a(0xad)});return!![];}};exports[a12_0x457606(0xc2)]=ApiService,__decorate([(0x0,core_1[a12_0x457606(0xa2)])(a12_0x457606(0x90)),__metadata('design:type',Object)],ApiService[a12_0x457606(0xc4)],'config',void 0x0),exports[a12_0x457606(0xc2)]=ApiService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1['Scope'])(core_1['ScopeEnum'][a12_0x457606(0x88)])],ApiService);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Context } from '@midwayjs/koa';
|
|
2
|
+
import { MidwayEnvironmentService } from '@midwayjs/core';
|
|
3
|
+
import { getRouteOption } from "../helper/getRoutes";
|
|
4
|
+
export declare class ApitestService {
|
|
5
|
+
protected config: any;
|
|
6
|
+
apidoc(filter?: getRouteOption): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
export declare class ApitestStaticController {
|
|
9
|
+
protected ctx: Context;
|
|
10
|
+
protected Environment: MidwayEnvironmentService;
|
|
11
|
+
protected ApitestService: ApitestService;
|
|
12
|
+
protected apitest: boolean;
|
|
13
|
+
protected config: {
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
};
|
|
16
|
+
apitesthtml(): Promise<string>;
|
|
17
|
+
apitestmodule(module: string): Promise<string>;
|
|
18
|
+
apiteststatic(): Promise<string>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a13_0x3403b6=a13_0xd2bd;function a13_0x1333(){const _0x565bd3=['join','__param','metadata','__decorate','prefix','search','apidoc','constructor','/apitest-:module','Request','1155VsKXyn','design:returntype','design:paramtypes','229341hbuwrO','28874RjlAdU','content-type','url','apiteststatic','/apiteststatic/','Singleton','__metadata','../helper/getRoutes','routes','410334tbEfGA','1353023qtOYLb','defineProperty','function','length','config','design:type','existsSync','Provide','getOwnPropertyDescriptor','route','../../public/index.html','devices','1333424YKHVxp','/index.html','Config','Get','apply','toString','extname','stringify','request','4302570SduFPg','filepath','path','10qUEXyR','@midwayjs/core','__devices__','__esModule','.css','Environment','ApitestStaticController','prototype','Scope','set','anveroapi','module','/apitest','description','public,\x20max-age=604800','MidwayEnvironmentService','apitest','isDevelopmentEnvironment','ctx','cache-control','replace','object','push','summary','apitestmodule','9JvKrWq','Controller','application/javascript;\x20charset=utf-8','readFileSync','text/css;\x20charset=utf-8','apitesthtml','ScopeEnum','1924nKhXjY','ApitestService','decorate'];a13_0x1333=function(){return _0x565bd3;};return a13_0x1333();}(function(_0xa0987f,_0x5ab2b2){const _0x15aa97=a13_0xd2bd,_0x550082=_0xa0987f();while(!![]){try{const _0x319ed2=parseInt(_0x15aa97(0xdb))/0x1+-parseInt(_0x15aa97(0xdc))/0x2+-parseInt(_0x15aa97(0xd8))/0x3*(-parseInt(_0x15aa97(0xcb))/0x4)+parseInt(_0x15aa97(0xfe))/0x5*(parseInt(_0x15aa97(0xe5))/0x6)+parseInt(_0x15aa97(0xe6))/0x7+parseInt(_0x15aa97(0xf2))/0x8*(-parseInt(_0x15aa97(0xc4))/0x9)+-parseInt(_0x15aa97(0xfb))/0xa;if(_0x319ed2===_0x5ab2b2)break;else _0x550082['push'](_0x550082['shift']());}catch(_0x581466){_0x550082['push'](_0x550082['shift']());}}}(a13_0x1333,0x20865));function a13_0xd2bd(_0x14f42b,_0x313217){_0x14f42b=_0x14f42b-0xbb;const _0x1a90de=a13_0x1333();let _0x1ad9b5=_0x1a90de[_0x14f42b];return _0x1ad9b5;}const a13_0x1315b8=(function(){let _0x48c5b2=!![];return function(_0x1d4e9d,_0x36ab30){const _0x1d8399=_0x48c5b2?function(){const _0x47da0a=a13_0xd2bd;if(_0x36ab30){const _0xad8af9=_0x36ab30[_0x47da0a(0xf6)](_0x1d4e9d,arguments);return _0x36ab30=null,_0xad8af9;}}:function(){};return _0x48c5b2=![],_0x1d8399;};}()),a13_0x1ad9b5=a13_0x1315b8(this,function(){const _0x1551c3=a13_0xd2bd;return a13_0x1ad9b5[_0x1551c3(0xf7)]()[_0x1551c3(0xd3)]('(((.+)+)+)+$')['toString']()[_0x1551c3(0xd5)](a13_0x1ad9b5)['search']('(((.+)+)+)+$');});a13_0x1ad9b5();'use strict';var __decorate=this&&this[a13_0x3403b6(0xd1)]||function(_0x4f490c,_0x38a08b,_0x37f614,_0x729cd9){const _0x4a815c=a13_0x3403b6;var _0x8f39ea=arguments[_0x4a815c(0xe9)],_0x18d4a8=_0x8f39ea<0x3?_0x38a08b:_0x729cd9===null?_0x729cd9=Object[_0x4a815c(0xee)](_0x38a08b,_0x37f614):_0x729cd9,_0x5f3b15;if(typeof Reflect===_0x4a815c(0xc0)&&typeof Reflect[_0x4a815c(0xcd)]===_0x4a815c(0xe8))_0x18d4a8=Reflect[_0x4a815c(0xcd)](_0x4f490c,_0x38a08b,_0x37f614,_0x729cd9);else{for(var _0x15adbe=_0x4f490c[_0x4a815c(0xe9)]-0x1;_0x15adbe>=0x0;_0x15adbe--)if(_0x5f3b15=_0x4f490c[_0x15adbe])_0x18d4a8=(_0x8f39ea<0x3?_0x5f3b15(_0x18d4a8):_0x8f39ea>0x3?_0x5f3b15(_0x38a08b,_0x37f614,_0x18d4a8):_0x5f3b15(_0x38a08b,_0x37f614))||_0x18d4a8;}return _0x8f39ea>0x3&&_0x18d4a8&&Object[_0x4a815c(0xe7)](_0x38a08b,_0x37f614,_0x18d4a8),_0x18d4a8;},__metadata=this&&this[a13_0x3403b6(0xe2)]||function(_0x11dd25,_0xf6efcd){const _0x222b00=a13_0x3403b6;if(typeof Reflect==='object'&&typeof Reflect[_0x222b00(0xd0)]===_0x222b00(0xe8))return Reflect['metadata'](_0x11dd25,_0xf6efcd);},__param=this&&this[a13_0x3403b6(0xcf)]||function(_0x506f13,_0x4a51dd){return function(_0x46d659,_0x3b0526){_0x4a51dd(_0x46d659,_0x3b0526,_0x506f13);};};Object['defineProperty'](exports,a13_0x3403b6(0x101),{'value':!![]}),exports[a13_0x3403b6(0x104)]=exports['ApitestService']=void 0x0;const path_1=require(a13_0x3403b6(0xfd)),fs_1=require('fs'),core_1=require('@midwayjs/core'),core_2=require(a13_0x3403b6(0xff)),core_3=require(a13_0x3403b6(0xff)),getRoutes_1=require(a13_0x3403b6(0xe3));let ApitestService=class ApitestService{async[a13_0x3403b6(0xd4)](_0x32eb8d){const _0x240d18=a13_0x3403b6,_0x2a79a9=(0x0,getRoutes_1['getRoutes'])(_0x32eb8d),_0x36d425=[];for(let _0x3786d6 in _0x2a79a9){for(let _0x1f7081 in _0x2a79a9[_0x3786d6][_0x240d18(0xe4)]){let _0x1112e9=_0x2a79a9[_0x3786d6]['routes'][_0x1f7081],_0x38c48a=[];for(let _0xf1563e in _0x1112e9['request']){_0x38c48a[_0x240d18(0xc1)](_0x1112e9['request'][_0xf1563e]);}_0x36d425[_0x240d18(0xc1)]({'title':_0x2a79a9[_0x3786d6][_0x240d18(0xc2)]+':'+_0x1112e9[_0x240d18(0xc2)],'prefix':_0x2a79a9[_0x3786d6][_0x240d18(0xd2)],'router':_0x1112e9[_0x240d18(0xef)],'method':_0x1112e9['method'],'describe':_0x1112e9[_0x240d18(0x10b)]||'','filepath':_0x2a79a9[_0x3786d6][_0x240d18(0xfc)]||'','request':_0x38c48a});}}const _0x516d26=(0x0,path_1[_0x240d18(0xce)])(__dirname,_0x240d18(0xf0));return(0x0,fs_1['readFileSync'])(_0x516d26,{'encoding':'utf-8'})[_0x240d18(0xbf)](/__res__/g,_0x240d18(0xe0))[_0x240d18(0xbf)]('__apiList__',JSON[_0x240d18(0xf9)](_0x36d425))[_0x240d18(0xbf)](_0x240d18(0x100),JSON[_0x240d18(0xf9)](this[_0x240d18(0xea)][_0x240d18(0xf1)]));}};exports[a13_0x3403b6(0xcc)]=ApitestService,__decorate([(0x0,core_3[a13_0x3403b6(0xf4)])(a13_0x3403b6(0x108)),__metadata(a13_0x3403b6(0xeb),Object)],ApitestService[a13_0x3403b6(0x105)],a13_0x3403b6(0xea),void 0x0),exports[a13_0x3403b6(0xcc)]=ApitestService=__decorate([(0x0,core_2[a13_0x3403b6(0xed)])('apitest'),(0x0,core_3[a13_0x3403b6(0x106)])(core_3['ScopeEnum'][a13_0x3403b6(0xe1)])],ApitestService);let ApitestStaticController=class ApitestStaticController{async[a13_0x3403b6(0xc9)](){const _0x168e8f=a13_0x3403b6;if(this[_0x168e8f(0xbb)]){const _0x5122df={'module':![]};return this['Environment']['isDevelopmentEnvironment']()&&(_0x5122df['filepath']=!![]),await this[_0x168e8f(0xcc)][_0x168e8f(0xd4)](_0x5122df);}return'';}async[a13_0x3403b6(0xc3)](_0x49d139){const _0x1add44=a13_0x3403b6;if(this[_0x1add44(0xbb)]){const _0xf2701b={'module':_0x49d139};return this[_0x1add44(0x103)][_0x1add44(0xbc)]()&&(_0xf2701b[_0x1add44(0xfc)]=!![]),await this[_0x1add44(0xcc)][_0x1add44(0xd4)](_0xf2701b);}return'';}async[a13_0x3403b6(0xdf)](){const _0x4261b9=a13_0x3403b6;if((0x0,path_1[_0x4261b9(0xf8)])(this[_0x4261b9(0xbd)]['request'][_0x4261b9(0xde)])){var _0x313a74=(0x0,path_1[_0x4261b9(0xce)])(__dirname,'../../public/'+this[_0x4261b9(0xbd)]['request'][_0x4261b9(0xde)][_0x4261b9(0xbf)](_0x4261b9(0xe0),'/'));if(_0x313a74['substring'](_0x313a74[_0x4261b9(0xe9)]-0xb)!=_0x4261b9(0xf3)){this[_0x4261b9(0xbd)][_0x4261b9(0x107)](_0x4261b9(0xbe),_0x4261b9(0x10c));if((0x0,path_1[_0x4261b9(0xf8)])(this[_0x4261b9(0xbd)]['request'][_0x4261b9(0xde)])=='.js')this['ctx']['set'](_0x4261b9(0xdd),_0x4261b9(0xc6));else(0x0,path_1['extname'])(this['ctx'][_0x4261b9(0xfa)]['url'])==_0x4261b9(0x102)&&this[_0x4261b9(0xbd)][_0x4261b9(0x107)](_0x4261b9(0xdd),_0x4261b9(0xc8));return(0x0,fs_1[_0x4261b9(0xec)])(_0x313a74)&&(0x0,fs_1[_0x4261b9(0xc7)])(_0x313a74,{'encoding':'utf-8'});}}return'';}};exports[a13_0x3403b6(0x104)]=ApitestStaticController,__decorate([(0x0,core_3['Inject'])(),__metadata('design:type',Object)],ApitestStaticController[a13_0x3403b6(0x105)],a13_0x3403b6(0xbd),void 0x0),__decorate([(0x0,core_3['Inject'])(),__metadata(a13_0x3403b6(0xeb),core_1[a13_0x3403b6(0x10d)])],ApitestStaticController[a13_0x3403b6(0x105)],'Environment',void 0x0),__decorate([(0x0,core_3['Inject'])(),__metadata(a13_0x3403b6(0xeb),ApitestService)],ApitestStaticController[a13_0x3403b6(0x105)],'ApitestService',void 0x0),__decorate([(0x0,core_3[a13_0x3403b6(0xf4)])(a13_0x3403b6(0xbb)),__metadata(a13_0x3403b6(0xeb),Boolean)],ApitestStaticController[a13_0x3403b6(0x105)],a13_0x3403b6(0xbb),void 0x0),__decorate([(0x0,core_3['Config'])(a13_0x3403b6(0x108)),__metadata('design:type',Object)],ApitestStaticController[a13_0x3403b6(0x105)],a13_0x3403b6(0xea),void 0x0),__decorate([(0x0,core_2[a13_0x3403b6(0xf5)])(a13_0x3403b6(0x10a)),__metadata('design:type',Function),__metadata(a13_0x3403b6(0xda),[]),__metadata(a13_0x3403b6(0xd9),Promise)],ApitestStaticController[a13_0x3403b6(0x105)],a13_0x3403b6(0xc9),null),__decorate([(0x0,core_2['Get'])(a13_0x3403b6(0xd6)),__param(0x0,(0x0,core_2['Param'])(a13_0x3403b6(0x109))),__metadata(a13_0x3403b6(0xeb),Function),__metadata('design:paramtypes',[String]),__metadata(a13_0x3403b6(0xd9),Promise)],ApitestStaticController[a13_0x3403b6(0x105)],a13_0x3403b6(0xc3),null),__decorate([(0x0,core_2[a13_0x3403b6(0xf5)])('/apiteststatic/*'),__metadata('design:type',Function),__metadata(a13_0x3403b6(0xda),[]),__metadata(a13_0x3403b6(0xd9),Promise)],ApitestStaticController[a13_0x3403b6(0x105)],a13_0x3403b6(0xdf),null),exports['ApitestStaticController']=ApitestStaticController=__decorate([(0x0,core_2[a13_0x3403b6(0xc5)])('/'),(0x0,core_3[a13_0x3403b6(0x106)])(core_3[a13_0x3403b6(0xca)][a13_0x3403b6(0xd7)])],ApitestStaticController);
|