mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 00:13:12 +09:00
Port remaining plugins to Typescript (#499)
* .js to .ts * Allow access to _items entries; getItemCount return number * add permission field to PluginPage interface * port plugins to typescript * update Request classes * fix IpcFlowType
This commit is contained in:
1 parent
50f12c719b
commit
0b3550b472
51 files changed
+1033
-1026
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import * as lib from "@clusterio/lib";
|
||||
import * as messages from "./messages";
|
||||
|
||||
class ControllerConfigGroup extends lib.PluginConfigGroup {}
|
||||
ControllerConfigGroup.defaultAccess = ["controller", "host", "control"];
|
||||
ControllerConfigGroup.groupName = "player_auth";
|
||||
ControllerConfigGroup.define({
|
||||
name: "code_length",
|
||||
title: "Code Length",
|
||||
description: "Length in characters of the generated codes.",
|
||||
type: "number",
|
||||
initial_value: 6,
|
||||
});
|
||||
ControllerConfigGroup.define({
|
||||
name: "code_timeout",
|
||||
title: "Code Timeout",
|
||||
description: "Time in seconds for the generated codes to stay valid.",
|
||||
type: "number",
|
||||
initial_value: 120,
|
||||
});
|
||||
ControllerConfigGroup.finalize();
|
||||
|
||||
const info: lib.PluginInfo = {
|
||||
name: "player_auth",
|
||||
title: "Player Auth",
|
||||
description: "Provides authentication to the cluster via logging into a Factorio server.",
|
||||
controllerEntrypoint: "dist/plugin/controller",
|
||||
instanceEntrypoint: "dist/plugin/instance",
|
||||
webEntrypoint: "./web",
|
||||
ControllerConfigGroup,
|
||||
|
||||
messages: [
|
||||
messages.FetchPlayerCodeRequest,
|
||||
messages.SetVerifyCodeRequest,
|
||||
],
|
||||
};
|
||||
|
||||
export default info;
|
||||
Reference in new issue
Block a user