mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-24 08:23:12 +09:00
Change to new preprocessor style
This commit is contained in:
37 files changed
+692
-2193
No files matched your search
@@ -1,79 +1,102 @@
|
||||
"use strict";
|
||||
const lib = require("@clusterio/lib");
|
||||
const messages = require("./messages");
|
||||
const Messages = require("./messages");
|
||||
|
||||
lib.definePermission({
|
||||
name: "// plugin_name //.example.permission.event",
|
||||
name: "__plugin_name__.example.permission.event",
|
||||
title: "Example permission event",
|
||||
description: "My plugin's example permission that I forgot to remove",
|
||||
});
|
||||
|
||||
lib.definePermission({
|
||||
name: "// plugin_name //.example.permission.request",
|
||||
name: "__plugin_name__.example.permission.request",
|
||||
title: "Example permission request",
|
||||
description: "My plugin's example permission that I forgot to remove",
|
||||
});// [subscribable] //
|
||||
});
|
||||
//%if controller & web // Subscribing requires web content and the controller
|
||||
|
||||
lib.definePermission({
|
||||
name: "// plugin_name //.example.permission.subscribe",
|
||||
name: "__plugin_name__.example.permission.subscribe",
|
||||
title: "Example permission subscribe",
|
||||
description: "My plugin's example permission that I forgot to remove",
|
||||
});// [] //// [web] //
|
||||
});
|
||||
//%endif
|
||||
//%if web
|
||||
|
||||
lib.definePermission({
|
||||
name: "// plugin_name //.page.view",
|
||||
name: "__plugin_name__.page.view",
|
||||
title: "Example page view permission",
|
||||
description: "My plugin's example page permission that I forgot to remove",
|
||||
});// [] //
|
||||
});
|
||||
//%endif
|
||||
|
||||
const plugin = {
|
||||
name: "// plugin_name //",
|
||||
title: "// plugin_name //",
|
||||
description: "I didn't update my description",// [entry_points] //
|
||||
// entry_points //
|
||||
// [] //// [controller] //
|
||||
description: "I didn't update my description",
|
||||
//%if controller
|
||||
|
||||
controllerEntrypoint: "./dist/node/controller",
|
||||
controllerConfigFields: {
|
||||
"// plugin_name //.myControllerField": {
|
||||
"__plugin_name__.myControllerField": {
|
||||
title: "My Controller Field",
|
||||
description: "This should be removed",
|
||||
type: "string",
|
||||
initialValue: "Remove Me",
|
||||
},
|
||||
},// [] //// [host] //
|
||||
},
|
||||
//%endif
|
||||
//%if host
|
||||
|
||||
hostEntrypoint: "./dist/node/host",
|
||||
hostConfigFields: {
|
||||
"// plugin_name //.myHostField": {
|
||||
"__plugin_name__.myHostField": {
|
||||
title: "My Host Field",
|
||||
description: "This should be removed",
|
||||
type: "string",
|
||||
initialValue: "Remove Me",
|
||||
},
|
||||
},// [] //// [instance] //
|
||||
},
|
||||
//%endif
|
||||
//%if instance
|
||||
|
||||
instanceEntrypoint: "./dist/node/instance",
|
||||
instanceConfigFields: {
|
||||
"// plugin_name //.myInstanceField": {
|
||||
"__plugin_name__.myInstanceField": {
|
||||
title: "My Instance Field",
|
||||
description: "This should be removed",
|
||||
type: "string",
|
||||
initialValue: "Remove Me",
|
||||
},
|
||||
},// [] //// [ctl] //
|
||||
},
|
||||
//%endif
|
||||
//%if ctl
|
||||
|
||||
ctlEntrypoint: "./dist/node/ctl",
|
||||
controlConfigFields: {
|
||||
"// plugin_name //.myControlField": {
|
||||
"__plugin_name__.myControlField": {
|
||||
title: "My Control Field",
|
||||
description: "This should be removed",
|
||||
type: "string",
|
||||
initialValue: "Remove Me",
|
||||
},
|
||||
},// [] //
|
||||
},
|
||||
//%endif
|
||||
|
||||
messages: [
|
||||
messages.PluginExampleEvent,
|
||||
messages.PluginExampleRequest,// [subscribable] //
|
||||
messages.ExampleSubscribableUpdate,// [] //
|
||||
Messages.PluginExampleEvent,
|
||||
Messages.PluginExampleRequest,
|
||||
//%if controller & web // Subscribing requires web content and the controller
|
||||
Messages.ExampleSubscribableUpdate,
|
||||
//%endif
|
||||
],
|
||||
//%if controller | web // The controller always includes web entry even if there is no content
|
||||
|
||||
webEntrypoint: "./web",
|
||||
routes: [],
|
||||
//%endif
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
plugin,
|
||||
PluginExampleEvent,
|
||||
PluginExampleRequest,
|
||||
};
|
||||
Reference in new issue
Block a user