Built motion from commit f738f9592c388b9f9eb3948f400a5c9d717a3561. Version 3.0.0...
[motion-next.git] / server / api / plugin / plugin.events.js
index 7fd24e9..d5ef462 100644 (file)
@@ -1 +1 @@
-const a619_0x22aa=['emit','events','undefined','remove','exports','setMaxListeners','Plugin','save'];(function(_0xf21bb1,_0x92e4d0){const _0x22aa96=function(_0x475be1){while(--_0x475be1){_0xf21bb1['push'](_0xf21bb1['shift']());}};_0x22aa96(++_0x92e4d0);}(a619_0x22aa,0x73));const a619_0x475b=function(_0xf21bb1,_0x92e4d0){_0xf21bb1=_0xf21bb1-0x65;let _0x22aa96=a619_0x22aa[_0xf21bb1];return _0x22aa96;};const a619_0x5134d2=a619_0x475b;'use strict';const EventEmitter=require(a619_0x5134d2(0x6b)),Plugin=require('../../mysqldb')['db'][a619_0x5134d2(0x68)],PluginEvents=new EventEmitter();PluginEvents[a619_0x5134d2(0x67)](0x0);const events={'afterCreate':a619_0x5134d2(0x69),'afterUpdate':'update','afterDestroy':a619_0x5134d2(0x65)};function emitEvent(_0x1389bc){return function(_0x15c15a){const _0x4ca9cd=a619_0x475b;PluginEvents[_0x4ca9cd(0x6a)](_0x1389bc+':'+_0x15c15a['id'],_0x15c15a),PluginEvents['emit'](_0x1389bc,_0x15c15a);};}for(const e in events){if(typeof events[e]!==a619_0x5134d2(0x6c)){const event=events[e];Plugin['addHook'](e,emitEvent(event));}}module[a619_0x5134d2(0x66)]=PluginEvents;
\ No newline at end of file
+const a619_0x537b=['save','addHook','setMaxListeners','Plugin','undefined','exports','emit'];(function(_0x345e14,_0xf6dbd){const _0x537b2f=function(_0x5f3acf){while(--_0x5f3acf){_0x345e14['push'](_0x345e14['shift']());}};_0x537b2f(++_0xf6dbd);}(a619_0x537b,0xd2));const a619_0x5f3a=function(_0x345e14,_0xf6dbd){_0x345e14=_0x345e14-0x18f;let _0x537b2f=a619_0x537b[_0x345e14];return _0x537b2f;};const a619_0x3f9c82=a619_0x5f3a;'use strict';const EventEmitter=require('events'),Plugin=require('../../mysqldb')['db'][a619_0x3f9c82(0x192)],PluginEvents=new EventEmitter();PluginEvents[a619_0x3f9c82(0x191)](0x0);const events={'afterCreate':a619_0x3f9c82(0x18f),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1861d4){return function(_0x3348ec){const _0x598b08=a619_0x5f3a;PluginEvents['emit'](_0x1861d4+':'+_0x3348ec['id'],_0x3348ec),PluginEvents[_0x598b08(0x195)](_0x1861d4,_0x3348ec);};}for(const e in events){if(typeof events[e]!==a619_0x3f9c82(0x193)){const event=events[e];Plugin[a619_0x3f9c82(0x190)](e,emitEvent(event));}}module[a619_0x3f9c82(0x194)]=PluginEvents;
\ No newline at end of file