Merge branch 'explosivegaming:main' into translate

This commit is contained in:
phidias authored and GitHub committed 2026-10-29 15:34:41 +09:00
commit 377b3f2a25
69 files changed
+218 -571

No files matched your search

-1
View File
@@ -24,7 +24,6 @@ export const plugin: lib.PluginDeclaration = {
name: "exp_server_list",
title: "ExpGaming - Server List",
description: "Clusterio plugin sharing the details of every instance with the others",
webEntrypoint: "./web",
controllerEntrypoint: "./dist/node/controller.js",
instanceEntrypoint: "./dist/node/instance.js",
+2 -4
View File
@@ -8,7 +8,7 @@
"type": "module",
"main": "dist/node/index.js",
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && vite build",
"test": "tap --type-strip-only --disable-coverage --allow-empty-coverage test/*.test.js",
"coverage": "tap --coverage-report=text test/*.test.js"
},
@@ -37,9 +37,7 @@
"fengari": "^0.1.5",
"tap": "^21.1.0",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
"vite": "catalog:"
},
"dependencies": {
"@sinclair/typebox": "catalog:",
+5 -4
View File
@@ -35,18 +35,19 @@ async function startPlugin(t2, servers = [server(1), server(2)]) {
instanceConfig.set("instance.id", 1);
instanceConfig.set("instance.name", "test");
const instance = new Instance(
{ assignGamePort: () => 1 }, new TestConnector(), t2.testdir(), "factorioDir", instanceConfig
);
const state = { sent: [], rcons: [] };
instance.server = {
const server = {
on: () => {},
handle: () => {},
sendRcon: async command => {
state.rcons.push(command);
return "";
},
};
const instance = new Instance(
{ assignGamePort: () => 1 }, new TestConnector(), t2.testdir(), instanceConfig, server
);
instance.sendTo = async (dst, request) => {
if (request instanceof lib.InstanceStatusChangedEvent) {
return undefined;
+1 -1
View File
@@ -1,4 +1,4 @@
{
"extends": "../tsconfig.browser.json",
"include": [ "web/**/*.tsx", "web/**/*.ts", "index.ts", "messages.ts", "package.json" ],
"include": [ "index.ts", "messages.ts", "package.json" ],
}
+6
View File
@@ -0,0 +1,6 @@
import { defineConfig } from "vite";
import { clusterioPlugin } from "@clusterio/web_ui/vite.mjs";
export default defineConfig({
plugins: [clusterioPlugin()],
});
-1
View File
@@ -1 +0,0 @@
export default function() {};
-29
View File
@@ -1,29 +0,0 @@
"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_server_list",
library: { type: "window", name: "plugin_exp_server_list" },
exposes: {
"./": "./index.ts",
"./package.json": "./package.json",
"./web": "./web/index.tsx",
},
shared: {
"@clusterio/lib": { import: false },
"@clusterio/web_ui": { import: false },
},
}),
],
});