Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
WORK IN PROGRESS
[key-jee]
- abbreviation: (CAGEY) Create A Game Engine Yourself
- adjective: cautious, wary, or shrewd
- adjective: Nicolas Cage-like
Logo created with https://logomakr.com
Cagey is a code philosophy that makes the development of stateful game servers in Node.js easy, testable, flexible and maintainable. It provides a foundation of rules for how things are supposed to connect, and an ecosystem of plugins that follow this. The whole point of Cagey is to make integration with other technologies obvious and simple, while keeping a very strict separation of concerns. For more information on these rules that plugins need to follow, please read [#plugin-development](Plugin development).
Software development (which very much includes framework development) is not a solved problem. And as we move on and try new concepts, we have to make some very strict decisions. That does not mean we believe these truths to be objective truths, nor that we won't ever change our minds on these.
There are several layers at which you can observe your server technology. At its very heart, we want as much of our code as possible to reflect business logic, not framework patterns, or the database we chose, or the network technology, etc. If we ever want to switch frameworks, databases, KPI services, etc. this should be as painless as possible. The fundamental nature of our business logic should not be contaminated by these choices.
Cagey attempts to solve this by keeping concerns separated as follows:
This installs Cagey core and the most commonly used plugins:
npm install cagey cagey-sessions cagey-peer-network cagey-client-messenger
See the ./examples folder and the various plugins for examples.
Many Cagey API emit events. All events may be listened to with async (...) => {}
functions. The execution will only
progress once all their promises have been resolved, and no errors were thrown.
A cagey object provides process lifecycle management features.
factory
const cagey = require('cagey').create({ log });
Creates and returns an instance of the Cagey
class. You must pass a cagey-logger
instance in an object.
async cagey.shutdown()
This emits:
"beforeShutdown" ()
on the cagey instance."shutdown" ()
on the cagey instance.The events being emitted can be used to stop certain subsystems, and close connections.
Please note that this method does not kill the process. Cagey expects you to clean up or unref all I/O handlers, so that Node.js will gracefully shut down when all work is done. If you really insist on killing the process, you can do this manually:
cagey.on('shutdown', () => { process.exit(0); });
When developing plugins for Cagey, please keep the following rules in mind.
examples/
folder, in your ReadMe file or in documentation elsewhere).cagey-
.[subsystem-name]
.debug
level; leave higher levels to user land.emitAsync
so listeners can safely do I/O if they need to.Your plugin should expose itself through a create(apis, options)
method on the module:
exports.create = function (apis, options) {
return new MyPlugin(apis, options);
};
The constructor of your plugin can destructure the apis
argument:
const EventEmitter = require('eventemitter2').EventEmitter2;
class MyPlugin extends EventEmitter {
constructor({ log }, options) {
super();
this.log = log;
}
}
After that, it's up to you to shape your API.
MIT
Cagey is developed and maintained by Wizcorp.
FAQs
Cagey game framework
The npm package cagey receives a total of 5 weekly downloads. As such, cagey popularity was classified as not popular.
We found that cagey demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.