refactor(source-control): Bitbucket lives in @t3tools/source-control-bitbucket (#17597)
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
eb459b5afa
commit
8d1858d9d6
33 files changed
+253
-63
No files matched your search
@@ -9,6 +9,8 @@ import * as Effect from "effect/Effect";
|
||||
import * as Layer from "effect/Layer";
|
||||
|
||||
import * as ServerSettings from "../serverSettings.ts";
|
||||
import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
|
||||
import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts";
|
||||
import * as VcsProcess from "../vcs/VcsProcess.ts";
|
||||
|
||||
export const layer = Layer.effect(
|
||||
@@ -16,9 +18,23 @@ export const layer = Layer.effect(
|
||||
Effect.gen(function* () {
|
||||
const serverSettings = yield* ServerSettings.ServerSettingsService;
|
||||
const process = yield* VcsProcess.VcsProcess;
|
||||
const git = yield* GitVcsDriver.GitVcsDriver;
|
||||
const vcsRegistry = yield* VcsDriverRegistry.VcsDriverRegistry;
|
||||
return SourceControlHost.SourceControlHost.of({
|
||||
settings: { get: serverSettings.getSettings },
|
||||
process: { run: process.run },
|
||||
git: {
|
||||
remotes: (cwd) =>
|
||||
vcsRegistry.resolve({ cwd }).pipe(Effect.map((handle) => handle.driver.listRemotes(cwd))),
|
||||
readConfigValue: git.readConfigValue,
|
||||
resolvePrimaryRemoteName: git.resolvePrimaryRemoteName,
|
||||
ensureRemote: git.ensureRemote,
|
||||
listLocalBranchNames: git.listLocalBranchNames,
|
||||
fetchRemoteBranch: git.fetchRemoteBranch,
|
||||
fetchRemoteTrackingBranch: git.fetchRemoteTrackingBranch,
|
||||
setBranchUpstream: git.setBranchUpstream,
|
||||
switchRef: git.switchRef,
|
||||
},
|
||||
});
|
||||
}),
|
||||
);
|
||||
Reference in new issue
Block a user