Open History to see the last commit
1import {
2 defineSourceControlDriver,
3 withOwnServices,
4} from "@t3tools/source-control-core/server/driver";
5import * as Effect from "effect/Effect";
6import * as Layer from "effect/Layer";
7
8import { definition } from "../shared/definition.ts";
9
10import * as TanStackSourceApi from "./TanStackSourceApi.ts";
11import * as TanStackSourceCredentials from "./TanStackSourceCredentials.ts";
12import * as TanStackSourceIssueTracker from "./TanStackSourceIssueTracker.ts";
13import * as TanStackSourceMediaFetch from "./tanStackSourceMediaFetch.ts";
14import * as TanStackSourcePullRequestProvider from "./TanStackSourcePullRequestProvider.ts";
15import * as TanStackSourceSourceControlProvider from "./TanStackSourceSourceControlProvider.ts";
16
17const services = TanStackSourceApi.layer.pipe(Layer.provideMerge(TanStackSourceCredentials.layer));
18
19const makeInstance = Effect.all({
20 sourceControl: TanStackSourceSourceControlProvider.make,
21 discovery: TanStackSourceSourceControlProvider.makeDiscovery,
22 pullRequests: TanStackSourcePullRequestProvider.make,
23 issues: TanStackSourceIssueTracker.make,
24 fetchMedia: TanStackSourceMediaFetch.make,
25});
26
27export const driver = defineSourceControlDriver({
28 kind: definition.kind,
29 definition,
30 make: withOwnServices(makeInstance, services),
31});