Team-Silver-Sphere / SquadJS

Squad Server Script Framework
Boost Software License 1.0
167 stars 127 forks source link

Plugin Overhaul #372

Open Thomas-Smyth opened 3 months ago

Thomas-Smyth commented 3 months ago

Introduction

Currently, there is a backlog of 8 issues and 13 pull requests related to plugin development. Many of these requests outdated, with the oldest issue over four years old and the oldest pull request over three. Requests and changes relating to plugins are challenging for maintainers. As many maintainers do not actively use all the plugins in their communities, they lack an environment to adequately test new or updated plugins. Additionally, plugins significantly expand the codebase, complicating overall testing and maintenance of SquadJS. This results in insufficiently reviewed pull requests or outright rejection, discouraging contributors and inhibiting innovation.

Solution

This pull request proposes that all plugins are evicted from this repository. In exchange, it implements extensive quality of life improvements making plugin development and publication easier. The aim of this proposal is to reduce the burden plugins place on SquadJS maintainers allowing them to focus on improving SquadJS's core functionality. Moreover, it aims to better foster the community of plugin developers encouraging them to collaboratively maintain the plugins they actively use.

The promise of this approach is highlighted within JetDave (@fantinodavide)'s work. JetDave manages over 12 different plugins which I understand are used by his community or communities he has strong ties to. This provides him an environment to adequately test the plugins, and by extension, far more qualified to manage the maintenance of them. Assuming this responsibility by running his own repositories, he takes the burden off of SquadJS maintainers whilst improving how well the plugins are maintained. Furthermore, each plugin having its own repository allows other to contribute and him to accept these contributions with less fear of breaking SquadJS's core functionality or other plugins.

Going forward, the aim will be to better formalise the communication between SquadJS's core functionality and plugins. This will be implement through the adoption of Typescript to document the available properties and methods that plugins can access, implement and call.

Changes

This pull request:

I implore people to read the updated documentation for more detail.

Further Changes

Going forwards, we will need to:

The latter of these changes is key to prevent a massive drop in functionality. However, I do not propose delaying the merge until this is completed. Doing so will delay significant improvements to SquadJS and discourage people from adopting the aims of the project.

Testing

This has been tested in a small test environment. Further testing will be required from others and in large environments.

wesley-931 commented 3 months ago

Question, I see no "build" in the "scripts" section of the package.json.

I only see tsx index.ts, this might impact peformance correct?

Will there be a way to deploy the builded version of the TS to JS?

Like something in the way of:

    "build": "npx tsc && npx tsc-alias",
    "start:prod": "node dist/index.js",