Showing the changes to apps/server/src/sourceControl/SourceControlRepositoryService.ts (1 of 42 files). Show all
Unified · Split
| @@ -24,21 +24,19 @@ import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; · 23 unmodified lines | ||
| 24 | 24 | import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts"; |
| 25 | 25 | const isSourceControlRepositoryError = Schema.is(SourceControlRepositoryError); |
| 26 | 26 | |
| 27 | −export interface SourceControlRepositoryServiceShape { | |
| 28 | − readonly lookupRepository: ( | |
| 29 | − input: SourceControlRepositoryLookupInput, | |
| 30 | − ) => Effect.Effect<SourceControlRepositoryInfo, SourceControlRepositoryError>; | |
| 31 | − readonly cloneRepository: ( | |
| 32 | − input: SourceControlCloneRepositoryInput, | |
| 33 | − ) => Effect.Effect<SourceControlCloneRepositoryResult, SourceControlRepositoryError>; | |
| 34 | − readonly publishRepository: ( | |
| 35 | − input: SourceControlPublishRepositoryInput, | |
| 36 | − ) => Effect.Effect<SourceControlPublishRepositoryResult, SourceControlRepositoryError>; | |
| 37 | −} | |
| 38 | − | |
| 39 | 27 | export class SourceControlRepositoryService extends Context.Service< |
| 40 | 28 | SourceControlRepositoryService, |
| 41 | − SourceControlRepositoryServiceShape | |
| 29 | + { | |
| 30 | + readonly lookupRepository: ( | |
| 31 | + input: SourceControlRepositoryLookupInput, | |
| 32 | + ) => Effect.Effect<SourceControlRepositoryInfo, SourceControlRepositoryError>; | |
| 33 | + readonly cloneRepository: ( | |
| 34 | + input: SourceControlCloneRepositoryInput, | |
| 35 | + ) => Effect.Effect<SourceControlCloneRepositoryResult, SourceControlRepositoryError>; | |
| 36 | + readonly publishRepository: ( | |
| 37 | + input: SourceControlPublishRepositoryInput, | |
| 38 | + ) => Effect.Effect<SourceControlPublishRepositoryResult, SourceControlRepositoryError>; | |
| 39 | + } | |
| 42 | 40 | >()("t3/sourceControl/SourceControlRepositoryService") {} |
| 43 | 41 | |
| 44 | 42 | function detailFromUnknown(cause: unknown): string { |
| @@ -116,7 +114,7 @@ function expandHomePath(input: string, path: Path.Path): string { · 71 unmodified lines | ||
| 116 | 114 | return input; |
| 117 | 115 | } |
| 118 | 116 | |
| 119 | −export const make = Effect.fn("makeSourceControlRepositoryService")(function* () { | |
| 117 | +export const make = Effect.gen(function* () { | |
| 120 | 118 | const config = yield* ServerConfig; |
| 121 | 119 | const fileSystem = yield* FileSystem.FileSystem; |
| 122 | 120 | const git = yield* GitVcsDriver.GitVcsDriver; |
| @@ -315,4 +313,4 @@ export const make = Effect.fn("makeSourceControlRepositoryService")(function* () · 192 unmodified lines | ||
| 315 | 313 | }); |
| 316 | 314 | }); |
| 317 | 315 | |
| 318 | −export const layer = Layer.effect(SourceControlRepositoryService, make()); | |
| 316 | +export const layer = Layer.effect(SourceControlRepositoryService, make); | |