refactor(source-control): Azure DevOps lives in @t3tools/source-control-azure-devops (#17592)
Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f6e45028ef
commit
d01febb509
30 files changed
+169
-47
No files matched your search
@@ -11,7 +11,6 @@ import {
|
||||
import type { SourceControlProviderKind } from "@t3tools/contracts";
|
||||
import { detectSourceControlProviderFromRemoteUrl } from "@t3tools/shared/sourceControl";
|
||||
|
||||
import * as AzureDevOpsSourceControlProvider from "./AzureDevOpsSourceControlProvider.ts";
|
||||
import * as BitbucketSourceControlProvider from "./BitbucketSourceControlProvider.ts";
|
||||
import * as GitHubSourceControlProvider from "./GitHubSourceControlProvider.ts";
|
||||
import * as GitLabSourceControlProvider from "./GitLabSourceControlProvider.ts";
|
||||
@@ -310,7 +309,6 @@ export const make = Effect.gen(function* () {
|
||||
const gitlab = yield* GitLabSourceControlProvider.make;
|
||||
const bitbucket = yield* BitbucketSourceControlProvider.make;
|
||||
const bitbucketDiscovery = yield* BitbucketSourceControlProvider.makeDiscovery;
|
||||
const azureDevOps = yield* AzureDevOpsSourceControlProvider.make;
|
||||
const drivers = yield* Effect.forEach(BuiltInDrivers.BUILT_IN_SOURCE_CONTROL_DRIVERS, (driver) =>
|
||||
driver.make.pipe(
|
||||
Effect.map((instance): SourceControlProviderRegistration => ({
|
||||
@@ -320,7 +318,9 @@ export const make = Effect.gen(function* () {
|
||||
})),
|
||||
),
|
||||
);
|
||||
return yield* makeWithProviders([
|
||||
// Discovery lists hosts in this order, so it is kept while hosts move into packages.
|
||||
const order = ["github", "gitlab", "azure-devops", "bitbucket", "forgejo"];
|
||||
const registrations: ReadonlyArray<SourceControlProviderRegistration> = [
|
||||
{
|
||||
kind: "github",
|
||||
provider: github,
|
||||
@@ -331,18 +331,16 @@ export const make = Effect.gen(function* () {
|
||||
provider: gitlab,
|
||||
discovery: GitLabSourceControlProvider.discovery,
|
||||
},
|
||||
{
|
||||
kind: "azure-devops",
|
||||
provider: azureDevOps,
|
||||
discovery: AzureDevOpsSourceControlProvider.discovery,
|
||||
},
|
||||
{
|
||||
kind: "bitbucket",
|
||||
provider: bitbucket,
|
||||
discovery: bitbucketDiscovery,
|
||||
},
|
||||
...drivers,
|
||||
]);
|
||||
];
|
||||
return yield* makeWithProviders(
|
||||
registrations.toSorted((left, right) => order.indexOf(left.kind) - order.indexOf(right.kind)),
|
||||
);
|
||||
});
|
||||
|
||||
export const layer = Layer.effect(SourceControlProviderRegistry, make);
|
||||
Reference in new issue
Block a user