Skip to content
Myr

upstream.ts

This file

Path

packages/git/src/upstream.ts

33 lines · 998 bytes · TypeScript

Last changed by

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 1–7why, one step back
1import { RepoName } from "@repo/artifacts/repo-host";
2import type { RepoNotFound } from "@repo/artifacts/repo-host";3import { Context, Data, Schema } from "effect";4import type { Effect } from "effect";56export type Service = "git-upload-pack" | "git-receive-pack";7

Merge build/comments-packages-rest into mainoscabrielbefore adoption38cd503

line 8why, one step back
8/** The client's credentials are never among the headers. */

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 9–33why, one step back
9export type Exchange = Data.TaggedEnum<{
10 Advertise: { readonly service: Service; readonly headers: Headers };11 Call: {12 readonly service: Service;13 readonly headers: Headers;14 readonly body: ReadableStream<Uint8Array>;15 };16}>;1718export const Exchange = Data.taggedEnum<Exchange>();1920export class UpstreamFailure extends Schema.TaggedError<UpstreamFailure>()(21 "UpstreamFailure",22 { reason: Schema.String, repo: RepoName }23) {}2425export class Upstream extends Context.Service<26 Upstream,27 {28 readonly exchange: (29 repo: RepoName,30 exchange: Exchange31 ) => Effect.Effect<Response, RepoNotFound | UpstreamFailure>;32 }33>()("git/Upstream") {}