| author | |
| committer | |
| log | 3b6ce931cc225b4b743daaa063e0bc9875555582 |
| tree | 19c728a40a85c84e40314650bf99d29ddfd87c72 |
| parent | 060c576f8922703725f0dbdd01443ed88ecc9baa |
| signature | Signed by PGP key B5690EEEBB952194 |
22 files changed, 21 insertions(+), 28 deletions(-)
apps/server/src/pullRequest/AzureDevOpsPullRequestCli.ts+1| ... | @@ -261,6 +261,7 @@ function isReviewerName(value: string): boolean { | ... | @@ -261,6 +261,7 @@ function isReviewerName(value: string): boolean { |
| 261 | return name.length > 0 && !name.startsWith("-"); | 261 | return name.length > 0 && !name.startsWith("-"); |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 264 | export const make = Effect.gen(function* () { | 265 | export const make = Effect.gen(function* () { |
| 265 | const azure = yield* AzureDevOpsCli.AzureDevOpsCli; | 266 | const azure = yield* AzureDevOpsCli.AzureDevOpsCli; |
| 266 | 267 |
apps/server/src/pullRequest/BitbucketPullRequestApi.ts+1| ... | @@ -378,6 +378,7 @@ function bitbucketReviewPosition( | ... | @@ -378,6 +378,7 @@ function bitbucketReviewPosition( |
| 378 | } | 378 | } |
| 379 | } | 379 | } |
| 380 | 380 | ||
| 381 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 381 | export const make = Effect.gen(function* () { | 382 | export const make = Effect.gen(function* () { |
| 382 | const bitbucket = yield* BitbucketApi.BitbucketApi; | 383 | const bitbucket = yield* BitbucketApi.BitbucketApi; |
| 383 | 384 |
apps/server/src/pullRequest/GitHubPullRequestCli.ts+2-1| ... | @@ -714,7 +714,7 @@ export class GitHubPullRequestCli extends Context.Service< | ... | @@ -714,7 +714,7 @@ export class GitHubPullRequestCli extends Context.Service< |
| 714 | * The host is not read off the identity: it travels alongside it, because the identity a | 714 | * The host is not read off the identity: it travels alongside it, because the identity a |
| 715 | * project records is the path below its host and never names the host itself. | 715 | * project records is the path below its host and never names the host itself. |
| 716 | */ | 716 | */ |
| 717 | export function parseRepositorySelector(value: string): { | 717 | function parseRepositorySelector(value: string): { |
| 718 | readonly owner: string; | 718 | readonly owner: string; |
| 719 | readonly name: string; | 719 | readonly name: string; |
| 720 | } { | 720 | } { |
| ... | @@ -980,6 +980,7 @@ function actionArgs( | ... | @@ -980,6 +980,7 @@ function actionArgs( |
| 980 | } | 980 | } |
| 981 | } | 981 | } |
| 982 | 982 | ||
| 983 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 983 | export const make = Effect.gen(function* () { | 984 | export const make = Effect.gen(function* () { |
| 984 | const github = yield* GitHubCli.GitHubCli; | 985 | const github = yield* GitHubCli.GitHubCli; |
| 985 | const graphQlBudget = yield* GitHubGraphQlBudget.GitHubGraphQlBudget; | 986 | const graphQlBudget = yield* GitHubGraphQlBudget.GitHubGraphQlBudget; |
apps/server/src/pullRequest/GitLabPullRequestCli.ts+1| ... | @@ -511,6 +511,7 @@ function actionArgs( | ... | @@ -511,6 +511,7 @@ function actionArgs( |
| 511 | } | 511 | } |
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 514 | export const make = Effect.gen(function* () { | 515 | export const make = Effect.gen(function* () { |
| 515 | const gitlab = yield* GitLabCli.GitLabCli; | 516 | const gitlab = yield* GitLabCli.GitLabCli; |
| 516 | 517 |
apps/server/src/pullRequest/PullRequestProviderRegistry.ts+2| ... | @@ -41,6 +41,8 @@ export function fromProviders( | ... | @@ -41,6 +41,8 @@ export function fromProviders( |
| 41 | /** | 41 | /** |
| 42 | * The hosts this build can read change requests from. A host with no entry here still shows up | 42 | * The hosts this build can read change requests from. A host with no entry here still shows up |
| 43 | * in the provider list as unimplemented, so its projects are explained rather than missing. | 43 | * in the provider list as unimplemented, so its projects are explained rather than missing. |
| 44 | * | ||
| 45 | * @public Service construction is part of the canonical Effect module API. | ||
| 44 | */ | 46 | */ |
| 45 | export const make = Effect.map( | 47 | export const make = Effect.map( |
| 46 | Effect.all([ | 48 | Effect.all([ |
apps/server/src/sourceControl/AzureDevOpsCli.ts+1-2| ... | @@ -203,8 +203,6 @@ export const AzureDevOpsCliError = Schema.Union([ | ... | @@ -203,8 +203,6 @@ export const AzureDevOpsCliError = Schema.Union([ |
| 203 | ]); | 203 | ]); |
| 204 | export type AzureDevOpsCliError = typeof AzureDevOpsCliError.Type; | 204 | export type AzureDevOpsCliError = typeof AzureDevOpsCliError.Type; |
| 205 | 205 | ||
| 206 | export const isAzureDevOpsCliError = Schema.is(AzureDevOpsCliError); | ||
| 207 | |||
| 208 | export interface AzureDevOpsRepositoryCloneUrls { | 206 | export interface AzureDevOpsRepositoryCloneUrls { |
| 209 | readonly nameWithOwner: string; | 207 | readonly nameWithOwner: string; |
| 210 | readonly url: string; | 208 | readonly url: string; |
| ... | @@ -352,6 +350,7 @@ function decodeAzureDevOpsJson<S extends Schema.Top>( | ... | @@ -352,6 +350,7 @@ function decodeAzureDevOpsJson<S extends Schema.Top>( |
| 352 | ); | 350 | ); |
| 353 | } | 351 | } |
| 354 | 352 | ||
| 353 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 355 | export const make = Effect.gen(function* () { | 354 | export const make = Effect.gen(function* () { |
| 356 | const process = yield* VcsProcess.VcsProcess; | 355 | const process = yield* VcsProcess.VcsProcess; |
| 357 | 356 |
apps/server/src/sourceControl/AzureDevOpsSourceControlProvider.ts-3| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | import * as Effect from "effect/Effect"; | 1 | import * as Effect from "effect/Effect"; |
| 2 | import * as Layer from "effect/Layer"; | ||
| 3 | import { SourceControlProviderError, type ChangeRequest } from "@t3tools/contracts"; | 2 | import { SourceControlProviderError, type ChangeRequest } from "@t3tools/contracts"; |
| 4 | 3 | ||
| 5 | import * as AzureDevOpsCli from "./AzureDevOpsCli.ts"; | 4 | import * as AzureDevOpsCli from "./AzureDevOpsCli.ts"; |
| ... | @@ -235,5 +234,3 @@ export const make = Effect.gen(function* () { | ... | @@ -235,5 +234,3 @@ export const make = Effect.gen(function* () { |
| 235 | ), | 234 | ), |
| 236 | }); | 235 | }); |
| 237 | }); | 236 | }); |
| 238 | |||
| 239 | export const layer = Layer.effect(SourceControlProvider.SourceControlProvider, make); |
apps/server/src/sourceControl/BitbucketApi.ts+2-1| ... | @@ -262,7 +262,7 @@ export const BitbucketApiError = Schema.Union([ | ... | @@ -262,7 +262,7 @@ export const BitbucketApiError = Schema.Union([ |
| 262 | BitbucketCheckoutError, | 262 | BitbucketCheckoutError, |
| 263 | ]); | 263 | ]); |
| 264 | export type BitbucketApiError = typeof BitbucketApiError.Type; | 264 | export type BitbucketApiError = typeof BitbucketApiError.Type; |
| 265 | export const isBitbucketApiError = Schema.is(BitbucketApiError); | 265 | const isBitbucketApiError = Schema.is(BitbucketApiError); |
| 266 | 266 | ||
| 267 | const RawBitbucketRepositorySchema = Schema.Struct({ | 267 | const RawBitbucketRepositorySchema = Schema.Struct({ |
| 268 | full_name: TrimmedNonEmptyString, | 268 | full_name: TrimmedNonEmptyString, |
| ... | @@ -606,6 +606,7 @@ function responseError( | ... | @@ -606,6 +606,7 @@ function responseError( |
| 606 | }); | 606 | }); |
| 607 | } | 607 | } |
| 608 | 608 | ||
| 609 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 609 | export const make = Effect.gen(function* () { | 610 | export const make = Effect.gen(function* () { |
| 610 | const config = yield* BitbucketApiEnvConfig; | 611 | const config = yield* BitbucketApiEnvConfig; |
| 611 | const httpClient = yield* HttpClient.HttpClient; | 612 | const httpClient = yield* HttpClient.HttpClient; |
apps/server/src/sourceControl/BitbucketSourceControlProvider.ts-3| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | import * as Effect from "effect/Effect"; | 1 | import * as Effect from "effect/Effect"; |
| 2 | import * as Layer from "effect/Layer"; | ||
| 3 | import * as Option from "effect/Option"; | 2 | import * as Option from "effect/Option"; |
| 4 | import { SourceControlProviderError, type ChangeRequest } from "@t3tools/contracts"; | 3 | import { SourceControlProviderError, type ChangeRequest } from "@t3tools/contracts"; |
| 5 | 4 | ||
| ... | @@ -186,8 +185,6 @@ export const make = Effect.gen(function* () { | ... | @@ -186,8 +185,6 @@ export const make = Effect.gen(function* () { |
| 186 | }); | 185 | }); |
| 187 | }); | 186 | }); |
| 188 | 187 | ||
| 189 | export const layer = Layer.effect(SourceControlProvider.SourceControlProvider, make); | ||
| 190 | |||
| 191 | export const makeDiscovery = Effect.gen(function* () { | 188 | export const makeDiscovery = Effect.gen(function* () { |
| 192 | const bitbucket = yield* BitbucketApi.BitbucketApi; | 189 | const bitbucket = yield* BitbucketApi.BitbucketApi; |
| 193 | 190 |
apps/server/src/sourceControl/GitHubCli.ts+1| ... | @@ -338,6 +338,7 @@ function deriveRepositoryCloneUrlsFromCreateOutput( | ... | @@ -338,6 +338,7 @@ function deriveRepositoryCloneUrlsFromCreateOutput( |
| 338 | }; | 338 | }; |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 341 | export const make = Effect.gen(function* () { | 342 | export const make = Effect.gen(function* () { |
| 342 | const process = yield* VcsProcess.VcsProcess; | 343 | const process = yield* VcsProcess.VcsProcess; |
| 343 | 344 |
apps/server/src/sourceControl/GitHubSourceControlProvider.ts-3| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | import * as DateTime from "effect/DateTime"; | 1 | import * as DateTime from "effect/DateTime"; |
| 2 | import * as Effect from "effect/Effect"; | 2 | import * as Effect from "effect/Effect"; |
| 3 | import * as Layer from "effect/Layer"; | ||
| 4 | import * as Option from "effect/Option"; | 3 | import * as Option from "effect/Option"; |
| 5 | import * as Result from "effect/Result"; | 4 | import * as Result from "effect/Result"; |
| 6 | import { | 5 | import { |
| ... | @@ -322,5 +321,3 @@ export const make = Effect.gen(function* () { | ... | @@ -322,5 +321,3 @@ export const make = Effect.gen(function* () { |
| 322 | ), | 321 | ), |
| 323 | }); | 322 | }); |
| 324 | }); | 323 | }); |
| 325 | |||
| 326 | export const layer = Layer.effect(SourceControlProvider.SourceControlProvider, make); |
apps/server/src/sourceControl/GitLabCli.ts+1-1| ... | @@ -237,7 +237,6 @@ export const GitLabCliError = Schema.Union([ | ... | @@ -237,7 +237,6 @@ export const GitLabCliError = Schema.Union([ |
| 237 | GitLabNamespaceDecodeError, | 237 | GitLabNamespaceDecodeError, |
| 238 | ]); | 238 | ]); |
| 239 | export type GitLabCliError = typeof GitLabCliError.Type; | 239 | export type GitLabCliError = typeof GitLabCliError.Type; |
| 240 | export const isGitLabCliError = Schema.is(GitLabCliError); | ||
| 241 | 240 | ||
| 242 | export interface GitLabMergeRequestSummary { | 241 | export interface GitLabMergeRequestSummary { |
| 243 | readonly number: number; | 242 | readonly number: number; |
| ... | @@ -409,6 +408,7 @@ function parseRepositoryPath(repository: string): { | ... | @@ -409,6 +408,7 @@ function parseRepositoryPath(repository: string): { |
| 409 | return { namespacePath, projectPath }; | 408 | return { namespacePath, projectPath }; |
| 410 | } | 409 | } |
| 411 | 410 | ||
| 411 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 412 | export const make = Effect.gen(function* () { | 412 | export const make = Effect.gen(function* () { |
| 413 | const process = yield* VcsProcess.VcsProcess; | 413 | const process = yield* VcsProcess.VcsProcess; |
| 414 | 414 |
apps/server/src/sourceControl/GitLabSourceControlProvider.ts-3| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | import * as Effect from "effect/Effect"; | 1 | import * as Effect from "effect/Effect"; |
| 2 | import * as Layer from "effect/Layer"; | ||
| 3 | import * as Option from "effect/Option"; | 2 | import * as Option from "effect/Option"; |
| 4 | import { SourceControlProviderError, type ChangeRequest } from "@t3tools/contracts"; | 3 | import { SourceControlProviderError, type ChangeRequest } from "@t3tools/contracts"; |
| 5 | 4 | ||
| ... | @@ -250,5 +249,3 @@ export const make = Effect.gen(function* () { | ... | @@ -250,5 +249,3 @@ export const make = Effect.gen(function* () { |
| 250 | ), | 249 | ), |
| 251 | }); | 250 | }); |
| 252 | }); | 251 | }); |
| 253 | |||
| 254 | export const layer = Layer.effect(SourceControlProvider.SourceControlProvider, make); |
apps/server/src/sourceControl/SourceControlDiscovery.ts+1| ... | @@ -64,6 +64,7 @@ export class SourceControlDiscovery extends Context.Service< | ... | @@ -64,6 +64,7 @@ export class SourceControlDiscovery extends Context.Service< |
| 64 | } | 64 | } |
| 65 | >()("t3/sourceControl/SourceControlDiscovery") {} | 65 | >()("t3/sourceControl/SourceControlDiscovery") {} |
| 66 | 66 | ||
| 67 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 67 | export const make = Effect.gen(function* () { | 68 | export const make = Effect.gen(function* () { |
| 68 | const config = yield* ServerConfig; | 69 | const config = yield* ServerConfig; |
| 69 | const process = yield* VcsProcess.VcsProcess; | 70 | const process = yield* VcsProcess.VcsProcess; |
apps/server/src/sourceControl/SourceControlProvider.ts+1-1| ... | @@ -61,7 +61,7 @@ export function parseSourceControlOwnerRef( | ... | @@ -61,7 +61,7 @@ export function parseSourceControlOwnerRef( |
| 61 | return owner && refName ? { owner, refName } : undefined; | 61 | return owner && refName ? { owner, refName } : undefined; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | export function normalizeSourceBranch(headSelector: string): string { | 64 | function normalizeSourceBranch(headSelector: string): string { |
| 65 | return parseSourceControlOwnerRef(headSelector)?.refName ?? headSelector.trim(); | 65 | return parseSourceControlOwnerRef(headSelector)?.refName ?? headSelector.trim(); |
| 66 | } | 66 | } |
| 67 | 67 |
apps/server/src/sourceControl/SourceControlProviderDiscovery.ts+1-1| ... | @@ -115,7 +115,7 @@ export function providerAuth(input: { | ... | @@ -115,7 +115,7 @@ export function providerAuth(input: { |
| 115 | }; | 115 | }; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | export function unknownAuth(detail?: string): SourceControlProviderAuth { | 118 | function unknownAuth(detail?: string): SourceControlProviderAuth { |
| 119 | return providerAuth({ status: "unknown", detail }); | 119 | return providerAuth({ status: "unknown", detail }); |
| 120 | } | 120 | } |
| 121 | 121 |
apps/server/src/sourceControl/SourceControlRateLimit.ts+1| ... | @@ -82,6 +82,7 @@ export function retryAtFromHeader(value: string | undefined, now: number): numbe | ... | @@ -82,6 +82,7 @@ export function retryAtFromHeader(value: string | undefined, now: number): numbe |
| 82 | return Number.isFinite(retryAt) && retryAt > now ? retryAt : undefined; | 82 | return Number.isFinite(retryAt) && retryAt > now ? retryAt : undefined; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 85 | export const make = Effect.gen(function* () { | 86 | export const make = Effect.gen(function* () { |
| 86 | const entries = yield* Ref.make<ReadonlyMap<string, RateLimitEntry>>(new Map()); | 87 | const entries = yield* Ref.make<ReadonlyMap<string, RateLimitEntry>>(new Map()); |
| 87 | 88 |
apps/server/src/sourceControl/SourceControlRepositoryService.ts+1| ... | @@ -77,6 +77,7 @@ function selectRemoteUrl( | ... | @@ -77,6 +77,7 @@ function selectRemoteUrl( |
| 77 | } | 77 | } |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 80 | export const make = Effect.gen(function* () { | 81 | export const make = Effect.gen(function* () { |
| 81 | const config = yield* ServerConfig; | 82 | const config = yield* ServerConfig; |
| 82 | const fileSystem = yield* FileSystem.FileSystem; | 83 | const fileSystem = yield* FileSystem.FileSystem; |
apps/server/src/sourceControl/azureDevOpsPullRequests.ts+1-3| ... | @@ -5,7 +5,7 @@ import * as Option from "effect/Option"; | ... | @@ -5,7 +5,7 @@ import * as Option from "effect/Option"; |
| 5 | import * as Result from "effect/Result"; | 5 | import * as Result from "effect/Result"; |
| 6 | import * as Schema from "effect/Schema"; | 6 | import * as Schema from "effect/Schema"; |
| 7 | import { PositiveInt, TrimmedNonEmptyString } from "@t3tools/contracts"; | 7 | import { PositiveInt, TrimmedNonEmptyString } from "@t3tools/contracts"; |
| 8 | import { decodeJsonResult, formatSchemaError } from "@t3tools/shared/schemaJson"; | 8 | import { decodeJsonResult } from "@t3tools/shared/schemaJson"; |
| 9 | 9 | ||
| 10 | export interface NormalizedAzureDevOpsPullRequestRecord { | 10 | export interface NormalizedAzureDevOpsPullRequestRecord { |
| 11 | readonly number: number; | 11 | readonly number: number; |
| ... | @@ -190,8 +190,6 @@ const decodeAzureDevOpsPullRequestList = decodeJsonResult(Schema.Array(Schema.Un | ... | @@ -190,8 +190,6 @@ const decodeAzureDevOpsPullRequestList = decodeJsonResult(Schema.Array(Schema.Un |
| 190 | const decodeAzureDevOpsPullRequest = decodeJsonResult(AzureDevOpsPullRequestSchema); | 190 | const decodeAzureDevOpsPullRequest = decodeJsonResult(AzureDevOpsPullRequestSchema); |
| 191 | const decodeAzureDevOpsPullRequestEntry = Schema.decodeUnknownExit(AzureDevOpsPullRequestSchema); | 191 | const decodeAzureDevOpsPullRequestEntry = Schema.decodeUnknownExit(AzureDevOpsPullRequestSchema); |
| 192 | 192 | ||
| 193 | export const formatAzureDevOpsJsonDecodeError = formatSchemaError; | ||
| 194 | |||
| 195 | export function decodeAzureDevOpsPullRequestListJson( | 193 | export function decodeAzureDevOpsPullRequestListJson( |
| 196 | raw: string, | 194 | raw: string, |
| 197 | ): Result.Result< | 195 | ): Result.Result< |
apps/server/src/sourceControl/gitHubPullRequests.ts+1-3| ... | @@ -5,7 +5,7 @@ import * as Option from "effect/Option"; | ... | @@ -5,7 +5,7 @@ import * as Option from "effect/Option"; |
| 5 | import * as Result from "effect/Result"; | 5 | import * as Result from "effect/Result"; |
| 6 | import * as Schema from "effect/Schema"; | 6 | import * as Schema from "effect/Schema"; |
| 7 | import { PositiveInt, TrimmedNonEmptyString } from "@t3tools/contracts"; | 7 | import { PositiveInt, TrimmedNonEmptyString } from "@t3tools/contracts"; |
| 8 | import { decodeJsonResult, formatSchemaError } from "@t3tools/shared/schemaJson"; | 8 | import { decodeJsonResult } from "@t3tools/shared/schemaJson"; |
| 9 | 9 | ||
| 10 | export interface NormalizedGitHubPullRequestRecord { | 10 | export interface NormalizedGitHubPullRequestRecord { |
| 11 | readonly number: number; | 11 | readonly number: number; |
| ... | @@ -114,8 +114,6 @@ const decodeGitHubPullRequestList = decodeJsonResult(Schema.Array(Schema.Unknown | ... | @@ -114,8 +114,6 @@ const decodeGitHubPullRequestList = decodeJsonResult(Schema.Array(Schema.Unknown |
| 114 | const decodeGitHubPullRequest = decodeJsonResult(GitHubPullRequestSchema); | 114 | const decodeGitHubPullRequest = decodeJsonResult(GitHubPullRequestSchema); |
| 115 | const decodeGitHubPullRequestEntry = Schema.decodeUnknownExit(GitHubPullRequestSchema); | 115 | const decodeGitHubPullRequestEntry = Schema.decodeUnknownExit(GitHubPullRequestSchema); |
| 116 | 116 | ||
| 117 | export const formatGitHubJsonDecodeError = formatSchemaError; | ||
| 118 | |||
| 119 | export function decodeGitHubPullRequestListJson( | 117 | export function decodeGitHubPullRequestListJson( |
| 120 | raw: string, | 118 | raw: string, |
| 121 | ): Result.Result< | 119 | ): Result.Result< |
apps/server/src/sourceControl/gitLabMergeRequests.ts+1-3| ... | @@ -5,7 +5,7 @@ import * as Option from "effect/Option"; | ... | @@ -5,7 +5,7 @@ import * as Option from "effect/Option"; |
| 5 | import * as Result from "effect/Result"; | 5 | import * as Result from "effect/Result"; |
| 6 | import * as Schema from "effect/Schema"; | 6 | import * as Schema from "effect/Schema"; |
| 7 | import { PositiveInt, TrimmedNonEmptyString } from "@t3tools/contracts"; | 7 | import { PositiveInt, TrimmedNonEmptyString } from "@t3tools/contracts"; |
| 8 | import { decodeJsonResult, formatSchemaError } from "@t3tools/shared/schemaJson"; | 8 | import { decodeJsonResult } from "@t3tools/shared/schemaJson"; |
| 9 | 9 | ||
| 10 | export interface NormalizedGitLabMergeRequestRecord { | 10 | export interface NormalizedGitLabMergeRequestRecord { |
| 11 | readonly number: number; | 11 | readonly number: number; |
| ... | @@ -129,8 +129,6 @@ const decodeGitLabMergeRequestList = decodeJsonResult(Schema.Array(Schema.Unknow | ... | @@ -129,8 +129,6 @@ const decodeGitLabMergeRequestList = decodeJsonResult(Schema.Array(Schema.Unknow |
| 129 | const decodeGitLabMergeRequest = decodeJsonResult(GitLabMergeRequestSchema); | 129 | const decodeGitLabMergeRequest = decodeJsonResult(GitLabMergeRequestSchema); |
| 130 | const decodeGitLabMergeRequestEntry = Schema.decodeUnknownExit(GitLabMergeRequestSchema); | 130 | const decodeGitLabMergeRequestEntry = Schema.decodeUnknownExit(GitLabMergeRequestSchema); |
| 131 | 131 | ||
| 132 | export const formatGitLabJsonDecodeError = formatSchemaError; | ||
| 133 | |||
| 134 | export function decodeGitLabMergeRequestListJson( | 132 | export function decodeGitLabMergeRequestListJson( |
| 135 | raw: string, | 133 | raw: string, |
| 136 | ): Result.Result< | 134 | ): Result.Result< |
apps/server/src/sourceControl/githubGraphQlBudget.ts+1| ... | @@ -77,6 +77,7 @@ function withRateLimit(document: string): string { | ... | @@ -77,6 +77,7 @@ function withRateLimit(document: string): string { |
| 77 | return `${document.slice(0, end)}\n ${RATE_LIMIT_SELECTION}\n${document.slice(end)}`; | 77 | return `${document.slice(0, end)}\n ${RATE_LIMIT_SELECTION}\n${document.slice(end)}`; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | /** @public Service construction is part of the canonical Effect module API. */ | ||
| 80 | export const make = Effect.gen(function* () { | 81 | export const make = Effect.gen(function* () { |
| 81 | const snapshots = yield* Ref.make<ReadonlyMap<string, GraphQlBudgetSnapshot>>(new Map()); | 82 | const snapshots = yield* Ref.make<ReadonlyMap<string, GraphQlBudgetSnapshot>>(new Map()); |
| 82 | 83 |