Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools oft miss.
colyseus-events
Advanced tools
generate notification events from colyseus state. forked from https://github.com/amir-arad/colyseus-mobx
Due to breaking API changes in Colyseus, this version only supports Colyseus 0.14 and above (@colyseus/schema >= 1.0.2)
The schema types new to Colyseus 0.14 (CollectionSchema
and SetSchema
) are not yet supported. please open an issue if you would like to use them.
npm install colyseus-events --save
Import wireEvents
and call it once when connecting to a room on the client side,
import { wireEvents } from 'colyseus-events';
const room: Room<GameState> = await client.joinOrCreate("game");
const events = wireEvents(room.state, new EventEmitter(), "state");
then you can wire listeners to events
and start triggering them.
whenever something changes in the state, an event will be emitted immediately. the name of the event will be the path of the changed property (or element). The event value will be the new value of that property or element. for convenience, the second value will be the event name. this can be helpful for listeners thatregister for more that one property.
examples:
when the server executes: state.foo.bar = 15
event 'state.foo.bar'
will be emitted with values 15
and 'state.foo.bar'
.
when the server executes: state.foo.bar.push(15)
event 'state.foo.bar[0]'
will be emitted with values 15
and 'state.foo.bar[0]'
.
## Contributor instructions
### Installing workspace
to install a development environment, you need to have node.js git installd.
Then, `git clone` this repo locally and run:
$ npm install $ npm test
and that's it, you've just installed the development environment!
This project is written with [VSCode](https://code.visualstudio.com/) in mind. specifically configured for these extensions: [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint), [esbenp.prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).
### test
`npm run test`
execute all tests.
### clean
`npm run clean`
Removes any built code and any built executables.
### build
`npm run build`
Cleans, then builds the library.
Your built code will be in the `./dist/` directory.
FAQs
generate notification events from colyseus state
The npm package colyseus-events receives a total of 1 weekly downloads. As such, colyseus-events popularity was classified as not popular.
We found that colyseus-events demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools oft miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.