@anncic-api/event 3.7.50 → 4.0.0
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/configuration.d.ts +6 -6
- package/dist/configuration.js +1 -1
- package/dist/decorator/Event.d.ts +4 -4
- package/dist/decorator/Event.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/interface.d.ts +2 -2
- package/dist/interface.js +1 -1
- package/dist/service/EventService.d.ts +32 -32
- package/dist/service/EventService.js +1 -1
- package/package.json +7 -4
package/dist/configuration.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MidwayConfigService, MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
-
export declare class CustomConfiguration {
|
|
3
|
-
config: MidwayConfigService;
|
|
4
|
-
decorator: MidwayDecoratorService;
|
|
5
|
-
onReady(): Promise<void>;
|
|
6
|
-
}
|
|
1
|
+
import { MidwayConfigService, MidwayDecoratorService } from '@midwayjs/core';
|
|
2
|
+
export declare class CustomConfiguration {
|
|
3
|
+
config: MidwayConfigService;
|
|
4
|
+
decorator: MidwayDecoratorService;
|
|
5
|
+
onReady(): Promise<void>;
|
|
6
|
+
}
|
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a0_0x1101(_0x14b8e4,_0x459734){_0x14b8e4=_0x14b8e4-0x92;var _0x1519ef=a0_0x350b();var _0x5dd8a2=_0x1519ef[_0x14b8e4];return _0x5dd8a2;}var a0_0x53e9f6=a0_0x1101;(function(_0x8eaa57,_0x45c37f){var _0x59286a=a0_0x1101,_0x596556=_0x8eaa57();while(!![]){try{var _0x439871=-parseInt(_0x59286a(0xa2))/0x1+-parseInt(_0x59286a(0x9b))/0x2+-parseInt(_0x59286a(0x97))/0x3*(parseInt(_0x59286a(0xb1))/0x4)+parseInt(_0x59286a(0xad))/0x5+parseInt(_0x59286a(0x9e))/0x6+parseInt(_0x59286a(0xa3))/0x7+parseInt(_0x59286a(0xaa))/0x8;if(_0x439871===_0x45c37f)break;else _0x596556['push'](_0x596556['shift']());}catch(_0x18a96c){_0x596556['push'](_0x596556['shift']());}}}(a0_0x350b,0x949dd));var a0_0x229e29=(function(){var _0x132054=!![];return function(_0x583ba2,_0x5880e7){var _0x2d26ef=_0x132054?function(){var _0x3767bf=a0_0x1101;if(_0x5880e7){var _0x2c1194=_0x5880e7[_0x3767bf(0x9f)](_0x583ba2,arguments);return _0x5880e7=null,_0x2c1194;}}:function(){};return _0x132054=![],_0x2d26ef;};}()),a0_0x5dd8a2=a0_0x229e29(this,function(){var _0x473f13=a0_0x1101;return a0_0x5dd8a2['toString']()[_0x473f13(0xac)](_0x473f13(0xa9))[_0x473f13(0x9c)]()[_0x473f13(0x9d)](a0_0x5dd8a2)['search'](_0x473f13(0xa9));});a0_0x5dd8a2();'use strict';var __decorate=this&&this[a0_0x53e9f6(0xa5)]||function(_0x198510,_0x35c016,_0x4514f4,_0x207d07){var _0x234710=a0_0x53e9f6,_0x5c66=arguments[_0x234710(0xaf)],_0x5f0496=_0x5c66<0x3?_0x35c016:_0x207d07===null?_0x207d07=Object[_0x234710(0x9a)](_0x35c016,_0x4514f4):_0x207d07,_0x262d09;if(typeof Reflect===_0x234710(0x98)&&typeof Reflect[_0x234710(0xa0)]==='function')_0x5f0496=Reflect['decorate'](_0x198510,_0x35c016,_0x4514f4,_0x207d07);else{for(var _0x3c81a7=_0x198510[_0x234710(0xaf)]-0x1;_0x3c81a7>=0x0;_0x3c81a7--)if(_0x262d09=_0x198510[_0x3c81a7])_0x5f0496=(_0x5c66<0x3?_0x262d09(_0x5f0496):_0x5c66>0x3?_0x262d09(_0x35c016,_0x4514f4,_0x5f0496):_0x262d09(_0x35c016,_0x4514f4))||_0x5f0496;}return _0x5c66>0x3&&_0x5f0496&&Object[_0x234710(0xae)](_0x35c016,_0x4514f4,_0x5f0496),_0x5f0496;},__metadata=this&&this['__metadata']||function(_0xf5452f,_0x1862e4){var _0x147385=a0_0x53e9f6;if(typeof Reflect===_0x147385(0x98)&&typeof Reflect[_0x147385(0x96)]===_0x147385(0xb0))return Reflect[_0x147385(0x96)](_0xf5452f,_0x1862e4);};function a0_0x350b(){var _0x2266cf=['getOwnPropertyDescriptor','1905024TZUzbu','toString','constructor','5188770nzOYFG','apply','decorate','anncic-api:event','969963iaoBbm','8366491bynXfI','config','__decorate','design:type','Inject','__esModule','(((.+)+)+)+$','9152328LZdGBX','decorator','search','651405xJzJPZ','defineProperty','length','function','43412PVjkwY','CustomConfiguration','@midwayjs/core','onReady','MidwayConfigService','metadata','222PkvjJK','object','prototype'];a0_0x350b=function(){return _0x2266cf;};return a0_0x350b();}Object[a0_0x53e9f6(0xae)](exports,a0_0x53e9f6(0xa8),{'value':!![]}),exports[a0_0x53e9f6(0x92)]=void 0x0;const core_1=require(a0_0x53e9f6(0x93)),core_2=require(a0_0x53e9f6(0x93));let CustomConfiguration=class CustomConfiguration{async[a0_0x53e9f6(0x94)](){}};exports[a0_0x53e9f6(0x92)]=CustomConfiguration,__decorate([(0x0,core_1[a0_0x53e9f6(0xa7)])(),__metadata(a0_0x53e9f6(0xa6),core_2[a0_0x53e9f6(0x95)])],CustomConfiguration[a0_0x53e9f6(0x99)],a0_0x53e9f6(0xa4),void 0x0),__decorate([(0x0,core_1[a0_0x53e9f6(0xa7)])(),__metadata(a0_0x53e9f6(0xa6),core_2['MidwayDecoratorService'])],CustomConfiguration['prototype'],a0_0x53e9f6(0xab),void 0x0),exports[a0_0x53e9f6(0x92)]=CustomConfiguration=__decorate([(0x0,core_1['Configuration'])({'namespace':a0_0x53e9f6(0xa1)})],CustomConfiguration);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function Event(): ClassDecorator;
|
|
2
|
-
export declare namespace Event {
|
|
3
|
-
var On: (name: string, priority?: number, throttle?: number) => MethodDecorator;
|
|
4
|
-
}
|
|
1
|
+
export declare function Event(): ClassDecorator;
|
|
2
|
+
export declare namespace Event {
|
|
3
|
+
var On: (name: string, priority?: number, throttle?: number) => MethodDecorator;
|
|
4
|
+
}
|
package/dist/decorator/Event.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a1_0x2dacda=a1_0x32d6;(function(_0x23ae38,_0x708400){const _0x228ec2=a1_0x32d6,_0x52c144=_0x23ae38();while(!![]){try{const _0x47f327=-parseInt(_0x228ec2(0x1b5))/0x1+parseInt(_0x228ec2(0x1a7))/0x2*(parseInt(_0x228ec2(0x1ba))/0x3)+-parseInt(_0x228ec2(0x1a3))/0x4*(parseInt(_0x228ec2(0x1bc))/0x5)+parseInt(_0x228ec2(0x1a6))/0x6*(-parseInt(_0x228ec2(0x1a5))/0x7)+parseInt(_0x228ec2(0x1bb))/0x8*(-parseInt(_0x228ec2(0x1a9))/0x9)+-parseInt(_0x228ec2(0x1b1))/0xa*(parseInt(_0x228ec2(0x1b8))/0xb)+parseInt(_0x228ec2(0x1b7))/0xc*(parseInt(_0x228ec2(0x1aa))/0xd);if(_0x47f327===_0x708400)break;else _0x52c144['push'](_0x52c144['shift']());}catch(_0x21e6b1){_0x52c144['push'](_0x52c144['shift']());}}}(a1_0x2369,0x8ed3e));const a1_0x2cc6ab=(function(){let _0x2ec9aa=!![];return function(_0x48d4b5,_0x5b388e){const _0x48d08b=_0x2ec9aa?function(){if(_0x5b388e){const _0x38f53b=_0x5b388e['apply'](_0x48d4b5,arguments);return _0x5b388e=null,_0x38f53b;}}:function(){};return _0x2ec9aa=![],_0x48d08b;};}()),a1_0x45c4f2=a1_0x2cc6ab(this,function(){const _0x13922b=a1_0x32d6;return a1_0x45c4f2['toString']()[_0x13922b(0x1ad)](_0x13922b(0x1b0))[_0x13922b(0x1b2)]()['constructor'](a1_0x45c4f2)['search'](_0x13922b(0x1b0));});a1_0x45c4f2();'use strict';function a1_0x2369(){const _0x4c309=['__esModule','(((.+)+)+)+$','260NqrfHr','toString','MetadataManager','Scope','1150622jcUNzn','attachMetadata','2076UXEtra','335654AEvWGH','@midwayjs/core','3XjrFAW','217760LwCKuy','220NDsXgh','../interface','25240knODlg','Provide','6120877erZnxM','6VbTeqj','884550gbxYdi','DecoratorManager','45yPiSwn','253604ScXsYZ','EVENT_ON_KEY','saveModule','search','Request'];a1_0x2369=function(){return _0x4c309;};return a1_0x2369();}Object['defineProperty'](exports,a1_0x2dacda(0x1af),{'value':!![]}),exports['Event']=Event;const core_1=require(a1_0x2dacda(0x1b9)),core_2=require('@midwayjs/core'),interface_1=require(a1_0x2dacda(0x1bd));function a1_0x32d6(_0x41d4b0,_0x35a4dc){_0x41d4b0=_0x41d4b0-0x1a3;const _0x1fb74c=a1_0x2369();let _0x45c4f2=_0x1fb74c[_0x41d4b0];return _0x45c4f2;}function Event(){return _0x4b7324=>{const _0x3e6b3b=a1_0x32d6;(0x0,core_1[_0x3e6b3b(0x1a4)])()(_0x4b7324),core_2[_0x3e6b3b(0x1a8)][_0x3e6b3b(0x1ac)](interface_1['EVENT_KEY'],_0x4b7324),(0x0,core_1[_0x3e6b3b(0x1b4)])(core_1['ScopeEnum'][_0x3e6b3b(0x1ae)],{'allowDowngrade':!![]})(_0x4b7324);};}Event['On']=function(_0x577fb2,_0x22b3e7=0x0,_0x2c7561=0x1f4){return(_0x10a6e5,_0x46006a,_0x92c884)=>{const _0x317f30=a1_0x32d6;return core_2[_0x317f30(0x1b3)][_0x317f30(0x1b6)](interface_1[_0x317f30(0x1ab)],{'name':_0x577fb2,'priority':_0x22b3e7,'propertyKey':_0x46006a,'descriptor':_0x92c884,'throttle':_0x2c7561},_0x10a6e5),_0x92c884;};};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Event } from './decorator/Event';
|
|
2
|
-
export { EventService } from "./service/EventService";
|
|
3
|
-
export { CustomConfiguration as Configuration } from './configuration';
|
|
1
|
+
export { Event } from './decorator/Event';
|
|
2
|
+
export { EventService } from "./service/EventService";
|
|
3
|
+
export { CustomConfiguration as Configuration } from './configuration';
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a2_0x419a45=a2_0x18a0;(function(_0x4b6a98,_0x353f95){var _0x3c187e=a2_0x18a0,_0x1c3f75=_0x4b6a98();while(!![]){try{var _0x34e29b=parseInt(_0x3c187e(0x14f))/0x1+parseInt(_0x3c187e(0x155))/0x2*(parseInt(_0x3c187e(0x158))/0x3)+-parseInt(_0x3c187e(0x15a))/0x4*(-parseInt(_0x3c187e(0x150))/0x5)+parseInt(_0x3c187e(0x15c))/0x6+parseInt(_0x3c187e(0x162))/0x7+-parseInt(_0x3c187e(0x152))/0x8*(parseInt(_0x3c187e(0x14e))/0x9)+-parseInt(_0x3c187e(0x164))/0xa;if(_0x34e29b===_0x353f95)break;else _0x1c3f75['push'](_0x1c3f75['shift']());}catch(_0x1d86f8){_0x1c3f75['push'](_0x1c3f75['shift']());}}}(a2_0x5818,0x458c1));var a2_0x1572ed=(function(){var _0x2ad818=!![];return function(_0x406592,_0x29d0e3){var _0x1b1c53=_0x2ad818?function(){var _0x5c6366=a2_0x18a0;if(_0x29d0e3){var _0x5cbe09=_0x29d0e3[_0x5c6366(0x161)](_0x406592,arguments);return _0x29d0e3=null,_0x5cbe09;}}:function(){};return _0x2ad818=![],_0x1b1c53;};}()),a2_0x59072f=a2_0x1572ed(this,function(){var _0x3af6fe=a2_0x18a0;return a2_0x59072f[_0x3af6fe(0x159)]()[_0x3af6fe(0x15e)](_0x3af6fe(0x160))[_0x3af6fe(0x159)]()['constructor'](a2_0x59072f)[_0x3af6fe(0x15e)](_0x3af6fe(0x160));});a2_0x59072f();'use strict';Object['defineProperty'](exports,a2_0x419a45(0x15d),{'value':!![]}),exports[a2_0x419a45(0x153)]=exports['EventService']=exports[a2_0x419a45(0x151)]=void 0x0;var Event_1=require(a2_0x419a45(0x156));function a2_0x18a0(_0x4c6789,_0x2cdbb4){_0x4c6789=_0x4c6789-0x14e;var _0x1c1b98=a2_0x5818();var _0x59072f=_0x1c1b98[_0x4c6789];return _0x59072f;}Object['defineProperty'](exports,a2_0x419a45(0x151),{'enumerable':!![],'get':function(){return Event_1['Event'];}});function a2_0x5818(){var _0x4119f7=['298340nTWiWu','Event','4467296QcoxDA','Configuration','./configuration','2374SBzdVE','./decorator/Event','./service/EventService','861krDgPJ','toString','20JqMXWa','defineProperty','2511036NkNieS','__esModule','search','CustomConfiguration','(((.+)+)+)+$','apply','82040MfgMqr','EventService','6423860awYZmI','9tjYEPJ','416428AfrfPT'];a2_0x5818=function(){return _0x4119f7;};return a2_0x5818();}var EventService_1=require(a2_0x419a45(0x157));Object['defineProperty'](exports,a2_0x419a45(0x163),{'enumerable':!![],'get':function(){var _0xa187f8=a2_0x419a45;return EventService_1[_0xa187f8(0x163)];}});var configuration_1=require(a2_0x419a45(0x154));Object[a2_0x419a45(0x15b)](exports,a2_0x419a45(0x153),{'enumerable':!![],'get':function(){var _0x4af588=a2_0x419a45;return configuration_1[_0x4af588(0x15f)];}});
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const EVENT_KEY = "anncic-api:event";
|
|
2
|
-
export declare const EVENT_ON_KEY = "anncic-api:event:on";
|
|
1
|
+
export declare const EVENT_KEY = "anncic-api:event";
|
|
2
|
+
export declare const EVENT_ON_KEY = "anncic-api:event:on";
|
package/dist/interface.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a3_0xf35ef0=a3_0xd3b9;(function(_0x55f77d,_0x14585d){var _0xc62fb5=a3_0xd3b9,_0x1d2a70=_0x55f77d();while(!![]){try{var _0x4f174c=-parseInt(_0xc62fb5(0xb5))/0x1+parseInt(_0xc62fb5(0xc6))/0x2*(parseInt(_0xc62fb5(0xb9))/0x3)+parseInt(_0xc62fb5(0xb8))/0x4*(-parseInt(_0xc62fb5(0xc0))/0x5)+parseInt(_0xc62fb5(0xb3))/0x6*(parseInt(_0xc62fb5(0xc1))/0x7)+-parseInt(_0xc62fb5(0xbf))/0x8*(-parseInt(_0xc62fb5(0xb1))/0x9)+-parseInt(_0xc62fb5(0xbc))/0xa*(-parseInt(_0xc62fb5(0xbb))/0xb)+-parseInt(_0xc62fb5(0xc5))/0xc;if(_0x4f174c===_0x14585d)break;else _0x1d2a70['push'](_0x1d2a70['shift']());}catch(_0x4bd71b){_0x1d2a70['push'](_0x1d2a70['shift']());}}}(a3_0x1607,0x3d380));function a3_0xd3b9(_0x206f70,_0x398ad1){_0x206f70=_0x206f70-0xb1;var _0x4a9b1c=a3_0x1607();var _0x251971=_0x4a9b1c[_0x206f70];return _0x251971;}var a3_0x53d32f=(function(){var _0x517004=!![];return function(_0x22e449,_0x3d041b){var _0x37662c=_0x517004?function(){if(_0x3d041b){var _0x8930a=_0x3d041b['apply'](_0x22e449,arguments);return _0x3d041b=null,_0x8930a;}}:function(){};return _0x517004=![],_0x37662c;};}()),a3_0x251971=a3_0x53d32f(this,function(){var _0x390b41=a3_0xd3b9;return a3_0x251971[_0x390b41(0xba)]()[_0x390b41(0xb2)](_0x390b41(0xc4))['toString']()[_0x390b41(0xbe)](a3_0x251971)[_0x390b41(0xb2)]('(((.+)+)+)+$');});a3_0x251971();'use strict';function a3_0x1607(){var _0x55b72f=['search','1115754EizosM','__esModule','166569VmuTYH','anncic-api:event:on','EVENT_KEY','92zFUoXl','66828sAjFJd','toString','88429meKdYk','260uQFdAJ','EVENT_ON_KEY','constructor','8CfCHGy','21695HRmfoH','7zJGkam','anncic-api:event','defineProperty','(((.+)+)+)+$','6839760jyBMdG','22wfuMnz','4023801eEPxos'];a3_0x1607=function(){return _0x55b72f;};return a3_0x1607();}Object[a3_0xf35ef0(0xc3)](exports,a3_0xf35ef0(0xb4),{'value':!![]}),exports['EVENT_ON_KEY']=exports[a3_0xf35ef0(0xb7)]=void 0x0,exports['EVENT_KEY']=a3_0xf35ef0(0xc2),exports[a3_0xf35ef0(0xbd)]=a3_0xf35ef0(0xb6);
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { IMidwayApplication } from '@midwayjs/core';
|
|
2
|
-
export declare class EventService {
|
|
3
|
-
app: IMidwayApplication;
|
|
4
|
-
protected init: boolean;
|
|
5
|
-
protected listevent: {
|
|
6
|
-
[key: string]: {
|
|
7
|
-
priority: number;
|
|
8
|
-
throttle: number;
|
|
9
|
-
resolve: Function;
|
|
10
|
-
propertyKey: string;
|
|
11
|
-
}[];
|
|
12
|
-
};
|
|
13
|
-
protected listevent_throttle: {
|
|
14
|
-
[key: string]: number;
|
|
15
|
-
};
|
|
16
|
-
getListevent(name?: string): Promise<{
|
|
17
|
-
[key: string]: {
|
|
18
|
-
priority: number;
|
|
19
|
-
throttle: number;
|
|
20
|
-
resolve: Function;
|
|
21
|
-
propertyKey: string;
|
|
22
|
-
}[];
|
|
23
|
-
} | {
|
|
24
|
-
priority: number;
|
|
25
|
-
throttle: number;
|
|
26
|
-
resolve: Function;
|
|
27
|
-
propertyKey: string;
|
|
28
|
-
}[]>;
|
|
29
|
-
emit(name: string, ...args: any[]): Promise<void>;
|
|
30
|
-
once(name: string, ...args: any[]): Promise<boolean>;
|
|
31
|
-
off(name: string): Promise<boolean>;
|
|
32
|
-
}
|
|
1
|
+
import { IMidwayApplication } from '@midwayjs/core';
|
|
2
|
+
export declare class EventService {
|
|
3
|
+
app: IMidwayApplication;
|
|
4
|
+
protected init: boolean;
|
|
5
|
+
protected listevent: {
|
|
6
|
+
[key: string]: {
|
|
7
|
+
priority: number;
|
|
8
|
+
throttle: number;
|
|
9
|
+
resolve: Function;
|
|
10
|
+
propertyKey: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
protected listevent_throttle: {
|
|
14
|
+
[key: string]: number;
|
|
15
|
+
};
|
|
16
|
+
getListevent(name?: string): Promise<{
|
|
17
|
+
[key: string]: {
|
|
18
|
+
priority: number;
|
|
19
|
+
throttle: number;
|
|
20
|
+
resolve: Function;
|
|
21
|
+
propertyKey: string;
|
|
22
|
+
}[];
|
|
23
|
+
} | {
|
|
24
|
+
priority: number;
|
|
25
|
+
throttle: number;
|
|
26
|
+
resolve: Function;
|
|
27
|
+
propertyKey: string;
|
|
28
|
+
}[]>;
|
|
29
|
+
emit(name: string, ...args: any[]): Promise<void>;
|
|
30
|
+
once(name: string, ...args: any[]): Promise<boolean>;
|
|
31
|
+
off(name: string): Promise<boolean>;
|
|
32
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a4_0x48904f=a4_0x4381;(function(_0x4deb6e,_0x3fbc8e){const _0x506a5d=a4_0x4381,_0x2d80e2=_0x4deb6e();while(!![]){try{const _0x505459=parseInt(_0x506a5d(0x12f))/0x1+-parseInt(_0x506a5d(0x11e))/0x2*(parseInt(_0x506a5d(0x130))/0x3)+-parseInt(_0x506a5d(0x129))/0x4*(-parseInt(_0x506a5d(0x126))/0x5)+-parseInt(_0x506a5d(0x132))/0x6+parseInt(_0x506a5d(0x138))/0x7+parseInt(_0x506a5d(0x149))/0x8+-parseInt(_0x506a5d(0x14a))/0x9;if(_0x505459===_0x3fbc8e)break;else _0x2d80e2['push'](_0x2d80e2['shift']());}catch(_0x4baa1e){_0x2d80e2['push'](_0x2d80e2['shift']());}}}(a4_0x2d2b,0x8c88c));const a4_0x21c8ab=(function(){let _0x534460=!![];return function(_0x34f2e6,_0x572ccb){const _0x592aef=_0x534460?function(){const _0x3b6ee7=a4_0x4381;if(_0x572ccb){const _0x3daa8b=_0x572ccb[_0x3b6ee7(0x142)](_0x34f2e6,arguments);return _0x572ccb=null,_0x3daa8b;}}:function(){};return _0x534460=![],_0x592aef;};}()),a4_0x2eace3=a4_0x21c8ab(this,function(){const _0x364df1=a4_0x4381;return a4_0x2eace3['toString']()[_0x364df1(0x147)](_0x364df1(0x146))['toString']()['constructor'](a4_0x2eace3)[_0x364df1(0x147)](_0x364df1(0x146));});function a4_0x4381(_0x37da00,_0x2486e5){_0x37da00=_0x37da00-0x11c;const _0x274a2e=a4_0x2d2b();let _0x2eace3=_0x274a2e[_0x37da00];return _0x2eace3;}a4_0x2eace3();'use strict';var __decorate=this&&this[a4_0x48904f(0x136)]||function(_0x13b9ea,_0x615d77,_0x13cdc9,_0x17f253){const _0x3041be=a4_0x48904f;var _0x1a53dc=arguments[_0x3041be(0x13a)],_0x5c6847=_0x1a53dc<0x3?_0x615d77:_0x17f253===null?_0x17f253=Object['getOwnPropertyDescriptor'](_0x615d77,_0x13cdc9):_0x17f253,_0xc0fba0;if(typeof Reflect===_0x3041be(0x11f)&&typeof Reflect[_0x3041be(0x148)]===_0x3041be(0x11d))_0x5c6847=Reflect[_0x3041be(0x148)](_0x13b9ea,_0x615d77,_0x13cdc9,_0x17f253);else{for(var _0xb585d4=_0x13b9ea[_0x3041be(0x13a)]-0x1;_0xb585d4>=0x0;_0xb585d4--)if(_0xc0fba0=_0x13b9ea[_0xb585d4])_0x5c6847=(_0x1a53dc<0x3?_0xc0fba0(_0x5c6847):_0x1a53dc>0x3?_0xc0fba0(_0x615d77,_0x13cdc9,_0x5c6847):_0xc0fba0(_0x615d77,_0x13cdc9))||_0x5c6847;}return _0x1a53dc>0x3&&_0x5c6847&&Object['defineProperty'](_0x615d77,_0x13cdc9,_0x5c6847),_0x5c6847;},__metadata=this&&this[a4_0x48904f(0x133)]||function(_0x50a741,_0x1c9974){const _0x4fe818=a4_0x48904f;if(typeof Reflect===_0x4fe818(0x11f)&&typeof Reflect['metadata']===_0x4fe818(0x11d))return Reflect[_0x4fe818(0x135)](_0x50a741,_0x1c9974);};Object['defineProperty'](exports,a4_0x48904f(0x124),{'value':!![]}),exports[a4_0x48904f(0x127)]=void 0x0;const collect_js_1=require(a4_0x48904f(0x140)),core_1=require('@midwayjs/core'),core_2=require(a4_0x48904f(0x13e)),interface_1=require('../interface');function a4_0x2d2b(){const _0x223831=['propertyKey','default','now','515663ssnhIO','60LRPocn','design:type','2660322LrAwBy','__metadata','throttle','metadata','__decorate','getListevent','5232052qwakio','EVENT_KEY','length','name','DecoratorManager','all','@midwayjs/core','init','collect.js','listevent','apply','Scope','stringify','listModule','(((.+)+)+)+$','search','decorate','7984384WfWrIT','11310300jHASqE','app','getOwnMetadata','priority','MetadataManager','prototype','function','81296GmjQnC','object','EVENT_ON_KEY','Singleton','off','emit','__esModule','listevent_throttle','1034410XekKZB','EventService','resolve','16MWnfvf','push','Provide'];a4_0x2d2b=function(){return _0x223831;};return a4_0x2d2b();}let EventService=class EventService{constructor(){const _0x5d2f64=a4_0x48904f;this[_0x5d2f64(0x13f)]=![];}async[a4_0x48904f(0x137)](_0xe84a73){const _0x3fbf3c=a4_0x48904f;if(!this[_0x3fbf3c(0x13f)]){this['init']=!![],this[_0x3fbf3c(0x141)]={},this[_0x3fbf3c(0x125)]={};for(const _0x86c273 of core_2[_0x3fbf3c(0x13c)][_0x3fbf3c(0x145)](interface_1[_0x3fbf3c(0x139)])||[]){const _0x409df5=await this[_0x3fbf3c(0x14b)]['getApplicationContext']()['getAsync'](_0x86c273);for(const _0x4e96e8 of core_2[_0x3fbf3c(0x14e)][_0x3fbf3c(0x14c)](interface_1[_0x3fbf3c(0x120)],_0x86c273)||[]){typeof(_0x409df5[_0x4e96e8['propertyKey']]==_0x3fbf3c(0x11d))&&(!this[_0x3fbf3c(0x141)][_0x4e96e8[_0x3fbf3c(0x13b)]]&&(this['listevent'][_0x4e96e8['name']]=[]),this[_0x3fbf3c(0x141)][_0x4e96e8['name']][_0x3fbf3c(0x12a)]({'priority':(_0x4e96e8===null||_0x4e96e8===void 0x0?void 0x0:_0x4e96e8[_0x3fbf3c(0x14d)])||0x0,'throttle':(_0x4e96e8===null||_0x4e96e8===void 0x0?void 0x0:_0x4e96e8[_0x3fbf3c(0x134)])||0x1f4,'resolve':_0x409df5[_0x4e96e8[_0x3fbf3c(0x12c)]]['bind'](_0x409df5),'propertyKey':_0x86c273[_0x3fbf3c(0x13b)]+'@'+_0x4e96e8[_0x3fbf3c(0x12c)]}));}}for(const _0x32af2c in this[_0x3fbf3c(0x141)]){this[_0x3fbf3c(0x141)][_0x32af2c]=(0x0,collect_js_1[_0x3fbf3c(0x12d)])(this[_0x3fbf3c(0x141)][_0x32af2c])['sortByDesc'](_0x3fbf3c(0x14d))[_0x3fbf3c(0x13d)]();}}return _0xe84a73?this[_0x3fbf3c(0x141)][_0xe84a73]||[]:this[_0x3fbf3c(0x141)];}async[a4_0x48904f(0x123)](_0x4045f5,..._0x597f40){const _0x53ca65=a4_0x48904f;var _0x20414b,_0x237057,_0x249eeb,_0x5890be,_0x1676f4;const _0x92b786=''+JSON[_0x53ca65(0x144)](_0x597f40),_0x50662f=Date[_0x53ca65(0x12e)]();await this[_0x53ca65(0x137)]();for(let _0x56fcfe in this[_0x53ca65(0x125)]){this['listevent_throttle'][_0x56fcfe]<_0x50662f&&delete this['listevent_throttle'][_0x56fcfe];}for(let _0x12a6aa in(_0x20414b=this[_0x53ca65(0x141)])===null||_0x20414b===void 0x0?void 0x0:_0x20414b[_0x4045f5]){if(((_0x237057=this[_0x53ca65(0x141)][_0x4045f5])===null||_0x237057===void 0x0?void 0x0:_0x237057[_0x12a6aa])&&typeof((_0x5890be=(_0x249eeb=this['listevent'][_0x4045f5])===null||_0x249eeb===void 0x0?void 0x0:_0x249eeb[_0x12a6aa])===null||_0x5890be===void 0x0?void 0x0:_0x5890be[_0x53ca65(0x128)])=='function'){const _0x445943=_0x4045f5+'_'+_0x12a6aa+'@'+_0x92b786;(this[_0x53ca65(0x125)][_0x445943]||0x0)<_0x50662f&&(this[_0x53ca65(0x125)][_0x445943]=_0x50662f+(((_0x1676f4=this[_0x53ca65(0x141)][_0x4045f5][_0x12a6aa])===null||_0x1676f4===void 0x0?void 0x0:_0x1676f4['throttle'])||0x1f4),await this[_0x53ca65(0x141)][_0x4045f5][_0x12a6aa]['resolve'](..._0x597f40));}}}async['once'](_0x21bfa7,..._0x5c0861){const _0x25a914=a4_0x48904f;return await this['getListevent'](),await this[_0x25a914(0x123)](_0x21bfa7,..._0x5c0861),this[_0x25a914(0x122)](_0x21bfa7);}async[a4_0x48904f(0x122)](_0x6ea638){const _0x24cf39=a4_0x48904f;return await this['getListevent'](),this['listevent'][_0x6ea638]&&delete this[_0x24cf39(0x141)][_0x6ea638],!!this[_0x24cf39(0x141)][_0x6ea638];}};exports[a4_0x48904f(0x127)]=EventService,__decorate([(0x0,core_1['MainApp'])(),__metadata(a4_0x48904f(0x131),Object)],EventService[a4_0x48904f(0x11c)],a4_0x48904f(0x14b),void 0x0),exports['EventService']=EventService=__decorate([(0x0,core_1[a4_0x48904f(0x12b)])('event'),(0x0,core_1[a4_0x48904f(0x143)])(core_1['ScopeEnum'][a4_0x48904f(0x121)])],EventService);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anncic-api/event",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -11,13 +11,16 @@
|
|
|
11
11
|
"registry": "https://registry.npmjs.org/"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"
|
|
15
|
-
|
|
14
|
+
"collect.js": "^4.36.1"
|
|
15
|
+
},
|
|
16
|
+
"peerDependencies": {
|
|
17
|
+
"@midwayjs/core": "^4.2.6"
|
|
16
18
|
},
|
|
17
19
|
"devDependencies": {
|
|
20
|
+
"@midwayjs/core": "^4.2.6",
|
|
18
21
|
"@types/node": "20.10.0",
|
|
19
22
|
"javascript-obfuscator": "^4.0.2",
|
|
20
|
-
"typescript": "
|
|
23
|
+
"typescript": "~5.9.3"
|
|
21
24
|
},
|
|
22
25
|
"gitHead": "f7d4644d5e0591c4b383021edab6db20d1714880",
|
|
23
26
|
"scripts": {
|