Merge remote-tracking branch 'origin/master' into plugin-minimap

This commit is contained in:
Danielv123 committed 2026-01-27 17:45:23 +01:00
commit 979d961618
131 files changed
+6585 -2515

No files matched your search

+18 -13
View File
@@ -1,6 +1,6 @@
{
"name": "@clusterio/plugin-global_chat",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22b",
"description": "Clusterio plugin forwarding between Factorio servers",
"author": "Hornwitser <github@hornwitser.no>",
"homepage": "https://github.com/clusterio/clusterio#readme",
@@ -13,32 +13,37 @@
"factorio"
],
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/clusterio/clusterio/issues"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"peerDependencies": {
"@clusterio/web_ui": "workspace:*",
"@clusterio/host": "workspace:*",
"@clusterio/ctl": "workspace:*",
"@clusterio/lib": "workspace:*"
},
"dependencies": {
"@sinclair/typebox": "catalog:"
},
"devDependencies": {
"@clusterio/lib": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@types/node": "^20.17.19",
"@types/react": "^18.3.18",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"@clusterio/host": "workspace:*",
"@clusterio/ctl": "workspace:*",
"@clusterio/lib": "workspace:*",
"@types/node": "catalog:",
"@types/react": "catalog:",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sinclair/typebox": "^0.30.4"
}
}
+2
View File
@@ -2,6 +2,8 @@
"extends": "../../tsconfig.node.json",
"references": [
{ "path": "../../packages/lib/tsconfig.node.json" },
{ "path": "../../packages/host/tsconfig.node.json" },
{ "path": "../../packages/ctl/tsconfig.node.json" },
],
"include": ["./**/*.ts"],
"exclude": ["test/*", "./dist/*"],
+1 -1
View File
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
output: {
+21 -16
View File
@@ -1,6 +1,6 @@
{
"name": "@clusterio/plugin-inventory_sync",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22b",
"description": "Clusterio plugin forwarding between Factorio servers",
"author": "Danielv <danielv@danielv.no>",
"homepage": "https://github.com/clusterio/factorioClusterio#readme",
@@ -13,35 +13,40 @@
"factorio"
],
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/clusterio/factorioClusterio/issues"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"peerDependencies": {
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*"
},
"dependencies": {
"@sinclair/typebox": "^0.30.4",
"fs-extra": "^8.1.0"
"@sinclair/typebox": "catalog:",
"fs-extra": "catalog:"
},
"devDependencies": {
"@clusterio/lib": "workspace:*",
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@types/fs-extra": "^11.0.1",
"@types/node": "^20.17.19",
"@types/react": "^18.3.18",
"antd": "^5.24.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*",
"@types/fs-extra": "catalog:",
"@types/node": "catalog:",
"@types/react": "catalog:",
"antd": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
@@ -2,6 +2,8 @@
"extends": "../../tsconfig.node.json",
"references": [
{ "path": "../../packages/lib/tsconfig.node.json" },
{ "path": "../../packages/host/tsconfig.node.json" },
{ "path": "../../packages/controller/tsconfig.node.json" },
],
"include": ["./**/*.ts"],
"exclude": ["test/*", "./dist/*"],
+1 -1
View File
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
output: {
+23 -18
View File
@@ -1,6 +1,6 @@
{
"name": "@clusterio/plugin-player_auth",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22b",
"description": "Clusterio plugin authenticating logged in players to the web interface",
"author": "Hornwitser <github@hornwitser.no>",
"homepage": "https://github.com/clusterio/clusterio#readme",
@@ -13,37 +13,42 @@
"factorio"
],
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/clusterio/clusterio/issues"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"peerDependencies": {
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*"
},
"dependencies": {
"@sinclair/typebox": "^0.30.4",
"express": "^4.21.2",
"jsonwebtoken": "^9.0.1"
"@sinclair/typebox": "catalog:",
"jsonwebtoken": "catalog:",
"express": "catalog:"
},
"devDependencies": {
"@clusterio/lib": "workspace:*",
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@types/express": "^4.17.17",
"@types/jsonwebtoken": "^9.0.9",
"@types/node": "^20.17.19",
"@types/react": "^18.3.18",
"antd": "^5.24.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*",
"@types/express": "catalog:",
"@types/jsonwebtoken": "catalog:",
"@types/node": "catalog:",
"@types/react": "catalog:",
"antd": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
+2
View File
@@ -2,6 +2,8 @@
"extends": "../../tsconfig.node.json",
"references": [
{ "path": "../../packages/lib/tsconfig.node.json" },
{ "path": "../../packages/host/tsconfig.node.json" },
{ "path": "../../packages/controller/tsconfig.node.json" },
],
"include": ["./**/*.ts"],
"exclude": ["test/*", "./dist/*"],
+1 -1
View File
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
output: {
+18 -13
View File
@@ -1,6 +1,6 @@
{
"name": "@clusterio/plugin-research_sync",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22b",
"description": "Clusterio plugin for synchronizing research between Factorio servers",
"author": "Hornwitser <github@hornwitser.no>",
"homepage": "https://github.com/clusterio/clusterio#readme",
@@ -13,32 +13,37 @@
"factorio"
],
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/clusterio/clusterio/issues"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"peerDependencies": {
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*"
},
"dependencies": {
"@sinclair/typebox": "^0.30.4",
"fs-extra": "^8.1.0"
"@sinclair/typebox": "catalog:",
"fs-extra": "catalog:"
},
"devDependencies": {
"@clusterio/lib": "workspace:*",
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@types/fs-extra": "^11.0.1",
"@types/node": "^20.17.19",
"@types/react": "^18.3.18",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*",
"@types/fs-extra": "catalog:",
"@types/node": "catalog:",
"@types/react": "catalog:",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
+2
View File
@@ -2,6 +2,8 @@
"extends": "../../tsconfig.node.json",
"references": [
{ "path": "../../packages/lib/tsconfig.node.json" },
{ "path": "../../packages/host/tsconfig.node.json" },
{ "path": "../../packages/controller/tsconfig.node.json" },
],
"include": ["./**/*.ts"],
"exclude": ["test/*", "./dist/*"],
+1 -1
View File
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
output: {
+13 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@clusterio/plugin-statistics_exporter",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22b",
"description": "Clusterio plugin for gathering statistics from Factorio servers",
"author": "Hornwitser <github@hornwitser.no>",
"homepage": "https://github.com/clusterio/clusterio#readme",
@@ -13,27 +13,30 @@
"factorio"
],
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/clusterio/clusterio/issues"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"peerDependencies": {
"@clusterio/web_ui": "workspace:*",
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*"
},
"devDependencies": {
"@clusterio/lib": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@types/node": "^20.17.19",
"@types/react": "^18.3.18",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*",
"@types/node": "catalog:",
"@types/react": "catalog:",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
@@ -2,6 +2,7 @@
"extends": "../../tsconfig.node.json",
"references": [
{ "path": "../../packages/lib/tsconfig.node.json" },
{ "path": "../../packages/host/tsconfig.node.json" },
],
"include": ["./**/*.ts"],
"exclude": ["test/*", "./dist/*"],
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
output: {
+26 -12
View File
@@ -14,6 +14,8 @@ type IpcItems = [name: string, count: number, quality: string][];
export class InstancePlugin extends BaseInstancePlugin {
pendingTasks!: Set<any>;
pingId?: ReturnType<typeof setTimeout>;
timeUpdateId?: ReturnType<typeof setInterval>;
cachedInventoryItems: Item[] = [];
unexpectedError(err: Error) {
this.logger.error(`Unexpected error:\n${err.stack}`);
@@ -54,18 +56,37 @@ export class InstancePlugin extends BaseInstancePlugin {
}, 5000);
let items = await this.instance.sendTo("controller", new GetStorageRequest());
// TODO Diff with dump of invdata produce minimal command to sync
let itemsJson = lib.escapeString(JSON.stringify(items));
await this.sendRcon(`/sc __subspace_storage__ UpdateInvData("${itemsJson}", true)`, true);
// Cache items for periodic time updates
this.cachedInventoryItems = items;
// Ensure a payload with updated time is sent every second
this.timeUpdateId = setInterval(() => {
if (this.instance.status !== "running") {
return;
}
const payloadItems = [
...this.cachedInventoryItems,
new Item("signal-unixtime", Math.floor(Date.now() / 1000), "normal"),
];
const payloadJson = lib.escapeString(JSON.stringify(payloadItems));
const task = this.sendRcon(`/sc __subspace_storage__ UpdateInvData("${payloadJson}")`, true)
.catch(err => this.unexpectedError(err));
this.pendingTasks.add(task);
task.finally(() => { this.pendingTasks.delete(task); });
}, 1000);
}
async onStop() {
clearInterval(this.pingId);
clearInterval(this.timeUpdateId);
await Promise.all(this.pendingTasks);
}
onExit() {
clearInterval(this.pingId);
clearInterval(this.timeUpdateId);
}
// provide items --------------------------------------------------------------
@@ -114,14 +135,7 @@ export class InstancePlugin extends BaseInstancePlugin {
if (this.instance.status !== "running") {
return;
}
let items = event.items;
// XXX this should be moved to instance/clusterio api
items.push(new Item("signal-unixtime", Math.floor(Date.now()/1000), "normal"));
let itemsJson = lib.escapeString(JSON.stringify(items));
let task = this.sendRcon(`/sc __subspace_storage__ UpdateInvData("${itemsJson}")`, true);
this.pendingTasks.add(task);
await task.finally(() => { this.pendingTasks.delete(task); });
// Cache latest inventory from controller
this.cachedInventoryItems = event.items;
}
}
+22 -17
View File
@@ -1,6 +1,6 @@
{
"name": "@clusterio/plugin-subspace_storage",
"version": "2.0.0-alpha.21",
"version": "2.0.0-alpha.22b",
"description": "Clusterio plugin for sharing storage between Factorio servers",
"author": "Hornwitser <github@hornwitser.no>",
"homepage": "https://github.com/clusterio/clusterio#readme",
@@ -13,36 +13,41 @@
"factorio"
],
"scripts": {
"prepare": "tsc --build && webpack-cli --env production",
"prepare": "tsc --build && webpack-cli --mode production",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"bugs": {
"url": "https://github.com/clusterio/clusterio/issues"
},
"engines": {
"node": ">=18"
"node": ">=20"
},
"peerDependencies": {
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*"
},
"dependencies": {
"@sinclair/typebox": "^0.30.4",
"fs-extra": "^8.1.0"
"@sinclair/typebox": "catalog:",
"fs-extra": "catalog:"
},
"devDependencies": {
"@clusterio/lib": "workspace:*",
"@clusterio/controller": "workspace:*",
"@clusterio/web_ui": "workspace:*",
"@types/express": "^4.17.17",
"@types/fs-extra": "^11.0.1",
"@types/node": "^20.17.19",
"@types/react": "^18.3.18",
"antd": "^5.24.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.7.3",
"webpack": "^5.98.0",
"webpack-cli": "^5.1.4",
"webpack-merge": "^5.9.0"
"@clusterio/host": "workspace:*",
"@clusterio/lib": "workspace:*",
"@types/express": "catalog:",
"@types/fs-extra": "catalog:",
"@types/node": "catalog:",
"@types/react": "catalog:",
"antd": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"typescript": "catalog:",
"webpack": "catalog:",
"webpack-cli": "catalog:",
"webpack-merge": "catalog:"
},
"publishConfig": {
"access": "public"
@@ -2,6 +2,8 @@
"extends": "../../tsconfig.node.json",
"references": [
{ "path": "../../packages/lib/tsconfig.node.json" },
{ "path": "../../packages/host/tsconfig.node.json" },
{ "path": "../../packages/controller/tsconfig.node.json" },
],
"include": ["./**/*.ts"],
"exclude": ["test/*", "./dist/*"],
+1 -1
View File
@@ -5,7 +5,7 @@ const { merge } = require("webpack-merge");
const common = require("@clusterio/web_ui/webpack.common");
module.exports = (env = {}) => merge(common(env), {
module.exports = (env = {}, argv = {}) => merge(common(env, argv), {
context: __dirname,
entry: "./web/index.tsx",
output: {