diff --git a/exp_groups/controller.ts b/exp_groups/controller.ts new file mode 100644 index 00000000..fc761f62 --- /dev/null +++ b/exp_groups/controller.ts @@ -0,0 +1,6 @@ +import * as lib from "@clusterio/lib"; +import { BaseControllerPlugin } from "@clusterio/controller"; + +export class ControllerPlugin extends BaseControllerPlugin { + +} diff --git a/exp_groups/index.ts b/exp_groups/index.ts new file mode 100644 index 00000000..14fe26e0 --- /dev/null +++ b/exp_groups/index.ts @@ -0,0 +1,22 @@ +import * as lib from "@clusterio/lib"; + +declare module "@clusterio/lib" { + export interface InstanceConfigFields { + } + export interface ControllerConfigFields { + } +} + +export const plugin: lib.PluginDeclaration = { + name: "exp_groups", + title: "ExpGaming - Permission Groups", + description: "Clusterio plugin providing syncing of permission groups", + + instanceEntrypoint: "./dist/node/instance", + instanceConfigFields: { + }, + + controllerEntrypoint: "./dist/node/controller", + controllerConfigFields: { + }, +}; diff --git a/exp_groups/instance.ts b/exp_groups/instance.ts new file mode 100644 index 00000000..455d035c --- /dev/null +++ b/exp_groups/instance.ts @@ -0,0 +1,6 @@ +import * as lib from "@clusterio/lib"; +import { BaseInstancePlugin } from "@clusterio/host"; + +export class InstancePlugin extends BaseInstancePlugin { + +} diff --git a/exp_groups/module/module.json b/exp_groups/module/module.json new file mode 100644 index 00000000..0d7ebefd --- /dev/null +++ b/exp_groups/module/module.json @@ -0,0 +1,11 @@ +{ + "name": "exp_groups", + "load": [ + "control.lua" + ], + "require": [ + ], + "dependencies": { + "clusterio": "*" + } +} diff --git a/exp_groups/module/module_exports.lua b/exp_groups/module/module_exports.lua new file mode 100644 index 00000000..47762f6b --- /dev/null +++ b/exp_groups/module/module_exports.lua @@ -0,0 +1,3 @@ + +-- Access the exports from other modules using require("modules/exp_groups") +return require("modules/exp_groups/control") diff --git a/exp_groups/package.json b/exp_groups/package.json new file mode 100644 index 00000000..518bc8e5 --- /dev/null +++ b/exp_groups/package.json @@ -0,0 +1,37 @@ +{ + "name": "@expcluster/permission-groups", + "version": "0.1.0", + "description": "Clusterio plugin providing syncing of permission groups", + "author": "Cooldude2606 ", + "license": "MIT", + "repository": "explosivegaming/ExpCluster", + "main": "dist/node/index.js", + "scripts": { + "prepare": "tsc --build && webpack-cli --env production" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@clusterio/lib": "catalog:" + }, + "devDependencies": { + "typescript": "catalog:", + "@types/node": "catalog:", + "@clusterio/lib": "catalog:", + "webpack": "catalog:", + "webpack-cli": "catalog:", + "webpack-merge": "catalog:" + }, + "dependencies": { + "@sinclair/typebox": "catalog:" + }, + "publishConfig": { + "access": "public" + }, + "keywords": [ + "clusterio", + "clusterio-plugin", + "factorio" + ] +} \ No newline at end of file diff --git a/exp_groups/tsconfig.browser.json b/exp_groups/tsconfig.browser.json new file mode 100644 index 00000000..1ab2704e --- /dev/null +++ b/exp_groups/tsconfig.browser.json @@ -0,0 +1,4 @@ +{ + "extends": "../tsconfig.browser.json", + "include": [ "web/**/*.tsx", "web/**/*.ts", "package.json" ], +} diff --git a/exp_groups/tsconfig.json b/exp_groups/tsconfig.json new file mode 100644 index 00000000..303b8f28 --- /dev/null +++ b/exp_groups/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.node.json" }, + { "path": "./tsconfig.browser.json" } + ] +} diff --git a/exp_groups/tsconfig.node.json b/exp_groups/tsconfig.node.json new file mode 100644 index 00000000..3218f2e7 --- /dev/null +++ b/exp_groups/tsconfig.node.json @@ -0,0 +1,5 @@ +{ + "extends": "../tsconfig.node.json", + "include": ["./**/*.ts"], + "exclude": ["test/*", "./dist/*"], +} diff --git a/exp_groups/web/index.tsx b/exp_groups/web/index.tsx new file mode 100644 index 00000000..e69de29b diff --git a/exp_groups/webpack.config.js b/exp_groups/webpack.config.js new file mode 100644 index 00000000..0baa40ac --- /dev/null +++ b/exp_groups/webpack.config.js @@ -0,0 +1,29 @@ +"use strict"; +const path = require("path"); +const webpack = require("webpack"); +const { merge } = require("webpack-merge"); + +const common = require("@clusterio/web_ui/webpack.common"); + +module.exports = (env = {}) => merge(common(env), { + context: __dirname, + entry: "./web/index.tsx", + output: { + path: path.resolve(__dirname, "dist", "web"), + }, + plugins: [ + new webpack.container.ModuleFederationPlugin({ + name: "exp_groups", + library: { type: "window", name: "plugin_exp_groups" }, + exposes: { + "./": "./index.ts", + "./package.json": "./package.json", + "./web": "./web/index.tsx", + }, + shared: { + "@clusterio/lib": { import: false }, + "@clusterio/web_ui": { import: false }, + }, + }), + ], +}); diff --git a/exp_scenario/controller.ts b/exp_scenario/controller.ts index 110c6c86..fc761f62 100644 --- a/exp_scenario/controller.ts +++ b/exp_scenario/controller.ts @@ -1,7 +1,6 @@ import * as lib from "@clusterio/lib"; -import { BaseControllerPlugin, InstanceInfo } from "@clusterio/controller"; +import { BaseControllerPlugin } from "@clusterio/controller"; export class ControllerPlugin extends BaseControllerPlugin { - async init() { - } + } diff --git a/exp_server_ups/package.json b/exp_server_ups/package.json index b446a746..f632ca4b 100644 --- a/exp_server_ups/package.json +++ b/exp_server_ups/package.json @@ -1,5 +1,5 @@ { - "name": "@expcluster/server_ups", + "name": "@expcluster/server-ups", "version": "0.1.0", "description": "Clusterio plugin providing in game server ups counter", "author": "Cooldude2606 ",