mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Order fromConfig arguments config first
Controller.fromConfig and Host.fromConfig now take the config, then the plugin infos, then the logger or connector. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ee097bfa6f
commit
3a81cfd94b
6 files changed
+9
-9
No files matched your search
@@ -79,7 +79,7 @@ describe("controller/src/Controller", function() {
|
||||
"controller.mods_directory": modsDirectory,
|
||||
});
|
||||
|
||||
const loaded = await Controller.fromConfig({}, [], config, true, false);
|
||||
const loaded = await Controller.fromConfig(config, [], {}, true, false);
|
||||
assert(loaded instanceof Controller);
|
||||
assert.equal(loaded.canRestart, true);
|
||||
assert.equal(loaded.recoveryMode, false);
|
||||
@@ -122,7 +122,7 @@ describe("controller/src/Controller", function() {
|
||||
"controller.mods_directory": path.join(dir, "mods"),
|
||||
});
|
||||
|
||||
const loaded = await Controller.fromConfig({}, [], config);
|
||||
const loaded = await Controller.fromConfig(config, [], {});
|
||||
await loaded.instances.records.save();
|
||||
const [saved] = JSON.parse(await fs.readFile(instancesPath, "utf8"));
|
||||
assert.equal(saved.config["from_config_plugin.version"], "1.2.0");
|
||||
|
||||
Reference in new issue
Block a user