Skip to content

Commit

Permalink
Finishing touches on this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
A248 committed Sep 12, 2023
1 parent 10b4ae5 commit 5a2573b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
package space.arim.libertybans.core.addon.it;

import jakarta.inject.Singleton;
import space.arim.libertybans.core.env.EnvMessageChannel;
import space.arim.libertybans.core.env.EnvServerNameDetection;
import space.arim.libertybans.core.importing.PlatformImportSource;
import space.arim.libertybans.core.selector.cache.MuteCache;
import space.arim.libertybans.core.selector.cache.OnDemandMuteCache;
Expand All @@ -37,6 +39,14 @@ public MuteCache muteCache(OnDemandMuteCache muteCache) {
return muteCache;
}

public EnvMessageChannel<?> messageChannel(EnvMessageChannel.NoOp messageChannel) {
return messageChannel;
}

public EnvServerNameDetection serverNameDetection() {
return (scopeManager) -> {};
}

public PlatformImportSource platformImportSource() {
throw new UnsupportedOperationException("PlatformImportSource not available");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import space.arim.libertybans.core.env.EnvEnforcer;
import space.arim.libertybans.core.env.EnvUserResolver;
import space.arim.libertybans.core.env.Environment;
import space.arim.libertybans.core.env.InstanceType;
import space.arim.libertybans.core.env.PlatformListener;
import space.arim.omnibus.util.concurrent.impl.IndifferentFactoryOfTheFuture;
import space.arim.omnibus.util.concurrent.impl.SimplifiedEnhancedExecutor;
Expand Down Expand Up @@ -87,6 +88,7 @@ public void execute(Runnable command) {
this.injector = new InjectorBuilder()
.bindInstance(Server.class, server)
.bindInstance(Identifier.ofTypeAndNamed(Path.class, "folder"), folder)
.bindInstance(InstanceType.class, InstanceType.STANDALONE)
.bindInstance(PlatformHandle.class, handle)
.bindInstance(Environment.class, environment)
.bindInstance(EnvEnforcer.class, envEnforcer)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* LibertyBans
* Copyright © 2021 Anand Beh
* Copyright © 2023 Anand Beh
*
* LibertyBans is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand All @@ -19,6 +19,7 @@

package space.arim.libertybans.core.it.jpmscompat;

import space.arim.libertybans.core.env.EnvMessageChannel;
import space.arim.libertybans.core.selector.cache.MuteCache;
import space.arim.libertybans.core.selector.cache.OnDemandMuteCache;
import space.arim.libertybans.core.importing.PlatformImportSource;
Expand All @@ -29,6 +30,10 @@ public MuteCache muteCache(OnDemandMuteCache muteCache) {
return muteCache;
}

public EnvMessageChannel<?> messageChannel(EnvMessageChannel.NoOp messageChannel) {
return messageChannel;
}

public PlatformImportSource platformImportSource() {
throw new UnsupportedOperationException("PlatformImportSource not available");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* LibertyBans
* Copyright © 2021 Anand Beh
* Copyright © 2023 Anand Beh
*
* LibertyBans is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
Expand Down Expand Up @@ -28,8 +28,10 @@
import space.arim.libertybans.core.PillarOneBindModule;
import space.arim.libertybans.core.PillarTwoBindModule;
import space.arim.libertybans.core.env.EnvEnforcer;
import space.arim.libertybans.core.env.EnvServerNameDetection;
import space.arim.libertybans.core.env.EnvUserResolver;
import space.arim.libertybans.core.env.Environment;
import space.arim.libertybans.core.env.InstanceType;
import space.arim.omnibus.DefaultOmnibus;
import space.arim.omnibus.Omnibus;

Expand All @@ -56,11 +58,13 @@ public JpmsLauncher(Path folder, PlatformHandle handle, Environment environment,
public BaseFoundation launch() {
return new InjectorBuilder()
.bindInstance(Identifier.ofTypeAndNamed(Path.class, "folder"), folder)
.bindInstance(InstanceType.class, InstanceType.STANDALONE)
.bindInstance(Omnibus.class, new DefaultOmnibus())
.bindInstance(PlatformHandle.class, handle)
.bindInstance(Environment.class, environment)
.bindInstance(EnvEnforcer.class, envEnforcer)
.bindInstance(EnvUserResolver.class, envUserResolver)
.bindInstance(EnvServerNameDetection.class, (scopeManager) -> {})
.addBindModules(
new ApiBindModule(),
new PillarOneBindModule(),
Expand Down

0 comments on commit 5a2573b

Please sign in to comment.