mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-25 16:33:12 +09:00
Add shared mods management
Add the ability to manage a set of mods to be shared by the master server to the rest of the cluster. This implements storage, uploads, downloads, deletetion, and listing details of mods but does not actually do anything with the stored mods.
This commit is contained in:
1 parent
2ab915cc00
commit
3b57c1e0ae
23 files changed
+1311
-5
No files matched your search
@@ -1,8 +1,9 @@
|
||||
// Message definitions for links
|
||||
"use strict";
|
||||
const libSchema = require("../schema");
|
||||
const libData = require("../data");
|
||||
const libErrors = require("../errors");
|
||||
const { logger } = require("../logging");
|
||||
const libSchema = require("../schema");
|
||||
const PlayerStats = require("../PlayerStats");
|
||||
|
||||
class MissingLinkHandlerError extends Error {
|
||||
@@ -709,6 +710,67 @@ messages.sendRcon = new Request({
|
||||
},
|
||||
});
|
||||
|
||||
messages.getMod = new Request({
|
||||
type: "get_mod",
|
||||
links: ["control-master"],
|
||||
permission: "core.mod.get",
|
||||
requestProperties: {
|
||||
"name": { type: "string" },
|
||||
"version": { type: "string" },
|
||||
},
|
||||
responseProperties: {
|
||||
"mod": libData.ModInfo.jsonSchema,
|
||||
},
|
||||
});
|
||||
|
||||
messages.listMods = new Request({
|
||||
type: "list_mods",
|
||||
links: ["control-master"],
|
||||
permission: "core.mod.list",
|
||||
responseProperties: {
|
||||
"list": {
|
||||
type: "array",
|
||||
items: libData.ModInfo.jsonSchema,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
messages.setModSubscriptions = new Request({
|
||||
type: "set_mod_subscriptions",
|
||||
links: ["control-master"],
|
||||
permission: "core.mod.subscribe",
|
||||
requestProperties: {
|
||||
"all": { type: "boolean" },
|
||||
"mod_names": {
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
messages.downloadMod = new Request({
|
||||
type: "download_mod",
|
||||
links: ["control-master"],
|
||||
permission: "core.mod.download",
|
||||
requestProperties: {
|
||||
"name": { type: "string" },
|
||||
"version": { type: "string" },
|
||||
},
|
||||
responseProperties: {
|
||||
"stream_id": { type: "string" },
|
||||
},
|
||||
});
|
||||
|
||||
messages.deleteMod = new Request({
|
||||
type: "delete_mod",
|
||||
links: ["control-master"],
|
||||
permission: "core.mod.delete",
|
||||
requestProperties: {
|
||||
"name": { type: "string" },
|
||||
"version": { type: "string" },
|
||||
},
|
||||
});
|
||||
|
||||
messages.listPermissions = new Request({
|
||||
type: "list_permissions",
|
||||
links: ["control-master"],
|
||||
@@ -1263,6 +1325,14 @@ messages.saveListUpdate = new Event({
|
||||
},
|
||||
});
|
||||
|
||||
messages.modUpdate = new Event({
|
||||
type: "mod_update",
|
||||
links: ["master-control"],
|
||||
eventProperties: {
|
||||
"mod": libData.ModInfo.jsonSchema,
|
||||
},
|
||||
});
|
||||
|
||||
messages.userUpdate = new Event({
|
||||
type: "user_update",
|
||||
links: ["master-control"],
|
||||
|
||||
Reference in new issue
Block a user