34 lines
850 B
JavaScript
34 lines
850 B
JavaScript
import {gather} from '@latus/core';
|
|
|
|
import badPacketsCheck from './packet/bad-packets-check';
|
|
import Bundle from './packet/bundle';
|
|
import Refresh from './packet/refresh';
|
|
|
|
export * from './hooks';
|
|
export {default as normalize} from './normalize';
|
|
export {default as Packet, Packer, ValidationError} from './packet';
|
|
export {default as packets} from './packet/packets';
|
|
|
|
export default {
|
|
hooks: {
|
|
'@latus/core/config': () => ({
|
|
authenticate: [],
|
|
connect: [],
|
|
}),
|
|
'@latus/core/starting': (latus) => {
|
|
// eslint-disable-next-line no-param-reassign
|
|
latus.config['%packets'] = gather(
|
|
latus,
|
|
{
|
|
type: '@latus/socket/packets',
|
|
check: badPacketsCheck,
|
|
},
|
|
);
|
|
},
|
|
'@latus/socket/packets': (latus) => ({
|
|
Bundle: Bundle(latus),
|
|
Refresh,
|
|
}),
|
|
},
|
|
};
|