Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@rbxts/flamework-gateways-mod
Advanced tools
🌉flamework-gateways-mod🌉
🌉 Gateways - Handle remote events and functions with classes
🛡️ Guards - Block certain requests before they are processed
📞 Pipes - Transform and validate parameters passed to requests
This is mainly a personal project to handle remotes with classes and decorators.
❌ Client-side RemoteFunctions are not supported
npm install @flamework/core@modding
npm install -D rbxts-transformer-flamework@modding
npm install @rbxts/flamework-gateways-mod
connectServer
and connectClient
should be called before igniting Flamework.
const server = connectServer<ServerGateway, ClientGateway>();
server.emit("clientEvent", players, ...args);
server.broadcast("clientEvent", ...args);
const client = connectClient<ServerGateway, ClientGateway>();
client.emit("serverEvent", ...args);
await client.request("serverInvoke", ...args);
Gateways should be added to Flamework.addPaths()
.
@Gateway({
guards: [new AdminGuard(["littensy"])],
})
class AdminGateway {
constructor(private readonly adminService: AdminService) {}
@OnEvent()
@UsePipes([], CommandPipe)
async processCommand(player: Player, message: string): Promise<void>;
async processCommand(player: Player, tokens: string | Array<string>) {
this.adminService.runCommand(player, tokens as Array<string>);
}
@OnInvoke()
async getCommands() {
return this.adminService.getCommands();
}
}
class AdminGuard implements CanActivate {
constructor(private readonly admins: Array<string>) {}
canActivate(context: ExecutionContext)
return this.admins.includes(context.getPlayer().Name);
}
}
class CommandPipe implements PipeTransform {
transform(value: unknown) {
assert(typeIs(value, "string"), "(CommandPipe) Value must be a string");
return value.split(" ");
}
}
FAQs
A class-based Flamework networking mod
The npm package @rbxts/flamework-gateways-mod receives a total of 15 weekly downloads. As such, @rbxts/flamework-gateways-mod popularity was classified as not popular.
We found that @rbxts/flamework-gateways-mod demonstrated a not healthy version release cadence and project activity because the last version was released 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
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.