anncic-api 3.4.38 → 3.4.39
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 +8 -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 +13 -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 +9 -9
|
@@ -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_0x3447a8=a0_0x3a5b;function a0_0x33b6(){var _0x3e9b1b=['/runtime/.upload','search','constructor','3384890epfGuI','2236428ukJUzh','default','1752704uIYdLc','dhauo1234420123gg3234901','__esModule','form','(((.+)+)+)+$','toString','2493908HVEEoc','apply','2149875xvZyFS','text','1929099FCWfyu','20mb','defineProperty','950651KFMPje','_token','appDir'];a0_0x33b6=function(){return _0x3e9b1b;};return a0_0x33b6();}(function(_0x335353,_0x1c3e3b){var _0x198933=a0_0x3a5b,_0x35792f=_0x335353();while(!![]){try{var _0x3e1c18=parseInt(_0x198933(0x94))/0x1+parseInt(_0x198933(0x87))/0x2+-parseInt(_0x198933(0x91))/0x3+-parseInt(_0x198933(0x8d))/0x4+parseInt(_0x198933(0x9a))/0x5+-parseInt(_0x198933(0x9b))/0x6+-parseInt(_0x198933(0x8f))/0x7;if(_0x3e1c18===_0x1c3e3b)break;else _0x35792f['push'](_0x35792f['shift']());}catch(_0x38ada8){_0x35792f['push'](_0x35792f['shift']());}}}(a0_0x33b6,0x88228));var a0_0x3e85d5=(function(){var _0x474b5e=!![];return function(_0x3dbbec,_0x52a5e3){var _0x47698a=_0x474b5e?function(){var _0x418943=a0_0x3a5b;if(_0x52a5e3){var _0x35c4ca=_0x52a5e3[_0x418943(0x8e)](_0x3dbbec,arguments);return _0x52a5e3=null,_0x35c4ca;}}:function(){};return _0x474b5e=![],_0x47698a;};}()),a0_0x3cfea4=a0_0x3e85d5(this,function(){var _0x3c72be=a0_0x3a5b;return a0_0x3cfea4[_0x3c72be(0x8c)]()[_0x3c72be(0x98)](_0x3c72be(0x8b))[_0x3c72be(0x8c)]()[_0x3c72be(0x99)](a0_0x3cfea4)[_0x3c72be(0x98)](_0x3c72be(0x8b));});function a0_0x3a5b(_0x58e963,_0x84b289){var _0x6b3241=a0_0x33b6();return a0_0x3a5b=function(_0x3cfea4,_0x3e85d5){_0x3cfea4=_0x3cfea4-0x86;var _0x33b6ee=_0x6b3241[_0x3cfea4];return _0x33b6ee;},a0_0x3a5b(_0x58e963,_0x84b289);}a0_0x3cfea4();'use strict';Object[a0_0x3447a8(0x93)](exports,a0_0x3447a8(0x89),{'value':!![]}),exports[a0_0x3447a8(0x86)]=_0x4908cf=>{var _0x59afa3=a0_0x3447a8;return{'apitest':!![],'keys':_0x4908cf['name'],'anncicapi':{'requestKey':_0x59afa3(0x95),'password':'zhiulanuiy7892387985hnoi','devices':{'DEFAULT':{'secret':'dhauo1234420123gg3234901','checkcode':_0x59afa3(0x88)}}},'bodyParser':{'enableTypes':['json',_0x59afa3(0x8a),_0x59afa3(0x90),'xml'],'formLimit':_0x59afa3(0x92),'jsonLimit':'20mb','textLimit':_0x59afa3(0x92),'xmlLimit':'20mb','enable':!![]},'upload':{'tmpdir':_0x4908cf[_0x59afa3(0x96)]+_0x59afa3(0x97),'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
|
+
var a1_0x235dbf=a1_0xcc07;function a1_0x11c8(){var _0x3a8987=['639960ExxihQ','__esModule','search','toString','default','14jTxvOc','defineProperty','312636PrIjTg','6oswDnE','(((.+)+)+)+$','576924LdqZnb','2tXDHPP','3765915NHHegS','13498850wFgTkW','2045148fEKfdO','constructor','456584xrbbDE','apply'];a1_0x11c8=function(){return _0x3a8987;};return a1_0x11c8();}(function(_0x5aa858,_0x4b306d){var _0x480add=a1_0xcc07,_0xaf1ef0=_0x5aa858();while(!![]){try{var _0x14af67=parseInt(_0x480add(0x1d0))/0x1*(parseInt(_0x480add(0x1d4))/0x2)+-parseInt(_0x480add(0x1d1))/0x3*(-parseInt(_0x480add(0x1d3))/0x4)+parseInt(_0x480add(0x1c9))/0x5+parseInt(_0x480add(0x1d7))/0x6+-parseInt(_0x480add(0x1ce))/0x7*(-parseInt(_0x480add(0x1c7))/0x8)+parseInt(_0x480add(0x1d5))/0x9+-parseInt(_0x480add(0x1d6))/0xa;if(_0x14af67===_0x4b306d)break;else _0xaf1ef0['push'](_0xaf1ef0['shift']());}catch(_0x42fcc4){_0xaf1ef0['push'](_0xaf1ef0['shift']());}}}(a1_0x11c8,0x3dae4));function a1_0xcc07(_0xc030f3,_0x368b84){var _0x3da570=a1_0x11c8();return a1_0xcc07=function(_0xbf60e5,_0xc928c5){_0xbf60e5=_0xbf60e5-0x1c7;var _0x11c8e4=_0x3da570[_0xbf60e5];return _0x11c8e4;},a1_0xcc07(_0xc030f3,_0x368b84);}var a1_0xc928c5=(function(){var _0x44fdcb=!![];return function(_0x3a49cc,_0x2d376a){var _0x1f55e6=_0x44fdcb?function(){var _0x3d464b=a1_0xcc07;if(_0x2d376a){var _0x3befdf=_0x2d376a[_0x3d464b(0x1c8)](_0x3a49cc,arguments);return _0x2d376a=null,_0x3befdf;}}:function(){};return _0x44fdcb=![],_0x1f55e6;};}()),a1_0xbf60e5=a1_0xc928c5(this,function(){var _0x24f455=a1_0xcc07;return a1_0xbf60e5['toString']()[_0x24f455(0x1cb)](_0x24f455(0x1d2))[_0x24f455(0x1cc)]()[_0x24f455(0x1d8)](a1_0xbf60e5)[_0x24f455(0x1cb)]('(((.+)+)+)+$');});a1_0xbf60e5();'use strict';Object[a1_0x235dbf(0x1cf)](exports,a1_0x235dbf(0x1ca),{'value':!![]}),exports[a1_0x235dbf(0x1cd)]={'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_0x4f2bbd=a2_0x3d19;(function(_0x147b43,_0xbf92a1){const _0x1204a1=a2_0x3d19,_0x4b6f1c=_0x147b43();while(!![]){try{const _0x46a5ab=parseInt(_0x1204a1(0x270))/0x1+parseInt(_0x1204a1(0x22d))/0x2+-parseInt(_0x1204a1(0x24d))/0x3+-parseInt(_0x1204a1(0x227))/0x4*(parseInt(_0x1204a1(0x24e))/0x5)+-parseInt(_0x1204a1(0x222))/0x6*(parseInt(_0x1204a1(0x254))/0x7)+-parseInt(_0x1204a1(0x25b))/0x8+parseInt(_0x1204a1(0x1f0))/0x9*(parseInt(_0x1204a1(0x201))/0xa);if(_0x46a5ab===_0xbf92a1)break;else _0x4b6f1c['push'](_0x4b6f1c['shift']());}catch(_0x101a7f){_0x4b6f1c['push'](_0x4b6f1c['shift']());}}}(a2_0x428c,0xc14c8));const a2_0x39eb98=(function(){let _0x578a78=!![];return function(_0x5a5698,_0x1d57b4){const _0x1a55f6=_0x578a78?function(){const _0xed0ca6=a2_0x3d19;if(_0x1d57b4){const _0x438879=_0x1d57b4[_0xed0ca6(0x207)](_0x5a5698,arguments);return _0x1d57b4=null,_0x438879;}}:function(){};return _0x578a78=![],_0x1a55f6;};}()),a2_0xd8f0cc=a2_0x39eb98(this,function(){const _0x55ce91=a2_0x3d19;return a2_0xd8f0cc[_0x55ce91(0x27e)]()[_0x55ce91(0x263)]('(((.+)+)+)+$')['toString']()[_0x55ce91(0x234)](a2_0xd8f0cc)[_0x55ce91(0x263)](_0x55ce91(0x215));});a2_0xd8f0cc();function a2_0x3d19(_0x2d32a1,_0xc43e46){const _0x5493f9=a2_0x428c();return a2_0x3d19=function(_0xd8f0cc,_0x39eb98){_0xd8f0cc=_0xd8f0cc-0x1ec;let _0x428c27=_0x5493f9[_0xd8f0cc];return _0x428c27;},a2_0x3d19(_0x2d32a1,_0xc43e46);}'use strict';var __decorate=this&&this[a2_0x4f2bbd(0x210)]||function(_0x254333,_0x3f5f63,_0x5b415e,_0x5261dd){const _0x490c28=a2_0x4f2bbd;var _0x394fd1=arguments[_0x490c28(0x208)],_0x52970f=_0x394fd1<0x3?_0x3f5f63:_0x5261dd===null?_0x5261dd=Object[_0x490c28(0x220)](_0x3f5f63,_0x5b415e):_0x5261dd,_0x52784b;if(typeof Reflect==='object'&&typeof Reflect[_0x490c28(0x1f6)]===_0x490c28(0x241))_0x52970f=Reflect[_0x490c28(0x1f6)](_0x254333,_0x3f5f63,_0x5b415e,_0x5261dd);else{for(var _0x1712d5=_0x254333[_0x490c28(0x208)]-0x1;_0x1712d5>=0x0;_0x1712d5--)if(_0x52784b=_0x254333[_0x1712d5])_0x52970f=(_0x394fd1<0x3?_0x52784b(_0x52970f):_0x394fd1>0x3?_0x52784b(_0x3f5f63,_0x5b415e,_0x52970f):_0x52784b(_0x3f5f63,_0x5b415e))||_0x52970f;}return _0x394fd1>0x3&&_0x52970f&&Object['defineProperty'](_0x3f5f63,_0x5b415e,_0x52970f),_0x52970f;},__metadata=this&&this['__metadata']||function(_0x1ea980,_0x1a58d3){const _0x482e09=a2_0x4f2bbd;if(typeof Reflect===_0x482e09(0x23e)&&typeof Reflect[_0x482e09(0x23a)]==='function')return Reflect[_0x482e09(0x23a)](_0x1ea980,_0x1a58d3);};Object[a2_0x4f2bbd(0x243)](exports,a2_0x4f2bbd(0x260),{'value':!![]}),exports[a2_0x4f2bbd(0x20f)]=void 0x0;const core_1=require(a2_0x4f2bbd(0x22a)),core_2=require(a2_0x4f2bbd(0x22a)),ApiError_1=require('./exception/ApiError'),ApiService_1=require(a2_0x4f2bbd(0x279)),intercept_1=require(a2_0x4f2bbd(0x256)),action_1=require(a2_0x4f2bbd(0x246)),fs=require('fs'),koasend=require(a2_0x4f2bbd(0x248)),koa=require(a2_0x4f2bbd(0x212)),upload=require(a2_0x4f2bbd(0x20b)),staticFile=require('@midwayjs/static-file'),crossDomain=require('@midwayjs/cross-domain'),ConfigDefault=require(a2_0x4f2bbd(0x255)),ConfigProduction=require(a2_0x4f2bbd(0x251)),anncic=require(a2_0x4f2bbd(0x27c)),anncicCache=require('@anncic-api/cache'),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x4f2bbd(0x221)),anncicValidator=require('@anncic-api/validator'),anncicHelper=require(a2_0x4f2bbd(0x23f));let CustomConfiguration=class CustomConfiguration{async[a2_0x4f2bbd(0x229)](){const _0x43f488=a2_0x4f2bbd;await this['filterConfig'](),await this['loggerConfig'](),await this[_0x43f488(0x26c)](),await this[_0x43f488(0x257)]();}async[a2_0x4f2bbd(0x26c)](){const _0x1e4e42=a2_0x4f2bbd,_0x46dafb=this['config']['getConfiguration'](),_0x384afb=(0x0,core_1[_0x1e4e42(0x209)])(intercept_1[_0x1e4e42(0x25e)],intercept_1['InterceptTargetTmp'])||{};this[_0x1e4e42(0x1fc)][_0x1e4e42(0x26e)](action_1[_0x1e4e42(0x25c)],_0x2c1862=>{const _0x2aee65=_0x1e4e42;var _0x177874;const _0x19a0f8=(0x0,core_1[_0x2aee65(0x209)])(action_1[_0x2aee65(0x261)],action_1['AppsConfigTmp'])||{},_0x52cb8b=_0x2c1862[_0x2aee65(0x23a)],_0x59c066=(0x0,core_1[_0x2aee65(0x209)])(action_1[_0x2aee65(0x21e)],_0x2c1862[_0x2aee65(0x24a)])||{},_0x1fac8b=((_0x177874=_0x59c066===null||_0x59c066===void 0x0?void 0x0:_0x59c066[_0x2aee65(0x203)])===null||_0x177874===void 0x0?void 0x0:_0x177874[_0x2aee65(0x1f8)](0x0,_0x59c066[_0x2aee65(0x203)][_0x2aee65(0x23b)]('.')))||'',_0x4b88df=(_0x59c066===null||_0x59c066===void 0x0?void 0x0:_0x59c066[_0x2aee65(0x1f7)])?(_0x19a0f8===null||_0x19a0f8===void 0x0?void 0x0:_0x19a0f8[_0x59c066[_0x2aee65(0x1f7)]])||{}:{};return{'before':async _0x1c5e6b=>{const _0x1573f0=_0x2aee65;var _0x564dfc,_0x5c6e78,_0x5e76a3,_0x20d27c;const _0x459544=(_0x564dfc=_0x1c5e6b===null||_0x1c5e6b===void 0x0?void 0x0:_0x1c5e6b[_0x1573f0(0x24a)])===null||_0x564dfc===void 0x0?void 0x0:_0x564dfc[core_2['REQUEST_OBJ_CTX_KEY']],_0x333a34=lodash['defaultsDeep']({},_0x459544[_0x1573f0(0x235)][_0x1573f0(0x27d)]||_0x459544[_0x1573f0(0x235)][((_0x5c6e78=_0x46dafb===null||_0x46dafb===void 0x0?void 0x0:_0x46dafb[_0x1573f0(0x1ff)])===null||_0x5c6e78===void 0x0?void 0x0:_0x5c6e78[_0x1573f0(0x1fb)])||_0x1573f0(0x27d)]||{},_0x459544[_0x1573f0(0x235)][_0x1573f0(0x202)]||{});_0x459544[_0x1573f0(0x249)]={'module':(_0x4b88df===null||_0x4b88df===void 0x0?void 0x0:_0x4b88df[_0x1573f0(0x1f9)])||'','routePath':''+_0x459544['path'],'routeName':_0x59c066[_0x1573f0(0x242)]['tagName']+'@'+_0x52cb8b[_0x1573f0(0x245)],'routeMethod':((_0x52cb8b===null||_0x52cb8b===void 0x0?void 0x0:_0x52cb8b['requestMethod'])||_0x459544['method']||'')[_0x1573f0(0x228)](),'routeDescription':(_0x52cb8b===null||_0x52cb8b===void 0x0?void 0x0:_0x52cb8b[_0x1573f0(0x259)])||'','filemethod':_0x1fac8b+'@'+(_0x52cb8b[_0x1573f0(0x27a)]||'')};if(_0x459544&&(_0x52cb8b===null||_0x52cb8b===void 0x0?void 0x0:_0x52cb8b[_0x1573f0(0x238)]))try{const _0x5a95bc=((_0x5e76a3=_0x46dafb===null||_0x46dafb===void 0x0?void 0x0:_0x46dafb[_0x1573f0(0x1ee)])===null||_0x5e76a3===void 0x0?void 0x0:_0x5e76a3[_0x1573f0(0x21a)])&&typeof(_0x333a34===null||_0x333a34===void 0x0?void 0x0:_0x333a34[_0x46dafb[_0x1573f0(0x1ee)][_0x1573f0(0x21a)]])==_0x1573f0(0x23d)?JSON[_0x1573f0(0x24b)](base64_decode(_0x333a34[_0x46dafb[_0x1573f0(0x1ee)]['requestKey']])||'{}')||{}:((_0x20d27c=_0x459544===null||_0x459544===void 0x0?void 0x0:_0x459544[_0x1573f0(0x235)])===null||_0x20d27c===void 0x0?void 0x0:_0x20d27c[_0x1573f0(0x265)])||{};if(!this[_0x1573f0(0x219)][_0x1573f0(0x216)](_0x5a95bc))throw new AnnError(ApiError_1['ApiError'][_0x1573f0(0x1ed)]);}catch(_0x3485e6){if(_0x3485e6 instanceof AnnError)throw _0x3485e6;else throw new AnnError(ApiError_1[_0x1573f0(0x21d)]['_UNKNOW_']);}},'around':async _0x55e8d6=>{const _0x35786a=_0x2aee65;var _0x4cf181,_0x7ef9c1,_0x29dd36;const _0x22d3c0=(_0x4cf181=_0x55e8d6===null||_0x55e8d6===void 0x0?void 0x0:_0x55e8d6[_0x35786a(0x24a)])===null||_0x4cf181===void 0x0?void 0x0:_0x4cf181[core_2[_0x35786a(0x262)]];if(_0x22d3c0&&(_0x52cb8b===null||_0x52cb8b===void 0x0?void 0x0:_0x52cb8b[_0x35786a(0x238)])&&((_0x52cb8b===null||_0x52cb8b===void 0x0?void 0x0:_0x52cb8b['intercept'])||typeof(_0x52cb8b===null||_0x52cb8b===void 0x0?void 0x0:_0x52cb8b['intercept'])==_0x35786a(0x223))){if(((_0x7ef9c1=_0x22d3c0['headers'])===null||_0x7ef9c1===void 0x0?void 0x0:_0x7ef9c1['device'])&&((_0x29dd36=_0x384afb===null||_0x384afb===void 0x0?void 0x0:_0x384afb[_0x22d3c0['headers'][_0x35786a(0x231)]])===null||_0x29dd36===void 0x0?void 0x0:_0x29dd36[_0x35786a(0x208)])>0x0)for(const _0x4480ba of _0x384afb[_0x22d3c0[_0x35786a(0x265)][_0x35786a(0x231)]]||[]){if(core_1[_0x35786a(0x1fe)][_0x35786a(0x277)](_0x4480ba)){const _0x1405f9=await _0x22d3c0[_0x35786a(0x1f5)]['getAsync'](_0x4480ba);typeof(_0x1405f9===null||_0x1405f9===void 0x0?void 0x0:_0x1405f9[_0x35786a(0x268)])==_0x35786a(0x241)?await _0x1405f9[_0x35786a(0x268)](_0x22d3c0,typeof(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x27a)])=='string'&&(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x26b)])?_0x22d3c0[_0x35786a(0x27a)][_0x35786a(0x228)]()+'@'+(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0['_matchedRoute']):undefined,_0x52cb8b)&&await _0x1405f9['handler'](_0x22d3c0,typeof(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0['method'])==_0x35786a(0x23d)&&(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0['_matchedRoute'])?_0x22d3c0[_0x35786a(0x27a)]['toLowerCase']()+'@'+(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x26b)]):undefined,_0x52cb8b):await _0x1405f9['handler'](_0x22d3c0,typeof(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x27a)])==_0x35786a(0x23d)&&(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x26b)])?_0x22d3c0[_0x35786a(0x27a)]['toLowerCase']()+'@'+(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x26b)]):undefined,_0x52cb8b);}else core_1['Types'][_0x35786a(0x217)](_0x4480ba)&&await _0x4480ba(_0x22d3c0,typeof(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x27a)])==_0x35786a(0x23d)&&(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x26b)])?_0x22d3c0['method'][_0x35786a(0x228)]()+'@'+(_0x22d3c0===null||_0x22d3c0===void 0x0?void 0x0:_0x22d3c0[_0x35786a(0x26b)]):undefined,_0x52cb8b);}}return await _0x55e8d6[_0x35786a(0x1f2)](..._0x55e8d6[_0x35786a(0x273)]);},'afterThrow':(_0x3d891f,_0x221820)=>{throw _0x221820;}};});}async[a2_0x4f2bbd(0x257)](){const _0x30c9be=a2_0x4f2bbd,_0x25ceda=this[_0x30c9be(0x21f)]['getConfiguration']();this['application'][_0x30c9be(0x218)]([_0x30c9be(0x237)])[_0x30c9be(0x244)](_0x298e00=>{const _0x482eae=_0x30c9be;(_0x298e00===null||_0x298e00===void 0x0?void 0x0:_0x298e00[_0x482eae(0x264)])&&Object[_0x482eae(0x20e)](_0x298e00[_0x482eae(0x264)],{'hosturl':{'configurable':![],'get':function(){const _0x315aa9=_0x482eae;var _0x5d663d,_0x111b05,_0x56814e,_0x3346a8;if((this===null||this===void 0x0?void 0x0:this[_0x315aa9(0x225)])&&!this[_0x315aa9(0x225)][_0x315aa9(0x1fa)](_0x315aa9(0x252))){let _0x212aa1=this[_0x315aa9(0x225)][_0x315aa9(0x24c)](':');return['80','443'][_0x315aa9(0x275)](_0x212aa1===null||_0x212aa1===void 0x0?void 0x0:_0x212aa1[0x1])?''+(!!((_0x111b05=(_0x5d663d=this===null||this===void 0x0?void 0x0:this[_0x315aa9(0x205)])===null||_0x5d663d===void 0x0?void 0x0:_0x5d663d[_0x315aa9(0x1f3)])===null||_0x111b05===void 0x0?void 0x0:_0x111b05[_0x315aa9(0x253)])||(_0x212aa1===null||_0x212aa1===void 0x0?void 0x0:_0x212aa1[0x1])==_0x315aa9(0x22c)?'https://':'http://')+_0x212aa1[0x0]:''+(!!((_0x3346a8=(_0x56814e=this===null||this===void 0x0?void 0x0:this[_0x315aa9(0x205)])===null||_0x56814e===void 0x0?void 0x0:_0x56814e[_0x315aa9(0x1f3)])===null||_0x3346a8===void 0x0?void 0x0:_0x3346a8[_0x315aa9(0x253)])?_0x315aa9(0x1fd):_0x315aa9(0x21c))+this[_0x315aa9(0x225)];}return'';}},'ok':{'value':function(_0x173806,_0x3c2a45,_0x55c006=0x0){return{'code':_0x55c006,'data':_0x173806,'extra':_0x3c2a45};}},'input':{'value':function(_0x5211a3,_0x46156f){const _0x5c2a7b=_0x482eae;var _0x1c5f08;const _0x579686=lodash[_0x5c2a7b(0x204)]({},this['request'][_0x5c2a7b(0x27d)]||this['request'][((_0x1c5f08=_0x25ceda===null||_0x25ceda===void 0x0?void 0x0:_0x25ceda[_0x5c2a7b(0x1ff)])===null||_0x1c5f08===void 0x0?void 0x0:_0x1c5f08[_0x5c2a7b(0x1fb)])||_0x5c2a7b(0x27d)]||{},this['request'][_0x5c2a7b(0x202)]||{});return _0x5211a3?lodash[_0x5c2a7b(0x213)](_0x579686,_0x5211a3,_0x46156f):_0x579686;}},'when':{'value':async function(_0x257f0d,_0x3cd203){const _0x231376=_0x482eae,_0x59c110=this[_0x231376(0x20c)](_0x257f0d,null);if(!lodash['isNull'](_0x59c110))return await _0x3cd203(_0x59c110);}},'only':{'value':function(_0x122497){const _0x15568f=_0x482eae,_0x3619ad={};for(let _0x58152b=0x0;_0x58152b<_0x122497['length'];_0x58152b++){lodash['isArray'](_0x122497[_0x58152b])&&_0x122497[_0x58152b][_0x15568f(0x208)]>0x0&&lodash['isString'](_0x122497[_0x58152b][0x0])&&(_0x3619ad[_0x122497[_0x58152b][0x0]]=this['input'](_0x122497[_0x58152b][0x0],_0x122497[_0x58152b][_0x15568f(0x208)]>0x1?_0x122497[_0x58152b][0x1]:null));}return _0x3619ad;}},'koasend':{'value':async function(_0x41e8fd,_0x20b6be){const _0x2f0641=_0x482eae;if(_0x41e8fd&&!fs['existsSync'](_0x41e8fd)&&!fs[_0x2f0641(0x269)](this[_0x2f0641(0x27b)][_0x2f0641(0x23c)]()+'/'+_0x41e8fd))return _0x2f0641(0x211);return _0x41e8fd=fs[_0x2f0641(0x269)](_0x41e8fd)?_0x41e8fd:this[_0x2f0641(0x27b)]['getAppDir']()+'/'+_0x41e8fd,this['attachment'](_0x20b6be||_0x41e8fd),await koasend(this,_0x41e8fd);}}});});}async[a2_0x4f2bbd(0x271)](){const _0xbae693=a2_0x4f2bbd;var _0x48f4af,_0x413e8c;if(fs[_0xbae693(0x269)](this[_0xbae693(0x27b)][_0xbae693(0x278)]()+_0xbae693(0x224))&&fs['statSync'](this[_0xbae693(0x27b)]['getBaseDir']()+_0xbae693(0x224))['isDirectory']()){const _0x27113e=this[_0xbae693(0x21f)][_0xbae693(0x214)](),_0x30e25a=((_0x48f4af=_0x27113e===null||_0x27113e===void 0x0?void 0x0:_0x27113e[_0xbae693(0x272)])===null||_0x48f4af===void 0x0?void 0x0:_0x48f4af['clients'])||{};for(const _0xc511c4 of fs['readdirSync'](this[_0xbae693(0x27b)][_0xbae693(0x278)]()+_0xbae693(0x224))){if(!fs[_0xbae693(0x25a)](this['app'][_0xbae693(0x278)]()+_0xbae693(0x233)+_0xc511c4)[_0xbae693(0x20d)]())continue;!(_0x30e25a===null||_0x30e25a===void 0x0?void 0x0:_0x30e25a[_0xc511c4])&&(_0x30e25a[_0xc511c4]=Object[_0xbae693(0x22b)]({},((_0x413e8c=_0x27113e===null||_0x27113e===void 0x0?void 0x0:_0x27113e[_0xbae693(0x272)])===null||_0x413e8c===void 0x0?void 0x0:_0x413e8c[_0xbae693(0x27f)])||{'maxSize':'1m','dir':this[_0xbae693(0x27b)][_0xbae693(0x23c)]()+_0xbae693(0x1f4)},{'enableJSON':!![],'enableConsole':this[_0xbae693(0x1ef)][_0xbae693(0x22e)](),'fileLogName':_0xc511c4+_0xbae693(0x247),'dir':this[_0xbae693(0x27b)][_0xbae693(0x23c)]()+'/runtime/apps-'+_0xc511c4})),this['loggerService'][_0xbae693(0x26d)](_0xc511c4,_0x30e25a[_0xc511c4]);}Object['keys'](_0x30e25a)[_0xbae693(0x208)]>0x0&&(!_0x27113e[_0xbae693(0x272)]&&(_0x27113e[_0xbae693(0x272)]={'default':{'maxSize':'1m','dir':this['app'][_0xbae693(0x23c)]()+_0xbae693(0x1f4)}}),_0x27113e[_0xbae693(0x272)][_0xbae693(0x274)]=_0x30e25a),this[_0xbae693(0x21f)]['addObject'](_0x27113e);}}async[a2_0x4f2bbd(0x232)](){const _0x1a08cc=a2_0x4f2bbd;var _0x5238da,_0x34f00e,_0x16d87c,_0x470f1f,_0x1717d9,_0xa77b91;const _0xb12f32=this[_0x1a08cc(0x21f)][_0x1a08cc(0x214)]();((_0x34f00e=(_0x5238da=_0xb12f32===null||_0xb12f32===void 0x0?void 0x0:_0xb12f32[_0x1a08cc(0x1ee)])===null||_0x5238da===void 0x0?void 0x0:_0x5238da[_0x1a08cc(0x20a)])===null||_0x34f00e===void 0x0?void 0x0:_0x34f00e[_0x1a08cc(0x258)])&&Object[_0x1a08cc(0x230)](_0xb12f32[_0x1a08cc(0x1ee)]['devices'])[_0x1a08cc(0x208)]>0x1&&delete _0xb12f32[_0x1a08cc(0x1ee)]['devices']['DEFAULT'];if((_0x16d87c=_0xb12f32===null||_0xb12f32===void 0x0?void 0x0:_0xb12f32[_0x1a08cc(0x200)])===null||_0x16d87c===void 0x0?void 0x0:_0x16d87c['dirs'])for(const _0x27cadf in _0xb12f32[_0x1a08cc(0x200)]['dirs']){((_0x470f1f=_0xb12f32[_0x1a08cc(0x200)][_0x1a08cc(0x22f)][_0x27cadf])===null||_0x470f1f===void 0x0?void 0x0:_0x470f1f[_0x1a08cc(0x276)])&&typeof((_0x1717d9=_0xb12f32[_0x1a08cc(0x200)][_0x1a08cc(0x22f)][_0x27cadf])===null||_0x1717d9===void 0x0?void 0x0:_0x1717d9[_0x1a08cc(0x276)])=='string'&&!fs[_0x1a08cc(0x269)](_0xb12f32[_0x1a08cc(0x200)][_0x1a08cc(0x22f)][_0x27cadf][_0x1a08cc(0x276)])&&(fs[_0x1a08cc(0x1ec)](_0xb12f32[_0x1a08cc(0x200)]['dirs'][_0x27cadf][_0x1a08cc(0x276)],{'recursive':!![]}),console[_0x1a08cc(0x26a)](_0x1a08cc(0x240)+_0xb12f32[_0x1a08cc(0x200)][_0x1a08cc(0x22f)][_0x27cadf]['dir']));}((_0xa77b91=_0xb12f32===null||_0xb12f32===void 0x0?void 0x0:_0xb12f32[_0x1a08cc(0x21b)])===null||_0xa77b91===void 0x0?void 0x0:_0xa77b91['tmpdir'])&&!fs[_0x1a08cc(0x269)](_0xb12f32[_0x1a08cc(0x21b)][_0x1a08cc(0x280)])&&(fs[_0x1a08cc(0x1ec)](_0xb12f32[_0x1a08cc(0x21b)]['tmpdir'],{'recursive':!![]}),console[_0x1a08cc(0x26a)](_0x1a08cc(0x24f)+_0xb12f32[_0x1a08cc(0x21b)][_0x1a08cc(0x280)])),this[_0x1a08cc(0x21f)][_0x1a08cc(0x25d)](_0xb12f32);}};__decorate([(0x0,core_1[a2_0x4f2bbd(0x267)])(),__metadata(a2_0x4f2bbd(0x239),Object)],CustomConfiguration[a2_0x4f2bbd(0x206)],a2_0x4f2bbd(0x27b),void 0x0),__decorate([(0x0,core_1[a2_0x4f2bbd(0x26f)])(),__metadata('design:type',core_2[a2_0x4f2bbd(0x1f1)])],CustomConfiguration[a2_0x4f2bbd(0x206)],a2_0x4f2bbd(0x21f),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x4f2bbd(0x239),core_2[a2_0x4f2bbd(0x266)])],CustomConfiguration[a2_0x4f2bbd(0x206)],a2_0x4f2bbd(0x1fc),void 0x0),__decorate([(0x0,core_1[a2_0x4f2bbd(0x26f)])(),__metadata(a2_0x4f2bbd(0x239),core_2[a2_0x4f2bbd(0x226)])],CustomConfiguration[a2_0x4f2bbd(0x206)],a2_0x4f2bbd(0x236),void 0x0),__decorate([(0x0,core_1[a2_0x4f2bbd(0x26f)])(),__metadata(a2_0x4f2bbd(0x239),core_2[a2_0x4f2bbd(0x25f)])],CustomConfiguration['prototype'],'environment',void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x4f2bbd(0x239),core_1[a2_0x4f2bbd(0x250)])],CustomConfiguration[a2_0x4f2bbd(0x206)],'loggerService',void 0x0),__decorate([(0x0,core_1[a2_0x4f2bbd(0x26f)])(),__metadata(a2_0x4f2bbd(0x239),ApiService_1[a2_0x4f2bbd(0x219)])],CustomConfiguration[a2_0x4f2bbd(0x206)],a2_0x4f2bbd(0x219),void 0x0),CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'imports':[koa,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':'anncic-api','conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],CustomConfiguration),exports[a2_0x4f2bbd(0x20f)]=CustomConfiguration;function a2_0x428c(){const _0xabee8b=['checksign','isFunction','getApplications','ApiService','requestKey','upload','http://','ApiError','ACTION_KEY','config','getOwnPropertyDescriptor','@anncic-api/typeorm','126WgwUvW','undefined','/apps','host','MidwayApplicationManager','1479428RUZHIi','toLowerCase','onReady','@midwayjs/core','assign','443','2208070UVweCR','isDevelopmentEnvironment','dirs','keys','device','filterConfig','/apps/','constructor','request','application','koa','apimit','design:type','metadata','lastIndexOf','getAppDir','string','object','anncic-apihelper','Anncic-api\x20static-file\x20:\x20mkdir\x20','function','routerOptions','defineProperty','forEach','routerName','./types/action','.log','koa-send','_matchedRouteMeta','target','parse','split','437055egAORW','15xaXYdY','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','MidwayLoggerService','./config/config.production','http','encrypted','204190QPveBV','./config/config.default','./types/intercept','hanlderApplications','DEFAULT','description','statSync','2020464eGbnQX','ACTION_ROUTE_KEY','addObject','INTERCEPT_KEY','MidwayEnvironmentService','__esModule','APPSCONFIG_KEY','REQUEST_OBJ_CTX_KEY','search','context','headers','MidwayDecoratorService','App','match','existsSync','log','_matchedRoute','handlerActionRoute','createLogger','registerMethodHandler','Inject','1202837LvQDrv','loggerConfig','midwayLogger','args','clients','includes','dir','isClass','getBaseDir','./service/ApiService','method','app','@anncic-api/core','body','toString','default','tmpdir','mkdirSync','HEADERS_SIGNATURE','anncicapi','environment','6516SYakPc','MidwayConfigService','proceed','connection','/runtime','requestContext','decorate','module','substring','name','startsWith','key','decorator','https://','Types','bodyXml','staticFile','8360iAaoLH','query','filepath','defaultsDeep','req','prototype','apply','length','getClassMetadata','devices','@midwayjs/upload','input','isDirectory','defineProperties','CustomConfiguration','__decorate','文件不存在','@midwayjs/koa','get','getConfiguration','(((.+)+)+)+$'];a2_0x428c=function(){return _0xabee8b;};return a2_0x428c();}
|
|
1
|
+
const a2_0x5b6ed5=a2_0x4f32;(function(_0x831ea8,_0x393535){const _0x21093a=a2_0x4f32,_0x3bf264=_0x831ea8();while(!![]){try{const _0x3d673b=-parseInt(_0x21093a(0xde))/0x1+-parseInt(_0x21093a(0x11b))/0x2+parseInt(_0x21093a(0xdd))/0x3+parseInt(_0x21093a(0xba))/0x4+-parseInt(_0x21093a(0xf8))/0x5+-parseInt(_0x21093a(0xce))/0x6*(-parseInt(_0x21093a(0x14b))/0x7)+-parseInt(_0x21093a(0xea))/0x8;if(_0x3d673b===_0x393535)break;else _0x3bf264['push'](_0x3bf264['shift']());}catch(_0x2bbd46){_0x3bf264['push'](_0x3bf264['shift']());}}}(a2_0x35b4,0x752a3));const a2_0x5cafd1=(function(){let _0x4df8a1=!![];return function(_0x4a2a72,_0x54556c){const _0x516205=_0x4df8a1?function(){if(_0x54556c){const _0x11a171=_0x54556c['apply'](_0x4a2a72,arguments);return _0x54556c=null,_0x11a171;}}:function(){};return _0x4df8a1=![],_0x516205;};}()),a2_0x225841=a2_0x5cafd1(this,function(){const _0x56e24a=a2_0x4f32;return a2_0x225841['toString']()[_0x56e24a(0x144)](_0x56e24a(0xc5))[_0x56e24a(0x143)]()[_0x56e24a(0x13b)](a2_0x225841)[_0x56e24a(0x144)](_0x56e24a(0xc5));});a2_0x225841();'use strict';var __decorate=this&&this[a2_0x5b6ed5(0x13a)]||function(_0x5a3aa9,_0x5967fb,_0x29617b,_0x52d8b9){const _0x18e0ee=a2_0x5b6ed5;var _0x51e9ad=arguments['length'],_0x22b485=_0x51e9ad<0x3?_0x5967fb:_0x52d8b9===null?_0x52d8b9=Object[_0x18e0ee(0x12a)](_0x5967fb,_0x29617b):_0x52d8b9,_0x24d112;if(typeof Reflect===_0x18e0ee(0xf4)&&typeof Reflect[_0x18e0ee(0xf9)]===_0x18e0ee(0x132))_0x22b485=Reflect[_0x18e0ee(0xf9)](_0x5a3aa9,_0x5967fb,_0x29617b,_0x52d8b9);else{for(var _0x43dfa2=_0x5a3aa9[_0x18e0ee(0xd7)]-0x1;_0x43dfa2>=0x0;_0x43dfa2--)if(_0x24d112=_0x5a3aa9[_0x43dfa2])_0x22b485=(_0x51e9ad<0x3?_0x24d112(_0x22b485):_0x51e9ad>0x3?_0x24d112(_0x5967fb,_0x29617b,_0x22b485):_0x24d112(_0x5967fb,_0x29617b))||_0x22b485;}return _0x51e9ad>0x3&&_0x22b485&&Object['defineProperty'](_0x5967fb,_0x29617b,_0x22b485),_0x22b485;},__metadata=this&&this['__metadata']||function(_0x37fb4f,_0x5d31d2){const _0x58d29e=a2_0x5b6ed5;if(typeof Reflect===_0x58d29e(0xf4)&&typeof Reflect['metadata']===_0x58d29e(0x132))return Reflect[_0x58d29e(0xcc)](_0x37fb4f,_0x5d31d2);};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CustomConfiguration']=void 0x0;function a2_0x4f32(_0x57bf07,_0x4b1b13){const _0x57a04b=a2_0x35b4();return a2_0x4f32=function(_0x225841,_0x5cafd1){_0x225841=_0x225841-0xb4;let _0x35b4e4=_0x57a04b[_0x225841];return _0x35b4e4;},a2_0x4f32(_0x57bf07,_0x4b1b13);}const core_1=require(a2_0x5b6ed5(0xdf)),core_2=require(a2_0x5b6ed5(0xdf)),ApiError_1=require(a2_0x5b6ed5(0x118)),ApiService_1=require('./service/ApiService'),intercept_1=require(a2_0x5b6ed5(0x122)),action_1=require(a2_0x5b6ed5(0xbb)),fs=require('fs'),koasend=require(a2_0x5b6ed5(0xf3)),koa=require(a2_0x5b6ed5(0x134)),upload=require('@midwayjs/upload'),staticFile=require(a2_0x5b6ed5(0xca)),crossDomain=require(a2_0x5b6ed5(0xd1)),ConfigDefault=require(a2_0x5b6ed5(0xb8)),ConfigProduction=require('./config/config.production'),anncic=require(a2_0x5b6ed5(0xf5)),anncicCache=require(a2_0x5b6ed5(0xfc)),anncicEvent=require('@anncic-api/event'),anncicTypeorm=require(a2_0x5b6ed5(0xc1)),anncicValidator=require(a2_0x5b6ed5(0xd4)),anncicHelper=require('anncic-apihelper');function a2_0x35b4(){const _0x23b51c=['environment','prototype','onReady','getAppDir','2333973lwOVvH','226862opKUNx','@midwayjs/core','design:type','encrypted','getBaseDir','_matchedRouteMeta','getApplications','/apps','keys','Inject','ACTION_ROUTE_KEY','HEADERS_SIGNATURE','84552gZNGep','requestMethod','hanlderApplications','req','文件不存在','anncic-api','intercept','_UNKNOW_','substring','koa-send','object','@anncic-api/core','apimit','getConfiguration','2131955FZTzgZ','decorate','requestContext','DEFAULT','@anncic-api/cache','clients','getClassMetadata','assign','registerMethodHandler','match','mkdirSync','InterceptTargetTmp','checksign','createLogger','/apps/','Configuration','Types','isClass','decorator','MidwayDecoratorService','includes','context','split','dir','host','AppsConfigTmp','config','attachment','isString','startsWith','target','ACTION_KEY','./exception/ApiError','MidwayEnvironmentService','device','1269226vOOske','filterConfig','devices','ApiError','/runtime/apps-','isFunction','forEach','./types/intercept','http','proceed','isDevelopmentEnvironment','method','body','APPSCONFIG_KEY','default','getOwnPropertyDescriptor','MidwayLoggerService','headers','module','tmpdir','upload','_matchedRoute','args','function','https://','@midwayjs/koa','query','INTERCEPT_KEY','Anncic-api\x20upload-tmpdir\x20:\x20mkdir\x20','addObject','handlerActionRoute','__decorate','constructor','toLowerCase','key','existsSync','input','loggerConfig','staticFile','http://','toString','search','routerName','MidwayApplicationManager','get','443','isNull','loggerService','35IMJton','description','dirs','isArray','midwayLogger','filepath','./config/config.default','connection','1264044BRgcAt','./types/action','.log','name','Anncic-api\x20static-file\x20:\x20mkdir\x20','parse','bodyXml','@anncic-api/typeorm','statSync','defaultsDeep','ApiService','(((.+)+)+)+$','app','string','readdirSync','request','@midwayjs/static-file','REQUEST_OBJ_CTX_KEY','metadata','getAsync','821208atdJSO','log','undefined','@midwayjs/cross-domain','requestKey','isDirectory','@anncic-api/validator','anncicapi','CustomConfiguration','length','/runtime'];a2_0x35b4=function(){return _0x23b51c;};return a2_0x35b4();}let CustomConfiguration=class CustomConfiguration{async[a2_0x5b6ed5(0xdb)](){const _0x2d4504=a2_0x5b6ed5;await this[_0x2d4504(0x11c)](),await this['loggerConfig'](),await this[_0x2d4504(0x139)](),await this[_0x2d4504(0xec)]();}async[a2_0x5b6ed5(0x139)](){const _0x5df415=a2_0x5b6ed5,_0x37dd92=this[_0x5df415(0x112)]['getConfiguration'](),_0xd2e890=(0x0,core_1[_0x5df415(0xfe)])(intercept_1[_0x5df415(0x136)],intercept_1[_0x5df415(0x103)])||{};this['decorator'][_0x5df415(0x100)](action_1[_0x5df415(0xe8)],_0x206c9a=>{const _0x2dd6d9=_0x5df415;var _0x4c0186;const _0x261f08=(0x0,core_1[_0x2dd6d9(0xfe)])(action_1[_0x2dd6d9(0x128)],action_1[_0x2dd6d9(0x111)])||{},_0x3e477f=_0x206c9a[_0x2dd6d9(0xcc)],_0x5da2a2=(0x0,core_1[_0x2dd6d9(0xfe)])(action_1[_0x2dd6d9(0x117)],_0x206c9a[_0x2dd6d9(0x116)])||{},_0x107e17=((_0x4c0186=_0x5da2a2===null||_0x5da2a2===void 0x0?void 0x0:_0x5da2a2[_0x2dd6d9(0xb7)])===null||_0x4c0186===void 0x0?void 0x0:_0x4c0186[_0x2dd6d9(0xf2)](0x0,_0x5da2a2['filepath']['lastIndexOf']('.')))||'',_0x54af52=(_0x5da2a2===null||_0x5da2a2===void 0x0?void 0x0:_0x5da2a2['module'])?(_0x261f08===null||_0x261f08===void 0x0?void 0x0:_0x261f08[_0x5da2a2[_0x2dd6d9(0x12d)]])||{}:{};return{'before':async _0x25ea9c=>{const _0x1d6eb4=_0x2dd6d9;var _0x1c5cce,_0x1a9733,_0x29ff75,_0x4c4080;const _0x1e2642=(_0x1c5cce=_0x25ea9c===null||_0x25ea9c===void 0x0?void 0x0:_0x25ea9c['target'])===null||_0x1c5cce===void 0x0?void 0x0:_0x1c5cce[core_2[_0x1d6eb4(0xcb)]],_0x1723c4=lodash[_0x1d6eb4(0xc3)]({},_0x1e2642[_0x1d6eb4(0xc9)][_0x1d6eb4(0x127)]||_0x1e2642[_0x1d6eb4(0xc9)][((_0x1a9733=_0x37dd92===null||_0x37dd92===void 0x0?void 0x0:_0x37dd92[_0x1d6eb4(0xc0)])===null||_0x1a9733===void 0x0?void 0x0:_0x1a9733[_0x1d6eb4(0x13d)])||'body']||{},_0x1e2642['request'][_0x1d6eb4(0x135)]||{});_0x1e2642[_0x1d6eb4(0xe3)]={'module':(_0x54af52===null||_0x54af52===void 0x0?void 0x0:_0x54af52[_0x1d6eb4(0xbd)])||'','routePath':''+_0x1e2642['path'],'routeName':_0x5da2a2['routerOptions']['tagName']+'@'+_0x3e477f[_0x1d6eb4(0x145)],'routeMethod':((_0x3e477f===null||_0x3e477f===void 0x0?void 0x0:_0x3e477f[_0x1d6eb4(0xeb)])||_0x1e2642[_0x1d6eb4(0x126)]||'')['toLowerCase'](),'routeDescription':(_0x3e477f===null||_0x3e477f===void 0x0?void 0x0:_0x3e477f[_0x1d6eb4(0x14c)])||'','filemethod':_0x107e17+'@'+(_0x3e477f['method']||'')};if(_0x1e2642&&(_0x3e477f===null||_0x3e477f===void 0x0?void 0x0:_0x3e477f[_0x1d6eb4(0xf6)]))try{const _0x58522e=((_0x29ff75=_0x37dd92===null||_0x37dd92===void 0x0?void 0x0:_0x37dd92[_0x1d6eb4(0xd5)])===null||_0x29ff75===void 0x0?void 0x0:_0x29ff75['requestKey'])&&typeof(_0x1723c4===null||_0x1723c4===void 0x0?void 0x0:_0x1723c4[_0x37dd92[_0x1d6eb4(0xd5)][_0x1d6eb4(0xd2)]])==_0x1d6eb4(0xc7)?JSON[_0x1d6eb4(0xbf)](base64_decode(_0x1723c4[_0x37dd92[_0x1d6eb4(0xd5)]['requestKey']])||'{}')||{}:((_0x4c4080=_0x1e2642===null||_0x1e2642===void 0x0?void 0x0:_0x1e2642['request'])===null||_0x4c4080===void 0x0?void 0x0:_0x4c4080[_0x1d6eb4(0x12c)])||{};if(!this[_0x1d6eb4(0xc4)][_0x1d6eb4(0x104)](_0x58522e))throw new AnnError(ApiError_1[_0x1d6eb4(0x11e)][_0x1d6eb4(0xe9)]);}catch(_0x574ca0){if(_0x574ca0 instanceof AnnError)throw _0x574ca0;else throw new AnnError(ApiError_1[_0x1d6eb4(0x11e)][_0x1d6eb4(0xf1)]);}},'around':async _0x2d07eb=>{const _0x278587=_0x2dd6d9;var _0x3fb374,_0x2b087c,_0x140e79;const _0x546911=(_0x3fb374=_0x2d07eb===null||_0x2d07eb===void 0x0?void 0x0:_0x2d07eb[_0x278587(0x116)])===null||_0x3fb374===void 0x0?void 0x0:_0x3fb374[core_2[_0x278587(0xcb)]];if(_0x546911&&(_0x3e477f===null||_0x3e477f===void 0x0?void 0x0:_0x3e477f[_0x278587(0xf6)])&&((_0x3e477f===null||_0x3e477f===void 0x0?void 0x0:_0x3e477f['intercept'])||typeof(_0x3e477f===null||_0x3e477f===void 0x0?void 0x0:_0x3e477f[_0x278587(0xf0)])==_0x278587(0xd0))){if(((_0x2b087c=_0x546911[_0x278587(0x12c)])===null||_0x2b087c===void 0x0?void 0x0:_0x2b087c[_0x278587(0x11a)])&&((_0x140e79=_0xd2e890===null||_0xd2e890===void 0x0?void 0x0:_0xd2e890[_0x546911[_0x278587(0x12c)][_0x278587(0x11a)]])===null||_0x140e79===void 0x0?void 0x0:_0x140e79['length'])>0x0)for(const _0x3a0a61 of _0xd2e890[_0x546911[_0x278587(0x12c)][_0x278587(0x11a)]]||[]){if(core_1[_0x278587(0x108)][_0x278587(0x109)](_0x3a0a61)){const _0x2d09c6=await _0x546911[_0x278587(0xfa)][_0x278587(0xcd)](_0x3a0a61);typeof(_0x2d09c6===null||_0x2d09c6===void 0x0?void 0x0:_0x2d09c6['match'])=='function'?await _0x2d09c6[_0x278587(0x101)](_0x546911,typeof(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x126)])=='string'&&(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x130)])?_0x546911[_0x278587(0x126)][_0x278587(0x13c)]()+'@'+(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911['_matchedRoute']):undefined,_0x3e477f)&&await _0x2d09c6['handler'](_0x546911,typeof(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x126)])==_0x278587(0xc7)&&(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x130)])?_0x546911['method'][_0x278587(0x13c)]()+'@'+(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x130)]):undefined,_0x3e477f):await _0x2d09c6['handler'](_0x546911,typeof(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x126)])==_0x278587(0xc7)&&(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x130)])?_0x546911[_0x278587(0x126)][_0x278587(0x13c)]()+'@'+(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x130)]):undefined,_0x3e477f);}else core_1['Types'][_0x278587(0x120)](_0x3a0a61)&&await _0x3a0a61(_0x546911,typeof(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x126)])==_0x278587(0xc7)&&(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911[_0x278587(0x130)])?_0x546911[_0x278587(0x126)][_0x278587(0x13c)]()+'@'+(_0x546911===null||_0x546911===void 0x0?void 0x0:_0x546911['_matchedRoute']):undefined,_0x3e477f);}}return await _0x2d07eb[_0x278587(0x124)](..._0x2d07eb[_0x278587(0x131)]);},'afterThrow':(_0x3b4b20,_0x5589f4)=>{throw _0x5589f4;}};});}async[a2_0x5b6ed5(0xec)](){const _0x47e4c3=a2_0x5b6ed5,_0x58de88=this[_0x47e4c3(0x112)][_0x47e4c3(0xf7)]();this['application'][_0x47e4c3(0xe4)](['koa'])[_0x47e4c3(0x121)](_0x46579e=>{const _0x5a2803=_0x47e4c3;(_0x46579e===null||_0x46579e===void 0x0?void 0x0:_0x46579e[_0x5a2803(0x10d)])&&Object['defineProperties'](_0x46579e[_0x5a2803(0x10d)],{'hosturl':{'configurable':![],'get':function(){const _0x80bef6=_0x5a2803;var _0x460b72,_0x36eb6,_0x4c07f0,_0x142a86;if((this===null||this===void 0x0?void 0x0:this[_0x80bef6(0x110)])&&!this[_0x80bef6(0x110)][_0x80bef6(0x115)](_0x80bef6(0x123))){let _0x84e754=this['host'][_0x80bef6(0x10e)](':');return['80','443'][_0x80bef6(0x10c)](_0x84e754===null||_0x84e754===void 0x0?void 0x0:_0x84e754[0x1])?''+(!!((_0x36eb6=(_0x460b72=this===null||this===void 0x0?void 0x0:this[_0x80bef6(0xed)])===null||_0x460b72===void 0x0?void 0x0:_0x460b72[_0x80bef6(0xb9)])===null||_0x36eb6===void 0x0?void 0x0:_0x36eb6[_0x80bef6(0xe1)])||(_0x84e754===null||_0x84e754===void 0x0?void 0x0:_0x84e754[0x1])==_0x80bef6(0x148)?_0x80bef6(0x133):_0x80bef6(0x142))+_0x84e754[0x0]:''+(!!((_0x142a86=(_0x4c07f0=this===null||this===void 0x0?void 0x0:this[_0x80bef6(0xed)])===null||_0x4c07f0===void 0x0?void 0x0:_0x4c07f0[_0x80bef6(0xb9)])===null||_0x142a86===void 0x0?void 0x0:_0x142a86[_0x80bef6(0xe1)])?_0x80bef6(0x133):_0x80bef6(0x142))+this[_0x80bef6(0x110)];}return'';}},'ok':{'value':function(_0x3c8934,_0x40a605,_0x3836ce=0x0){return{'code':_0x3836ce,'data':_0x3c8934,'extra':_0x40a605};}},'input':{'value':function(_0x5dae69,_0x2a111c){const _0x4b506a=_0x5a2803;var _0x2d7686;const _0x39243c=lodash[_0x4b506a(0xc3)]({},this[_0x4b506a(0xc9)][_0x4b506a(0x127)]||this[_0x4b506a(0xc9)][((_0x2d7686=_0x58de88===null||_0x58de88===void 0x0?void 0x0:_0x58de88[_0x4b506a(0xc0)])===null||_0x2d7686===void 0x0?void 0x0:_0x2d7686[_0x4b506a(0x13d)])||_0x4b506a(0x127)]||{},this[_0x4b506a(0xc9)]['query']||{});return _0x5dae69?lodash[_0x4b506a(0x147)](_0x39243c,_0x5dae69,_0x2a111c):_0x39243c;}},'when':{'value':async function(_0x5dacfa,_0x35d7d6){const _0x38b795=_0x5a2803,_0x44d03c=this[_0x38b795(0x13f)](_0x5dacfa,null);if(!lodash[_0x38b795(0x149)](_0x44d03c))return await _0x35d7d6(_0x44d03c);}},'only':{'value':function(_0x4e9830){const _0x3750d3=_0x5a2803,_0x4a4f40={};for(let _0x58420a=0x0;_0x58420a<_0x4e9830[_0x3750d3(0xd7)];_0x58420a++){lodash[_0x3750d3(0xb5)](_0x4e9830[_0x58420a])&&_0x4e9830[_0x58420a][_0x3750d3(0xd7)]>0x0&&lodash[_0x3750d3(0x114)](_0x4e9830[_0x58420a][0x0])&&(_0x4a4f40[_0x4e9830[_0x58420a][0x0]]=this['input'](_0x4e9830[_0x58420a][0x0],_0x4e9830[_0x58420a]['length']>0x1?_0x4e9830[_0x58420a][0x1]:null));}return _0x4a4f40;}},'koasend':{'value':async function(_0x15aed7,_0x3fad3b){const _0x26305c=_0x5a2803;if(_0x15aed7&&!fs['existsSync'](_0x15aed7)&&!fs[_0x26305c(0x13e)](this[_0x26305c(0xc6)][_0x26305c(0xdc)]()+'/'+_0x15aed7))return _0x26305c(0xee);return _0x15aed7=fs[_0x26305c(0x13e)](_0x15aed7)?_0x15aed7:this['app'][_0x26305c(0xdc)]()+'/'+_0x15aed7,this[_0x26305c(0x113)](_0x3fad3b||_0x15aed7),await koasend(this,_0x15aed7);}}});});}async[a2_0x5b6ed5(0x140)](){const _0x2decf8=a2_0x5b6ed5;var _0x48a257,_0x6f244a;if(fs[_0x2decf8(0x13e)](this[_0x2decf8(0xc6)][_0x2decf8(0xe2)]()+'/apps')&&fs[_0x2decf8(0xc2)](this[_0x2decf8(0xc6)][_0x2decf8(0xe2)]()+_0x2decf8(0xe5))[_0x2decf8(0xd3)]()){const _0x29770b=this[_0x2decf8(0x112)][_0x2decf8(0xf7)](),_0x373282=((_0x48a257=_0x29770b===null||_0x29770b===void 0x0?void 0x0:_0x29770b[_0x2decf8(0xb6)])===null||_0x48a257===void 0x0?void 0x0:_0x48a257[_0x2decf8(0xfd)])||{};for(const _0x47884d of fs[_0x2decf8(0xc8)](this[_0x2decf8(0xc6)][_0x2decf8(0xe2)]()+_0x2decf8(0xe5))){if(!fs[_0x2decf8(0xc2)](this[_0x2decf8(0xc6)][_0x2decf8(0xe2)]()+_0x2decf8(0x106)+_0x47884d)[_0x2decf8(0xd3)]())continue;!(_0x373282===null||_0x373282===void 0x0?void 0x0:_0x373282[_0x47884d])&&(_0x373282[_0x47884d]=Object[_0x2decf8(0xff)]({},((_0x6f244a=_0x29770b===null||_0x29770b===void 0x0?void 0x0:_0x29770b[_0x2decf8(0xb6)])===null||_0x6f244a===void 0x0?void 0x0:_0x6f244a[_0x2decf8(0x129)])||{'maxSize':'1m','dir':this[_0x2decf8(0xc6)][_0x2decf8(0xdc)]()+'/runtime'},{'enableJSON':!![],'enableConsole':this[_0x2decf8(0xd9)][_0x2decf8(0x125)](),'fileLogName':_0x47884d+_0x2decf8(0xbc),'dir':this['app'][_0x2decf8(0xdc)]()+_0x2decf8(0x11f)+_0x47884d})),this[_0x2decf8(0x14a)][_0x2decf8(0x105)](_0x47884d,_0x373282[_0x47884d]);}Object[_0x2decf8(0xe6)](_0x373282)['length']>0x0&&(!_0x29770b[_0x2decf8(0xb6)]&&(_0x29770b[_0x2decf8(0xb6)]={'default':{'maxSize':'1m','dir':this[_0x2decf8(0xc6)][_0x2decf8(0xdc)]()+_0x2decf8(0xd8)}}),_0x29770b['midwayLogger'][_0x2decf8(0xfd)]=_0x373282),this[_0x2decf8(0x112)][_0x2decf8(0x138)](_0x29770b);}}async['filterConfig'](){const _0x2fa191=a2_0x5b6ed5;var _0x241f49,_0x5101d4,_0x4d819f,_0x592a5d,_0x2284cc,_0x389893;const _0x29bcff=this[_0x2fa191(0x112)]['getConfiguration']();((_0x5101d4=(_0x241f49=_0x29bcff===null||_0x29bcff===void 0x0?void 0x0:_0x29bcff[_0x2fa191(0xd5)])===null||_0x241f49===void 0x0?void 0x0:_0x241f49[_0x2fa191(0x11d)])===null||_0x5101d4===void 0x0?void 0x0:_0x5101d4[_0x2fa191(0xfb)])&&Object['keys'](_0x29bcff[_0x2fa191(0xd5)][_0x2fa191(0x11d)])[_0x2fa191(0xd7)]>0x1&&delete _0x29bcff[_0x2fa191(0xd5)][_0x2fa191(0x11d)][_0x2fa191(0xfb)];if((_0x4d819f=_0x29bcff===null||_0x29bcff===void 0x0?void 0x0:_0x29bcff[_0x2fa191(0x141)])===null||_0x4d819f===void 0x0?void 0x0:_0x4d819f[_0x2fa191(0xb4)])for(const _0x5616ae in _0x29bcff[_0x2fa191(0x141)][_0x2fa191(0xb4)]){((_0x592a5d=_0x29bcff['staticFile'][_0x2fa191(0xb4)][_0x5616ae])===null||_0x592a5d===void 0x0?void 0x0:_0x592a5d[_0x2fa191(0x10f)])&&typeof((_0x2284cc=_0x29bcff['staticFile'][_0x2fa191(0xb4)][_0x5616ae])===null||_0x2284cc===void 0x0?void 0x0:_0x2284cc[_0x2fa191(0x10f)])=='string'&&!fs[_0x2fa191(0x13e)](_0x29bcff[_0x2fa191(0x141)][_0x2fa191(0xb4)][_0x5616ae]['dir'])&&(fs[_0x2fa191(0x102)](_0x29bcff[_0x2fa191(0x141)][_0x2fa191(0xb4)][_0x5616ae][_0x2fa191(0x10f)],{'recursive':!![]}),console['log'](_0x2fa191(0xbe)+_0x29bcff[_0x2fa191(0x141)]['dirs'][_0x5616ae]['dir']));}((_0x389893=_0x29bcff===null||_0x29bcff===void 0x0?void 0x0:_0x29bcff[_0x2fa191(0x12f)])===null||_0x389893===void 0x0?void 0x0:_0x389893['tmpdir'])&&!fs[_0x2fa191(0x13e)](_0x29bcff[_0x2fa191(0x12f)][_0x2fa191(0x12e)])&&(fs[_0x2fa191(0x102)](_0x29bcff[_0x2fa191(0x12f)][_0x2fa191(0x12e)],{'recursive':!![]}),console[_0x2fa191(0xcf)](_0x2fa191(0x137)+_0x29bcff[_0x2fa191(0x12f)][_0x2fa191(0x12e)])),this['config'][_0x2fa191(0x138)](_0x29bcff);}};exports[a2_0x5b6ed5(0xd6)]=CustomConfiguration,__decorate([(0x0,core_1['App'])(),__metadata('design:type',Object)],CustomConfiguration[a2_0x5b6ed5(0xda)],a2_0x5b6ed5(0xc6),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x5b6ed5(0xe0),core_2['MidwayConfigService'])],CustomConfiguration['prototype'],a2_0x5b6ed5(0x112),void 0x0),__decorate([(0x0,core_1[a2_0x5b6ed5(0xe7)])(),__metadata('design:type',core_2[a2_0x5b6ed5(0x10b)])],CustomConfiguration[a2_0x5b6ed5(0xda)],a2_0x5b6ed5(0x10a),void 0x0),__decorate([(0x0,core_1['Inject'])(),__metadata(a2_0x5b6ed5(0xe0),core_2[a2_0x5b6ed5(0x146)])],CustomConfiguration[a2_0x5b6ed5(0xda)],'application',void 0x0),__decorate([(0x0,core_1[a2_0x5b6ed5(0xe7)])(),__metadata(a2_0x5b6ed5(0xe0),core_2[a2_0x5b6ed5(0x119)])],CustomConfiguration[a2_0x5b6ed5(0xda)],'environment',void 0x0),__decorate([(0x0,core_1[a2_0x5b6ed5(0xe7)])(),__metadata(a2_0x5b6ed5(0xe0),core_1[a2_0x5b6ed5(0x12b)])],CustomConfiguration[a2_0x5b6ed5(0xda)],a2_0x5b6ed5(0x14a),void 0x0),__decorate([(0x0,core_1[a2_0x5b6ed5(0xe7)])(),__metadata(a2_0x5b6ed5(0xe0),ApiService_1[a2_0x5b6ed5(0xc4)])],CustomConfiguration[a2_0x5b6ed5(0xda)],a2_0x5b6ed5(0xc4),void 0x0),exports[a2_0x5b6ed5(0xd6)]=CustomConfiguration=__decorate([(0x0,core_1[a2_0x5b6ed5(0x107)])({'imports':[koa,upload,staticFile,crossDomain,anncic,anncicCache,anncicEvent,anncicTypeorm,anncicValidator,anncicHelper],'namespace':a2_0x5b6ed5(0xef),'conflictCheck':![],'importConfigs':[{'default':ConfigDefault,'production':ConfigProduction}]})],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_0x50299e=a3_0x257e;(function(_0x32a3a7,_0x2063e4){const _0x2c4449=a3_0x257e,_0x3bb87f=_0x32a3a7();while(!![]){try{const _0x2d894e=parseInt(_0x2c4449(0x14c))/0x1*(parseInt(_0x2c4449(0x13c))/0x2)+-parseInt(_0x2c4449(0x13f))/0x3*(parseInt(_0x2c4449(0x14a))/0x4)+parseInt(_0x2c4449(0x163))/0x5*(-parseInt(_0x2c4449(0x143))/0x6)+parseInt(_0x2c4449(0x130))/0x7*(-parseInt(_0x2c4449(0x11d))/0x8)+-parseInt(_0x2c4449(0x157))/0x9*(parseInt(_0x2c4449(0x15f))/0xa)+-parseInt(_0x2c4449(0x149))/0xb+parseInt(_0x2c4449(0x15e))/0xc;if(_0x2d894e===_0x2063e4)break;else _0x3bb87f['push'](_0x3bb87f['shift']());}catch(_0x3ca0f0){_0x3bb87f['push'](_0x3bb87f['shift']());}}}(a3_0x1391,0x970ae));const a3_0x14ff36=(function(){let _0x4749e8=!![];return function(_0x18f001,_0x2daeb4){const _0x36e3e3=_0x4749e8?function(){const _0x5d2084=a3_0x257e;if(_0x2daeb4){const _0x53768d=_0x2daeb4[_0x5d2084(0x139)](_0x18f001,arguments);return _0x2daeb4=null,_0x53768d;}}:function(){};return _0x4749e8=![],_0x36e3e3;};}()),a3_0x4781fa=a3_0x14ff36(this,function(){const _0x5779a1=a3_0x257e;return a3_0x4781fa[_0x5779a1(0x137)]()[_0x5779a1(0x14d)](_0x5779a1(0x159))[_0x5779a1(0x137)]()[_0x5779a1(0x141)](a3_0x4781fa)['search'](_0x5779a1(0x159));});a3_0x4781fa();'use strict';var _a,_b;Object['defineProperty'](exports,a3_0x50299e(0x126),{'value':!![]}),exports[a3_0x50299e(0x145)]=exports[a3_0x50299e(0x158)]=exports['Action']=void 0x0;const fs=require('fs'),validator_1=require(a3_0x50299e(0x132)),core_1=require('@midwayjs/core'),core_2=require(a3_0x50299e(0x166)),action_1=require(a3_0x50299e(0x160)),NODE_ENV=((_a=process===null||process===void 0x0?void 0x0:process[a3_0x50299e(0x136)])===null||_a===void 0x0?void 0x0:_a[a3_0x50299e(0x13d)])||((_b=process===null||process===void 0x0?void 0x0:process[a3_0x50299e(0x136)])===null||_b===void 0x0?void 0x0:_b[a3_0x50299e(0x155)]);function Action(_0x2ad945,_0x196590,_0x12178b={'middleware':[],'sensitive':!![]}){return _0x404c10=>{const _0x352d2e=a3_0x257e;var _0x18e774;_0x12178b[_0x352d2e(0x15a)]=_0x196590;const _0x3ccaa1=parseRoute(_0x2ad945);if(_0x3ccaa1[_0x352d2e(0x165)]){_0x12178b['prefix']=_0x12178b[_0x352d2e(0x13e)]?'/'+_0x3ccaa1['module']+'/'+_0x12178b[_0x352d2e(0x13e)]:'/'+_0x3ccaa1[_0x352d2e(0x162)];_0x3ccaa1[_0x352d2e(0x13e)]&&(_0x12178b[_0x352d2e(0x13e)]='/'+_0x3ccaa1[_0x352d2e(0x13e)]+'/'+_0x12178b['prefix']);_0x12178b['prefix']=_0x12178b[_0x352d2e(0x13e)][_0x352d2e(0x127)]()[_0x352d2e(0x15c)](/\/{2,}/g,'/');const _0x2b5cc3=getModuleConfig(_0x3ccaa1[_0x352d2e(0x161)]+'/apps',_0x3ccaa1[_0x352d2e(0x165)],lodash[_0x352d2e(0x14f)](_0x3ccaa1['filepath'],'ts')?'ts':'js');if(lodash[_0x352d2e(0x128)](_0x2b5cc3[_0x352d2e(0x12e)])&&_0x2b5cc3[_0x352d2e(0x12e)][_0x352d2e(0x16c)]>0x0)for(let _0x4b895e in _0x2b5cc3['middleware']){if(((_0x18e774=_0x2b5cc3===null||_0x2b5cc3===void 0x0?void 0x0:_0x2b5cc3[_0x352d2e(0x15b)])===null||_0x18e774===void 0x0?void 0x0:_0x18e774[_0x352d2e(0x16c)])>0x0&&_0x2b5cc3[_0x352d2e(0x15b)]['indexOf'](_0x2b5cc3[_0x352d2e(0x12e)][_0x4b895e])!=-0x1)continue;_0x12178b['middleware'][_0x352d2e(0x169)](_0x2b5cc3[_0x352d2e(0x12e)][_0x4b895e]);}(0x0,core_1[_0x352d2e(0x120)])(action_1['ACTION_KEY'],_0x404c10),(0x0,core_1[_0x352d2e(0x150)])(_0x12178b[_0x352d2e(0x13e)],_0x12178b)(_0x404c10),(0x0,core_1['saveClassMetadata'])(action_1[_0x352d2e(0x16e)],{'prefix':_0x12178b[_0x352d2e(0x13e)],'pprefix':_0x3ccaa1[_0x352d2e(0x13e)],'module':_0x3ccaa1[_0x352d2e(0x165)],'filepath':_0x3ccaa1[_0x352d2e(0x156)],'routerOptions':_0x12178b},_0x404c10);}else _0x12178b[_0x352d2e(0x13e)]=_0x12178b['prefix']?'/'+_0x12178b[_0x352d2e(0x13e)]:'/'+_0x3ccaa1[_0x352d2e(0x162)],_0x3ccaa1[_0x352d2e(0x13e)]&&(_0x12178b[_0x352d2e(0x13e)]='/'+_0x3ccaa1[_0x352d2e(0x13e)]+'/'+_0x12178b['prefix']),_0x12178b[_0x352d2e(0x13e)]=_0x12178b[_0x352d2e(0x13e)][_0x352d2e(0x127)]()[_0x352d2e(0x15c)](/\/{2,}/g,'/'),(0x0,core_1['saveModule'])(action_1[_0x352d2e(0x16e)],_0x404c10),(0x0,core_1[_0x352d2e(0x150)])(_0x12178b['prefix'],_0x12178b)(_0x404c10),(0x0,core_1[_0x352d2e(0x13b)])(action_1['ACTION_KEY'],{'prefix':_0x12178b[_0x352d2e(0x13e)],'module':_0x3ccaa1['module'],'pprefix':_0x3ccaa1[_0x352d2e(0x13e)],'filepath':_0x3ccaa1[_0x352d2e(0x156)],'routerOptions':_0x12178b},_0x404c10);};}exports[a3_0x50299e(0x16d)]=Action,Action[a3_0x50299e(0x11f)]=function(_0xf92504,_0x349a31='/',_0x2aee92={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2a3366,_0x3cbae5,_0x2a6158)=>{const _0x1ad231=a3_0x257e;ActionApi(_0xf92504,_0x1ad231(0x11f),_0x349a31,_0x2aee92)(_0x2a3366,_0x3cbae5,_0x2a6158);};},Action[a3_0x50299e(0x152)]=function(_0xbba819,_0x332416='/',_0x1d878f={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2de561,_0xc7c513,_0x4d1b61)=>{const _0xc89919=a3_0x257e;ActionApi(_0xbba819,_0xc89919(0x152),_0x332416,_0x1d878f)(_0x2de561,_0xc7c513,_0x4d1b61);};};function ActionApi(_0x12d434,_0x11697f=a3_0x50299e(0x11f),_0x13d1df='/',_0x20a3ad={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x484044,_0x1a0d75,_0xa26883)=>{const _0x2bb960=a3_0x257e;var _0x43b7ca,_0x381033,_0x24e904;!_0x20a3ad[_0x2bb960(0x12e)]&&(_0x20a3ad[_0x2bb960(0x12e)]=[]);!((_0x43b7ca=_0x20a3ad===null||_0x20a3ad===void 0x0?void 0x0:_0x20a3ad['validate'])===null||_0x43b7ca===void 0x0?void 0x0:_0x43b7ca[_0x2bb960(0x151)])&&(_0x20a3ad[_0x2bb960(0x135)]={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x2bb960(0x13a)}});if(!_0x13d1df)_0x13d1df='/';else typeof _0x13d1df==_0x2bb960(0x13a)&&(!_0x13d1df[_0x2bb960(0x14e)]('/')&&!_0x13d1df[_0x2bb960(0x14e)]('-')&&(_0x13d1df='/'+_0x13d1df));typeof _0x20a3ad[_0x2bb960(0x147)]==_0x2bb960(0x11e)&&(_0x20a3ad[_0x2bb960(0x147)]=!![]);if(((_0x381033=_0x20a3ad===null||_0x20a3ad===void 0x0?void 0x0:_0x20a3ad[_0x2bb960(0x12e)])===null||_0x381033===void 0x0?void 0x0:_0x381033[_0x2bb960(0x16c)])>0x0&&((_0x24e904=_0x20a3ad===null||_0x20a3ad===void 0x0?void 0x0:_0x20a3ad[_0x2bb960(0x15b)])===null||_0x24e904===void 0x0?void 0x0:_0x24e904['length'])>0x0)for(let _0x118576 in _0x20a3ad[_0x2bb960(0x12e)]){_0x20a3ad[_0x2bb960(0x15b)]['indexOf'](_0x20a3ad[_0x2bb960(0x12e)][_0x118576])!==-0x1&&(_0x20a3ad[_0x2bb960(0x12e)][_0x118576]=null);}_0x20a3ad[_0x2bb960(0x122)]=_0x12d434,(0x0,validator_1[_0x2bb960(0x131)])(_0x20a3ad['validate'])(_0x484044,_0x1a0d75,_0xa26883),(0x0,core_2[_0x2bb960(0x129)])(Object[_0x2bb960(0x164)](_0x20a3ad,{'path':_0x13d1df,'requestMethod':(_0x11697f||_0x2bb960(0x11f))[_0x2bb960(0x127)]()}))(_0x484044,_0x1a0d75,_0xa26883),(0x0,core_2[_0x2bb960(0x144)])(action_1[_0x2bb960(0x12f)],{'path':_0x13d1df,'method':_0x1a0d75,'apimit':_0x20a3ad[_0x2bb960(0x147)],'intercept':_0x20a3ad['intercept'],'routerName':_0x20a3ad[_0x2bb960(0x122)],'description':_0x20a3ad[_0x2bb960(0x124)],'middleware':(_0x20a3ad[_0x2bb960(0x12e)]||[])['filter'](_0x539667=>!!_0x539667),'requestMethod':(_0x11697f||_0x2bb960(0x11f))[_0x2bb960(0x127)]()},_0x484044),(0x0,core_2[_0x2bb960(0x138)])(action_1[_0x2bb960(0x12f)],{'path':_0x13d1df,'method':_0x1a0d75,'apimit':_0x20a3ad[_0x2bb960(0x147)],'intercept':_0x20a3ad['intercept'],'routerName':_0x20a3ad[_0x2bb960(0x122)],'description':_0x20a3ad[_0x2bb960(0x124)],'middleware':(_0x20a3ad['middleware']||[])['filter'](_0x4732f5=>!!_0x4732f5),'requestMethod':(_0x11697f||'get')[_0x2bb960(0x127)]()})(_0x484044,_0x1a0d75,_0xa26883);};}exports['ActionApi']=ActionApi;function parseRoute(_0x24b5a7){const _0x1b1edb=a3_0x50299e;_0x24b5a7=_0x24b5a7[_0x1b1edb(0x15c)](/(\\|\/)/g,'/');const _0x2d9144=process[_0x1b1edb(0x148)]()[_0x1b1edb(0x15c)](/(\\|\/)/g,'/'),_0x5e3cc5=_0x24b5a7[_0x1b1edb(0x16b)](0x0,_0x2d9144[_0x1b1edb(0x16c)]+_0x24b5a7[_0x1b1edb(0x16b)](_0x2d9144['length']+0x1)[_0x1b1edb(0x12d)]('/')+0x1),_0x1b1009=_0x24b5a7[_0x1b1edb(0x16b)](_0x5e3cc5['length']+0x1)['replace'](/(\\|\/)/g,'/'),_0x3f480b={'route':'','prefix':![],'module':![],'rootpath':_0x5e3cc5,'filepath':_0x1b1009};if(_0x1b1009[_0x1b1edb(0x14e)](_0x1b1edb(0x171))||_0x1b1009[_0x1b1edb(0x14e)](_0x1b1edb(0x12c))){const _0x13b6bb=_0x1b1009[_0x1b1edb(0x16b)]((_0x1b1009[_0x1b1edb(0x14e)](_0x1b1edb(0x171))?'app/controller/':_0x1b1edb(0x12c))[_0x1b1edb(0x16c)])['split']('/')[_0x1b1edb(0x15d)](_0x4da624=>_0x4da624&&_0x4da624[_0x1b1edb(0x170)]());return _0x13b6bb[_0x1b1edb(0x16c)]>0x1&&(_0x3f480b[_0x1b1edb(0x13e)]=_0x13b6bb[0x0]['toLowerCase'](),_0x13b6bb[_0x1b1edb(0x12a)](0x0,0x1)),_0x3f480b[_0x1b1edb(0x162)]=('/'+_0x13b6bb[_0x1b1edb(0x167)]('/'))[_0x1b1edb(0x15c)](/(\.ts|\.js)$/,'')[_0x1b1edb(0x15c)](/\/{2,}/g,'/')[_0x1b1edb(0x142)](/[\/|A-Z]*[^A-Z]+/g)[_0x1b1edb(0x167)]('-')[_0x1b1edb(0x127)]()[_0x1b1edb(0x15c)](/\/\-/g,'/'),_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x14f)](_0x1b1edb(0x133))&&(_0x3f480b[_0x1b1edb(0x162)]=_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x16b)](0x0,_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x16c)]-0x7)),_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x14f)]('-controller')&&(_0x3f480b[_0x1b1edb(0x162)]=_0x3f480b['route']['substring'](0x0,_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x16c)]-0xb)),_0x3f480b;}else{if(_0x1b1009[_0x1b1edb(0x14e)](_0x1b1edb(0x14b))){const _0xbfa3e6=_0x1b1009[_0x1b1edb(0x16b)](0x0,_0x1b1009['indexOf'](_0x1b1edb(0x154))+0x5),_0x35c955=_0x1b1009['substring'](_0xbfa3e6[_0x1b1edb(0x16c)]+0x1)[_0x1b1edb(0x15c)](/(\\|\/)/g,'/')['split']('/')[0x0];if(_0x1b1009[_0x1b1edb(0x14e)](_0x1b1edb(0x14b)+_0x35c955+_0x1b1edb(0x16a))){const _0x19a9e4=_0x1b1009['substring']((_0xbfa3e6+'/'+_0x35c955+_0x1b1edb(0x16a))[_0x1b1edb(0x16c)])[_0x1b1edb(0x12b)]('/')[_0x1b1edb(0x15d)](_0x3446f8=>_0x3446f8&&_0x3446f8[_0x1b1edb(0x170)]());return _0x19a9e4[_0x1b1edb(0x16c)]>0x1&&(_0x3f480b[_0x1b1edb(0x13e)]=_0x19a9e4[0x0][_0x1b1edb(0x127)](),_0x19a9e4[_0x1b1edb(0x12a)](0x0,0x1)),_0x3f480b[_0x1b1edb(0x165)]=_0x35c955,_0x3f480b[_0x1b1edb(0x162)]=('/'+_0x35c955+'/'+_0x19a9e4[_0x1b1edb(0x167)]('/'))[_0x1b1edb(0x15c)](/(\.ts|\.js)$/,'')['replace'](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)[_0x1b1edb(0x167)]('-')[_0x1b1edb(0x127)]()[_0x1b1edb(0x15c)](/\/\-/g,'/'),_0x3f480b['route'][_0x1b1edb(0x14f)](_0x1b1edb(0x133))&&(_0x3f480b['route']=_0x3f480b[_0x1b1edb(0x162)]['substring'](0x0,_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x16c)]-0x7)),_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x14f)](_0x1b1edb(0x16f))&&(_0x3f480b[_0x1b1edb(0x162)]=_0x3f480b[_0x1b1edb(0x162)][_0x1b1edb(0x16b)](0x0,_0x3f480b['route'][_0x1b1edb(0x16c)]-0xb)),_0x3f480b;}throw new Error(_0x1b1009+_0x1b1edb(0x134)+_0x35c955+'/controller/文件下');}}throw new Error(_0x1b1009+_0x1b1edb(0x153));}exports[a3_0x50299e(0x145)]=parseRoute;function a3_0x257e(_0x349606,_0x3d83ad){const _0x2ac66c=a3_0x1391();return a3_0x257e=function(_0x4781fa,_0x14ff36){_0x4781fa=_0x4781fa-0x11d;let _0x139199=_0x2ac66c[_0x4781fa];return _0x139199;},a3_0x257e(_0x349606,_0x3d83ad);}const moduleConfigTmp=(0x0,core_1[a3_0x50299e(0x125)])(action_1[a3_0x50299e(0x123)],action_1['AppsConfigTmp'])||{};function a3_0x1391(){const _0x3a29c7=['module','@midwayjs/core','join','defaultsDeep','push','/controller/','substring','length','Action','ACTION_KEY','-controller','trim','app/controller/','32lgEaAR','undefined','get','saveModule','existsSync','routerName','APPSCONFIG_KEY','description','getClassMetadata','__esModule','toLowerCase','isArray','RequestMapping','splice','split','basic/controller/','indexOf','middleware','ACTION_ROUTE_KEY','975779AScPlq','Validator','@anncic-api/validator','-action','\x20文件请放在apps/','validate','env','toString','createCustomMethodDecorator','apply','string','saveClassMetadata','6EzDryU','MIDWAY_SERVER_ENV','prefix','1083837hOsgVX','/config.','constructor','match','7338sFCVmF','attachClassMetadata','parseRoute','keys','apimit','cwd','311432Wfqabk','4uoefrC','apps/','194885eWhByj','search','startsWith','endsWith','Controller','validationOptions','post','\x20文件请放在app/controller/文件下','/apps/','NODE_ENV','filepath','25290LbbkWx','ActionApi','(((.+)+)+)+$','tagName','middlewareIgnore','replace','filter','26122440rpDdvA','3550QSqvbE','../types/action','rootpath','route','810WFfHnQ','assign'];a3_0x1391=function(){return _0x3a29c7;};return a3_0x1391();}function getModuleConfig(_0x44d400,_0x1cfbf8,_0x41609f){const _0x2d6aca=a3_0x50299e;if(!(moduleConfigTmp===null||moduleConfigTmp===void 0x0?void 0x0:moduleConfigTmp[_0x1cfbf8])){let _0x1663e1={};if(NODE_ENV&&fs[_0x2d6aca(0x121)](_0x44d400+'/'+_0x1cfbf8+'/config.'+NODE_ENV+'.'+_0x41609f)){const _0x3d3829=include(_0x44d400+'/'+_0x1cfbf8+_0x2d6aca(0x140)+NODE_ENV+'.'+_0x41609f);Object['keys'](_0x3d3829)[_0x2d6aca(0x16c)]>0x0&&(_0x1663e1=lodash['defaultsDeep'](_0x1663e1,_0x3d3829));}if(fs[_0x2d6aca(0x121)](_0x44d400+'/config.'+_0x41609f)){const _0x3cf8d9=include(_0x44d400+_0x2d6aca(0x140)+_0x41609f);Object[_0x2d6aca(0x146)](_0x3cf8d9)[_0x2d6aca(0x16c)]>0x0&&(_0x1663e1=lodash[_0x2d6aca(0x168)](_0x1663e1,_0x3cf8d9));}moduleConfigTmp[_0x1cfbf8]=_0x1663e1,(0x0,core_1[_0x2d6aca(0x13b)])(action_1['APPSCONFIG_KEY'],moduleConfigTmp,action_1['AppsConfigTmp']);}return moduleConfigTmp[_0x1cfbf8];}
|
|
1
|
+
const a3_0x503b1=a3_0x3df7;(function(_0x516b04,_0x2e99ae){const _0x5c6460=a3_0x3df7,_0x49c24c=_0x516b04();while(!![]){try{const _0x4890ae=parseInt(_0x5c6460(0x1a7))/0x1*(-parseInt(_0x5c6460(0x183))/0x2)+-parseInt(_0x5c6460(0x1b8))/0x3*(parseInt(_0x5c6460(0x188))/0x4)+parseInt(_0x5c6460(0x1a6))/0x5*(-parseInt(_0x5c6460(0x19c))/0x6)+-parseInt(_0x5c6460(0x1a5))/0x7*(-parseInt(_0x5c6460(0x196))/0x8)+-parseInt(_0x5c6460(0x1a9))/0x9*(-parseInt(_0x5c6460(0x19d))/0xa)+parseInt(_0x5c6460(0x18c))/0xb*(-parseInt(_0x5c6460(0x18a))/0xc)+-parseInt(_0x5c6460(0x177))/0xd*(-parseInt(_0x5c6460(0x172))/0xe);if(_0x4890ae===_0x2e99ae)break;else _0x49c24c['push'](_0x49c24c['shift']());}catch(_0x156af2){_0x49c24c['push'](_0x49c24c['shift']());}}}(a3_0x46d4,0xc9545));const a3_0x294d9d=(function(){let _0x35c49b=!![];return function(_0xeb1746,_0xa4894a){const _0xc9396f=_0x35c49b?function(){const _0x4345c4=a3_0x3df7;if(_0xa4894a){const _0x591088=_0xa4894a[_0x4345c4(0x16d)](_0xeb1746,arguments);return _0xa4894a=null,_0x591088;}}:function(){};return _0x35c49b=![],_0xc9396f;};}()),a3_0x51b7ea=a3_0x294d9d(this,function(){const _0x59e789=a3_0x3df7;return a3_0x51b7ea[_0x59e789(0x173)]()[_0x59e789(0x1ae)]('(((.+)+)+)+$')[_0x59e789(0x173)]()[_0x59e789(0x1bd)](a3_0x51b7ea)[_0x59e789(0x1ae)](_0x59e789(0x171));});a3_0x51b7ea();'use strict';var _a,_b;Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a3_0x503b1(0x1a3)]=Action,exports[a3_0x503b1(0x170)]=ActionApi,exports[a3_0x503b1(0x1b2)]=parseRoute;const fs=require('fs'),validator_1=require(a3_0x503b1(0x1b4)),core_1=require('@midwayjs/core'),core_2=require(a3_0x503b1(0x1ab)),action_1=require(a3_0x503b1(0x178)),NODE_ENV=((_a=process===null||process===void 0x0?void 0x0:process['env'])===null||_a===void 0x0?void 0x0:_a[a3_0x503b1(0x1aa)])||((_b=process===null||process===void 0x0?void 0x0:process[a3_0x503b1(0x16f)])===null||_b===void 0x0?void 0x0:_b[a3_0x503b1(0x19a)]);function Action(_0x3ce424,_0x1dd9e9,_0x387ad5={'middleware':[],'sensitive':!![]}){return _0xc6a52b=>{const _0x333875=a3_0x3df7;var _0x2b5cec;_0x387ad5[_0x333875(0x1b6)]=_0x1dd9e9;const _0x1d569f=parseRoute(_0x3ce424);if(_0x1d569f['module']){_0x387ad5[_0x333875(0x16a)]=_0x387ad5[_0x333875(0x16a)]?'/'+_0x1d569f[_0x333875(0x181)]+'/'+_0x387ad5[_0x333875(0x16a)]:'/'+_0x1d569f[_0x333875(0x1a2)];_0x1d569f[_0x333875(0x16a)]&&(_0x387ad5[_0x333875(0x16a)]='/'+_0x1d569f['prefix']+'/'+_0x387ad5[_0x333875(0x16a)]);_0x387ad5['prefix']=_0x387ad5[_0x333875(0x16a)][_0x333875(0x1bc)]()[_0x333875(0x169)](/\/{2,}/g,'/');const _0x517669=getModuleConfig(_0x1d569f[_0x333875(0x176)]+_0x333875(0x167),_0x1d569f['module'],lodash[_0x333875(0x185)](_0x1d569f[_0x333875(0x1b0)],'ts')?'ts':'js');if(lodash['isArray'](_0x517669[_0x333875(0x1b9)])&&_0x517669[_0x333875(0x1b9)]['length']>0x0)for(let _0x4744da in _0x517669[_0x333875(0x1b9)]){if(((_0x2b5cec=_0x517669===null||_0x517669===void 0x0?void 0x0:_0x517669[_0x333875(0x18e)])===null||_0x2b5cec===void 0x0?void 0x0:_0x2b5cec[_0x333875(0x194)])>0x0&&_0x517669[_0x333875(0x18e)]['indexOf'](_0x517669['middleware'][_0x4744da])!=-0x1)continue;_0x387ad5[_0x333875(0x1b9)][_0x333875(0x17b)](_0x517669[_0x333875(0x1b9)][_0x4744da]);}(0x0,core_1[_0x333875(0x16b)])(action_1[_0x333875(0x168)],_0xc6a52b),(0x0,core_1[_0x333875(0x19e)])(_0x387ad5['prefix'],_0x387ad5)(_0xc6a52b),(0x0,core_1[_0x333875(0x1b7)])(action_1[_0x333875(0x168)],{'prefix':_0x387ad5[_0x333875(0x16a)],'pprefix':_0x1d569f[_0x333875(0x16a)],'module':_0x1d569f[_0x333875(0x181)],'filepath':_0x1d569f[_0x333875(0x1b0)],'routerOptions':_0x387ad5},_0xc6a52b);}else _0x387ad5[_0x333875(0x16a)]=_0x387ad5[_0x333875(0x16a)]?'/'+_0x387ad5[_0x333875(0x16a)]:'/'+_0x1d569f['route'],_0x1d569f[_0x333875(0x16a)]&&(_0x387ad5[_0x333875(0x16a)]='/'+_0x1d569f[_0x333875(0x16a)]+'/'+_0x387ad5['prefix']),_0x387ad5['prefix']=_0x387ad5['prefix']['toLowerCase']()[_0x333875(0x169)](/\/{2,}/g,'/'),(0x0,core_1[_0x333875(0x16b)])(action_1[_0x333875(0x168)],_0xc6a52b),(0x0,core_1[_0x333875(0x19e)])(_0x387ad5[_0x333875(0x16a)],_0x387ad5)(_0xc6a52b),(0x0,core_1[_0x333875(0x1b7)])(action_1['ACTION_KEY'],{'prefix':_0x387ad5[_0x333875(0x16a)],'module':_0x1d569f[_0x333875(0x181)],'pprefix':_0x1d569f[_0x333875(0x16a)],'filepath':_0x1d569f[_0x333875(0x1b0)],'routerOptions':_0x387ad5},_0xc6a52b);};}Action[a3_0x503b1(0x1ba)]=function(_0x49faee,_0x33a6b6='/',_0x59b500={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x3b36d2,_0x19d9b4,_0x599d35)=>{ActionApi(_0x49faee,'get',_0x33a6b6,_0x59b500)(_0x3b36d2,_0x19d9b4,_0x599d35);};},Action[a3_0x503b1(0x174)]=function(_0x165b18,_0x3837ef='/',_0x4bc8fa={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x21d051,_0x3c04ce,_0x51093)=>{const _0x4005bf=a3_0x3df7;ActionApi(_0x165b18,_0x4005bf(0x174),_0x3837ef,_0x4bc8fa)(_0x21d051,_0x3c04ce,_0x51093);};};function ActionApi(_0x1ceb01,_0x374d74=a3_0x503b1(0x1ba),_0x1c7cb2='/',_0x3ff01b={'apimit':!![],'intercept':!![],'validate':{},'middleware':[],'middlewareIgnore':[]}){return(_0x2a9c00,_0x3d2f56,_0x800373)=>{const _0x516ce5=a3_0x3df7;var _0x44d8da,_0x38411c,_0x43301a;!_0x3ff01b[_0x516ce5(0x1b9)]&&(_0x3ff01b[_0x516ce5(0x1b9)]=[]);!((_0x44d8da=_0x3ff01b===null||_0x3ff01b===void 0x0?void 0x0:_0x3ff01b[_0x516ce5(0x197)])===null||_0x44d8da===void 0x0?void 0x0:_0x44d8da[_0x516ce5(0x18b)])&&(_0x3ff01b['validate']={'validationOptions':{'allowUnknown':!![],'stripUnknown':!![],'dateFormat':_0x516ce5(0x1b5)}});if(!_0x1c7cb2)_0x1c7cb2='/';else typeof _0x1c7cb2==_0x516ce5(0x1b5)&&(!_0x1c7cb2['startsWith']('/')&&!_0x1c7cb2[_0x516ce5(0x189)]('-')&&(_0x1c7cb2='/'+_0x1c7cb2));typeof _0x3ff01b[_0x516ce5(0x17a)]==_0x516ce5(0x1a8)&&(_0x3ff01b['apimit']=!![]);if(((_0x38411c=_0x3ff01b===null||_0x3ff01b===void 0x0?void 0x0:_0x3ff01b[_0x516ce5(0x1b9)])===null||_0x38411c===void 0x0?void 0x0:_0x38411c[_0x516ce5(0x194)])>0x0&&((_0x43301a=_0x3ff01b===null||_0x3ff01b===void 0x0?void 0x0:_0x3ff01b['middlewareIgnore'])===null||_0x43301a===void 0x0?void 0x0:_0x43301a[_0x516ce5(0x194)])>0x0)for(let _0x5732ce in _0x3ff01b[_0x516ce5(0x1b9)]){_0x3ff01b['middlewareIgnore'][_0x516ce5(0x17c)](_0x3ff01b[_0x516ce5(0x1b9)][_0x5732ce])!==-0x1&&(_0x3ff01b[_0x516ce5(0x1b9)][_0x5732ce]=null);}_0x3ff01b[_0x516ce5(0x190)]=_0x1ceb01,(0x0,validator_1[_0x516ce5(0x182)])(_0x3ff01b[_0x516ce5(0x197)])(_0x2a9c00,_0x3d2f56,_0x800373),(0x0,core_2[_0x516ce5(0x199)])(Object[_0x516ce5(0x184)](_0x3ff01b,{'path':_0x1c7cb2,'requestMethod':(_0x374d74||_0x516ce5(0x1ba))['toLowerCase']()}))(_0x2a9c00,_0x3d2f56,_0x800373),(0x0,core_2[_0x516ce5(0x175)])(action_1['ACTION_ROUTE_KEY'],{'path':_0x1c7cb2,'method':_0x3d2f56,'apimit':_0x3ff01b[_0x516ce5(0x17a)],'intercept':_0x3ff01b[_0x516ce5(0x1a4)],'routerName':_0x3ff01b['routerName'],'description':_0x3ff01b[_0x516ce5(0x1be)],'middleware':(_0x3ff01b['middleware']||[])[_0x516ce5(0x18f)](_0x190f4b=>!!_0x190f4b),'requestMethod':(_0x374d74||_0x516ce5(0x1ba))[_0x516ce5(0x1bc)]()},_0x2a9c00),(0x0,core_2[_0x516ce5(0x18d)])(action_1[_0x516ce5(0x195)],{'path':_0x1c7cb2,'method':_0x3d2f56,'apimit':_0x3ff01b[_0x516ce5(0x17a)],'intercept':_0x3ff01b[_0x516ce5(0x1a4)],'routerName':_0x3ff01b[_0x516ce5(0x190)],'description':_0x3ff01b['description'],'middleware':(_0x3ff01b[_0x516ce5(0x1b9)]||[])[_0x516ce5(0x18f)](_0x2c0f14=>!!_0x2c0f14),'requestMethod':(_0x374d74||'get')[_0x516ce5(0x1bc)]()})(_0x2a9c00,_0x3d2f56,_0x800373);};}function parseRoute(_0x40cfa6){const _0x128d2f=a3_0x503b1;_0x40cfa6=_0x40cfa6[_0x128d2f(0x169)](/(\\|\/)/g,'/');const _0x3b2237=process[_0x128d2f(0x1a0)]()['replace'](/(\\|\/)/g,'/'),_0x2589ad=_0x40cfa6[_0x128d2f(0x17d)](0x0,_0x3b2237[_0x128d2f(0x194)]+_0x40cfa6[_0x128d2f(0x17d)](_0x3b2237[_0x128d2f(0x194)]+0x1)[_0x128d2f(0x17c)]('/')+0x1),_0x186b3e=_0x40cfa6[_0x128d2f(0x17d)](_0x2589ad[_0x128d2f(0x194)]+0x1)[_0x128d2f(0x169)](/(\\|\/)/g,'/'),_0xb2f57a={'route':'','prefix':![],'module':![],'rootpath':_0x2589ad,'filepath':_0x186b3e};if(_0x186b3e[_0x128d2f(0x189)]('app/controller/')||_0x186b3e[_0x128d2f(0x189)](_0x128d2f(0x19f))){const _0x40ada3=_0x186b3e[_0x128d2f(0x17d)]((_0x186b3e['startsWith'](_0x128d2f(0x16c))?'app/controller/':_0x128d2f(0x19f))[_0x128d2f(0x194)])['split']('/')['filter'](_0x3e8e69=>_0x3e8e69&&_0x3e8e69[_0x128d2f(0x180)]());return _0x40ada3['length']>0x1&&(_0xb2f57a['prefix']=_0x40ada3[0x0][_0x128d2f(0x1bc)](),_0x40ada3['splice'](0x0,0x1)),_0xb2f57a['route']=('/'+_0x40ada3[_0x128d2f(0x17f)]('/'))[_0x128d2f(0x169)](/(\.ts|\.js)$/,'')[_0x128d2f(0x169)](/\/{2,}/g,'/')[_0x128d2f(0x193)](/[\/|A-Z]*[^A-Z]+/g)[_0x128d2f(0x17f)]('-')[_0x128d2f(0x1bc)]()[_0x128d2f(0x169)](/\/\-/g,'/'),_0xb2f57a[_0x128d2f(0x1a2)]['endsWith'](_0x128d2f(0x1b3))&&(_0xb2f57a[_0x128d2f(0x1a2)]=_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x17d)](0x0,_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x194)]-0x7)),_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x185)](_0x128d2f(0x192))&&(_0xb2f57a[_0x128d2f(0x1a2)]=_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x17d)](0x0,_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x194)]-0xb)),_0xb2f57a;}else{if(_0x186b3e['startsWith'](_0x128d2f(0x1b1))){const _0x32beb6=_0x186b3e['substring'](0x0,_0x186b3e[_0x128d2f(0x17c)](_0x128d2f(0x179))+0x5),_0x1e4d8e=_0x186b3e[_0x128d2f(0x17d)](_0x32beb6['length']+0x1)['replace'](/(\\|\/)/g,'/')[_0x128d2f(0x17e)]('/')[0x0];if(_0x186b3e['startsWith']('apps/'+_0x1e4d8e+_0x128d2f(0x16e))){const _0x42dad2=_0x186b3e['substring']((_0x32beb6+'/'+_0x1e4d8e+_0x128d2f(0x16e))[_0x128d2f(0x194)])[_0x128d2f(0x17e)]('/')[_0x128d2f(0x18f)](_0x258323=>_0x258323&&_0x258323[_0x128d2f(0x180)]());return _0x42dad2['length']>0x1&&(_0xb2f57a['prefix']=_0x42dad2[0x0][_0x128d2f(0x1bc)](),_0x42dad2[_0x128d2f(0x1af)](0x0,0x1)),_0xb2f57a[_0x128d2f(0x181)]=_0x1e4d8e,_0xb2f57a[_0x128d2f(0x1a2)]=('/'+_0x1e4d8e+'/'+_0x42dad2['join']('/'))[_0x128d2f(0x169)](/(\.ts|\.js)$/,'')[_0x128d2f(0x169)](/\/{2,}/g,'/')['match'](/[\/|A-Z]*[^A-Z]+/g)['join']('-')[_0x128d2f(0x1bc)]()[_0x128d2f(0x169)](/\/\-/g,'/'),_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x185)](_0x128d2f(0x1b3))&&(_0xb2f57a['route']=_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x17d)](0x0,_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x194)]-0x7)),_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x185)](_0x128d2f(0x192))&&(_0xb2f57a['route']=_0xb2f57a['route'][_0x128d2f(0x17d)](0x0,_0xb2f57a[_0x128d2f(0x1a2)][_0x128d2f(0x194)]-0xb)),_0xb2f57a;}throw new Error(_0x186b3e+_0x128d2f(0x1a1)+_0x1e4d8e+'/controller/文件下');}}throw new Error(_0x186b3e+_0x128d2f(0x1ac));}const moduleConfigTmp=(0x0,core_1[a3_0x503b1(0x198)])(action_1[a3_0x503b1(0x187)],action_1[a3_0x503b1(0x19b)])||{};function a3_0x3df7(_0x203ab1,_0x371740){const _0x1545f0=a3_0x46d4();return a3_0x3df7=function(_0x51b7ea,_0x294d9d){_0x51b7ea=_0x51b7ea-0x167;let _0x46d4e0=_0x1545f0[_0x51b7ea];return _0x46d4e0;},a3_0x3df7(_0x203ab1,_0x371740);}function a3_0x46d4(){const _0x56edb1=['5yNgxbV','1kcipvn','undefined','16488SaMzAy','MIDWAY_SERVER_ENV','@midwayjs/core','\x20文件请放在app/controller/文件下','/config.','search','splice','filepath','apps/','parseRoute','-action','@anncic-api/validator','string','tagName','saveClassMetadata','60XfKmzi','middleware','get','keys','toLowerCase','constructor','description','/apps','ACTION_KEY','replace','prefix','saveModule','app/controller/','apply','/controller/','env','ActionApi','(((.+)+)+)+$','285166hWcWjb','toString','post','attachClassMetadata','rootpath','1313WWYkop','../types/action','/apps/','apimit','push','indexOf','substring','split','join','trim','module','Validator','1380726JQIAxr','assign','endsWith','defaultsDeep','APPSCONFIG_KEY','196008zbTNIa','startsWith','34116QetqOJ','validationOptions','3619MXXBRe','createCustomMethodDecorator','middlewareIgnore','filter','routerName','existsSync','-controller','match','length','ACTION_ROUTE_KEY','10744btiWlZ','validate','getClassMetadata','RequestMapping','NODE_ENV','AppsConfigTmp','1763046KzXUNf','940HMoJfA','Controller','basic/controller/','cwd','\x20文件请放在apps/','route','Action','intercept','7791pFhabq'];a3_0x46d4=function(){return _0x56edb1;};return a3_0x46d4();}function getModuleConfig(_0x5cc9ee,_0x193fcc,_0x20ec20){const _0x42ce81=a3_0x503b1;if(!(moduleConfigTmp===null||moduleConfigTmp===void 0x0?void 0x0:moduleConfigTmp[_0x193fcc])){let _0x5ef2cb={};if(NODE_ENV&&fs[_0x42ce81(0x191)](_0x5cc9ee+'/'+_0x193fcc+_0x42ce81(0x1ad)+NODE_ENV+'.'+_0x20ec20)){const _0x20a1a2=include(_0x5cc9ee+'/'+_0x193fcc+_0x42ce81(0x1ad)+NODE_ENV+'.'+_0x20ec20);Object[_0x42ce81(0x1bb)](_0x20a1a2)[_0x42ce81(0x194)]>0x0&&(_0x5ef2cb=lodash[_0x42ce81(0x186)](_0x5ef2cb,_0x20a1a2));}if(fs[_0x42ce81(0x191)](_0x5cc9ee+_0x42ce81(0x1ad)+_0x20ec20)){const _0x219d9d=include(_0x5cc9ee+_0x42ce81(0x1ad)+_0x20ec20);Object[_0x42ce81(0x1bb)](_0x219d9d)['length']>0x0&&(_0x5ef2cb=lodash[_0x42ce81(0x186)](_0x5ef2cb,_0x219d9d));}moduleConfigTmp[_0x193fcc]=_0x5ef2cb,(0x0,core_1[_0x42ce81(0x1b7)])(action_1[_0x42ce81(0x187)],moduleConfigTmp,action_1[_0x42ce81(0x19b)]);}return moduleConfigTmp[_0x193fcc];}
|
|
@@ -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
|
-
const
|
|
1
|
+
const a4_0x629288=a4_0x247c;(function(_0x2e3e59,_0x37f47b){const _0x4451c1=a4_0x247c,_0x1e9423=_0x2e3e59();while(!![]){try{const _0x457acd=-parseInt(_0x4451c1(0x128))/0x1*(parseInt(_0x4451c1(0x11c))/0x2)+parseInt(_0x4451c1(0x115))/0x3*(-parseInt(_0x4451c1(0x126))/0x4)+-parseInt(_0x4451c1(0x130))/0x5*(-parseInt(_0x4451c1(0x11a))/0x6)+-parseInt(_0x4451c1(0x124))/0x7+-parseInt(_0x4451c1(0x11e))/0x8*(-parseInt(_0x4451c1(0x12d))/0x9)+parseInt(_0x4451c1(0x11b))/0xa+parseInt(_0x4451c1(0x12e))/0xb;if(_0x457acd===_0x37f47b)break;else _0x1e9423['push'](_0x1e9423['shift']());}catch(_0x17ca0b){_0x1e9423['push'](_0x1e9423['shift']());}}}(a4_0x2df9,0x7d898));const a4_0x592490=(function(){let _0x2c4e0a=!![];return function(_0x33ebbd,_0x145a9f){const _0x37e9d2=_0x2c4e0a?function(){const _0x3e70c9=a4_0x247c;if(_0x145a9f){const _0x5289c2=_0x145a9f[_0x3e70c9(0x121)](_0x33ebbd,arguments);return _0x145a9f=null,_0x5289c2;}}:function(){};return _0x2c4e0a=![],_0x37e9d2;};}()),a4_0x4ca435=a4_0x592490(this,function(){const _0x46d8c8=a4_0x247c;return a4_0x4ca435['toString']()[_0x46d8c8(0x117)](_0x46d8c8(0x119))[_0x46d8c8(0x125)]()['constructor'](a4_0x4ca435)['search'](_0x46d8c8(0x119));});a4_0x4ca435();function a4_0x2df9(){const _0x488fea=['7177912GCnTmj','toString','4qrcBkw','__esModule','1ttvGgi','getAsync','RequestMapping','MidwayEnvironmentService','ApitestService','333pRmMHz','11663905mKXNdV','REQUEST_OBJ_CTX_KEY','5RkCmqM','isDevelopmentEnvironment','apidoc','getConfig','app','value','1221873dmEyHQ','filepath','search','get','(((.+)+)+)+$','3181404uKxtbg','773760YTFHaA','831466twbTFd','/apitest','150200sxVItw','Apitest','@midwayjs/core','apply','apitest','getApplicationContext'];a4_0x2df9=function(){return _0x488fea;};return a4_0x2df9();}function a4_0x247c(_0x19a62c,_0x7fa5cb){const _0x456935=a4_0x2df9();return a4_0x247c=function(_0x4ca435,_0x592490){_0x4ca435=_0x4ca435-0x112;let _0x2df9c2=_0x456935[_0x4ca435];return _0x2df9c2;},a4_0x247c(_0x19a62c,_0x7fa5cb);}'use strict';Object['defineProperty'](exports,a4_0x629288(0x127),{'value':!![]}),exports[a4_0x629288(0x11f)]=Apitest;const core_1=require(a4_0x629288(0x120)),ApitestService_1=require('../service/ApitestService');function Apitest(_0x4e03d7=a4_0x629288(0x11d),_0xce0d1f){return(_0x572fa5,_0x53ce35,_0x529c4c)=>{const _0x1ad093=a4_0x247c;return(0x0,core_1[_0x1ad093(0x12a)])({'path':_0x4e03d7,'requestMethod':_0x1ad093(0x118)})(_0x572fa5,_0x53ce35,_0x529c4c),_0x529c4c[_0x1ad093(0x114)]=async function(..._0x48ca1f){const _0x238801=_0x1ad093;var _0xe68f46;const _0x15ecd0=(_0xe68f46=this[core_1[_0x238801(0x12f)]])===null||_0xe68f46===void 0x0?void 0x0:_0xe68f46[_0x238801(0x113)];if(_0x15ecd0&&_0x15ecd0[_0x238801(0x112)](_0x238801(0x122))){const _0x1725d3=await _0x15ecd0[_0x238801(0x123)]()[_0x238801(0x129)](ApitestService_1[_0x238801(0x12c)]),_0x2b35e7=await _0x15ecd0[_0x238801(0x123)]()[_0x238801(0x129)](core_1[_0x238801(0x12b)]);return _0x2b35e7[_0x238801(0x131)]()&&(_0xce0d1f[_0x238801(0x116)]=!![]),await _0x1725d3[_0x238801(0x132)](_0xce0d1f);}return'';},_0x529c4c;};}
|
|
@@ -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
|
-
const
|
|
1
|
+
const a5_0x39a98f=a5_0x6c45;(function(_0x38e093,_0x42fe61){const _0x6d3e84=a5_0x6c45,_0x1b9924=_0x38e093();while(!![]){try{const _0x17bd81=parseInt(_0x6d3e84(0x7f))/0x1*(-parseInt(_0x6d3e84(0x72))/0x2)+-parseInt(_0x6d3e84(0x71))/0x3+-parseInt(_0x6d3e84(0x7e))/0x4*(parseInt(_0x6d3e84(0x88))/0x5)+-parseInt(_0x6d3e84(0x90))/0x6+parseInt(_0x6d3e84(0x77))/0x7*(-parseInt(_0x6d3e84(0x81))/0x8)+parseInt(_0x6d3e84(0x84))/0x9*(parseInt(_0x6d3e84(0x78))/0xa)+-parseInt(_0x6d3e84(0x85))/0xb*(-parseInt(_0x6d3e84(0x87))/0xc);if(_0x17bd81===_0x42fe61)break;else _0x1b9924['push'](_0x1b9924['shift']());}catch(_0x253cfb){_0x1b9924['push'](_0x1b9924['shift']());}}}(a5_0x3767,0x3815c));const a5_0x502441=(function(){let _0xa50a25=!![];return function(_0x518cc5,_0x32a2a3){const _0x35a3e9=_0xa50a25?function(){const _0x45b1b5=a5_0x6c45;if(_0x32a2a3){const _0x48db08=_0x32a2a3[_0x45b1b5(0x7a)](_0x518cc5,arguments);return _0x32a2a3=null,_0x48db08;}}:function(){};return _0xa50a25=![],_0x35a3e9;};}()),a5_0x3c32ac=a5_0x502441(this,function(){const _0x149dbd=a5_0x6c45;return a5_0x3c32ac[_0x149dbd(0x7c)]()[_0x149dbd(0x8b)](_0x149dbd(0x83))[_0x149dbd(0x7c)]()[_0x149dbd(0x8c)](a5_0x3c32ac)[_0x149dbd(0x8b)](_0x149dbd(0x83));});a5_0x3c32ac();'use strict';Object[a5_0x39a98f(0x76)](exports,a5_0x39a98f(0x7d),{'value':!![]}),exports['IIntercept']=void 0x0,exports[a5_0x39a98f(0x82)]=Intercept;const core_1=require('@midwayjs/core'),intercept_1=require(a5_0x39a98f(0x8f));function Intercept(_0x2d52d0){return _0x458565=>{const _0x455cf7=a5_0x6c45,_0x43cfd9=(0x0,core_1[_0x455cf7(0x73)])(intercept_1['INTERCEPT_KEY'],intercept_1[_0x455cf7(0x74)])||{};for(let _0x2308c9 of Array[_0x455cf7(0x7b)](_0x2d52d0)?_0x2d52d0:[_0x2d52d0]){_0x2308c9=_0x2308c9[_0x455cf7(0x8a)]();!(_0x43cfd9===null||_0x43cfd9===void 0x0?void 0x0:_0x43cfd9[_0x2308c9])&&(_0x43cfd9[_0x2308c9]=[]);if(_0x43cfd9[_0x2308c9][_0x455cf7(0x89)](_0x458565))continue;_0x43cfd9[_0x2308c9][_0x455cf7(0x86)](_0x458565);}(0x0,core_1['Provide'])()(_0x458565),(0x0,core_1['Scope'])(core_1[_0x455cf7(0x75)][_0x455cf7(0x80)])(_0x458565),(0x0,core_1[_0x455cf7(0x8d)])(intercept_1[_0x455cf7(0x8e)],_0x43cfd9,intercept_1['InterceptTargetTmp']);};}function a5_0x6c45(_0x36271f,_0x22999f){const _0x1bfac7=a5_0x3767();return a5_0x6c45=function(_0x3c32ac,_0x502441){_0x3c32ac=_0x3c32ac-0x71;let _0x376748=_0x1bfac7[_0x3c32ac];return _0x376748;},a5_0x6c45(_0x36271f,_0x22999f);}class IIntercept{async['match'](_0x59bc7c,_0x4d1a50,_0x5e5013){return!![];}}function a5_0x3767(){const _0x40b1ac=['Singleton','464nNaMon','Intercept','(((.+)+)+)+$','27WqQuAe','117942SpSjZy','push','1488HOkKLo','5cwyjvD','includes','toUpperCase','search','constructor','saveClassMetadata','INTERCEPT_KEY','../types/intercept','2400084DzennD','359271cmLHEI','168486PqPXxx','getClassMetadata','InterceptTargetTmp','ScopeEnum','defineProperty','9247NwzEXh','1165670ghAdOQ','IIntercept','apply','isArray','toString','__esModule','1727604QPunlX','5CDoeqi'];a5_0x3767=function(){return _0x40b1ac;};return a5_0x3767();}exports[a5_0x39a98f(0x79)]=IIntercept;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
static readonly
|
|
4
|
-
static readonly
|
|
5
|
-
static readonly
|
|
6
|
-
static readonly
|
|
7
|
-
static readonly
|
|
8
|
-
|
|
9
|
-
}
|
|
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
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a6_0x5dfd9d=a6_0x2acb;(function(_0x3ee4f7,_0x3c0c41){var _0x5b8c88=a6_0x2acb,_0x14321a=_0x3ee4f7();while(!![]){try{var _0x50b4a3=-parseInt(_0x5b8c88(0x1a2))/0x1+parseInt(_0x5b8c88(0x1ac))/0x2+-parseInt(_0x5b8c88(0x19d))/0x3*(parseInt(_0x5b8c88(0x191))/0x4)+-parseInt(_0x5b8c88(0x1ab))/0x5*(parseInt(_0x5b8c88(0x19b))/0x6)+parseInt(_0x5b8c88(0x19f))/0x7+-parseInt(_0x5b8c88(0x1a4))/0x8+parseInt(_0x5b8c88(0x194))/0x9*(-parseInt(_0x5b8c88(0x193))/0xa);if(_0x50b4a3===_0x3c0c41)break;else _0x14321a['push'](_0x14321a['shift']());}catch(_0x1fe837){_0x14321a['push'](_0x14321a['shift']());}}}(a6_0x5df3,0x24013));function a6_0x2acb(_0x56e02a,_0x5c3356){var _0x1ad95a=a6_0x5df3();return a6_0x2acb=function(_0x1ab15e,_0x3901cb){_0x1ab15e=_0x1ab15e-0x190;var _0x5df34a=_0x1ad95a[_0x1ab15e];return _0x5df34a;},a6_0x2acb(_0x56e02a,_0x5c3356);}var a6_0x3901cb=(function(){var _0x335a6=!![];return function(_0x51e1ea,_0x210724){var _0x4cdc7f=_0x335a6?function(){if(_0x210724){var _0x2ff974=_0x210724['apply'](_0x51e1ea,arguments);return _0x210724=null,_0x2ff974;}}:function(){};return _0x335a6=![],_0x4cdc7f;};}()),a6_0x1ab15e=a6_0x3901cb(this,function(){var _0x177b21=a6_0x2acb;return a6_0x1ab15e['toString']()[_0x177b21(0x192)](_0x177b21(0x196))['toString']()[_0x177b21(0x198)](a6_0x1ab15e)[_0x177b21(0x192)](_0x177b21(0x196));});a6_0x1ab15e();'use strict';var __decorate=this&&this[a6_0x5dfd9d(0x1af)]||function(_0x1692ab,_0x461bc5,_0x41e364,_0xe424b0){var _0x4dc932=a6_0x5dfd9d,_0x50f489=arguments[_0x4dc932(0x1b1)],_0x468058=_0x50f489<0x3?_0x461bc5:_0xe424b0===null?_0xe424b0=Object['getOwnPropertyDescriptor'](_0x461bc5,_0x41e364):_0xe424b0,_0x3227ac;if(typeof Reflect===_0x4dc932(0x1ad)&&typeof Reflect[_0x4dc932(0x190)]===_0x4dc932(0x1a5))_0x468058=Reflect['decorate'](_0x1692ab,_0x461bc5,_0x41e364,_0xe424b0);else{for(var _0x4a0133=_0x1692ab[_0x4dc932(0x1b1)]-0x1;_0x4a0133>=0x0;_0x4a0133--)if(_0x3227ac=_0x1692ab[_0x4a0133])_0x468058=(_0x50f489<0x3?_0x3227ac(_0x468058):_0x50f489>0x3?_0x3227ac(_0x461bc5,_0x41e364,_0x468058):_0x3227ac(_0x461bc5,_0x41e364))||_0x468058;}return _0x50f489>0x3&&_0x468058&&Object[_0x4dc932(0x1a0)](_0x461bc5,_0x41e364,_0x468058),_0x468058;},__metadata=this&&this[a6_0x5dfd9d(0x195)]||function(_0x56a254,_0x54e4d0){var _0x3b5e6e=a6_0x5dfd9d;if(typeof Reflect===_0x3b5e6e(0x1ad)&&typeof Reflect[_0x3b5e6e(0x19c)]===_0x3b5e6e(0x1a5))return Reflect[_0x3b5e6e(0x19c)](_0x56a254,_0x54e4d0);};function a6_0x5df3(){var _0xe19bfb=['TIMEOUT_LOGINTIME','__esModule','5EazrOk','398106QAQYes','object','请使用正确的设备','__decorate','signature验证失败','length','decorate','244sgEXZo','search','30KDwiXx','357795qfbeaq','__metadata','(((.+)+)+)+$','HEADERS_SIGNATURE','constructor','ApiError','HEADERS_LACK','22014mzXfgB','metadata','1284UViXrt','TIMEOUT','1976170mudlwC','defineProperty','HEADERS_CHECKCODE','78130fXqGKs','登录超时,请重新登录','853728nhTAiS','function','验证失败,请重新登录','请求头信息不完整','design:type'];a6_0x5df3=function(){return _0xe19bfb;};return a6_0x5df3();}Object['defineProperty'](exports,a6_0x5dfd9d(0x1aa),{'value':!![]}),exports[a6_0x5dfd9d(0x199)]=void 0x0;class ApiError extends AnnError{}exports[a6_0x5dfd9d(0x199)]=ApiError,ApiError['TIMEOUT']=0x19003,ApiError[a6_0x5dfd9d(0x19a)]=0x18e72,ApiError['HEADERS_DEVICE']=0x18e73,ApiError[a6_0x5dfd9d(0x197)]=0x18e74,ApiError[a6_0x5dfd9d(0x1a1)]=0x18e75,ApiError[a6_0x5dfd9d(0x1a9)]=0x18e76,__decorate([AnnErrorMsg('请求超时,请重试'),__metadata(a6_0x5dfd9d(0x1a8),Object)],ApiError,a6_0x5dfd9d(0x19e),void 0x0),__decorate([AnnErrorMsg(a6_0x5dfd9d(0x1a7)),__metadata(a6_0x5dfd9d(0x1a8),Object)],ApiError,a6_0x5dfd9d(0x19a),void 0x0),__decorate([AnnErrorMsg(a6_0x5dfd9d(0x1ae)),__metadata(a6_0x5dfd9d(0x1a8),Object)],ApiError,'HEADERS_DEVICE',void 0x0),__decorate([AnnErrorMsg(a6_0x5dfd9d(0x1b0)),__metadata('design:type',Object)],ApiError,a6_0x5dfd9d(0x197),void 0x0),__decorate([AnnErrorMsg(a6_0x5dfd9d(0x1a6)),__metadata(a6_0x5dfd9d(0x1a8),Object)],ApiError,a6_0x5dfd9d(0x1a1),void 0x0),__decorate([AnnErrorMsg(a6_0x5dfd9d(0x1a3)),__metadata(a6_0x5dfd9d(0x1a8),Object)],ApiError,'TIMEOUT_LOGINTIME',void 0x0);
|
|
@@ -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
|
-
const
|
|
1
|
+
const a7_0x580900=a7_0x29e7;(function(_0x167cc8,_0x310383){const _0x3e08f2=a7_0x29e7,_0x551180=_0x167cc8();while(!![]){try{const _0x29cdd6=-parseInt(_0x3e08f2(0x197))/0x1*(parseInt(_0x3e08f2(0x198))/0x2)+-parseInt(_0x3e08f2(0x18a))/0x3*(-parseInt(_0x3e08f2(0x19c))/0x4)+-parseInt(_0x3e08f2(0x19b))/0x5*(parseInt(_0x3e08f2(0x199))/0x6)+parseInt(_0x3e08f2(0x18e))/0x7+parseInt(_0x3e08f2(0x190))/0x8*(-parseInt(_0x3e08f2(0x189))/0x9)+-parseInt(_0x3e08f2(0x196))/0xa+-parseInt(_0x3e08f2(0x187))/0xb*(-parseInt(_0x3e08f2(0x195))/0xc);if(_0x29cdd6===_0x310383)break;else _0x551180['push'](_0x551180['shift']());}catch(_0x4411e4){_0x551180['push'](_0x551180['shift']());}}}(a7_0x14cb,0x8caa5));const a7_0x4d6c72=(function(){let _0x45641d=!![];return function(_0xae170a,_0x24412d){const _0x55584d=_0x45641d?function(){if(_0x24412d){const _0x4f7ab3=_0x24412d['apply'](_0xae170a,arguments);return _0x24412d=null,_0x4f7ab3;}}:function(){};return _0x45641d=![],_0x55584d;};}()),a7_0x290c0e=a7_0x4d6c72(this,function(){const _0x20c8d9=a7_0x29e7;return a7_0x290c0e[_0x20c8d9(0x194)]()['search'](_0x20c8d9(0x18d))[_0x20c8d9(0x194)]()[_0x20c8d9(0x19a)](a7_0x290c0e)[_0x20c8d9(0x193)]('(((.+)+)+)+$');});a7_0x290c0e();'use strict';Object[a7_0x580900(0x18c)](exports,a7_0x580900(0x191),{'value':!![]}),exports[a7_0x580900(0x19d)]=getAppsConfig;const core_1=require(a7_0x580900(0x188)),action_1=require(a7_0x580900(0x18b));function a7_0x14cb(){const _0x51eb34=['toString','48YCJBZC','7953210pGqilk','1glZPfv','1079726DcYoWy','6wIFmuz','constructor','2061535KcCezp','6860ZrfkTq','getAppsConfig','APPSCONFIG_KEY','4257451kGvyqX','@midwayjs/core','4847913wHZMpR','480MWJzwN','../types/action','defineProperty','(((.+)+)+)+$','7278243ZNEuce','AppsConfigTmp','8YESDQy','__esModule','get','search'];a7_0x14cb=function(){return _0x51eb34;};return a7_0x14cb();}function a7_0x29e7(_0xb91111,_0x44aa85){const _0x29dc67=a7_0x14cb();return a7_0x29e7=function(_0x290c0e,_0x4d6c72){_0x290c0e=_0x290c0e-0x186;let _0x14cbb5=_0x29dc67[_0x290c0e];return _0x14cbb5;},a7_0x29e7(_0xb91111,_0x44aa85);}function getAppsConfig(_0x2f1edd){const _0x2e00b9=a7_0x580900,_0x87248c=(0x0,core_1['getClassMetadata'])(action_1[_0x2e00b9(0x186)],action_1[_0x2e00b9(0x18f)])||{};return _0x2f1edd?lodash[_0x2e00b9(0x192)](_0x87248c,_0x2f1edd):_0x87248c;}
|
|
@@ -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): {};
|