anncic-api 3.4.24 → 3.4.33
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 +27 -27
- package/dist/config/config.default.js +1 -1
- package/dist/config/config.production.d.ts +5 -5
- package/dist/config/config.production.js +1 -1
- package/dist/configuration.d.ts +17 -17
- package/dist/configuration.js +1 -1
- package/dist/decorator/Action.d.ts +14 -14
- package/dist/decorator/Action.js +1 -1
- package/dist/decorator/ActionApitest.d.ts +2 -2
- package/dist/decorator/ActionApitest.js +1 -1
- package/dist/decorator/Intercept.d.ts +5 -5
- package/dist/decorator/Intercept.js +1 -1
- package/dist/exception/ApiError.d.ts +9 -9
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getAppsConfig.d.ts +3 -3
- package/dist/helper/getAppsConfig.js +1 -1
- package/dist/helper/getRoutes.d.ts +9 -9
- package/dist/helper/getRoutes.js +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/service/ApiService.d.ts +12 -12
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.d.ts +19 -19
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.d.ts +46 -46
- package/dist/service/ExcelService.js +1 -1
- package/dist/service/ExcelStream.d.ts +38 -38
- package/dist/service/ExcelStream.js +1 -1
- package/dist/types/action.d.ts +27 -27
- package/dist/types/action.js +1 -1
- package/dist/types/common.d.ts +14 -14
- package/dist/types/common.js +1 -1
- package/dist/types/intercept.d.ts +3 -3
- package/dist/types/intercept.js +1 -1
- package/package.json +8 -8
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
declare const _default: (appinfo: any) => {
|
|
2
|
-
apitest: boolean;
|
|
3
|
-
keys: any;
|
|
4
|
-
anncicapi: {
|
|
5
|
-
requestKey: string;
|
|
6
|
-
password: string;
|
|
7
|
-
devices: {
|
|
8
|
-
DEFAULT: {
|
|
9
|
-
secret: string;
|
|
10
|
-
checkcode: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
bodyParser: {
|
|
15
|
-
enableTypes: string[];
|
|
16
|
-
formLimit: string;
|
|
17
|
-
jsonLimit: string;
|
|
18
|
-
textLimit: string;
|
|
19
|
-
xmlLimit: string;
|
|
20
|
-
enable: boolean;
|
|
21
|
-
};
|
|
22
|
-
upload: {
|
|
23
|
-
tmpdir: string;
|
|
24
|
-
cleanTimeout: number;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
export default _default;
|
|
1
|
+
declare const _default: (appinfo: any) => {
|
|
2
|
+
apitest: boolean;
|
|
3
|
+
keys: any;
|
|
4
|
+
anncicapi: {
|
|
5
|
+
requestKey: string;
|
|
6
|
+
password: string;
|
|
7
|
+
devices: {
|
|
8
|
+
DEFAULT: {
|
|
9
|
+
secret: string;
|
|
10
|
+
checkcode: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
bodyParser: {
|
|
15
|
+
enableTypes: string[];
|
|
16
|
+
formLimit: string;
|
|
17
|
+
jsonLimit: string;
|
|
18
|
+
textLimit: string;
|
|
19
|
+
xmlLimit: string;
|
|
20
|
+
enable: boolean;
|
|
21
|
+
};
|
|
22
|
+
upload: {
|
|
23
|
+
tmpdir: string;
|
|
24
|
+
cleanTimeout: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a0_0x1b59a8=a0_0x2dbd;function a0_0x2dbd(_0x273f7d,_0x36347d){var _0x19dea6=a0_0x1754();return a0_0x2dbd=function(_0x37a33,_0x21537f){_0x37a33=_0x37a33-0x13e;var _0x17543a=_0x19dea6[_0x37a33];return _0x17543a;},a0_0x2dbd(_0x273f7d,_0x36347d);}(function(_0x56b2b7,_0x544413){var _0x24e059=a0_0x2dbd,_0x3a5256=_0x56b2b7();while(!![]){try{var _0x11ba3f=parseInt(_0x24e059(0x152))/0x1+-parseInt(_0x24e059(0x147))/0x2*(-parseInt(_0x24e059(0x155))/0x3)+parseInt(_0x24e059(0x14d))/0x4*(-parseInt(_0x24e059(0x149))/0x5)+parseInt(_0x24e059(0x13f))/0x6+parseInt(_0x24e059(0x14b))/0x7+parseInt(_0x24e059(0x13e))/0x8+-parseInt(_0x24e059(0x142))/0x9;if(_0x11ba3f===_0x544413)break;else _0x3a5256['push'](_0x3a5256['shift']());}catch(_0x3ab5bf){_0x3a5256['push'](_0x3a5256['shift']());}}}(a0_0x1754,0x20daa));var a0_0x21537f=(function(){var _0x155590=!![];return function(_0x154848,_0x49360e){var _0x245620=_0x155590?function(){var _0x214842=a0_0x2dbd;if(_0x49360e){var _0x2da214=_0x49360e[_0x214842(0x153)](_0x154848,arguments);return _0x49360e=null,_0x2da214;}}:function(){};return _0x155590=![],_0x245620;};}()),a0_0x37a33=a0_0x21537f(this,function(){var _0x1d7c64=a0_0x2dbd;return a0_0x37a33[_0x1d7c64(0x14f)]()[_0x1d7c64(0x154)](_0x1d7c64(0x140))[_0x1d7c64(0x14f)]()[_0x1d7c64(0x14e)](a0_0x37a33)[_0x1d7c64(0x154)](_0x1d7c64(0x140));});function a0_0x1754(){var _0x18f3f4=['dhauo1234420123gg3234901','58788iUKPiL','apply','search','9pFgnVV','1211808kYLCFB','558738mCSoIx','(((.+)+)+)+$','json','3422079Umrojv','xml','appDir','form','/runtime/.upload','75352meDyAs','text','296435nXAMgX','name','1103711vhGghL','default','4WdjwIM','constructor','toString','20mb'];a0_0x1754=function(){return _0x18f3f4;};return a0_0x1754();}a0_0x37a33();'use strict';Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a0_0x1b59a8(0x14c)]=_0x64d711=>{var _0x4c29e2=a0_0x1b59a8;return{'apitest':!![],'keys':_0x64d711[_0x4c29e2(0x14a)],'anncicapi':{'requestKey':'_token','password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':_0x4c29e2(0x151),'checkcode':_0x4c29e2(0x151)}}},'bodyParser':{'enableTypes':[_0x4c29e2(0x141),_0x4c29e2(0x145),_0x4c29e2(0x148),_0x4c29e2(0x143)],'formLimit':_0x4c29e2(0x150),'jsonLimit':_0x4c29e2(0x150),'textLimit':_0x4c29e2(0x150),'xmlLimit':_0x4c29e2(0x150),'enable':!![]},'upload':{'tmpdir':_0x64d711[_0x4c29e2(0x144)]+_0x4c29e2(0x146),'cleanTimeout':0x5265c00}};};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
apitest: boolean;
|
|
3
|
-
anncicapi: {};
|
|
4
|
-
};
|
|
5
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
apitest: boolean;
|
|
3
|
+
anncicapi: {};
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a1_0x44ef(_0x114248,_0x5f4c40){var _0x4c24b3=a1_0x23ef();return a1_0x44ef=function(_0x4203d4,_0x332155){_0x4203d4=_0x4203d4-0x1bf;var _0x23efe6=_0x4c24b3[_0x4203d4];return _0x23efe6;},a1_0x44ef(_0x114248,_0x5f4c40);}function a1_0x23ef(){var _0x4661df=['8pOrxpT','__esModule','5dgAHLN','apply','4429710NmYnHJ','2805996zpPqEJ','toString','528731TloNUX','165918mrmYKk','356631qTMkum','default','6ZnFHyq','13278562DfWhVy','10pFhFhz','search','(((.+)+)+)+$','126095ccHQsw','constructor'];a1_0x23ef=function(){return _0x4661df;};return a1_0x23ef();}var a1_0x1bbcd0=a1_0x44ef;(function(_0xc892ae,_0x3742b0){var _0x591469=a1_0x44ef,_0x2c0258=_0xc892ae();while(!![]){try{var _0x3d85e5=-parseInt(_0x591469(0x1c4))/0x1*(-parseInt(_0x591469(0x1bf))/0x2)+parseInt(_0x591469(0x1cf))/0x3+-parseInt(_0x591469(0x1cb))/0x4*(parseInt(_0x591469(0x1c8))/0x5)+-parseInt(_0x591469(0x1ce))/0x6+parseInt(_0x591469(0x1cd))/0x7*(-parseInt(_0x591469(0x1c6))/0x8)+-parseInt(_0x591469(0x1ca))/0x9+-parseInt(_0x591469(0x1c1))/0xa*(-parseInt(_0x591469(0x1c0))/0xb);if(_0x3d85e5===_0x3742b0)break;else _0x2c0258['push'](_0x2c0258['shift']());}catch(_0x1bde95){_0x2c0258['push'](_0x2c0258['shift']());}}}(a1_0x23ef,0x63785));var a1_0x332155=(function(){var _0x5b7db4=!![];return function(_0x5e5efa,_0x42a29e){var _0x65fe9e=_0x5b7db4?function(){var _0x273f93=a1_0x44ef;if(_0x42a29e){var _0x534855=_0x42a29e[_0x273f93(0x1c9)](_0x5e5efa,arguments);return _0x42a29e=null,_0x534855;}}:function(){};return _0x5b7db4=![],_0x65fe9e;};}()),a1_0x4203d4=a1_0x332155(this,function(){var _0x7c7499=a1_0x44ef;return a1_0x4203d4['toString']()[_0x7c7499(0x1c2)](_0x7c7499(0x1c3))[_0x7c7499(0x1cc)]()[_0x7c7499(0x1c5)](a1_0x4203d4)[_0x7c7499(0x1c2)](_0x7c7499(0x1c3));});a1_0x4203d4();'use strict';Object['defineProperty'](exports,a1_0x1bbcd0(0x1c7),{'value':!![]}),exports[a1_0x1bbcd0(0x1d0)]={'apitest':![],'anncicapi':{}};
|
package/dist/configuration.d.ts
CHANGED
|
@@ -1,17 +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
|
-
}
|
|
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
|
+
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a2_0x2bc5c2=a2_0x499e;(function(_0x15d488,_0x4c9a46){const _0x493abc=a2_0x499e,_0x5c393e=_0x15d488();while(!![]){try{const _0xf5d8d8=-parseInt(_0x493abc(0x115))/0x1+parseInt(_0x493abc(0x139))/0x2*(-parseInt(_0x493abc(0x14e))/0x3)+parseInt(_0x493abc(0x11b))/0x4+parseInt(_0x493abc(0x143))/0x5+parseInt(_0x493abc(0x13b))/0x6+-parseInt(_0x493abc(0x161))/0x7*(parseInt(_0x493abc(0x10e))/0x8)+-parseInt(_0x493abc(0x13c))/0x9*(parseInt(_0x493abc(0x17b))/0xa);if(_0xf5d8d8===_0x4c9a46)break;else _0x5c393e['push'](_0x5c393e['shift']());}catch(_0x2f8a8b){_0x5c393e['push'](_0x5c393e['shift']());}}}(a2_0x20c3,0x447f7));const a2_0xb631ba=(function(){let _0x4dc508=!![];return function(_0x432b22,_0x4e0eae){const _0x37469f=_0x4dc508?function(){if(_0x4e0eae){const _0x4142b2=_0x4e0eae['apply'](_0x432b22,arguments);return _0x4e0eae=null,_0x4142b2;}}:function(){};return _0x4dc508=![],_0x37469f;};}()),a2_0x1cec75=a2_0xb631ba(this,function(){const _0x2d1629=a2_0x499e;return a2_0x1cec75[_0x2d1629(0xfe)]()['search']('(((.+)+)+)+$')[_0x2d1629(0xfe)]()['constructor'](a2_0x1cec75)[_0x2d1629(0x118)](_0x2d1629(0x109));});a2_0x1cec75();'use strict';function a2_0x499e(_0x5dbeb0,_0x550a1b){const _0x59fc9b=a2_0x20c3();return a2_0x499e=function(_0x1cec75,_0xb631ba){_0x1cec75=_0x1cec75-0xef;let _0x20c323=_0x59fc9b[_0x1cec75];return _0x20c323;},a2_0x499e(_0x5dbeb0,_0x550a1b);}var __decorate=this&&this[a2_0x2bc5c2(0x154)]||function(_0x147f49,_0x2cf03e,_0x1b4a93,_0x3604a3){const _0x6e7c4b=a2_0x2bc5c2;var _0xf411ac=arguments[_0x6e7c4b(0x104)],_0x53ce12=_0xf411ac<0x3?_0x2cf03e:_0x3604a3===null?_0x3604a3=Object[_0x6e7c4b(0x135)](_0x2cf03e,_0x1b4a93):_0x3604a3,_0x15afab;if(typeof Reflect===_0x6e7c4b(0x111)&&typeof Reflect[_0x6e7c4b(0xef)]===_0x6e7c4b(0x10f))_0x53ce12=Reflect[_0x6e7c4b(0xef)](_0x147f49,_0x2cf03e,_0x1b4a93,_0x3604a3);else{for(var _0x3b763c=_0x147f49[_0x6e7c4b(0x104)]-0x1;_0x3b763c>=0x0;_0x3b763c--)if(_0x15afab=_0x147f49[_0x3b763c])_0x53ce12=(_0xf411ac<0x3?_0x15afab(_0x53ce12):_0xf411ac>0x3?_0x15afab(_0x2cf03e,_0x1b4a93,_0x53ce12):_0x15afab(_0x2cf03e,_0x1b4a93))||_0x53ce12;}return _0xf411ac>0x3&&_0x53ce12&&Object[_0x6e7c4b(0x10a)](_0x2cf03e,_0x1b4a93,_0x53ce12),_0x53ce12;},__metadata=this&&this[a2_0x2bc5c2(0x125)]||function(_0x5d569f,_0x488dac){const _0x5d7ba1=a2_0x2bc5c2;if(typeof Reflect===_0x5d7ba1(0x111)&&typeof Reflect[_0x5d7ba1(0x149)]===_0x5d7ba1(0x10f))return Reflect[_0x5d7ba1(0x149)](_0x5d569f,_0x488dac);};Object[a2_0x2bc5c2(0x10a)](exports,a2_0x2bc5c2(0xf3),{'value':!![]}),exports[a2_0x2bc5c2(0x172)]=void 0x0;const core_1=require(a2_0x2bc5c2(0x166)),core_2=require(a2_0x2bc5c2(0x166)),ApiError_1=require(a2_0x2bc5c2(0x169)),ApiService_1=require('./service/ApiService'),intercept_1=require(a2_0x2bc5c2(0x14f)),action_1=require(a2_0x2bc5c2(0x160)),fs=require('fs'),koasend=require('koa-send'),koa=require(a2_0x2bc5c2(0x130)),upload=require(a2_0x2bc5c2(0x180)),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0x2bc5c2(0x136)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0x2bc5c2(0x145)),anncic=require(a2_0x2bc5c2(0x182)),anncicCache=require(a2_0x2bc5c2(0x159)),anncicEvent=require(a2_0x2bc5c2(0xfc)),anncicTypeorm=require(a2_0x2bc5c2(0x138)),anncicValidator=require(a2_0x2bc5c2(0x14a)),anncicHelper=require(a2_0x2bc5c2(0x12f));function a2_0x20c3(){const _0x4cafb4=['function','getConfiguration','object','name','https://','startsWith','184401RBcxHB','request','ACTION_ROUTE_KEY','search','toLowerCase','handler','2147904uLDQBE','includes','isDevelopmentEnvironment','_matchedRoute','module','routerOptions','args','readdirSync','handlerActionRoute','dir','__metadata','existsSync','Inject','routerName','getApplications','http://','prototype','isFunction','staticFile','design:type','anncic-apihelper','@midwayjs/koa','loggerConfig','body','tmpdir','description','getOwnPropertyDescriptor','@midwayjs/cross-domain','dirs','@anncic-api/typeorm','4WLZdCh','device','1540104GacGKa','579609XdkCNK','Types','req','/apps/','getClassMetadata','Anncic-api\x20static-file\x20:\x20mkdir\x20','intercept','2777100NaBgUg','isString','./config/config.production','query','onReady','InterceptTargetTmp','metadata','@anncic-api/validator','MidwayLoggerService','upload','isNull','496986xFnXkG','./types/intercept','requestMethod','log','Configuration','_UNKNOW_','__decorate','checksign','midwayLogger','MidwayConfigService','addObject','@anncic-api/cache','decorator','config','connection','filepath','mkdirSync','path','./types/action','3418709WdqyKv','AppsConfigTmp','hanlderApplications','filterConfig','bodyXml','@midwayjs/core','tagName','key','./exception/ApiError','getBaseDir','requestKey','app','match','http','attachment','/runtime','App','CustomConfiguration','proceed','MidwayApplicationManager','target','MidwayEnvironmentService','ApiError','assign','requestContext','INTERCEPT_KEY','10ehPtPd','host','ApiService','/apps','lastIndexOf','@midwayjs/upload','context','@anncic-api/core','clients','anncic-api','encrypted','decorate','get','defaultsDeep','apimit','__esModule','method','anncicapi','isClass','REQUEST_OBJ_CTX_KEY','forEach','isDirectory','defineProperties','split','@anncic-api/event','headers','toString','_matchedRouteMeta','APPSCONFIG_KEY','application','statSync','loggerService','length','getAppDir','string','443','ACTION_KEY','(((.+)+)+)+$','defineProperty','environment','input','devices','8dqsIMV'];a2_0x20c3=function(){return _0x4cafb4;};return a2_0x20c3();}let CustomConfiguration=class CustomConfiguration{async[a2_0x2bc5c2(0x147)](){const _0x3d328b=a2_0x2bc5c2;await this['filterConfig'](),await this['loggerConfig'](),await this[_0x3d328b(0x123)](),await this[_0x3d328b(0x163)]();}async[a2_0x2bc5c2(0x123)](){const _0x586543=a2_0x2bc5c2,_0xa5b247=this[_0x586543(0x15b)][_0x586543(0x110)](),_0xc17aa2=(0x0,core_1[_0x586543(0x140)])(intercept_1[_0x586543(0x17a)],intercept_1[_0x586543(0x148)])||{};this[_0x586543(0x15a)]['registerMethodHandler'](action_1[_0x586543(0x117)],_0x27a035=>{const _0x1ea20d=_0x586543;var _0xde1851;const _0x2d42e9=(0x0,core_1[_0x1ea20d(0x140)])(action_1[_0x1ea20d(0x100)],action_1[_0x1ea20d(0x162)])||{},_0x4fe31f=_0x27a035['metadata'],_0x381533=(0x0,core_1[_0x1ea20d(0x140)])(action_1[_0x1ea20d(0x108)],_0x27a035[_0x1ea20d(0x175)])||{},_0x370d20=((_0xde1851=_0x381533===null||_0x381533===void 0x0?void 0x0:_0x381533['filepath'])===null||_0xde1851===void 0x0?void 0x0:_0xde1851['substring'](0x0,_0x381533[_0x1ea20d(0x15d)][_0x1ea20d(0x17f)]('.')))||'',_0x1b49de=(_0x381533===null||_0x381533===void 0x0?void 0x0:_0x381533[_0x1ea20d(0x11f)])?(_0x2d42e9===null||_0x2d42e9===void 0x0?void 0x0:_0x2d42e9[_0x381533[_0x1ea20d(0x11f)]])||{}:{};return{'before':async _0x5c7c25=>{const _0x3fcb55=_0x1ea20d;var _0x595592,_0x58f270,_0x43b5e2,_0x5e70f3;const _0x82d743=(_0x595592=_0x5c7c25===null||_0x5c7c25===void 0x0?void 0x0:_0x5c7c25['target'])===null||_0x595592===void 0x0?void 0x0:_0x595592[core_2[_0x3fcb55(0xf7)]],_0x5a5a41=lodash[_0x3fcb55(0xf1)]({},_0x82d743[_0x3fcb55(0x116)][_0x3fcb55(0x132)]||_0x82d743[_0x3fcb55(0x116)][((_0x58f270=_0xa5b247===null||_0xa5b247===void 0x0?void 0x0:_0xa5b247['bodyXml'])===null||_0x58f270===void 0x0?void 0x0:_0x58f270[_0x3fcb55(0x168)])||'body']||{},_0x82d743[_0x3fcb55(0x116)][_0x3fcb55(0x146)]||{});_0x82d743[_0x3fcb55(0xff)]={'module':(_0x1b49de===null||_0x1b49de===void 0x0?void 0x0:_0x1b49de[_0x3fcb55(0x112)])||'','routePath':''+_0x82d743[_0x3fcb55(0x15f)],'routeName':_0x381533[_0x3fcb55(0x120)][_0x3fcb55(0x167)]+'@'+_0x4fe31f[_0x3fcb55(0x128)],'routeMethod':((_0x4fe31f===null||_0x4fe31f===void 0x0?void 0x0:_0x4fe31f[_0x3fcb55(0x150)])||_0x82d743[_0x3fcb55(0xf4)]||'')[_0x3fcb55(0x119)](),'routeDescription':(_0x4fe31f===null||_0x4fe31f===void 0x0?void 0x0:_0x4fe31f[_0x3fcb55(0x134)])||'','filemethod':_0x370d20+'@'+(_0x4fe31f['method']||'')};if(_0x82d743&&(_0x4fe31f===null||_0x4fe31f===void 0x0?void 0x0:_0x4fe31f[_0x3fcb55(0xf2)]))try{const _0x413c91=((_0x43b5e2=_0xa5b247===null||_0xa5b247===void 0x0?void 0x0:_0xa5b247[_0x3fcb55(0xf5)])===null||_0x43b5e2===void 0x0?void 0x0:_0x43b5e2['requestKey'])&&typeof(_0x5a5a41===null||_0x5a5a41===void 0x0?void 0x0:_0x5a5a41[_0xa5b247['anncicapi']['requestKey']])=='string'?JSON['parse'](base64_decode(_0x5a5a41[_0xa5b247[_0x3fcb55(0xf5)][_0x3fcb55(0x16b)]])||'{}')||{}:((_0x5e70f3=_0x82d743===null||_0x82d743===void 0x0?void 0x0:_0x82d743[_0x3fcb55(0x116)])===null||_0x5e70f3===void 0x0?void 0x0:_0x5e70f3[_0x3fcb55(0xfd)])||{};if(!this['ApiService'][_0x3fcb55(0x155)](_0x413c91))throw new AnnError(ApiError_1[_0x3fcb55(0x177)]['HEADERS_SIGNATURE']);}catch(_0x4d5b36){if(_0x4d5b36 instanceof AnnError)throw _0x4d5b36;else throw new AnnError(ApiError_1[_0x3fcb55(0x177)][_0x3fcb55(0x153)]);}},'around':async _0x1ccec4=>{const _0x42c2d5=_0x1ea20d;var _0x364749,_0x2e610c,_0x255fef;const _0x558370=(_0x364749=_0x1ccec4===null||_0x1ccec4===void 0x0?void 0x0:_0x1ccec4[_0x42c2d5(0x175)])===null||_0x364749===void 0x0?void 0x0:_0x364749[core_2['REQUEST_OBJ_CTX_KEY']];if(_0x558370&&(_0x4fe31f===null||_0x4fe31f===void 0x0?void 0x0:_0x4fe31f[_0x42c2d5(0xf2)])&&((_0x4fe31f===null||_0x4fe31f===void 0x0?void 0x0:_0x4fe31f['intercept'])||typeof(_0x4fe31f===null||_0x4fe31f===void 0x0?void 0x0:_0x4fe31f[_0x42c2d5(0x142)])=='undefined')){if(((_0x2e610c=_0x558370['headers'])===null||_0x2e610c===void 0x0?void 0x0:_0x2e610c[_0x42c2d5(0x13a)])&&((_0x255fef=_0xc17aa2===null||_0xc17aa2===void 0x0?void 0x0:_0xc17aa2[_0x558370[_0x42c2d5(0xfd)]['device']])===null||_0x255fef===void 0x0?void 0x0:_0x255fef['length'])>0x0)for(const _0x3f0b49 of _0xc17aa2[_0x558370[_0x42c2d5(0xfd)][_0x42c2d5(0x13a)]]||[]){if(core_1[_0x42c2d5(0x13d)][_0x42c2d5(0xf6)](_0x3f0b49)){const _0x14e3f7=await _0x558370[_0x42c2d5(0x179)]['getAsync'](_0x3f0b49);typeof(_0x14e3f7===null||_0x14e3f7===void 0x0?void 0x0:_0x14e3f7[_0x42c2d5(0x16d)])==_0x42c2d5(0x10f)?await _0x14e3f7[_0x42c2d5(0x16d)](_0x558370,typeof(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0xf4)])=='string'&&(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0x11e)])?_0x558370[_0x42c2d5(0xf4)][_0x42c2d5(0x119)]()+'@'+(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370['_matchedRoute']):undefined,_0x4fe31f)&&await _0x14e3f7[_0x42c2d5(0x11a)](_0x558370,typeof(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370['method'])==_0x42c2d5(0x106)&&(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370['_matchedRoute'])?_0x558370[_0x42c2d5(0xf4)][_0x42c2d5(0x119)]()+'@'+(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370['_matchedRoute']):undefined,_0x4fe31f):await _0x14e3f7[_0x42c2d5(0x11a)](_0x558370,typeof(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0xf4)])==_0x42c2d5(0x106)&&(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0x11e)])?_0x558370[_0x42c2d5(0xf4)][_0x42c2d5(0x119)]()+'@'+(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0x11e)]):undefined,_0x4fe31f);}else core_1[_0x42c2d5(0x13d)][_0x42c2d5(0x12c)](_0x3f0b49)&&await _0x3f0b49(_0x558370,typeof(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0xf4)])==_0x42c2d5(0x106)&&(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370['_matchedRoute'])?_0x558370['method'][_0x42c2d5(0x119)]()+'@'+(_0x558370===null||_0x558370===void 0x0?void 0x0:_0x558370[_0x42c2d5(0x11e)]):undefined,_0x4fe31f);}}return await _0x1ccec4[_0x42c2d5(0x173)](..._0x1ccec4[_0x42c2d5(0x121)]);},'afterThrow':(_0x40ee69,_0x1328d0)=>{throw _0x1328d0;}};});}async[a2_0x2bc5c2(0x163)](){const _0x136d8b=a2_0x2bc5c2,_0x4c04c1=this[_0x136d8b(0x15b)][_0x136d8b(0x110)]();this['application'][_0x136d8b(0x129)](['koa'])[_0x136d8b(0xf8)](_0x217af3=>{const _0x2aa3da=_0x136d8b;(_0x217af3===null||_0x217af3===void 0x0?void 0x0:_0x217af3[_0x2aa3da(0x181)])&&Object[_0x2aa3da(0xfa)](_0x217af3[_0x2aa3da(0x181)],{'hosturl':{'configurable':![],'get':function(){const _0x4d9318=_0x2aa3da;var _0x37c0d4,_0x566f91,_0x8b04f6,_0x2e5455;if((this===null||this===void 0x0?void 0x0:this[_0x4d9318(0x17c)])&&!this[_0x4d9318(0x17c)][_0x4d9318(0x114)](_0x4d9318(0x16e))){let _0x3f8d6f=this[_0x4d9318(0x17c)][_0x4d9318(0xfb)](':');return['80',_0x4d9318(0x107)][_0x4d9318(0x11c)](_0x3f8d6f===null||_0x3f8d6f===void 0x0?void 0x0:_0x3f8d6f[0x1])?''+(!!((_0x566f91=(_0x37c0d4=this===null||this===void 0x0?void 0x0:this[_0x4d9318(0x13e)])===null||_0x37c0d4===void 0x0?void 0x0:_0x37c0d4['connection'])===null||_0x566f91===void 0x0?void 0x0:_0x566f91['encrypted'])||(_0x3f8d6f===null||_0x3f8d6f===void 0x0?void 0x0:_0x3f8d6f[0x1])==_0x4d9318(0x107)?_0x4d9318(0x113):_0x4d9318(0x12a))+_0x3f8d6f[0x0]:''+(!!((_0x2e5455=(_0x8b04f6=this===null||this===void 0x0?void 0x0:this[_0x4d9318(0x13e)])===null||_0x8b04f6===void 0x0?void 0x0:_0x8b04f6[_0x4d9318(0x15c)])===null||_0x2e5455===void 0x0?void 0x0:_0x2e5455[_0x4d9318(0x185)])?_0x4d9318(0x113):'http://')+this[_0x4d9318(0x17c)];}return'';}},'ok':{'value':function(_0x168806,_0x224006,_0x1d0e03=0x0){return{'code':_0x1d0e03,'data':_0x168806,'extra':_0x224006};}},'input':{'value':function(_0x214620,_0x4007e5){const _0x20be53=_0x2aa3da;var _0xca8201;const _0x1e5e96=lodash[_0x20be53(0xf1)]({},this[_0x20be53(0x116)][_0x20be53(0x132)]||this['request'][((_0xca8201=_0x4c04c1===null||_0x4c04c1===void 0x0?void 0x0:_0x4c04c1[_0x20be53(0x165)])===null||_0xca8201===void 0x0?void 0x0:_0xca8201[_0x20be53(0x168)])||_0x20be53(0x132)]||{},this[_0x20be53(0x116)][_0x20be53(0x146)]||{});return _0x214620?lodash[_0x20be53(0xf0)](_0x1e5e96,_0x214620,_0x4007e5):_0x1e5e96;}},'when':{'value':async function(_0x2a731d,_0x2efc46){const _0x49a35a=_0x2aa3da,_0x514681=this[_0x49a35a(0x10c)](_0x2a731d,null);if(!lodash[_0x49a35a(0x14d)](_0x514681))return await _0x2efc46(_0x514681);}},'only':{'value':function(_0x5d9be0){const _0x535420=_0x2aa3da,_0x2e3cae={};for(let _0x203b23=0x0;_0x203b23<_0x5d9be0[_0x535420(0x104)];_0x203b23++){lodash['isArray'](_0x5d9be0[_0x203b23])&&_0x5d9be0[_0x203b23][_0x535420(0x104)]>0x0&&lodash[_0x535420(0x144)](_0x5d9be0[_0x203b23][0x0])&&(_0x2e3cae[_0x5d9be0[_0x203b23][0x0]]=this[_0x535420(0x10c)](_0x5d9be0[_0x203b23][0x0],_0x5d9be0[_0x203b23][_0x535420(0x104)]>0x1?_0x5d9be0[_0x203b23][0x1]:null));}return _0x2e3cae;}},'koasend':{'value':async function(_0x565733,_0x4a8f2d){const _0x287048=_0x2aa3da;if(_0x565733&&!fs[_0x287048(0x126)](_0x565733)&&!fs['existsSync'](this[_0x287048(0x16c)]['getAppDir']()+'/'+_0x565733))return'文件不存在';return _0x565733=fs[_0x287048(0x126)](_0x565733)?_0x565733:this[_0x287048(0x16c)][_0x287048(0x105)]()+'/'+_0x565733,this[_0x287048(0x16f)](_0x4a8f2d||_0x565733),await koasend(this,_0x565733);}}});});}async[a2_0x2bc5c2(0x131)](){const _0x569472=a2_0x2bc5c2;var _0x5e9e84,_0x4581cf;if(fs['existsSync'](this[_0x569472(0x16c)]['getBaseDir']()+_0x569472(0x17e))&&fs[_0x569472(0x102)](this[_0x569472(0x16c)][_0x569472(0x16a)]()+_0x569472(0x17e))[_0x569472(0xf9)]()){const _0x21ad57=this[_0x569472(0x15b)][_0x569472(0x110)](),_0x28cfb8=((_0x5e9e84=_0x21ad57===null||_0x21ad57===void 0x0?void 0x0:_0x21ad57[_0x569472(0x156)])===null||_0x5e9e84===void 0x0?void 0x0:_0x5e9e84[_0x569472(0x183)])||{};for(const _0x2ee431 of fs[_0x569472(0x122)](this[_0x569472(0x16c)]['getBaseDir']()+_0x569472(0x17e))){if(!fs[_0x569472(0x102)](this[_0x569472(0x16c)][_0x569472(0x16a)]()+_0x569472(0x13f)+_0x2ee431)[_0x569472(0xf9)]())continue;!(_0x28cfb8===null||_0x28cfb8===void 0x0?void 0x0:_0x28cfb8[_0x2ee431])&&(_0x28cfb8[_0x2ee431]=Object[_0x569472(0x178)]({},((_0x4581cf=_0x21ad57===null||_0x21ad57===void 0x0?void 0x0:_0x21ad57[_0x569472(0x156)])===null||_0x4581cf===void 0x0?void 0x0:_0x4581cf['default'])||{'maxSize':'1m','dir':this['app'][_0x569472(0x105)]()+_0x569472(0x170)},{'enableJSON':!![],'enableConsole':this[_0x569472(0x10b)][_0x569472(0x11d)](),'fileLogName':_0x2ee431+'.log','dir':this[_0x569472(0x16c)]['getAppDir']()+'/runtime/apps-'+_0x2ee431})),this[_0x569472(0x103)]['createLogger'](_0x2ee431,_0x28cfb8[_0x2ee431]);}Object['keys'](_0x28cfb8)[_0x569472(0x104)]>0x0&&(!_0x21ad57[_0x569472(0x156)]&&(_0x21ad57[_0x569472(0x156)]={'default':{'maxSize':'1m','dir':this[_0x569472(0x16c)][_0x569472(0x105)]()+_0x569472(0x170)}}),_0x21ad57['midwayLogger'][_0x569472(0x183)]=_0x28cfb8),this['config']['addObject'](_0x21ad57);}}async[a2_0x2bc5c2(0x164)](){const _0x453b42=a2_0x2bc5c2;var _0x4f8745,_0x20c59e,_0x59ebe3,_0x386faa,_0x44ad45,_0x390524;const _0x1788e5=this[_0x453b42(0x15b)][_0x453b42(0x110)]();((_0x20c59e=(_0x4f8745=_0x1788e5===null||_0x1788e5===void 0x0?void 0x0:_0x1788e5[_0x453b42(0xf5)])===null||_0x4f8745===void 0x0?void 0x0:_0x4f8745[_0x453b42(0x10d)])===null||_0x20c59e===void 0x0?void 0x0:_0x20c59e['DEFAULT'])&&Object['keys'](_0x1788e5[_0x453b42(0xf5)][_0x453b42(0x10d)])['length']>0x1&&delete _0x1788e5[_0x453b42(0xf5)][_0x453b42(0x10d)]['DEFAULT'];if((_0x59ebe3=_0x1788e5===null||_0x1788e5===void 0x0?void 0x0:_0x1788e5[_0x453b42(0x12d)])===null||_0x59ebe3===void 0x0?void 0x0:_0x59ebe3['dirs'])for(const _0x1da0d5 in _0x1788e5[_0x453b42(0x12d)]['dirs']){((_0x386faa=_0x1788e5['staticFile']['dirs'][_0x1da0d5])===null||_0x386faa===void 0x0?void 0x0:_0x386faa['dir'])&&typeof((_0x44ad45=_0x1788e5[_0x453b42(0x12d)][_0x453b42(0x137)][_0x1da0d5])===null||_0x44ad45===void 0x0?void 0x0:_0x44ad45[_0x453b42(0x124)])==_0x453b42(0x106)&&!fs[_0x453b42(0x126)](_0x1788e5[_0x453b42(0x12d)][_0x453b42(0x137)][_0x1da0d5][_0x453b42(0x124)])&&(fs[_0x453b42(0x15e)](_0x1788e5[_0x453b42(0x12d)][_0x453b42(0x137)][_0x1da0d5][_0x453b42(0x124)],{'recursive':!![]}),console[_0x453b42(0x151)](_0x453b42(0x141)+_0x1788e5[_0x453b42(0x12d)][_0x453b42(0x137)][_0x1da0d5]['dir']));}((_0x390524=_0x1788e5===null||_0x1788e5===void 0x0?void 0x0:_0x1788e5[_0x453b42(0x14c)])===null||_0x390524===void 0x0?void 0x0:_0x390524['tmpdir'])&&!fs[_0x453b42(0x126)](_0x1788e5[_0x453b42(0x14c)]['tmpdir'])&&(fs[_0x453b42(0x15e)](_0x1788e5[_0x453b42(0x14c)][_0x453b42(0x133)],{'recursive':!![]}),console[_0x453b42(0x151)]('Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20'+_0x1788e5['upload']['tmpdir'])),this[_0x453b42(0x15b)][_0x453b42(0x158)](_0x1788e5);}};exports[a2_0x2bc5c2(0x172)]=CustomConfiguration,__decorate([(0x0,core_1[a2_0x2bc5c2(0x171)])(),__metadata(a2_0x2bc5c2(0x12e),Object)],CustomConfiguration[a2_0x2bc5c2(0x12b)],'app',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x2bc5c2(0x12e),core_2[a2_0x2bc5c2(0x157)])],CustomConfiguration[a2_0x2bc5c2(0x12b)],'config',void 0x0),__decorate([(0x0,core_1[a2_0x2bc5c2(0x127)])(),__metadata('design:type',core_2['MidwayDecoratorService'])],CustomConfiguration[a2_0x2bc5c2(0x12b)],a2_0x2bc5c2(0x15a),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata('design:type',core_2[a2_0x2bc5c2(0x174)])],CustomConfiguration[a2_0x2bc5c2(0x12b)],a2_0x2bc5c2(0x101),void 0x0),__decorate([(0x0,core_1[a2_0x2bc5c2(0x127)])(),__metadata(a2_0x2bc5c2(0x12e),core_2[a2_0x2bc5c2(0x176)])],CustomConfiguration[a2_0x2bc5c2(0x12b)],'environment',void 0x0),__decorate([(0x0,core_1[a2_0x2bc5c2(0x127)])(),__metadata(a2_0x2bc5c2(0x12e),core_1[a2_0x2bc5c2(0x14b)])],CustomConfiguration['prototype'],a2_0x2bc5c2(0x103),void 0x0),__decorate([(0x0,core_1[a2_0x2bc5c2(0x127)])(),__metadata(a2_0x2bc5c2(0x12e),ApiService_1['ApiService'])],CustomConfiguration[a2_0x2bc5c2(0x12b)],a2_0x2bc5c2(0x17d),void 0x0),exports[a2_0x2bc5c2(0x172)]=CustomConfiguration=__decorate([(0x0,core_1[a2_0x2bc5c2(0x152)])({'imports':[koa,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x2bc5c2(0x184),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration);
|
|
1
|
+
const a2_0x5800c3=a2_0x1c10;(function(_0x1466f0,_0xee15c7){const _0x1f6006=a2_0x1c10,_0x31e085=_0x1466f0();while(!![]){try{const _0x3fd5d3=-parseInt(_0x1f6006(0x220))/0x1+-parseInt(_0x1f6006(0x20d))/0x2*(parseInt(_0x1f6006(0x240))/0x3)+-parseInt(_0x1f6006(0x1e9))/0x4*(-parseInt(_0x1f6006(0x266))/0x5)+parseInt(_0x1f6006(0x216))/0x6+parseInt(_0x1f6006(0x25d))/0x7+-parseInt(_0x1f6006(0x27a))/0x8+-parseInt(_0x1f6006(0x250))/0x9*(-parseInt(_0x1f6006(0x25b))/0xa);if(_0x3fd5d3===_0xee15c7)break;else _0x31e085['push'](_0x31e085['shift']());}catch(_0x254caf){_0x31e085['push'](_0x31e085['shift']());}}}(a2_0x2054,0xd1f64));const a2_0x472fec=(function(){let _0x20d78a=!![];return function(_0x2845a9,_0x1b996d){const _0x3fda81=_0x20d78a?function(){const _0x5465ff=a2_0x1c10;if(_0x1b996d){const _0x8561a=_0x1b996d[_0x5465ff(0x227)](_0x2845a9,arguments);return _0x1b996d=null,_0x8561a;}}:function(){};return _0x20d78a=![],_0x3fda81;};}()),a2_0x4df5e7=a2_0x472fec(this,function(){const _0x148397=a2_0x1c10;return a2_0x4df5e7[_0x148397(0x275)]()['search'](_0x148397(0x244))[_0x148397(0x275)]()[_0x148397(0x24d)](a2_0x4df5e7)['search'](_0x148397(0x244));});function a2_0x1c10(_0x42add0,_0x1aab60){const _0x1a6855=a2_0x2054();return a2_0x1c10=function(_0x4df5e7,_0x472fec){_0x4df5e7=_0x4df5e7-0x1e8;let _0x20540f=_0x1a6855[_0x4df5e7];return _0x20540f;},a2_0x1c10(_0x42add0,_0x1aab60);}a2_0x4df5e7();'use strict';var __decorate=this&&this[a2_0x5800c3(0x257)]||function(_0xd90381,_0x215681,_0x19c5dc,_0x567ee6){const _0x40fcd8=a2_0x5800c3;var _0x50f569=arguments[_0x40fcd8(0x1eb)],_0x3f1c55=_0x50f569<0x3?_0x215681:_0x567ee6===null?_0x567ee6=Object['getOwnPropertyDescriptor'](_0x215681,_0x19c5dc):_0x567ee6,_0x2d6700;if(typeof Reflect==='object'&&typeof Reflect[_0x40fcd8(0x26a)]==='function')_0x3f1c55=Reflect[_0x40fcd8(0x26a)](_0xd90381,_0x215681,_0x19c5dc,_0x567ee6);else{for(var _0x1b9f76=_0xd90381[_0x40fcd8(0x1eb)]-0x1;_0x1b9f76>=0x0;_0x1b9f76--)if(_0x2d6700=_0xd90381[_0x1b9f76])_0x3f1c55=(_0x50f569<0x3?_0x2d6700(_0x3f1c55):_0x50f569>0x3?_0x2d6700(_0x215681,_0x19c5dc,_0x3f1c55):_0x2d6700(_0x215681,_0x19c5dc))||_0x3f1c55;}return _0x50f569>0x3&&_0x3f1c55&&Object[_0x40fcd8(0x239)](_0x215681,_0x19c5dc,_0x3f1c55),_0x3f1c55;},__metadata=this&&this[a2_0x5800c3(0x24a)]||function(_0x11f725,_0x47d4bc){const _0x3bf27c=a2_0x5800c3;if(typeof Reflect===_0x3bf27c(0x25c)&&typeof Reflect[_0x3bf27c(0x1f3)]===_0x3bf27c(0x20c))return Reflect['metadata'](_0x11f725,_0x47d4bc);};Object[a2_0x5800c3(0x239)](exports,a2_0x5800c3(0x1f1),{'value':!![]}),exports['CustomConfiguration']=void 0x0;const core_1=require(a2_0x5800c3(0x1ec)),core_2=require(a2_0x5800c3(0x1ec)),ApiError_1=require('./exception/ApiError'),ApiService_1=require('./service/ApiService'),intercept_1=require(a2_0x5800c3(0x230)),action_1=require(a2_0x5800c3(0x208)),fs=require('fs'),koasend=require(a2_0x5800c3(0x217)),koa=require(a2_0x5800c3(0x246)),upload=require(a2_0x5800c3(0x222)),staticFile=require('@midwayjs/static-file'),crossDomain=require(a2_0x5800c3(0x1ee)),ConfigDefault=require('./config/config.default'),ConfigProduction=require(a2_0x5800c3(0x24e)),anncic=require(a2_0x5800c3(0x279)),anncicCache=require(a2_0x5800c3(0x249)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require('@anncic-api/typeorm'),anncicValidator=require('@anncic-api/validator'),anncicHelper=require('anncic-apihelper');let CustomConfiguration=class CustomConfiguration{async[a2_0x5800c3(0x278)](){const _0x13f7e0=a2_0x5800c3;await this['filterConfig'](),await this[_0x13f7e0(0x254)](),await this['handlerActionRoute'](),await this[_0x13f7e0(0x1ff)]();}async[a2_0x5800c3(0x263)](){const _0x3f12f2=a2_0x5800c3,_0xb34247=this['config'][_0x3f12f2(0x26b)](),_0xceab6f=(0x0,core_1[_0x3f12f2(0x26e)])(intercept_1[_0x3f12f2(0x1fc)],intercept_1['InterceptTargetTmp'])||{};this[_0x3f12f2(0x258)][_0x3f12f2(0x23f)](action_1[_0x3f12f2(0x225)],_0x242989=>{const _0x44fc5e=_0x3f12f2;var _0x4b552c;const _0x5610a3=(0x0,core_1['getClassMetadata'])(action_1['APPSCONFIG_KEY'],action_1['AppsConfigTmp'])||{},_0x494f91=_0x242989[_0x44fc5e(0x1f3)],_0x4e4b58=(0x0,core_1[_0x44fc5e(0x26e)])(action_1[_0x44fc5e(0x262)],_0x242989['target'])||{},_0x2439f5=((_0x4b552c=_0x4e4b58===null||_0x4e4b58===void 0x0?void 0x0:_0x4e4b58[_0x44fc5e(0x219)])===null||_0x4b552c===void 0x0?void 0x0:_0x4b552c[_0x44fc5e(0x1f4)](0x0,_0x4e4b58[_0x44fc5e(0x219)][_0x44fc5e(0x22a)]('.')))||'',_0x519797=(_0x4e4b58===null||_0x4e4b58===void 0x0?void 0x0:_0x4e4b58[_0x44fc5e(0x241)])?(_0x5610a3===null||_0x5610a3===void 0x0?void 0x0:_0x5610a3[_0x4e4b58[_0x44fc5e(0x241)]])||{}:{};return{'before':async _0x55579a=>{const _0x1550ba=_0x44fc5e;var _0x229bfa,_0x4b8985,_0x57646b,_0x4b90be;const _0x450ac8=(_0x229bfa=_0x55579a===null||_0x55579a===void 0x0?void 0x0:_0x55579a[_0x1550ba(0x25f)])===null||_0x229bfa===void 0x0?void 0x0:_0x229bfa[core_2[_0x1550ba(0x261)]],_0x3baf81=lodash[_0x1550ba(0x271)]({},_0x450ac8[_0x1550ba(0x1f0)]['body']||_0x450ac8[_0x1550ba(0x1f0)][((_0x4b8985=_0xb34247===null||_0xb34247===void 0x0?void 0x0:_0xb34247[_0x1550ba(0x21b)])===null||_0x4b8985===void 0x0?void 0x0:_0x4b8985['key'])||_0x1550ba(0x1f6)]||{},_0x450ac8[_0x1550ba(0x1f0)][_0x1550ba(0x1f2)]||{});_0x450ac8[_0x1550ba(0x26c)]={'module':(_0x519797===null||_0x519797===void 0x0?void 0x0:_0x519797[_0x1550ba(0x1f8)])||'','routePath':''+_0x450ac8['path'],'routeName':_0x4e4b58['routerOptions'][_0x1550ba(0x204)]+'@'+_0x494f91[_0x1550ba(0x202)],'routeMethod':((_0x494f91===null||_0x494f91===void 0x0?void 0x0:_0x494f91['requestMethod'])||_0x450ac8[_0x1550ba(0x211)]||'')[_0x1550ba(0x267)](),'routeDescription':(_0x494f91===null||_0x494f91===void 0x0?void 0x0:_0x494f91[_0x1550ba(0x229)])||'','filemethod':_0x2439f5+'@'+(_0x494f91[_0x1550ba(0x211)]||'')};if(_0x450ac8&&(_0x494f91===null||_0x494f91===void 0x0?void 0x0:_0x494f91[_0x1550ba(0x21c)]))try{const _0x48e738=((_0x57646b=_0xb34247===null||_0xb34247===void 0x0?void 0x0:_0xb34247[_0x1550ba(0x21a)])===null||_0x57646b===void 0x0?void 0x0:_0x57646b['requestKey'])&&typeof(_0x3baf81===null||_0x3baf81===void 0x0?void 0x0:_0x3baf81[_0xb34247[_0x1550ba(0x21a)][_0x1550ba(0x23e)]])==_0x1550ba(0x21e)?JSON['parse'](base64_decode(_0x3baf81[_0xb34247['anncicapi']['requestKey']])||'{}')||{}:((_0x4b90be=_0x450ac8===null||_0x450ac8===void 0x0?void 0x0:_0x450ac8[_0x1550ba(0x1f0)])===null||_0x4b90be===void 0x0?void 0x0:_0x4b90be['headers'])||{};if(!this[_0x1550ba(0x255)][_0x1550ba(0x270)](_0x48e738))throw new AnnError(ApiError_1['ApiError'][_0x1550ba(0x203)]);}catch(_0x15f405){if(_0x15f405 instanceof AnnError)throw _0x15f405;else throw new AnnError(ApiError_1[_0x1550ba(0x1f5)][_0x1550ba(0x247)]);}},'around':async _0xf2f7ca=>{const _0x304ad5=_0x44fc5e;var _0x4a8d24,_0x4a074b,_0x1b38ce;const _0x386148=(_0x4a8d24=_0xf2f7ca===null||_0xf2f7ca===void 0x0?void 0x0:_0xf2f7ca[_0x304ad5(0x25f)])===null||_0x4a8d24===void 0x0?void 0x0:_0x4a8d24[core_2[_0x304ad5(0x261)]];if(_0x386148&&(_0x494f91===null||_0x494f91===void 0x0?void 0x0:_0x494f91[_0x304ad5(0x21c)])&&((_0x494f91===null||_0x494f91===void 0x0?void 0x0:_0x494f91[_0x304ad5(0x264)])||typeof(_0x494f91===null||_0x494f91===void 0x0?void 0x0:_0x494f91[_0x304ad5(0x264)])==_0x304ad5(0x1fd))){if(((_0x4a074b=_0x386148[_0x304ad5(0x23c)])===null||_0x4a074b===void 0x0?void 0x0:_0x4a074b[_0x304ad5(0x27c)])&&((_0x1b38ce=_0xceab6f===null||_0xceab6f===void 0x0?void 0x0:_0xceab6f[_0x386148['headers']['device']])===null||_0x1b38ce===void 0x0?void 0x0:_0x1b38ce['length'])>0x0)for(const _0x37a7c5 of _0xceab6f[_0x386148[_0x304ad5(0x23c)][_0x304ad5(0x27c)]]||[]){if(core_1[_0x304ad5(0x268)][_0x304ad5(0x20f)](_0x37a7c5)){const _0x3d4991=await _0x386148[_0x304ad5(0x251)][_0x304ad5(0x221)](_0x37a7c5);typeof(_0x3d4991===null||_0x3d4991===void 0x0?void 0x0:_0x3d4991[_0x304ad5(0x20a)])==_0x304ad5(0x20c)?await _0x3d4991['match'](_0x386148,typeof(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x211)])==_0x304ad5(0x21e)&&(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x207)])?_0x386148[_0x304ad5(0x211)][_0x304ad5(0x267)]()+'@'+(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x207)]):undefined,_0x494f91)&&await _0x3d4991['handler'](_0x386148,typeof(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x211)])==_0x304ad5(0x21e)&&(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148['_matchedRoute'])?_0x386148[_0x304ad5(0x211)][_0x304ad5(0x267)]()+'@'+(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x207)]):undefined,_0x494f91):await _0x3d4991[_0x304ad5(0x234)](_0x386148,typeof(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x211)])=='string'&&(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x207)])?_0x386148[_0x304ad5(0x211)]['toLowerCase']()+'@'+(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148['_matchedRoute']):undefined,_0x494f91);}else core_1[_0x304ad5(0x268)][_0x304ad5(0x237)](_0x37a7c5)&&await _0x37a7c5(_0x386148,typeof(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x211)])==_0x304ad5(0x21e)&&(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x207)])?_0x386148[_0x304ad5(0x211)][_0x304ad5(0x267)]()+'@'+(_0x386148===null||_0x386148===void 0x0?void 0x0:_0x386148[_0x304ad5(0x207)]):undefined,_0x494f91);}}return await _0xf2f7ca[_0x304ad5(0x213)](..._0xf2f7ca['args']);},'afterThrow':(_0x313cfa,_0x5831f9)=>{throw _0x5831f9;}};});}async[a2_0x5800c3(0x1ff)](){const _0xda2e57=a2_0x5800c3,_0x4e85ea=this[_0xda2e57(0x26d)][_0xda2e57(0x26b)]();this[_0xda2e57(0x1ed)][_0xda2e57(0x212)]([_0xda2e57(0x22b)])[_0xda2e57(0x23a)](_0x57e26d=>{const _0x269961=_0xda2e57;(_0x57e26d===null||_0x57e26d===void 0x0?void 0x0:_0x57e26d['context'])&&Object[_0x269961(0x1fa)](_0x57e26d[_0x269961(0x226)],{'hosturl':{'configurable':![],'get':function(){const _0x23a933=_0x269961;var _0x5dc8bb,_0x40ae42,_0x367f2a,_0x59a6e7;if((this===null||this===void 0x0?void 0x0:this['host'])&&!this[_0x23a933(0x256)][_0x23a933(0x232)]('http')){let _0x1773ba=this[_0x23a933(0x256)][_0x23a933(0x1f7)](':');return['80',_0x23a933(0x20e)][_0x23a933(0x25a)](_0x1773ba===null||_0x1773ba===void 0x0?void 0x0:_0x1773ba[0x1])?''+(!!((_0x40ae42=(_0x5dc8bb=this===null||this===void 0x0?void 0x0:this[_0x23a933(0x22d)])===null||_0x5dc8bb===void 0x0?void 0x0:_0x5dc8bb['connection'])===null||_0x40ae42===void 0x0?void 0x0:_0x40ae42['encrypted'])||(_0x1773ba===null||_0x1773ba===void 0x0?void 0x0:_0x1773ba[0x1])==_0x23a933(0x20e)?_0x23a933(0x252):_0x23a933(0x21d))+_0x1773ba[0x0]:''+(!!((_0x59a6e7=(_0x367f2a=this===null||this===void 0x0?void 0x0:this[_0x23a933(0x22d)])===null||_0x367f2a===void 0x0?void 0x0:_0x367f2a['connection'])===null||_0x59a6e7===void 0x0?void 0x0:_0x59a6e7[_0x23a933(0x210)])?_0x23a933(0x252):_0x23a933(0x21d))+this[_0x23a933(0x256)];}return'';}},'ok':{'value':function(_0x538234,_0x2faa4b,_0x148c7d=0x0){return{'code':_0x148c7d,'data':_0x538234,'extra':_0x2faa4b};}},'input':{'value':function(_0x496063,_0x452111){const _0x16cd5f=_0x269961;var _0x3f9ac6;const _0x2a2a8=lodash['defaultsDeep']({},this[_0x16cd5f(0x1f0)][_0x16cd5f(0x1f6)]||this[_0x16cd5f(0x1f0)][((_0x3f9ac6=_0x4e85ea===null||_0x4e85ea===void 0x0?void 0x0:_0x4e85ea[_0x16cd5f(0x21b)])===null||_0x3f9ac6===void 0x0?void 0x0:_0x3f9ac6[_0x16cd5f(0x22e)])||'body']||{},this[_0x16cd5f(0x1f0)][_0x16cd5f(0x1f2)]||{});return _0x496063?lodash[_0x16cd5f(0x1fb)](_0x2a2a8,_0x496063,_0x452111):_0x2a2a8;}},'when':{'value':async function(_0x56ece7,_0x3899b0){const _0xa0b719=_0x269961,_0x4b8c58=this['input'](_0x56ece7,null);if(!lodash[_0xa0b719(0x26f)](_0x4b8c58))return await _0x3899b0(_0x4b8c58);}},'only':{'value':function(_0x3fc618){const _0x361ab1=_0x269961,_0x133e57={};for(let _0x4e98cd=0x0;_0x4e98cd<_0x3fc618['length'];_0x4e98cd++){lodash[_0x361ab1(0x233)](_0x3fc618[_0x4e98cd])&&_0x3fc618[_0x4e98cd]['length']>0x0&&lodash['isString'](_0x3fc618[_0x4e98cd][0x0])&&(_0x133e57[_0x3fc618[_0x4e98cd][0x0]]=this['input'](_0x3fc618[_0x4e98cd][0x0],_0x3fc618[_0x4e98cd][_0x361ab1(0x1eb)]>0x1?_0x3fc618[_0x4e98cd][0x1]:null));}return _0x133e57;}},'koasend':{'value':async function(_0x52c48a,_0x1c5878){const _0x25bcea=_0x269961;if(_0x52c48a&&!fs[_0x25bcea(0x248)](_0x52c48a)&&!fs['existsSync'](this['app'][_0x25bcea(0x1fe)]()+'/'+_0x52c48a))return _0x25bcea(0x245);return _0x52c48a=fs[_0x25bcea(0x248)](_0x52c48a)?_0x52c48a:this[_0x25bcea(0x22c)][_0x25bcea(0x1fe)]()+'/'+_0x52c48a,this[_0x25bcea(0x200)](_0x1c5878||_0x52c48a),await koasend(this,_0x52c48a);}}});});}async['loggerConfig'](){const _0x3a6e8a=a2_0x5800c3;var _0x2535cc,_0x548ef9;if(fs[_0x3a6e8a(0x248)](this[_0x3a6e8a(0x22c)][_0x3a6e8a(0x243)]()+'/apps')&&fs['statSync'](this[_0x3a6e8a(0x22c)]['getBaseDir']()+_0x3a6e8a(0x235))[_0x3a6e8a(0x242)]()){const _0x18a6f6=this['config'][_0x3a6e8a(0x26b)](),_0x455477=((_0x2535cc=_0x18a6f6===null||_0x18a6f6===void 0x0?void 0x0:_0x18a6f6[_0x3a6e8a(0x24b)])===null||_0x2535cc===void 0x0?void 0x0:_0x2535cc[_0x3a6e8a(0x223)])||{};for(const _0x56a1bf of fs[_0x3a6e8a(0x1e8)](this[_0x3a6e8a(0x22c)]['getBaseDir']()+'/apps')){if(!fs[_0x3a6e8a(0x25e)](this['app'][_0x3a6e8a(0x243)]()+_0x3a6e8a(0x205)+_0x56a1bf)[_0x3a6e8a(0x242)]())continue;!(_0x455477===null||_0x455477===void 0x0?void 0x0:_0x455477[_0x56a1bf])&&(_0x455477[_0x56a1bf]=Object[_0x3a6e8a(0x21f)]({},((_0x548ef9=_0x18a6f6===null||_0x18a6f6===void 0x0?void 0x0:_0x18a6f6[_0x3a6e8a(0x24b)])===null||_0x548ef9===void 0x0?void 0x0:_0x548ef9[_0x3a6e8a(0x24c)])||{'maxSize':'1m','dir':this[_0x3a6e8a(0x22c)]['getAppDir']()+_0x3a6e8a(0x228)},{'enableJSON':!![],'enableConsole':this['environment']['isDevelopmentEnvironment'](),'fileLogName':_0x56a1bf+_0x3a6e8a(0x231),'dir':this['app'][_0x3a6e8a(0x1fe)]()+_0x3a6e8a(0x276)+_0x56a1bf})),this[_0x3a6e8a(0x22f)][_0x3a6e8a(0x224)](_0x56a1bf,_0x455477[_0x56a1bf]);}Object[_0x3a6e8a(0x259)](_0x455477)['length']>0x0&&(!_0x18a6f6['midwayLogger']&&(_0x18a6f6['midwayLogger']={'default':{'maxSize':'1m','dir':this[_0x3a6e8a(0x22c)][_0x3a6e8a(0x1fe)]()+_0x3a6e8a(0x228)}}),_0x18a6f6[_0x3a6e8a(0x24b)][_0x3a6e8a(0x223)]=_0x455477),this[_0x3a6e8a(0x26d)][_0x3a6e8a(0x206)](_0x18a6f6);}}async[a2_0x5800c3(0x215)](){const _0x58d942=a2_0x5800c3;var _0x151aaa,_0x467277,_0x3da269,_0x3c62ed,_0x4c8ed8,_0x3bd217;const _0xec8975=this['config'][_0x58d942(0x26b)]();((_0x467277=(_0x151aaa=_0xec8975===null||_0xec8975===void 0x0?void 0x0:_0xec8975[_0x58d942(0x21a)])===null||_0x151aaa===void 0x0?void 0x0:_0x151aaa['devices'])===null||_0x467277===void 0x0?void 0x0:_0x467277['DEFAULT'])&&Object[_0x58d942(0x259)](_0xec8975[_0x58d942(0x21a)]['devices'])[_0x58d942(0x1eb)]>0x1&&delete _0xec8975[_0x58d942(0x21a)][_0x58d942(0x201)][_0x58d942(0x277)];if((_0x3da269=_0xec8975===null||_0xec8975===void 0x0?void 0x0:_0xec8975['staticFile'])===null||_0x3da269===void 0x0?void 0x0:_0x3da269[_0x58d942(0x253)])for(const _0x50db11 in _0xec8975['staticFile'][_0x58d942(0x253)]){((_0x3c62ed=_0xec8975[_0x58d942(0x218)]['dirs'][_0x50db11])===null||_0x3c62ed===void 0x0?void 0x0:_0x3c62ed[_0x58d942(0x274)])&&typeof((_0x4c8ed8=_0xec8975[_0x58d942(0x218)][_0x58d942(0x253)][_0x50db11])===null||_0x4c8ed8===void 0x0?void 0x0:_0x4c8ed8['dir'])=='string'&&!fs[_0x58d942(0x248)](_0xec8975[_0x58d942(0x218)][_0x58d942(0x253)][_0x50db11][_0x58d942(0x274)])&&(fs['mkdirSync'](_0xec8975['staticFile'][_0x58d942(0x253)][_0x50db11]['dir'],{'recursive':!![]}),console[_0x58d942(0x1ef)](_0x58d942(0x238)+_0xec8975['staticFile'][_0x58d942(0x253)][_0x50db11][_0x58d942(0x274)]));}((_0x3bd217=_0xec8975===null||_0xec8975===void 0x0?void 0x0:_0xec8975['upload'])===null||_0x3bd217===void 0x0?void 0x0:_0x3bd217[_0x58d942(0x236)])&&!fs['existsSync'](_0xec8975[_0x58d942(0x214)][_0x58d942(0x236)])&&(fs[_0x58d942(0x265)](_0xec8975[_0x58d942(0x214)]['tmpdir'],{'recursive':!![]}),console['log'](_0x58d942(0x273)+_0xec8975[_0x58d942(0x214)][_0x58d942(0x236)])),this[_0x58d942(0x26d)][_0x58d942(0x206)](_0xec8975);}};function a2_0x2054(){const _0x2bead6=['app','req','key','loggerService','./types/intercept','.log','startsWith','isArray','handler','/apps','tmpdir','isFunction','Anncic-api\x20static-file\x20:\x20mkdir\x20','defineProperty','forEach','MidwayDecoratorService','headers','anncic-api','requestKey','registerMethodHandler','87dpIWiR','module','isDirectory','getBaseDir','(((.+)+)+)+$','文件不存在','@midwayjs/koa','_UNKNOW_','existsSync','@anncic-api/cache','__metadata','midwayLogger','default','constructor','./config/config.production','App','9rCUStH','requestContext','https://','dirs','loggerConfig','ApiService','host','__decorate','decorator','keys','includes','24363140LzZSJu','object','1227779KTqniH','statSync','target','environment','REQUEST_OBJ_CTX_KEY','ACTION_KEY','handlerActionRoute','intercept','mkdirSync','10QDgRPz','toLowerCase','Types','design:type','decorate','getConfiguration','_matchedRouteMeta','config','getClassMetadata','isNull','checksign','defaultsDeep','MidwayConfigService','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','dir','toString','/runtime/apps-','DEFAULT','onReady','@anncic-api/core','10023448YeWLYB','Configuration','device','readdirSync','1782236GZIgRJ','prototype','length','@midwayjs/core','application','@midwayjs/cross-domain','log','request','__esModule','query','metadata','substring','ApiError','body','split','name','MidwayLoggerService','defineProperties','get','INTERCEPT_KEY','undefined','getAppDir','hanlderApplications','attachment','devices','routerName','HEADERS_SIGNATURE','tagName','/apps/','addObject','_matchedRoute','./types/action','Inject','match','MidwayApplicationManager','function','68478VRYszJ','443','isClass','encrypted','method','getApplications','proceed','upload','filterConfig','7307832cRyXRT','koa-send','staticFile','filepath','anncicapi','bodyXml','apimit','http://','string','assign','1614935fjlloX','getAsync','@midwayjs/upload','clients','createLogger','ACTION_ROUTE_KEY','context','apply','/runtime','description','lastIndexOf','koa'];a2_0x2054=function(){return _0x2bead6;};return a2_0x2054();}__decorate([(0x0,core_1[a2_0x5800c3(0x24f)])(),__metadata(a2_0x5800c3(0x269),Object)],CustomConfiguration[a2_0x5800c3(0x1ea)],a2_0x5800c3(0x22c),void 0x0),__decorate([(0x0,core_1[a2_0x5800c3(0x209)])(),__metadata(a2_0x5800c3(0x269),core_2[a2_0x5800c3(0x272)])],CustomConfiguration[a2_0x5800c3(0x1ea)],a2_0x5800c3(0x26d),void 0x0),__decorate([(0x0,core_1[a2_0x5800c3(0x209)])(),__metadata(a2_0x5800c3(0x269),core_2[a2_0x5800c3(0x23b)])],CustomConfiguration[a2_0x5800c3(0x1ea)],a2_0x5800c3(0x258),void 0x0),__decorate([(0x0,core_1[a2_0x5800c3(0x209)])(),__metadata(a2_0x5800c3(0x269),core_2[a2_0x5800c3(0x20b)])],CustomConfiguration[a2_0x5800c3(0x1ea)],'application',void 0x0),__decorate([(0x0,core_1[a2_0x5800c3(0x209)])(),__metadata(a2_0x5800c3(0x269),core_2['MidwayEnvironmentService'])],CustomConfiguration[a2_0x5800c3(0x1ea)],a2_0x5800c3(0x260),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata('design:type',core_1[a2_0x5800c3(0x1f9)])],CustomConfiguration[a2_0x5800c3(0x1ea)],a2_0x5800c3(0x22f),void 0x0),__decorate([(0x0,core_1[a2_0x5800c3(0x209)])(),__metadata(a2_0x5800c3(0x269),ApiService_1[a2_0x5800c3(0x255)])],CustomConfiguration['prototype'],a2_0x5800c3(0x255),void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a2_0x5800c3(0x27b)])({'imports':[koa,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x5800c3(0x23d),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
|
|
@@ -1,14 +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
|
-
};
|
|
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
|
+
};
|
package/dist/decorator/Action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a3_0x19ebf3=a3_0x2779;function a3_0x2779(_0x3e0874,_0x2bc7e6){const _0x3b91c7=a3_0x4276();return a3_0x2779=function(_0x3925f7,_0xcb204f){_0x3925f7=_0x3925f7-0xdf;let _0x42762c=_0x3b91c7[_0x3925f7];return _0x42762c;},a3_0x2779(_0x3e0874,_0x2bc7e6);}(function(_0x416c57,_0x138091){const _0x1c05e8=a3_0x2779,_0x59a91b=_0x416c57();while(!![]){try{const _0x378926=-parseInt(_0x1c05e8(0x100))/0x1*(parseInt(_0x1c05e8(0x10f))/0x2)+parseInt(_0x1c05e8(0xf1))/0x3*(-parseInt(_0x1c05e8(0x105))/0x4)+parseInt(_0x1c05e8(0x107))/0x5+parseInt(_0x1c05e8(0xe2))/0x6*(parseInt(_0x1c05e8(0xee))/0x7)+parseInt(_0x1c05e8(0x119))/0x8*(-parseInt(_0x1c05e8(0x114))/0x9)+-parseInt(_0x1c05e8(0x12c))/0xa+parseInt(_0x1c05e8(0xfc))/0xb;if(_0x378926===_0x138091)break;else _0x59a91b['push'](_0x59a91b['shift']());}catch(_0x571087){_0x59a91b['push'](_0x59a91b['shift']());}}}(a3_0x4276,0x2de95));const a3_0xcb204f=(function(){let _0x385500=!![];return function(_0x8390b8,_0x67b2dd){const _0x2b2145=_0x385500?function(){const _0x4a64b6=a3_0x2779;if(_0x67b2dd){const _0x16597a=_0x67b2dd[_0x4a64b6(0x131)](_0x8390b8,arguments);return _0x67b2dd=null,_0x16597a;}}:function(){};return _0x385500=![],_0x2b2145;};}()),a3_0x3925f7=a3_0xcb204f(this,function(){const _0x5dba76=a3_0x2779;return a3_0x3925f7[_0x5dba76(0xe9)]()['search']('(((.+)+)+)+$')[_0x5dba76(0xe9)]()['constructor'](a3_0x3925f7)['search']('(((.+)+)+)+$');});function a3_0x4276(){const _0x58c264=['apply','-controller','endsWith','replace','894fCRGtc','rootpath','keys','ACTION_ROUTE_KEY','prefix','description','apimit','toString','routerName','toLowerCase','substring','defaultsDeep','14014qwakKC','createCustomMethodDecorator','@anncic-api/validator','9PCnwoq','../types/action','indexOf','Validator','route','validationOptions','/controller/','splice','\x20文件请放在apps/','Controller','middleware','5580685AhZhPC','Action','length','saveModule','218917BXNbuO','/apps/','attachClassMetadata','\x20文件请放在app/controller/文件下','defineProperty','89172wtiLGK','intercept','910265nfbcpA','string','cwd','module','trim','undefined','apps/','assign','2qAiBtA','/config.','validate','join','AppsConfigTmp','2817rhuMsZ','filter','@midwayjs/core','APPSCONFIG_KEY','NODE_ENV','5848sLEtSP','parseRoute','saveClassMetadata','-action','app/controller/','ACTION_KEY','getClassMetadata','/controller/文件下','env','tagName','filepath','RequestMapping','get','post','/apps','basic/controller/','startsWith','push','ActionApi','2850340XlBfUL','middlewareIgnore','existsSync','split','match'];a3_0x4276=function(){return _0x58c264;};return a3_0x4276();}a3_0x3925f7();'use strict';var _a,_b;Object[a3_0x19ebf3(0x104)](exports,'__esModule',{'value':!![]}),exports[a3_0x19ebf3(0x11a)]=exports[a3_0x19ebf3(0x12b)]=exports[a3_0x19ebf3(0xfd)]=void 0x0;const fs=require('fs'),validator_1=require(a3_0x19ebf3(0xf0)),core_1=require('@midwayjs/core'),core_2=require(a3_0x19ebf3(0x116)),action_1=require(a3_0x19ebf3(0xf2)),NODE_ENV=((_a=process===null||process===void 0x0?void 0x0:process[a3_0x19ebf3(0x121)])===null||_a===void 0x0?void 0x0:_a['MIDWAY_SERVER_ENV'])||((_b=process===null||process===void 0x0?void 0x0:process[a3_0x19ebf3(0x121)])===null||_b===void 0x0?void 0x0:_b[a3_0x19ebf3(0x118)]);function Action(_0x5cac66,_0x445ee4,_0x2f8b8e={'middleware':[],'sensitive':!![]}){return _0x39feae=>{const _0x4a19e8=a3_0x2779;var _0x1efaff;_0x2f8b8e[_0x4a19e8(0x122)]=_0x445ee4;const _0x468899=parseRoute(_0x5cac66);if(_0x468899['module']){_0x2f8b8e['prefix']=_0x2f8b8e[_0x4a19e8(0xe6)]?'/'+_0x468899[_0x4a19e8(0x10a)]+'/'+_0x2f8b8e[_0x4a19e8(0xe6)]:'/'+_0x468899[_0x4a19e8(0xf5)];_0x468899[_0x4a19e8(0xe6)]&&(_0x2f8b8e['prefix']='/'+_0x468899[_0x4a19e8(0xe6)]+'/'+_0x2f8b8e[_0x4a19e8(0xe6)]);_0x2f8b8e[_0x4a19e8(0xe6)]=_0x2f8b8e[_0x4a19e8(0xe6)][_0x4a19e8(0xeb)]()[_0x4a19e8(0xe1)](/\/{2,}/g,'/');const _0x311fbf=getModuleConfig(_0x468899[_0x4a19e8(0xe3)]+_0x4a19e8(0x127),_0x468899[_0x4a19e8(0x10a)],lodash[_0x4a19e8(0xe0)](_0x468899['filepath'],'ts')?'ts':'js');if(lodash['isArray'](_0x311fbf[_0x4a19e8(0xfb)])&&_0x311fbf[_0x4a19e8(0xfb)][_0x4a19e8(0xfe)]>0x0)for(let _0x1f6705 in _0x311fbf['middleware']){if(((_0x1efaff=_0x311fbf===null||_0x311fbf===void 0x0?void 0x0:_0x311fbf[_0x4a19e8(0x12d)])===null||_0x1efaff===void 0x0?void 0x0:_0x1efaff[_0x4a19e8(0xfe)])>0x0&&_0x311fbf['middlewareIgnore']['indexOf'](_0x311fbf['middleware'][_0x1f6705])!=-0x1)continue;_0x2f8b8e[_0x4a19e8(0xfb)][_0x4a19e8(0x12a)](_0x311fbf[_0x4a19e8(0xfb)][_0x1f6705]);}(0x0,core_1['saveModule'])(action_1[_0x4a19e8(0x11e)],_0x39feae),(0x0,core_1[_0x4a19e8(0xfa)])(_0x2f8b8e[_0x4a19e8(0xe6)],_0x2f8b8e)(_0x39feae),(0x0,core_1[_0x4a19e8(0x11b)])(action_1[_0x4a19e8(0x11e)],{'prefix':_0x2f8b8e[_0x4a19e8(0xe6)],'pprefix':_0x468899['prefix'],'module':_0x468899[_0x4a19e8(0x10a)],'filepath':_0x468899[_0x4a19e8(0x123)],'routerOptions':_0x2f8b8e},_0x39feae);}else _0x2f8b8e[_0x4a19e8(0xe6)]=_0x2f8b8e['prefix']?'/'+_0x2f8b8e[_0x4a19e8(0xe6)]:'/'+_0x468899[_0x4a19e8(0xf5)],_0x468899[_0x4a19e8(0xe6)]&&(_0x2f8b8e[_0x4a19e8(0xe6)]='/'+_0x468899[_0x4a19e8(0xe6)]+'/'+_0x2f8b8e[_0x4a19e8(0xe6)]),_0x2f8b8e[_0x4a19e8(0xe6)]=_0x2f8b8e['prefix'][_0x4a19e8(0xeb)]()[_0x4a19e8(0xe1)](/\/{2,}/g,'/'),(0x0,core_1[_0x4a19e8(0xff)])(action_1[_0x4a19e8(0x11e)],_0x39feae),(0x0,core_1[_0x4a19e8(0xfa)])(_0x2f8b8e[_0x4a19e8(0xe6)],_0x2f8b8e)(_0x39feae),(0x0,core_1[_0x4a19e8(0x11b)])(action_1['ACTION_KEY'],{'prefix':_0x2f8b8e[_0x4a19e8(0xe6)],'module':_0x468899[_0x4a19e8(0x10a)],'pprefix':_0x468899[_0x4a19e8(0xe6)],'filepath':_0x468899[_0x4a19e8(0x123)],'routerOptions':_0x2f8b8e},_0x39feae);};}exports[a3_0x19ebf3(0xfd)]=Action,Action[a3_0x19ebf3(0x125)]=function(_0x260c60,_0x687f74='/',_0xa3bc61={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x5539cb,_0x1a48ec,_0x436131)=>{ActionApi(_0x260c60,'get',_0x687f74,_0xa3bc61)(_0x5539cb,_0x1a48ec,_0x436131);};},Action[a3_0x19ebf3(0x126)]=function(_0x3f4d77,_0x3895e3='/',_0x5e8a44={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2ef506,_0x7133d,_0x533e03)=>{const _0x2a2a8b=a3_0x2779;ActionApi(_0x3f4d77,_0x2a2a8b(0x126),_0x3895e3,_0x5e8a44)(_0x2ef506,_0x7133d,_0x533e03);};};function ActionApi(_0x1504e3,_0x231381='get',_0x1315e9='/',_0xe4e641={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x68004d,_0x223828,_0x400901)=>{const _0x5327f2=a3_0x2779;var _0x52207c,_0x37a3da,_0x24a8a1;!_0xe4e641[_0x5327f2(0xfb)]&&(_0xe4e641[_0x5327f2(0xfb)]=[]);!((_0x52207c=_0xe4e641===null||_0xe4e641===void 0x0?void 0x0:_0xe4e641['validate'])===null||_0x52207c===void 0x0?void 0x0:_0x52207c[_0x5327f2(0xf6)])&&(_0xe4e641[_0x5327f2(0x111)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x5327f2(0x108)}});if(!_0x1315e9)_0x1315e9='/';else typeof _0x1315e9==_0x5327f2(0x108)&&(!_0x1315e9['startsWith']('/')&&!_0x1315e9[_0x5327f2(0x129)]('-')&&(_0x1315e9='/'+_0x1315e9));typeof _0xe4e641[_0x5327f2(0xe8)]==_0x5327f2(0x10c)&&(_0xe4e641['apimit']=!![]);if(((_0x37a3da=_0xe4e641===null||_0xe4e641===void 0x0?void 0x0:_0xe4e641[_0x5327f2(0xfb)])===null||_0x37a3da===void 0x0?void 0x0:_0x37a3da['length'])>0x0&&((_0x24a8a1=_0xe4e641===null||_0xe4e641===void 0x0?void 0x0:_0xe4e641[_0x5327f2(0x12d)])===null||_0x24a8a1===void 0x0?void 0x0:_0x24a8a1[_0x5327f2(0xfe)])>0x0)for(let _0x1ab835 in _0xe4e641[_0x5327f2(0xfb)]){_0xe4e641[_0x5327f2(0x12d)][_0x5327f2(0xf3)](_0xe4e641[_0x5327f2(0xfb)][_0x1ab835])!==-0x1&&(_0xe4e641[_0x5327f2(0xfb)][_0x1ab835]=null);}_0xe4e641[_0x5327f2(0xea)]=_0x1504e3,(0x0,validator_1[_0x5327f2(0xf4)])(_0xe4e641['validate'])(_0x68004d,_0x223828,_0x400901),(0x0,core_2[_0x5327f2(0x124)])(Object[_0x5327f2(0x10e)](_0xe4e641,{'path':_0x1315e9,'requestMethod':(_0x231381||_0x5327f2(0x125))['toLowerCase']()}))(_0x68004d,_0x223828,_0x400901),(0x0,core_2[_0x5327f2(0x102)])(action_1[_0x5327f2(0xe5)],{'path':_0x1315e9,'method':_0x223828,'apimit':_0xe4e641['apimit'],'intercept':_0xe4e641[_0x5327f2(0x106)],'routerName':_0xe4e641['routerName'],'description':_0xe4e641[_0x5327f2(0xe7)],'middleware':(_0xe4e641[_0x5327f2(0xfb)]||[])[_0x5327f2(0x115)](_0x15356c=>!!_0x15356c),'requestMethod':(_0x231381||_0x5327f2(0x125))[_0x5327f2(0xeb)]()},_0x68004d),(0x0,core_2[_0x5327f2(0xef)])(action_1[_0x5327f2(0xe5)],{'path':_0x1315e9,'method':_0x223828,'apimit':_0xe4e641[_0x5327f2(0xe8)],'intercept':_0xe4e641[_0x5327f2(0x106)],'routerName':_0xe4e641[_0x5327f2(0xea)],'description':_0xe4e641[_0x5327f2(0xe7)],'middleware':(_0xe4e641['middleware']||[])[_0x5327f2(0x115)](_0xa6e641=>!!_0xa6e641),'requestMethod':(_0x231381||_0x5327f2(0x125))[_0x5327f2(0xeb)]()})(_0x68004d,_0x223828,_0x400901);};}exports[a3_0x19ebf3(0x12b)]=ActionApi;function parseRoute(_0x564c01){const _0x4cedec=a3_0x19ebf3;_0x564c01=_0x564c01['replace'](/(\\|\/)/g,'/');const _0x4f0254=process[_0x4cedec(0x109)]()[_0x4cedec(0xe1)](/(\\|\/)/g,'/'),_0x4e5685=_0x564c01['substring'](0x0,_0x4f0254[_0x4cedec(0xfe)]+_0x564c01['substring'](_0x4f0254['length']+0x1)[_0x4cedec(0xf3)]('/')+0x1),_0x464461=_0x564c01[_0x4cedec(0xec)](_0x4e5685[_0x4cedec(0xfe)]+0x1)[_0x4cedec(0xe1)](/(\\|\/)/g,'/'),_0x27f79c={'route':'','prefix':![],'module':![],'rootpath':_0x4e5685,'filepath':_0x464461};if(_0x464461[_0x4cedec(0x129)](_0x4cedec(0x11d))||_0x464461[_0x4cedec(0x129)](_0x4cedec(0x128))){const _0x2f3e65=_0x464461['substring']((_0x464461['startsWith'](_0x4cedec(0x11d))?_0x4cedec(0x11d):_0x4cedec(0x128))[_0x4cedec(0xfe)])['split']('/')['filter'](_0x1df199=>_0x1df199&&_0x1df199[_0x4cedec(0x10b)]());return _0x2f3e65['length']>0x1&&(_0x27f79c['prefix']=_0x2f3e65[0x0][_0x4cedec(0xeb)](),_0x2f3e65[_0x4cedec(0xf8)](0x0,0x1)),_0x27f79c['route']=('/'+_0x2f3e65[_0x4cedec(0x112)]('/'))[_0x4cedec(0xe1)](/(\.ts|\.js)$/,'')[_0x4cedec(0xe1)](/\/{2,}/g,'/')[_0x4cedec(0x130)](/[\/|A-Z]*[^A-Z]+/g)[_0x4cedec(0x112)]('-')[_0x4cedec(0xeb)]()['replace'](/\/\-/g,'/'),_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xe0)](_0x4cedec(0x11c))&&(_0x27f79c[_0x4cedec(0xf5)]=_0x27f79c['route'][_0x4cedec(0xec)](0x0,_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xfe)]-0x7)),_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xe0)](_0x4cedec(0xdf))&&(_0x27f79c[_0x4cedec(0xf5)]=_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xec)](0x0,_0x27f79c[_0x4cedec(0xf5)]['length']-0xb)),_0x27f79c;}else{if(_0x464461[_0x4cedec(0x129)](_0x4cedec(0x10d))){const _0x4330d6=_0x464461[_0x4cedec(0xec)](0x0,_0x464461[_0x4cedec(0xf3)](_0x4cedec(0x101))+0x5),_0x54bb89=_0x464461[_0x4cedec(0xec)](_0x4330d6[_0x4cedec(0xfe)]+0x1)[_0x4cedec(0xe1)](/(\\|\/)/g,'/')[_0x4cedec(0x12f)]('/')[0x0];if(_0x464461[_0x4cedec(0x129)](_0x4cedec(0x10d)+_0x54bb89+_0x4cedec(0xf7))){const _0x26be3b=_0x464461[_0x4cedec(0xec)]((_0x4330d6+'/'+_0x54bb89+'/controller/')['length'])[_0x4cedec(0x12f)]('/')[_0x4cedec(0x115)](_0x41551c=>_0x41551c&&_0x41551c[_0x4cedec(0x10b)]());return _0x26be3b['length']>0x1&&(_0x27f79c[_0x4cedec(0xe6)]=_0x26be3b[0x0][_0x4cedec(0xeb)](),_0x26be3b[_0x4cedec(0xf8)](0x0,0x1)),_0x27f79c[_0x4cedec(0x10a)]=_0x54bb89,_0x27f79c[_0x4cedec(0xf5)]=('/'+_0x54bb89+'/'+_0x26be3b['join']('/'))[_0x4cedec(0xe1)](/(\.ts|\.js)$/,'')[_0x4cedec(0xe1)](/\/{2,}/g,'/')[_0x4cedec(0x130)](/[\/|A-Z]*[^A-Z]+/g)[_0x4cedec(0x112)]('-')[_0x4cedec(0xeb)]()[_0x4cedec(0xe1)](/\/\-/g,'/'),_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xe0)](_0x4cedec(0x11c))&&(_0x27f79c[_0x4cedec(0xf5)]=_0x27f79c[_0x4cedec(0xf5)]['substring'](0x0,_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xfe)]-0x7)),_0x27f79c[_0x4cedec(0xf5)][_0x4cedec(0xe0)]('-controller')&&(_0x27f79c[_0x4cedec(0xf5)]=_0x27f79c['route']['substring'](0x0,_0x27f79c['route']['length']-0xb)),_0x27f79c;}throw new Error(_0x464461+_0x4cedec(0xf9)+_0x54bb89+_0x4cedec(0x120));}}throw new Error(_0x464461+_0x4cedec(0x103));}exports[a3_0x19ebf3(0x11a)]=parseRoute;const moduleConfigTmp=(0x0,core_1[a3_0x19ebf3(0x11f)])(action_1[a3_0x19ebf3(0x117)],action_1[a3_0x19ebf3(0x113)])||{};function getModuleConfig(_0x5b7665,_0x321d97,_0x1bec44){const _0xe91ca0=a3_0x19ebf3;if(!(moduleConfigTmp===null||moduleConfigTmp===void 0x0?void 0x0:moduleConfigTmp[_0x321d97])){let _0x4a09e5={};if(NODE_ENV&&fs['existsSync'](_0x5b7665+'/'+_0x321d97+'/config.'+NODE_ENV+'.'+_0x1bec44)){const _0x5af117=include(_0x5b7665+'/'+_0x321d97+_0xe91ca0(0x110)+NODE_ENV+'.'+_0x1bec44);Object[_0xe91ca0(0xe4)](_0x5af117)[_0xe91ca0(0xfe)]>0x0&&(_0x4a09e5=lodash[_0xe91ca0(0xed)](_0x4a09e5,_0x5af117));}if(fs[_0xe91ca0(0x12e)](_0x5b7665+_0xe91ca0(0x110)+_0x1bec44)){const _0x4b7cd0=include(_0x5b7665+_0xe91ca0(0x110)+_0x1bec44);Object['keys'](_0x4b7cd0)['length']>0x0&&(_0x4a09e5=lodash[_0xe91ca0(0xed)](_0x4a09e5,_0x4b7cd0));}moduleConfigTmp[_0x321d97]=_0x4a09e5,(0x0,core_1[_0xe91ca0(0x11b)])(action_1[_0xe91ca0(0x117)],moduleConfigTmp,action_1[_0xe91ca0(0x113)]);}return moduleConfigTmp[_0x321d97];}
|
|
1
|
+
const a3_0x2051d1=a3_0x4fe8;(function(_0x30d277,_0xe62750){const _0x42cfc1=a3_0x4fe8,_0x1a81a9=_0x30d277();while(!![]){try{const _0x309ed2=parseInt(_0x42cfc1(0x13b))/0x1+-parseInt(_0x42cfc1(0x121))/0x2*(-parseInt(_0x42cfc1(0x15e))/0x3)+-parseInt(_0x42cfc1(0x119))/0x4*(-parseInt(_0x42cfc1(0x157))/0x5)+parseInt(_0x42cfc1(0x13e))/0x6+-parseInt(_0x42cfc1(0x14c))/0x7*(parseInt(_0x42cfc1(0x138))/0x8)+parseInt(_0x42cfc1(0x137))/0x9+-parseInt(_0x42cfc1(0x112))/0xa;if(_0x309ed2===_0xe62750)break;else _0x1a81a9['push'](_0x1a81a9['shift']());}catch(_0x57d323){_0x1a81a9['push'](_0x1a81a9['shift']());}}}(a3_0x1523,0x7bc52));function a3_0x4fe8(_0x501ecd,_0xf186fd){const _0x51f285=a3_0x1523();return a3_0x4fe8=function(_0x519b8a,_0x3d5680){_0x519b8a=_0x519b8a-0x112;let _0x1523da=_0x51f285[_0x519b8a];return _0x1523da;},a3_0x4fe8(_0x501ecd,_0xf186fd);}const a3_0x3d5680=(function(){let _0x1faee2=!![];return function(_0x251116,_0x410fed){const _0x582cbd=_0x1faee2?function(){const _0x347a13=a3_0x4fe8;if(_0x410fed){const _0x22f5e5=_0x410fed[_0x347a13(0x11c)](_0x251116,arguments);return _0x410fed=null,_0x22f5e5;}}:function(){};return _0x1faee2=![],_0x582cbd;};}()),a3_0x519b8a=a3_0x3d5680(this,function(){const _0x2da9d2=a3_0x4fe8;return a3_0x519b8a['toString']()[_0x2da9d2(0x143)](_0x2da9d2(0x15a))['toString']()[_0x2da9d2(0x13d)](a3_0x519b8a)[_0x2da9d2(0x143)](_0x2da9d2(0x15a));});a3_0x519b8a();'use strict';var _a,_b;Object[a3_0x2051d1(0x114)](exports,a3_0x2051d1(0x155),{'value':!![]}),exports['parseRoute']=exports[a3_0x2051d1(0x144)]=exports[a3_0x2051d1(0x140)]=void 0x0;const fs=require('fs'),validator_1=require('@anncic-api/validator'),core_1=require(a3_0x2051d1(0x12a)),core_2=require(a3_0x2051d1(0x12a)),action_1=require(a3_0x2051d1(0x136)),NODE_ENV=((_a=process===null||process===void 0x0?void 0x0:process[a3_0x2051d1(0x15f)])===null||_a===void 0x0?void 0x0:_a[a3_0x2051d1(0x115)])||((_b=process===null||process===void 0x0?void 0x0:process[a3_0x2051d1(0x15f)])===null||_b===void 0x0?void 0x0:_b[a3_0x2051d1(0x131)]);function Action(_0x4a6594,_0x3d237a,_0x251d33={'middleware':[],'sensitive':!![]}){return _0x2122a3=>{const _0x4a0ef7=a3_0x4fe8;var _0x18627c;_0x251d33[_0x4a0ef7(0x14f)]=_0x3d237a;const _0x52c2b5=parseRoute(_0x4a6594);if(_0x52c2b5[_0x4a0ef7(0x13a)]){_0x251d33[_0x4a0ef7(0x126)]=_0x251d33[_0x4a0ef7(0x126)]?'/'+_0x52c2b5['module']+'/'+_0x251d33[_0x4a0ef7(0x126)]:'/'+_0x52c2b5[_0x4a0ef7(0x129)];_0x52c2b5[_0x4a0ef7(0x126)]&&(_0x251d33['prefix']='/'+_0x52c2b5['prefix']+'/'+_0x251d33['prefix']);_0x251d33[_0x4a0ef7(0x126)]=_0x251d33[_0x4a0ef7(0x126)][_0x4a0ef7(0x158)]()[_0x4a0ef7(0x123)](/\/{2,}/g,'/');const _0x169b94=getModuleConfig(_0x52c2b5[_0x4a0ef7(0x134)]+_0x4a0ef7(0x122),_0x52c2b5[_0x4a0ef7(0x13a)],lodash[_0x4a0ef7(0x11b)](_0x52c2b5[_0x4a0ef7(0x15c)],'ts')?'ts':'js');if(lodash[_0x4a0ef7(0x14d)](_0x169b94[_0x4a0ef7(0x11d)])&&_0x169b94['middleware']['length']>0x0)for(let _0x3ec82c in _0x169b94[_0x4a0ef7(0x11d)]){if(((_0x18627c=_0x169b94===null||_0x169b94===void 0x0?void 0x0:_0x169b94[_0x4a0ef7(0x149)])===null||_0x18627c===void 0x0?void 0x0:_0x18627c['length'])>0x0&&_0x169b94['middlewareIgnore'][_0x4a0ef7(0x14a)](_0x169b94[_0x4a0ef7(0x11d)][_0x3ec82c])!=-0x1)continue;_0x251d33['middleware'][_0x4a0ef7(0x132)](_0x169b94[_0x4a0ef7(0x11d)][_0x3ec82c]);}(0x0,core_1['saveModule'])(action_1[_0x4a0ef7(0x124)],_0x2122a3),(0x0,core_1['Controller'])(_0x251d33[_0x4a0ef7(0x126)],_0x251d33)(_0x2122a3),(0x0,core_1[_0x4a0ef7(0x14e)])(action_1['ACTION_KEY'],{'prefix':_0x251d33[_0x4a0ef7(0x126)],'pprefix':_0x52c2b5[_0x4a0ef7(0x126)],'module':_0x52c2b5[_0x4a0ef7(0x13a)],'filepath':_0x52c2b5[_0x4a0ef7(0x15c)],'routerOptions':_0x251d33},_0x2122a3);}else _0x251d33['prefix']=_0x251d33[_0x4a0ef7(0x126)]?'/'+_0x251d33['prefix']:'/'+_0x52c2b5[_0x4a0ef7(0x129)],_0x52c2b5[_0x4a0ef7(0x126)]&&(_0x251d33[_0x4a0ef7(0x126)]='/'+_0x52c2b5[_0x4a0ef7(0x126)]+'/'+_0x251d33[_0x4a0ef7(0x126)]),_0x251d33[_0x4a0ef7(0x126)]=_0x251d33[_0x4a0ef7(0x126)]['toLowerCase']()[_0x4a0ef7(0x123)](/\/{2,}/g,'/'),(0x0,core_1[_0x4a0ef7(0x116)])(action_1[_0x4a0ef7(0x124)],_0x2122a3),(0x0,core_1[_0x4a0ef7(0x14b)])(_0x251d33['prefix'],_0x251d33)(_0x2122a3),(0x0,core_1[_0x4a0ef7(0x14e)])(action_1[_0x4a0ef7(0x124)],{'prefix':_0x251d33[_0x4a0ef7(0x126)],'module':_0x52c2b5['module'],'pprefix':_0x52c2b5[_0x4a0ef7(0x126)],'filepath':_0x52c2b5[_0x4a0ef7(0x15c)],'routerOptions':_0x251d33},_0x2122a3);};}exports['Action']=Action,Action[a3_0x2051d1(0x153)]=function(_0x405d1d,_0x466a76='/',_0x31195e={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2b3905,_0x15126e,_0x3bf983)=>{ActionApi(_0x405d1d,'get',_0x466a76,_0x31195e)(_0x2b3905,_0x15126e,_0x3bf983);};},Action['post']=function(_0x36391a,_0x172b88='/',_0x2f191d={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x11edc1,_0x27b166,_0x47b793)=>{const _0x57e5bf=a3_0x4fe8;ActionApi(_0x36391a,_0x57e5bf(0x127),_0x172b88,_0x2f191d)(_0x11edc1,_0x27b166,_0x47b793);};};function a3_0x1523(){const _0x30937d=['Validator','__esModule','apps/','545cxQPgm','toLowerCase','validationOptions','(((.+)+)+)+$','validate','filepath','/config.','861VeejVt','env','RequestMapping','\x20文件请放在apps/','trim','13175030VtogXF','/controller/','defineProperty','MIDWAY_SERVER_ENV','saveModule','ACTION_ROUTE_KEY','keys','5944weHXFx','APPSCONFIG_KEY','endsWith','apply','middleware','/apps/','routerName','join','606bbzpVo','/apps','replace','ACTION_KEY','splice','prefix','post','substring','route','@midwayjs/core','intercept','apimit','match','-controller','filter','defaultsDeep','NODE_ENV','push','/controller/文件下','rootpath','basic/controller/','../types/action','6904152YcfSrX','113352qAmgmT','AppsConfigTmp','module','698092TWEeOS','app/controller/','constructor','1597014FYzuuN','attachClassMetadata','Action','split','parseRoute','search','ActionApi','length','description','createCustomMethodDecorator','string','middlewareIgnore','indexOf','Controller','77NwmVxA','isArray','saveClassMetadata','tagName','startsWith','-action','assign','get'];a3_0x1523=function(){return _0x30937d;};return a3_0x1523();}function ActionApi(_0x13fa51,_0x4aa024=a3_0x2051d1(0x153),_0x1f2427='/',_0x542792={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x3d52ef,_0x2673f5,_0x29a11f)=>{const _0x287d83=a3_0x4fe8;var _0x1ffa6e,_0x47c123,_0x2b5571;!_0x542792['middleware']&&(_0x542792[_0x287d83(0x11d)]=[]);!((_0x1ffa6e=_0x542792===null||_0x542792===void 0x0?void 0x0:_0x542792[_0x287d83(0x15b)])===null||_0x1ffa6e===void 0x0?void 0x0:_0x1ffa6e[_0x287d83(0x159)])&&(_0x542792['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x287d83(0x148)}});if(!_0x1f2427)_0x1f2427='/';else typeof _0x1f2427=='string'&&(!_0x1f2427[_0x287d83(0x150)]('/')&&!_0x1f2427[_0x287d83(0x150)]('-')&&(_0x1f2427='/'+_0x1f2427));typeof _0x542792[_0x287d83(0x12c)]=='undefined'&&(_0x542792[_0x287d83(0x12c)]=!![]);if(((_0x47c123=_0x542792===null||_0x542792===void 0x0?void 0x0:_0x542792[_0x287d83(0x11d)])===null||_0x47c123===void 0x0?void 0x0:_0x47c123[_0x287d83(0x145)])>0x0&&((_0x2b5571=_0x542792===null||_0x542792===void 0x0?void 0x0:_0x542792[_0x287d83(0x149)])===null||_0x2b5571===void 0x0?void 0x0:_0x2b5571[_0x287d83(0x145)])>0x0)for(let _0x5732f3 in _0x542792[_0x287d83(0x11d)]){_0x542792[_0x287d83(0x149)]['indexOf'](_0x542792[_0x287d83(0x11d)][_0x5732f3])!==-0x1&&(_0x542792[_0x287d83(0x11d)][_0x5732f3]=null);}_0x542792[_0x287d83(0x11f)]=_0x13fa51,(0x0,validator_1[_0x287d83(0x154)])(_0x542792[_0x287d83(0x15b)])(_0x3d52ef,_0x2673f5,_0x29a11f),(0x0,core_2[_0x287d83(0x160)])(Object[_0x287d83(0x152)](_0x542792,{'path':_0x1f2427,'requestMethod':(_0x4aa024||_0x287d83(0x153))['toLowerCase']()}))(_0x3d52ef,_0x2673f5,_0x29a11f),(0x0,core_2[_0x287d83(0x13f)])(action_1[_0x287d83(0x117)],{'path':_0x1f2427,'method':_0x2673f5,'apimit':_0x542792['apimit'],'intercept':_0x542792[_0x287d83(0x12b)],'routerName':_0x542792['routerName'],'description':_0x542792[_0x287d83(0x146)],'middleware':(_0x542792['middleware']||[])['filter'](_0x4238f1=>!!_0x4238f1),'requestMethod':(_0x4aa024||_0x287d83(0x153))[_0x287d83(0x158)]()},_0x3d52ef),(0x0,core_2[_0x287d83(0x147)])(action_1[_0x287d83(0x117)],{'path':_0x1f2427,'method':_0x2673f5,'apimit':_0x542792[_0x287d83(0x12c)],'intercept':_0x542792[_0x287d83(0x12b)],'routerName':_0x542792[_0x287d83(0x11f)],'description':_0x542792['description'],'middleware':(_0x542792['middleware']||[])[_0x287d83(0x12f)](_0x4e3b84=>!!_0x4e3b84),'requestMethod':(_0x4aa024||'get')[_0x287d83(0x158)]()})(_0x3d52ef,_0x2673f5,_0x29a11f);};}exports[a3_0x2051d1(0x144)]=ActionApi;function parseRoute(_0x5cfdaf){const _0x261327=a3_0x2051d1;_0x5cfdaf=_0x5cfdaf[_0x261327(0x123)](/(\\|\/)/g,'/');const _0x392d1d=process['cwd']()[_0x261327(0x123)](/(\\|\/)/g,'/'),_0x503f93=_0x5cfdaf['substring'](0x0,_0x392d1d[_0x261327(0x145)]+_0x5cfdaf[_0x261327(0x128)](_0x392d1d[_0x261327(0x145)]+0x1)[_0x261327(0x14a)]('/')+0x1),_0x227433=_0x5cfdaf[_0x261327(0x128)](_0x503f93[_0x261327(0x145)]+0x1)[_0x261327(0x123)](/(\\|\/)/g,'/'),_0x38f04f={'route':'','prefix':![],'module':![],'rootpath':_0x503f93,'filepath':_0x227433};if(_0x227433[_0x261327(0x150)](_0x261327(0x13c))||_0x227433[_0x261327(0x150)]('basic/controller/')){const _0xa2dc90=_0x227433[_0x261327(0x128)]((_0x227433[_0x261327(0x150)](_0x261327(0x13c))?_0x261327(0x13c):_0x261327(0x135))[_0x261327(0x145)])['split']('/')[_0x261327(0x12f)](_0x26f098=>_0x26f098&&_0x26f098[_0x261327(0x162)]());return _0xa2dc90['length']>0x1&&(_0x38f04f[_0x261327(0x126)]=_0xa2dc90[0x0][_0x261327(0x158)](),_0xa2dc90[_0x261327(0x125)](0x0,0x1)),_0x38f04f[_0x261327(0x129)]=('/'+_0xa2dc90['join']('/'))[_0x261327(0x123)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x261327(0x120)]('-')['toLowerCase']()[_0x261327(0x123)](/\/\-/g,'/'),_0x38f04f[_0x261327(0x129)][_0x261327(0x11b)](_0x261327(0x151))&&(_0x38f04f[_0x261327(0x129)]=_0x38f04f[_0x261327(0x129)][_0x261327(0x128)](0x0,_0x38f04f[_0x261327(0x129)][_0x261327(0x145)]-0x7)),_0x38f04f[_0x261327(0x129)]['endsWith'](_0x261327(0x12e))&&(_0x38f04f[_0x261327(0x129)]=_0x38f04f[_0x261327(0x129)][_0x261327(0x128)](0x0,_0x38f04f[_0x261327(0x129)]['length']-0xb)),_0x38f04f;}else{if(_0x227433['startsWith'](_0x261327(0x156))){const _0x461257=_0x227433[_0x261327(0x128)](0x0,_0x227433[_0x261327(0x14a)](_0x261327(0x11e))+0x5),_0x23939f=_0x227433[_0x261327(0x128)](_0x461257[_0x261327(0x145)]+0x1)['replace'](/(\\|\/)/g,'/')[_0x261327(0x141)]('/')[0x0];if(_0x227433[_0x261327(0x150)](_0x261327(0x156)+_0x23939f+_0x261327(0x113))){const _0x4e7927=_0x227433['substring']((_0x461257+'/'+_0x23939f+_0x261327(0x113))['length'])[_0x261327(0x141)]('/')[_0x261327(0x12f)](_0x4bb6c8=>_0x4bb6c8&&_0x4bb6c8[_0x261327(0x162)]());return _0x4e7927[_0x261327(0x145)]>0x1&&(_0x38f04f[_0x261327(0x126)]=_0x4e7927[0x0][_0x261327(0x158)](),_0x4e7927[_0x261327(0x125)](0x0,0x1)),_0x38f04f[_0x261327(0x13a)]=_0x23939f,_0x38f04f['route']=('/'+_0x23939f+'/'+_0x4e7927['join']('/'))[_0x261327(0x123)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')[_0x261327(0x12d)](/[\/|A-Z]*[^A-Z]+/g)[_0x261327(0x120)]('-')[_0x261327(0x158)]()['replace'](/\/\-/g,'/'),_0x38f04f[_0x261327(0x129)][_0x261327(0x11b)]('-action')&&(_0x38f04f[_0x261327(0x129)]=_0x38f04f[_0x261327(0x129)]['substring'](0x0,_0x38f04f[_0x261327(0x129)][_0x261327(0x145)]-0x7)),_0x38f04f['route'][_0x261327(0x11b)](_0x261327(0x12e))&&(_0x38f04f[_0x261327(0x129)]=_0x38f04f[_0x261327(0x129)]['substring'](0x0,_0x38f04f[_0x261327(0x129)][_0x261327(0x145)]-0xb)),_0x38f04f;}throw new Error(_0x227433+_0x261327(0x161)+_0x23939f+_0x261327(0x133));}}throw new Error(_0x227433+'\x20文件请放在app/controller/文件下');}exports[a3_0x2051d1(0x142)]=parseRoute;const moduleConfigTmp=(0x0,core_1['getClassMetadata'])(action_1[a3_0x2051d1(0x11a)],action_1[a3_0x2051d1(0x139)])||{};function getModuleConfig(_0x2affb2,_0x38450a,_0x46d648){const _0x2bed2e=a3_0x2051d1;if(!(moduleConfigTmp===null||moduleConfigTmp===void 0x0?void 0x0:moduleConfigTmp[_0x38450a])){let _0x46c600={};if(NODE_ENV&&fs['existsSync'](_0x2affb2+'/'+_0x38450a+_0x2bed2e(0x15d)+NODE_ENV+'.'+_0x46d648)){const _0x1fa271=include(_0x2affb2+'/'+_0x38450a+_0x2bed2e(0x15d)+NODE_ENV+'.'+_0x46d648);Object[_0x2bed2e(0x118)](_0x1fa271)[_0x2bed2e(0x145)]>0x0&&(_0x46c600=lodash['defaultsDeep'](_0x46c600,_0x1fa271));}if(fs['existsSync'](_0x2affb2+_0x2bed2e(0x15d)+_0x46d648)){const _0x339b63=include(_0x2affb2+_0x2bed2e(0x15d)+_0x46d648);Object[_0x2bed2e(0x118)](_0x339b63)[_0x2bed2e(0x145)]>0x0&&(_0x46c600=lodash[_0x2bed2e(0x130)](_0x46c600,_0x339b63));}moduleConfigTmp[_0x38450a]=_0x46c600,(0x0,core_1['saveClassMetadata'])(action_1[_0x2bed2e(0x11a)],moduleConfigTmp,action_1[_0x2bed2e(0x139)]);}return moduleConfigTmp[_0x38450a];}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { getRouteOption } from '../helper/getRoutes';
|
|
2
|
-
export declare function Apitest(path?: string, option?: getRouteOption): MethodDecorator;
|
|
1
|
+
import { getRouteOption } from '../helper/getRoutes';
|
|
2
|
+
export declare function Apitest(path?: string, option?: getRouteOption): MethodDecorator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a4_0x543ab8=a4_0x52e7;(function(_0x30b41b,_0x10ca89){const _0x430df5=a4_0x52e7,_0x1faccf=_0x30b41b();while(!![]){try{const _0x12fc31=-parseInt(_0x430df5(0x19e))/0x1*(parseInt(_0x430df5(0x194))/0x2)+-parseInt(_0x430df5(0x185))/0x3+-parseInt(_0x430df5(0x189))/0x4*(parseInt(_0x430df5(0x19f))/0x5)+parseInt(_0x430df5(0x18d))/0x6+parseInt(_0x430df5(0x18e))/0x7+-parseInt(_0x430df5(0x192))/0x8*(-parseInt(_0x430df5(0x198))/0x9)+parseInt(_0x430df5(0x184))/0xa;if(_0x12fc31===_0x10ca89)break;else _0x1faccf['push'](_0x1faccf['shift']());}catch(_0x592c86){_0x1faccf['push'](_0x1faccf['shift']());}}}(a4_0xe4ca,0x594b3));function a4_0xe4ca(){const _0x1a4f7a=['17705yUDhNZ','get','786430NhFTZm','1151181sUnUsg','constructor','search','getAsync','192KKUPMB','getApplicationContext','MidwayEnvironmentService','__esModule','2002116TYthHB','2030406SMWioT','Apitest','../service/ApitestService','isDevelopmentEnvironment','376wfaVIe','apidoc','2qLkdWi','getConfig','apitest','RequestMapping','121653URRwEV','app','@midwayjs/core','/apitest','(((.+)+)+)+$','toString','418244jHADTc'];a4_0xe4ca=function(){return _0x1a4f7a;};return a4_0xe4ca();}const a4_0x2c1790=(function(){let _0x43bc96=!![];return function(_0x22373d,_0x2c4b12){const _0x1dc837=_0x43bc96?function(){if(_0x2c4b12){const _0x22fdc0=_0x2c4b12['apply'](_0x22373d,arguments);return _0x2c4b12=null,_0x22fdc0;}}:function(){};return _0x43bc96=![],_0x1dc837;};}()),a4_0x5ae1fe=a4_0x2c1790(this,function(){const _0x3d7253=a4_0x52e7;return a4_0x5ae1fe[_0x3d7253(0x19d)]()[_0x3d7253(0x187)](_0x3d7253(0x19c))[_0x3d7253(0x19d)]()[_0x3d7253(0x186)](a4_0x5ae1fe)[_0x3d7253(0x187)](_0x3d7253(0x19c));});function a4_0x52e7(_0x362c8f,_0x49514f){const _0x295899=a4_0xe4ca();return a4_0x52e7=function(_0x5ae1fe,_0x2c1790){_0x5ae1fe=_0x5ae1fe-0x184;let _0xe4ca02=_0x295899[_0x5ae1fe];return _0xe4ca02;},a4_0x52e7(_0x362c8f,_0x49514f);}a4_0x5ae1fe();'use strict';Object['defineProperty'](exports,a4_0x543ab8(0x18c),{'value':!![]}),exports['Apitest']=void 0x0;const core_1=require(a4_0x543ab8(0x19a)),ApitestService_1=require(a4_0x543ab8(0x190));function Apitest(_0x26ba8f=a4_0x543ab8(0x19b),_0x2eb60f){return(_0x4098ae,_0x58a8f6,_0x4d433e)=>{const _0x15dc41=a4_0x52e7;return(0x0,core_1[_0x15dc41(0x197)])({'path':_0x26ba8f,'requestMethod':_0x15dc41(0x1a0)})(_0x4098ae,_0x58a8f6,_0x4d433e),_0x4d433e['value']=async function(..._0x3f542f){const _0x4064ea=_0x15dc41;var _0x324c5b;const _0x5c75a4=(_0x324c5b=this[core_1['REQUEST_OBJ_CTX_KEY']])===null||_0x324c5b===void 0x0?void 0x0:_0x324c5b[_0x4064ea(0x199)];if(_0x5c75a4&&_0x5c75a4[_0x4064ea(0x195)](_0x4064ea(0x196))){const _0x5f3037=await _0x5c75a4[_0x4064ea(0x18a)]()[_0x4064ea(0x188)](ApitestService_1['ApitestService']),_0x8d0bae=await _0x5c75a4['getApplicationContext']()[_0x4064ea(0x188)](core_1[_0x4064ea(0x18b)]);return _0x8d0bae[_0x4064ea(0x191)]()&&(_0x2eb60f['filepath']=!![]),await _0x5f3037[_0x4064ea(0x193)](_0x2eb60f);}return'';},_0x4d433e;};}exports[a4_0x543ab8(0x18f)]=Apitest;
|
|
@@ -1,5 +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
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x385c17=a5_0x1805;(function(_0xed86a4,_0x4f29c5){const _0x2beff2=a5_0x1805,_0x456d73=_0xed86a4();while(!![]){try{const _0x1d161a=parseInt(_0x2beff2(0xd3))/0x1*(parseInt(_0x2beff2(0xca))/0x2)+parseInt(_0x2beff2(0xd4))/0x3+parseInt(_0x2beff2(0xc7))/0x4+parseInt(_0x2beff2(0xd5))/0x5*(parseInt(_0x2beff2(0xc9))/0x6)+parseInt(_0x2beff2(0xcf))/0x7*(-parseInt(_0x2beff2(0xe5))/0x8)+parseInt(_0x2beff2(0xdb))/0x9*(-parseInt(_0x2beff2(0xdc))/0xa)+-parseInt(_0x2beff2(0xcc))/0xb;if(_0x1d161a===_0x4f29c5)break;else _0x456d73['push'](_0x456d73['shift']());}catch(_0x261aba){_0x456d73['push'](_0x456d73['shift']());}}}(a5_0x2740,0xecf9b));const a5_0x27c9e6=(function(){let _0x5a41b8=!![];return function(_0xf319a9,_0x25636c){const _0x1519a7=_0x5a41b8?function(){if(_0x25636c){const _0x19fb64=_0x25636c['apply'](_0xf319a9,arguments);return _0x25636c=null,_0x19fb64;}}:function(){};return _0x5a41b8=![],_0x1519a7;};}()),a5_0x149744=a5_0x27c9e6(this,function(){const _0x5364d1=a5_0x1805;return a5_0x149744[_0x5364d1(0xdd)]()['search']('(((.+)+)+)+$')[_0x5364d1(0xdd)]()[_0x5364d1(0xd9)](a5_0x149744)['search'](_0x5364d1(0xcd));});function a5_0x1805(_0x583b6c,_0x183051){const _0x2fecef=a5_0x2740();return a5_0x1805=function(_0x149744,_0x27c9e6){_0x149744=_0x149744-0xc7;let _0x27407e=_0x2fecef[_0x149744];return _0x27407e;},a5_0x1805(_0x583b6c,_0x183051);}a5_0x149744();'use strict';Object[a5_0x385c17(0xe2)](exports,a5_0x385c17(0xde),{'value':!![]}),exports[a5_0x385c17(0xe3)]=exports[a5_0x385c17(0xce)]=void 0x0;function a5_0x2740(){const _0x2aca59=['8ySbDHc','7044160RZlwvl','toUpperCase','2839950SrEhOS','4412MnZOFa','InterceptTargetTmp','36528833pUKFHq','(((.+)+)+)+$','Intercept','3575866oUWGxd','match','../types/intercept','push','634DlIQXd','5169906FLlNpj','15tjUnlb','INTERCEPT_KEY','Singleton','Provide','constructor','@midwayjs/core','10413hQqSta','12970FqPzHv','toString','__esModule','getClassMetadata','isArray','saveClassMetadata','defineProperty','IIntercept','Scope'];a5_0x2740=function(){return _0x2aca59;};return a5_0x2740();}const core_1=require(a5_0x385c17(0xda)),intercept_1=require(a5_0x385c17(0xd1));function Intercept(_0x1f38ea){return _0x231c5c=>{const _0x1eecbf=a5_0x1805,_0x34f882=(0x0,core_1[_0x1eecbf(0xdf)])(intercept_1[_0x1eecbf(0xd6)],intercept_1['InterceptTargetTmp'])||{};for(let _0x6978f3 of Array[_0x1eecbf(0xe0)](_0x1f38ea)?_0x1f38ea:[_0x1f38ea]){_0x6978f3=_0x6978f3[_0x1eecbf(0xc8)]();!(_0x34f882===null||_0x34f882===void 0x0?void 0x0:_0x34f882[_0x6978f3])&&(_0x34f882[_0x6978f3]=[]);if(_0x34f882[_0x6978f3]['includes'](_0x231c5c))continue;_0x34f882[_0x6978f3][_0x1eecbf(0xd2)](_0x231c5c);}(0x0,core_1[_0x1eecbf(0xd8)])()(_0x231c5c),(0x0,core_1[_0x1eecbf(0xe4)])(core_1['ScopeEnum'][_0x1eecbf(0xd7)])(_0x231c5c),(0x0,core_1[_0x1eecbf(0xe1)])(intercept_1[_0x1eecbf(0xd6)],_0x34f882,intercept_1[_0x1eecbf(0xcb)]);};}exports[a5_0x385c17(0xce)]=Intercept;class IIntercept{async[a5_0x385c17(0xd0)](_0x15d183,_0x17afac,_0x5c2c68){return!![];}}exports[a5_0x385c17(0xe3)]=IIntercept;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="@anncic-api/core" />
|
|
2
|
-
export declare class ApiError extends AnnError {
|
|
3
|
-
static readonly TIMEOUT = 102403;
|
|
4
|
-
static readonly HEADERS_LACK = 102002;
|
|
5
|
-
static readonly HEADERS_DEVICE = 102003;
|
|
6
|
-
static readonly HEADERS_SIGNATURE = 102004;
|
|
7
|
-
static readonly HEADERS_CHECKCODE = 102005;
|
|
8
|
-
static readonly TIMEOUT_LOGINTIME = 102006;
|
|
9
|
-
}
|
|
1
|
+
/// <reference types="@anncic-api/core" />
|
|
2
|
+
export declare class ApiError extends AnnError {
|
|
3
|
+
static readonly TIMEOUT = 102403;
|
|
4
|
+
static readonly HEADERS_LACK = 102002;
|
|
5
|
+
static readonly HEADERS_DEVICE = 102003;
|
|
6
|
+
static readonly HEADERS_SIGNATURE = 102004;
|
|
7
|
+
static readonly HEADERS_CHECKCODE = 102005;
|
|
8
|
+
static readonly TIMEOUT_LOGINTIME = 102006;
|
|
9
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x1ac4e5=a6_0x38fe;(function(_0x263fc5,_0x4b3934){var _0x53cfbe=a6_0x38fe,_0x6549ea=_0x263fc5();while(!![]){try{var _0xd83c17=parseInt(_0x53cfbe(0x10e))/0x1*(-parseInt(_0x53cfbe(0x11c))/0x2)+-parseInt(_0x53cfbe(0x11e))/0x3*(-parseInt(_0x53cfbe(0x122))/0x4)+-parseInt(_0x53cfbe(0x102))/0x5*(-parseInt(_0x53cfbe(0x114))/0x6)+parseInt(_0x53cfbe(0x106))/0x7+parseInt(_0x53cfbe(0x11b))/0x8*(parseInt(_0x53cfbe(0x119))/0x9)+-parseInt(_0x53cfbe(0x110))/0xa*(parseInt(_0x53cfbe(0x108))/0xb)+parseInt(_0x53cfbe(0x11f))/0xc*(-parseInt(_0x53cfbe(0x117))/0xd);if(_0xd83c17===_0x4b3934)break;else _0x6549ea['push'](_0x6549ea['shift']());}catch(_0x44652b){_0x6549ea['push'](_0x6549ea['shift']());}}}(a6_0x45c9,0xb961d));function a6_0x38fe(_0x25e4fa,_0x1d5205){var _0x5e068d=a6_0x45c9();return a6_0x38fe=function(_0x356e3f,_0x48398b){_0x356e3f=_0x356e3f-0xfd;var _0x45c914=_0x5e068d[_0x356e3f];return _0x45c914;},a6_0x38fe(_0x25e4fa,_0x1d5205);}var a6_0x48398b=(function(){var _0x1ca582=!![];return function(_0x129df8,_0x5ad70a){var _0x6c6ccc=_0x1ca582?function(){if(_0x5ad70a){var _0x29acce=_0x5ad70a['apply'](_0x129df8,arguments);return _0x5ad70a=null,_0x29acce;}}:function(){};return _0x1ca582=![],_0x6c6ccc;};}()),a6_0x356e3f=a6_0x48398b(this,function(){var _0x2a9a3f=a6_0x38fe;return a6_0x356e3f[_0x2a9a3f(0x10b)]()[_0x2a9a3f(0x118)](_0x2a9a3f(0x104))[_0x2a9a3f(0x10b)]()['constructor'](a6_0x356e3f)[_0x2a9a3f(0x118)](_0x2a9a3f(0x104));});a6_0x356e3f();'use strict';var __decorate=this&&this[a6_0x1ac4e5(0x107)]||function(_0x2842e2,_0x25476b,_0x24d9d8,_0x145365){var _0x148dd2=a6_0x1ac4e5,_0x1f026c=arguments['length'],_0x454884=_0x1f026c<0x3?_0x25476b:_0x145365===null?_0x145365=Object[_0x148dd2(0x11a)](_0x25476b,_0x24d9d8):_0x145365,_0x442a29;if(typeof Reflect==='object'&&typeof Reflect[_0x148dd2(0x100)]===_0x148dd2(0x112))_0x454884=Reflect[_0x148dd2(0x100)](_0x2842e2,_0x25476b,_0x24d9d8,_0x145365);else{for(var _0x26de19=_0x2842e2[_0x148dd2(0x10a)]-0x1;_0x26de19>=0x0;_0x26de19--)if(_0x442a29=_0x2842e2[_0x26de19])_0x454884=(_0x1f026c<0x3?_0x442a29(_0x454884):_0x1f026c>0x3?_0x442a29(_0x25476b,_0x24d9d8,_0x454884):_0x442a29(_0x25476b,_0x24d9d8))||_0x454884;}return _0x1f026c>0x3&&_0x454884&&Object[_0x148dd2(0xfd)](_0x25476b,_0x24d9d8,_0x454884),_0x454884;},__metadata=this&&this[a6_0x1ac4e5(0x121)]||function(_0x5041f0,_0x3acc99){var _0x560862=a6_0x1ac4e5;if(typeof Reflect===_0x560862(0x115)&&typeof Reflect['metadata']===_0x560862(0x112))return Reflect['metadata'](_0x5041f0,_0x3acc99);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a6_0x1ac4e5(0x120)]=void 0x0;function a6_0x45c9(){var _0x2e309e=['HEADERS_SIGNATURE','(((.+)+)+)+$','HEADERS_DEVICE','3343452zNPEoi','__decorate','3791029LdnYhZ','TIMEOUT','length','toString','TIMEOUT_LOGINTIME','登录超时,请重新登录','5MxvxrJ','HEADERS_CHECKCODE','30JmDnrF','验证失败,请重新登录','function','请求头信息不完整','7336920JPzrSS','object','请求超时,请重试','481SAUQGR','search','6910353IhzfCc','getOwnPropertyDescriptor','8CFVMnc','343748VuaSBX','signature验证失败','1005dLSpcB','135456FwBISm','ApiError','__metadata','7188UubLfW','defineProperty','请使用正确的设备','design:type','decorate','HEADERS_LACK','5vJihAe'];a6_0x45c9=function(){return _0x2e309e;};return a6_0x45c9();}class ApiError extends AnnError{}ApiError[a6_0x1ac4e5(0x109)]=0x19003,ApiError[a6_0x1ac4e5(0x101)]=0x18e72,ApiError[a6_0x1ac4e5(0x105)]=0x18e73,ApiError[a6_0x1ac4e5(0x103)]=0x18e74,ApiError[a6_0x1ac4e5(0x10f)]=0x18e75,ApiError[a6_0x1ac4e5(0x10c)]=0x18e76,__decorate([AnnErrorMsg(a6_0x1ac4e5(0x116)),__metadata(a6_0x1ac4e5(0xff),Object)],ApiError,a6_0x1ac4e5(0x109),void 0x0),__decorate([AnnErrorMsg(a6_0x1ac4e5(0x113)),__metadata(a6_0x1ac4e5(0xff),Object)],ApiError,a6_0x1ac4e5(0x101),void 0x0),__decorate([AnnErrorMsg(a6_0x1ac4e5(0xfe)),__metadata(a6_0x1ac4e5(0xff),Object)],ApiError,a6_0x1ac4e5(0x105),void 0x0),__decorate([AnnErrorMsg(a6_0x1ac4e5(0x11d)),__metadata('design:type',Object)],ApiError,a6_0x1ac4e5(0x103),void 0x0),__decorate([AnnErrorMsg(a6_0x1ac4e5(0x111)),__metadata(a6_0x1ac4e5(0xff),Object)],ApiError,a6_0x1ac4e5(0x10f),void 0x0),__decorate([AnnErrorMsg(a6_0x1ac4e5(0x10d)),__metadata(a6_0x1ac4e5(0xff),Object)],ApiError,'TIMEOUT_LOGINTIME',void 0x0),exports[a6_0x1ac4e5(0x120)]=ApiError;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function getAppsConfig(appName?: string): {
|
|
2
|
-
[key: string]: any;
|
|
3
|
-
};
|
|
1
|
+
export declare function getAppsConfig(appName?: string): {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a7_0x44a46d=a7_0x4c5a;(function(_0x534069,_0xd8ce69){const _0x121e83=a7_0x4c5a,_0x3d57e7=_0x534069();while(!![]){try{const _0x2b8f5a=-parseInt(_0x121e83(0x14c))/0x1+-parseInt(_0x121e83(0x14d))/0x2+parseInt(_0x121e83(0x159))/0x3+-parseInt(_0x121e83(0x15a))/0x4*(parseInt(_0x121e83(0x149))/0x5)+-parseInt(_0x121e83(0x155))/0x6*(parseInt(_0x121e83(0x15c))/0x7)+parseInt(_0x121e83(0x150))/0x8*(parseInt(_0x121e83(0x14f))/0x9)+-parseInt(_0x121e83(0x14b))/0xa*(-parseInt(_0x121e83(0x151))/0xb);if(_0x2b8f5a===_0xd8ce69)break;else _0x3d57e7['push'](_0x3d57e7['shift']());}catch(_0x1fa684){_0x3d57e7['push'](_0x3d57e7['shift']());}}}(a7_0x15b6,0xa0a61));function a7_0x15b6(){const _0x5e59cf=['1188990eeWwxy','185894CVoOyc','@midwayjs/core','168759pWIsju','504UHjxxC','2783OevYSQ','defineProperty','constructor','getAppsConfig','3012ttFxYi','APPSCONFIG_KEY','(((.+)+)+)+$','__esModule','2862009DORAez','4724ZoErSY','getClassMetadata','11907HlmIVS','AppsConfigTmp','5345DXXrzo','toString','75930mUrSqY'];a7_0x15b6=function(){return _0x5e59cf;};return a7_0x15b6();}function a7_0x4c5a(_0x46974d,_0x2e9152){const _0x3ebc26=a7_0x15b6();return a7_0x4c5a=function(_0xeaf9b,_0x54c6cb){_0xeaf9b=_0xeaf9b-0x149;let _0x15b629=_0x3ebc26[_0xeaf9b];return _0x15b629;},a7_0x4c5a(_0x46974d,_0x2e9152);}const a7_0x54c6cb=(function(){let _0x2a0be1=!![];return function(_0x3b1203,_0x5a9a0f){const _0x350115=_0x2a0be1?function(){if(_0x5a9a0f){const _0x31fec4=_0x5a9a0f['apply'](_0x3b1203,arguments);return _0x5a9a0f=null,_0x31fec4;}}:function(){};return _0x2a0be1=![],_0x350115;};}()),a7_0xeaf9b=a7_0x54c6cb(this,function(){const _0x6e7cd5=a7_0x4c5a;return a7_0xeaf9b['toString']()['search'](_0x6e7cd5(0x157))[_0x6e7cd5(0x14a)]()[_0x6e7cd5(0x153)](a7_0xeaf9b)['search'](_0x6e7cd5(0x157));});a7_0xeaf9b();'use strict';Object[a7_0x44a46d(0x152)](exports,a7_0x44a46d(0x158),{'value':!![]}),exports['getAppsConfig']=void 0x0;const core_1=require(a7_0x44a46d(0x14e)),action_1=require('../types/action');function getAppsConfig(_0x23e96b){const _0x2d036a=a7_0x44a46d,_0x50bb36=(0x0,core_1[_0x2d036a(0x15b)])(action_1[_0x2d036a(0x156)],action_1[_0x2d036a(0x15d)])||{};return _0x23e96b?lodash['get'](_0x50bb36,_0x23e96b):_0x50bb36;}exports[a7_0x44a46d(0x154)]=getAppsConfig;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export interface getRouteOption {
|
|
2
|
-
noreq?: boolean;
|
|
3
|
-
prefix?: string;
|
|
4
|
-
module?: string | boolean;
|
|
5
|
-
filter?: string[];
|
|
6
|
-
filepath?: boolean;
|
|
7
|
-
intercept?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function getRoutes(filter?: getRouteOption): {};
|
|
1
|
+
export interface getRouteOption {
|
|
2
|
+
noreq?: boolean;
|
|
3
|
+
prefix?: string;
|
|
4
|
+
module?: string | boolean;
|
|
5
|
+
filter?: string[];
|
|
6
|
+
filepath?: boolean;
|
|
7
|
+
intercept?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function getRoutes(filter?: getRouteOption): {};
|