@ref0/git 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access/private-refs.mjs +3 -3
- package/dist/auth/auth.d.mts +2 -2
- package/dist/auth/auth.mjs +3 -6
- package/dist/auth/authorize.mjs +1 -17
- package/dist/auth/helpers.mjs +3 -11
- package/dist/auth/host-services.mjs +11 -0
- package/dist/auth/policy.d.mts +27 -7
- package/dist/auth/policy.mjs +8 -4
- package/dist/auth/tokens-layer.d.mts +1 -2
- package/dist/auth/tokens-layer.mjs +2 -3
- package/dist/auth/tokens-public.d.mts +3 -3
- package/dist/auth/tokens.d.mts +1 -8
- package/dist/auth/tokens.mjs +1 -8
- package/dist/auth.d.mts +1 -4
- package/dist/auth.mjs +1 -3
- package/dist/client/git-http.mjs +18 -4
- package/dist/client/push-upload.mjs +33 -7
- package/dist/client/remote.mjs +94 -28
- package/dist/client/slice-push.d.mts +1 -1
- package/dist/contracts/access.d.mts +8 -8
- package/dist/contracts/actors.d.mts +2 -34
- package/dist/contracts/blobs.d.mts +2 -2
- package/dist/contracts/client.d.mts +8 -3
- package/dist/contracts/commits.d.mts +10 -2
- package/dist/contracts/commits.mjs +9 -1
- package/dist/contracts/files.d.mts +2 -2
- package/dist/contracts/forks.d.mts +11 -1
- package/dist/contracts/git.d.mts +18 -7
- package/dist/contracts/git.mjs +3 -2
- package/dist/contracts/lfs.d.mts +0 -7
- package/dist/contracts/objects.d.mts +80 -10
- package/dist/contracts/operations.d.mts +3 -0
- package/dist/contracts/operations.mjs +12 -2
- package/dist/contracts/push-uploads.d.mts +44 -5
- package/dist/contracts/push-uploads.mjs +7 -3
- package/dist/contracts/refs.d.mts +28 -6
- package/dist/contracts/remote.mjs +1 -3
- package/dist/contracts/repo-records.d.mts +1 -0
- package/dist/contracts/repos.d.mts +90 -2
- package/dist/contracts/repos.mjs +29 -2
- package/dist/contracts/result.d.mts +23 -18
- package/dist/contracts/result.mjs +17 -4
- package/dist/contracts/rules.d.mts +22 -22
- package/dist/contracts/server.d.mts +28 -77
- package/dist/contracts/signin.d.mts +1 -1
- package/dist/contracts/sync.d.mts +79 -19
- package/dist/contracts/sync.mjs +34 -10
- package/dist/contracts/tokens.d.mts +1 -6
- package/dist/contracts/tokens.mjs +1 -2
- package/dist/contracts/topics.d.mts +0 -5
- package/dist/contracts/work.d.mts +66 -2
- package/dist/contracts/work.mjs +8 -1
- package/dist/core/access.mjs +27 -5
- package/dist/core/ancestry.d.mts +9 -0
- package/dist/core/ancestry.mjs +6 -6
- package/dist/core/asked.mjs +42 -4
- package/dist/core/call-names.mjs +1 -0
- package/dist/core/call-services.mjs +2 -1
- package/dist/core/events/deliver.mjs +10 -2
- package/dist/core/forks.mjs +3 -3
- package/dist/core/imports.mjs +147 -9
- package/dist/core/index-job.mjs +9 -6
- package/dist/core/job-view.mjs +8 -9
- package/dist/core/mirror-rows.mjs +19 -4
- package/dist/core/objects/commits.mjs +16 -6
- package/dist/core/parts.d.mts +6 -1
- package/dist/core/parts.mjs +1 -4
- package/dist/core/purge.mjs +76 -6
- package/dist/core/push-decide.mjs +1 -1
- package/dist/core/push-files.d.mts +12 -0
- package/dist/core/push-files.mjs +225 -0
- package/dist/core/push-repo.d.mts +8 -0
- package/dist/core/push-repo.mjs +56 -0
- package/dist/core/push.d.mts +17 -0
- package/dist/core/push.mjs +98 -26
- package/dist/core/receipts.mjs +26 -10
- package/dist/core/ref-view.mjs +59 -5
- package/dist/core/refs.mjs +13 -8
- package/dist/core/repack.mjs +11 -8
- package/dist/core/repo-info.mjs +16 -9
- package/dist/core/repos.mjs +30 -14
- package/dist/core/seam.mjs +2 -2
- package/dist/core/view.d.mts +6 -0
- package/dist/core/view.mjs +45 -12
- package/dist/core/work.mjs +47 -22
- package/dist/effect.d.mts +3 -1
- package/dist/effect.mjs +3 -1
- package/dist/engine/reads.mjs +13 -6
- package/dist/engine/walk.mjs +4 -4
- package/dist/event-streams/event-streams.d.mts +1 -1
- package/dist/event-streams/event-streams.mjs +1 -1
- package/dist/event-streams/stream.d.mts +1 -1
- package/dist/event-streams/stream.mjs +1 -1
- package/dist/extend.d.mts +3 -3
- package/dist/extend.mjs +2 -2
- package/dist/http/answers.mjs +4 -2
- package/dist/http/core-parts.mjs +64 -15
- package/dist/http/handler.mjs +2 -2
- package/dist/http/node.mjs +5 -4
- package/dist/http/parts.d.mts +1 -0
- package/dist/http/push-upload-job.mjs +503 -0
- package/dist/http/push-uploads.d.mts +1 -0
- package/dist/http/push-uploads.mjs +114 -56
- package/dist/http/upload-pack.mjs +7 -6
- package/dist/index.d.mts +23 -24
- package/dist/index.mjs +4 -7
- package/dist/lfs/base.d.mts +7 -3
- package/dist/lfs/base.mjs +2 -1
- package/dist/lfs/copy.d.mts +46 -0
- package/dist/lfs/copy.mjs +26 -0
- package/dist/lfs/layer.mjs +4 -2
- package/dist/lfs/objects.d.mts +6 -0
- package/dist/lfs/objects.mjs +68 -41
- package/dist/lfs/rows.d.mts +13 -0
- package/dist/lfs/service.d.mts +1 -7
- package/dist/lfs/service.mjs +1 -9
- package/dist/lfs/upload-most.mjs +5 -5
- package/dist/node.d.mts +2 -2
- package/dist/protocol/bytes/sha256-hasher.d.mts +15 -0
- package/dist/protocol/bytes/sha256.d.mts +32 -0
- package/dist/protocol/bytes/sha256.mjs +105 -49
- package/dist/protocol/wire/advertisement.mjs +9 -4
- package/dist/protocol/wire/lines.d.mts +4 -2
- package/dist/protocol/wire/lines.mjs +11 -5
- package/dist/protocol/wire/push-uploads.mjs +13 -1
- package/dist/protocol/wire/v2.mjs +2 -2
- package/dist/protocol.d.mts +3 -1
- package/dist/protocol.mjs +3 -1
- package/dist/queue/advance.mjs +1 -1
- package/dist/queue/host.d.mts +1 -7
- package/dist/queue/host.mjs +1 -7
- package/dist/queue/layer.mjs +1 -1
- package/dist/queue/trim.mjs +1 -1
- package/dist/rest/blobs.d.mts +31 -23
- package/dist/rest/blobs.mjs +1 -1
- package/dist/rest/caller.d.mts +49 -9
- package/dist/rest/caller.mjs +1 -1
- package/dist/rest/client.d.mts +10 -3
- package/dist/rest/client.mjs +4 -0
- package/dist/rest/commits.d.mts +273 -240
- package/dist/rest/errors.d.mts +24 -4
- package/dist/rest/events.d.mts +9 -6
- package/dist/rest/events.mjs +1 -2
- package/dist/rest/files.d.mts +127 -115
- package/dist/rest/forks.d.mts +121 -97
- package/dist/rest/handler.mjs +4 -57
- package/dist/rest/handlers.d.mts +1 -1
- package/dist/rest/handlers.mjs +18 -4
- package/dist/rest/layer.mjs +2 -1
- package/dist/rest/me.d.mts +8 -4
- package/dist/rest/merges.d.mts +8 -4
- package/dist/rest/paths.mjs +1 -0
- package/dist/rest/queue.d.mts +282 -226
- package/dist/rest/refs.d.mts +205 -176
- package/dist/rest/repos.d.mts +108 -80
- package/dist/rest/tags.d.mts +24 -12
- package/dist/rest/tokens.d.mts +235 -211
- package/dist/rest/topics.d.mts +53 -33
- package/dist/rest/trees.d.mts +105 -89
- package/dist/rest/work.d.mts +467 -20
- package/dist/rest/work.mjs +8 -0
- package/dist/server/edge-node.d.mts +9 -13
- package/dist/server/edge-node.mjs +9 -12
- package/dist/server/git-layer.d.mts +1 -6
- package/dist/server/git-layer.mjs +2 -2
- package/dist/server/git-namespace.d.mts +3 -3
- package/dist/server/joined.d.mts +15 -22
- package/dist/server/joined.mjs +5 -29
- package/dist/server/lifecycle.mjs +107 -23
- package/dist/server/registry.mjs +9 -1
- package/dist/server/server.mjs +133 -212
- package/dist/storage/budget.mjs +2 -2
- package/dist/storage/clean-up.mjs +13 -10
- package/dist/storage/fetch.mjs +13 -8
- package/dist/storage/file-limits.mjs +24 -0
- package/dist/storage/index-build.d.mts +1 -0
- package/dist/storage/index-build.mjs +106 -62
- package/dist/storage/index-fetch.mjs +16 -3
- package/dist/storage/index-reach.mjs +33 -5
- package/dist/storage/index-remap.mjs +8 -1
- package/dist/storage/index-shallow.mjs +5 -3
- package/dist/storage/largest-files.mjs +48 -0
- package/dist/storage/lfs-pointers.mjs +10 -1
- package/dist/storage/loose.mjs +3 -1
- package/dist/storage/memory-budget.mjs +28 -4
- package/dist/storage/pack-reads.mjs +8 -8
- package/dist/storage/pack-receive.mjs +83 -25
- package/dist/storage/packs.mjs +37 -21
- package/dist/storage/prune-keep.mjs +203 -34
- package/dist/storage/prune-walk.mjs +54 -16
- package/dist/storage/prune.mjs +629 -196
- package/dist/storage/push-uploads.mjs +36 -12
- package/dist/storage/quarantine.mjs +9 -9
- package/dist/storage/ready.mjs +47 -19
- package/dist/storage/receive-bounds.mjs +29 -8
- package/dist/storage/receive-state.mjs +8 -0
- package/dist/storage/receive-steps.mjs +71 -18
- package/dist/storage/repack.d.mts +1 -1
- package/dist/storage/repack.mjs +1 -8
- package/dist/storage/rows.mjs +12 -1
- package/dist/storage/shallow.d.mts +1 -0
- package/dist/storage/shallow.mjs +26 -4
- package/dist/storage/stream-whole.mjs +5 -2
- package/dist/storage/visible.mjs +29 -1
- package/dist/storage/walk.mjs +2 -1
- package/dist/store/catalogue.mjs +1 -0
- package/dist/store/cursor-seal-namespace.d.mts +2 -0
- package/dist/store/cursor-seal-public.d.mts +5 -0
- package/dist/store/cursor-seal-public.mjs +5 -0
- package/dist/store/cursor-seal.d.mts +16 -2
- package/dist/store/cursor-seal.mjs +26 -14
- package/dist/store/errors.mjs +9 -1
- package/dist/store/records.d.mts +2 -0
- package/dist/store/records.mjs +9 -6
- package/dist/store/repo-record.d.mts +9 -7
- package/dist/store/repo-record.mjs +102 -19
- package/dist/store/scopes.mjs +10 -2
- package/dist/sync/bound.d.mts +2 -0
- package/dist/sync/bound.mjs +11 -2
- package/dist/sync/github.d.mts +6 -1
- package/dist/sync/github.mjs +55 -43
- package/dist/sync/http.mjs +36 -1
- package/dist/sync/import.mjs +1 -0
- package/dist/sync/layer.mjs +6 -2
- package/dist/sync/lfs-batch.mjs +119 -0
- package/dist/sync/lfs-copy.mjs +251 -0
- package/dist/sync/mirror.mjs +210 -137
- package/dist/sync/smart-http.mjs +4 -2
- package/dist/sync/step.mjs +25 -5
- package/dist/sync/tries.mjs +45 -14
- package/dist/sync.d.mts +2 -2
- package/dist/topics/host.mjs +1 -19
- package/dist/topics/layer.mjs +1 -1
- package/package.json +3 -8
- package/dist/auth/bridge.mjs +0 -30
- package/dist/auth/helpers.d.mts +0 -17
- package/dist/core/purge.d.mts +0 -8
- package/dist/core/registered-rows.d.mts +0 -5
- package/dist/core/repack.d.mts +0 -11
- package/dist/http/handler.d.mts +0 -2
- package/dist/rest/handler.d.mts +0 -21
- package/dist/rest.d.mts +0 -2
- package/dist/rest.mjs +0 -1
- package/dist/server/registry.d.mts +0 -16
- package/dist/server/server.d.mts +0 -36
- package/dist/storage/repack-job.d.mts +0 -3
- package/dist/topics/host.d.mts +0 -7
package/dist/rest/forks.d.mts
CHANGED
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
import { GitCallerMiddleware, GitRestServices } from "./caller.mjs";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/http-api";
|
|
4
|
-
declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndpoint.HttpApiEndpoint<"
|
|
4
|
+
declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/repos/:repo/-/forks", Schema.toCodecStringTree<Schema.Struct<{
|
|
5
5
|
repo: Schema.String;
|
|
6
|
-
}>>, Schema.
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}>>;
|
|
36
|
-
}
|
|
37
|
-
readonly next: Schema.optionalKey<Schema.String>;
|
|
6
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
7
|
+
readonly holder: Schema.String;
|
|
8
|
+
readonly key: Schema.optionalKey<Schema.String>;
|
|
9
|
+
readonly name: Schema.optionalKey<Schema.String>;
|
|
10
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
11
|
+
readonly name: Schema.String;
|
|
12
|
+
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
|
13
|
+
readonly public: Schema.Boolean;
|
|
14
|
+
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
15
|
+
readonly shallow: Schema.Boolean;
|
|
16
|
+
readonly stats: Schema.Struct<{
|
|
17
|
+
readonly repo: Schema.String;
|
|
18
|
+
readonly refs: Schema.Number;
|
|
19
|
+
readonly packs: Schema.optionalKey<Schema.Number>;
|
|
20
|
+
readonly packBytes: Schema.optionalKey<Schema.Number>;
|
|
21
|
+
readonly ownBytes: Schema.optionalKey<Schema.Number>;
|
|
22
|
+
readonly pushedAt: Schema.optionalKey<Schema.Number>;
|
|
23
|
+
readonly maintainedAt: Schema.optionalKey<Schema.Number>;
|
|
24
|
+
}>;
|
|
25
|
+
readonly work: Schema.optionalKey<Schema.Struct<{
|
|
26
|
+
readonly waiting: Schema.Number;
|
|
27
|
+
readonly oldestDue: Schema.optionalKey<Schema.Number>;
|
|
28
|
+
readonly failed: Schema.Number;
|
|
29
|
+
readonly oldestFailed: Schema.optionalKey<Schema.Number>;
|
|
30
|
+
readonly index: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
31
|
+
readonly state: Schema.Literal<"refused">;
|
|
32
|
+
readonly retryAt: Schema.Number;
|
|
33
|
+
}>, Schema.Struct<{
|
|
34
|
+
readonly state: Schema.Literal<"too-large">;
|
|
35
|
+
}>]>>;
|
|
36
|
+
}>>;
|
|
38
37
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
39
38
|
readonly code: "ALREADY_EXISTS";
|
|
40
39
|
readonly message: string;
|
|
@@ -139,6 +138,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
139
138
|
readonly reason?: string;
|
|
140
139
|
readonly packs?: number;
|
|
141
140
|
readonly most?: number;
|
|
141
|
+
readonly retryAfter?: number;
|
|
142
142
|
};
|
|
143
143
|
}, unknown, never, never>, Schema.Codec<{
|
|
144
144
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -244,6 +244,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
244
244
|
readonly reason?: string;
|
|
245
245
|
readonly packs?: number;
|
|
246
246
|
readonly most?: number;
|
|
247
|
+
readonly retryAfter?: number;
|
|
247
248
|
};
|
|
248
249
|
}, unknown, never, never>, {
|
|
249
250
|
"ref0-code": Schema.String;
|
|
@@ -319,7 +320,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
319
320
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
320
321
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
321
322
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
322
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
323
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
323
324
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
324
325
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
325
326
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -335,9 +336,10 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
335
336
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
336
337
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
337
338
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
338
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
339
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
339
340
|
packs: Schema.optionalKey<Schema.Number>;
|
|
340
341
|
most: Schema.optionalKey<Schema.Number>;
|
|
342
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
341
343
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
342
344
|
}>, Schema.Struct<{
|
|
343
345
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -411,7 +413,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
411
413
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
412
414
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
413
415
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
414
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
416
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
415
417
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
416
418
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
417
419
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -427,21 +429,24 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
427
429
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
428
430
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
429
431
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
430
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
432
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
431
433
|
packs: Schema.optionalKey<Schema.Number>;
|
|
432
434
|
most: Schema.optionalKey<Schema.Number>;
|
|
435
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
433
436
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
434
437
|
}>, {
|
|
435
438
|
"ref0-code": Schema.String;
|
|
436
439
|
'www-authenticate': Schema.String;
|
|
437
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
440
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"sync", "POST", "/repos/:repo/-/forks/sync", Schema.toCodecStringTree<Schema.Struct<{
|
|
438
441
|
repo: Schema.String;
|
|
439
|
-
|
|
440
|
-
|
|
442
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
443
|
+
key: Schema.optionalKey<Schema.String>;
|
|
444
|
+
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
441
445
|
readonly name: Schema.String;
|
|
442
446
|
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
|
443
447
|
readonly public: Schema.Boolean;
|
|
444
448
|
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
449
|
+
readonly shallow: Schema.Boolean;
|
|
445
450
|
readonly stats: Schema.Struct<{
|
|
446
451
|
readonly repo: Schema.String;
|
|
447
452
|
readonly refs: Schema.Number;
|
|
@@ -567,6 +572,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
567
572
|
readonly reason?: string;
|
|
568
573
|
readonly packs?: number;
|
|
569
574
|
readonly most?: number;
|
|
575
|
+
readonly retryAfter?: number;
|
|
570
576
|
};
|
|
571
577
|
}, unknown, never, never>, Schema.Codec<{
|
|
572
578
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -672,6 +678,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
672
678
|
readonly reason?: string;
|
|
673
679
|
readonly packs?: number;
|
|
674
680
|
readonly most?: number;
|
|
681
|
+
readonly retryAfter?: number;
|
|
675
682
|
};
|
|
676
683
|
}, unknown, never, never>, {
|
|
677
684
|
"ref0-code": Schema.String;
|
|
@@ -747,7 +754,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
747
754
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
748
755
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
749
756
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
750
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
757
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
751
758
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
752
759
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
753
760
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -763,9 +770,10 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
763
770
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
764
771
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
765
772
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
766
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
773
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
767
774
|
packs: Schema.optionalKey<Schema.Number>;
|
|
768
775
|
most: Schema.optionalKey<Schema.Number>;
|
|
776
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
769
777
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
770
778
|
}>, Schema.Struct<{
|
|
771
779
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -839,7 +847,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
839
847
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
840
848
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
841
849
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
842
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
850
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
843
851
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
844
852
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
845
853
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -855,22 +863,49 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
855
863
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
856
864
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
857
865
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
858
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
866
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
859
867
|
packs: Schema.optionalKey<Schema.Number>;
|
|
860
868
|
most: Schema.optionalKey<Schema.Number>;
|
|
869
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
861
870
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
862
871
|
}>, {
|
|
863
872
|
"ref0-code": Schema.String;
|
|
864
873
|
'www-authenticate': Schema.String;
|
|
865
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
874
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/repos/:repo/-/forks", Schema.toCodecStringTree<Schema.Struct<{
|
|
866
875
|
repo: Schema.String;
|
|
867
|
-
}>>,
|
|
868
|
-
readonly
|
|
869
|
-
readonly
|
|
870
|
-
|
|
876
|
+
}>>, Schema.toCodecStringTree<Schema.Struct<{
|
|
877
|
+
readonly after: Schema.optionalKey<Schema.String>;
|
|
878
|
+
readonly limit: Schema.optionalKey<Schema.Int>;
|
|
879
|
+
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
880
|
+
readonly items: Schema.mutable<Schema.$Array<Schema.Struct<{
|
|
871
881
|
readonly name: Schema.String;
|
|
872
|
-
readonly
|
|
873
|
-
|
|
882
|
+
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
|
883
|
+
readonly public: Schema.Boolean;
|
|
884
|
+
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
885
|
+
readonly shallow: Schema.Boolean;
|
|
886
|
+
readonly stats: Schema.Struct<{
|
|
887
|
+
readonly repo: Schema.String;
|
|
888
|
+
readonly refs: Schema.Number;
|
|
889
|
+
readonly packs: Schema.optionalKey<Schema.Number>;
|
|
890
|
+
readonly packBytes: Schema.optionalKey<Schema.Number>;
|
|
891
|
+
readonly ownBytes: Schema.optionalKey<Schema.Number>;
|
|
892
|
+
readonly pushedAt: Schema.optionalKey<Schema.Number>;
|
|
893
|
+
readonly maintainedAt: Schema.optionalKey<Schema.Number>;
|
|
894
|
+
}>;
|
|
895
|
+
readonly work: Schema.optionalKey<Schema.Struct<{
|
|
896
|
+
readonly waiting: Schema.Number;
|
|
897
|
+
readonly oldestDue: Schema.optionalKey<Schema.Number>;
|
|
898
|
+
readonly failed: Schema.Number;
|
|
899
|
+
readonly oldestFailed: Schema.optionalKey<Schema.Number>;
|
|
900
|
+
readonly index: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
901
|
+
readonly state: Schema.Literal<"refused">;
|
|
902
|
+
readonly retryAt: Schema.Number;
|
|
903
|
+
}>, Schema.Struct<{
|
|
904
|
+
readonly state: Schema.Literal<"too-large">;
|
|
905
|
+
}>]>>;
|
|
906
|
+
}>>;
|
|
907
|
+
}>>>;
|
|
908
|
+
readonly next: Schema.optionalKey<Schema.String>;
|
|
874
909
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
875
910
|
readonly code: "ALREADY_EXISTS";
|
|
876
911
|
readonly message: string;
|
|
@@ -975,6 +1010,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
975
1010
|
readonly reason?: string;
|
|
976
1011
|
readonly packs?: number;
|
|
977
1012
|
readonly most?: number;
|
|
1013
|
+
readonly retryAfter?: number;
|
|
978
1014
|
};
|
|
979
1015
|
}, unknown, never, never>, Schema.Codec<{
|
|
980
1016
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -1080,6 +1116,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1080
1116
|
readonly reason?: string;
|
|
1081
1117
|
readonly packs?: number;
|
|
1082
1118
|
readonly most?: number;
|
|
1119
|
+
readonly retryAfter?: number;
|
|
1083
1120
|
};
|
|
1084
1121
|
}, unknown, never, never>, {
|
|
1085
1122
|
"ref0-code": Schema.String;
|
|
@@ -1155,7 +1192,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1155
1192
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
1156
1193
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1157
1194
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1158
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1195
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1159
1196
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
1160
1197
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
1161
1198
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -1171,9 +1208,10 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1171
1208
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1172
1209
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1173
1210
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1174
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1211
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1175
1212
|
packs: Schema.optionalKey<Schema.Number>;
|
|
1176
1213
|
most: Schema.optionalKey<Schema.Number>;
|
|
1214
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
1177
1215
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
1178
1216
|
}>, Schema.Struct<{
|
|
1179
1217
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -1247,7 +1285,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1247
1285
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
1248
1286
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1249
1287
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1250
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1288
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1251
1289
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
1252
1290
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
1253
1291
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -1263,42 +1301,22 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1263
1301
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1264
1302
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1265
1303
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1266
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1304
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1267
1305
|
packs: Schema.optionalKey<Schema.Number>;
|
|
1268
1306
|
most: Schema.optionalKey<Schema.Number>;
|
|
1307
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
1269
1308
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
1270
1309
|
}>, {
|
|
1271
1310
|
"ref0-code": Schema.String;
|
|
1272
1311
|
'www-authenticate': Schema.String;
|
|
1273
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1312
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"fetch", "POST", "/repos/:repo/-/forks/fetch", Schema.toCodecStringTree<Schema.Struct<{
|
|
1274
1313
|
repo: Schema.String;
|
|
1275
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
readonly
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
1282
|
-
readonly stats: Schema.Struct<{
|
|
1283
|
-
readonly repo: Schema.String;
|
|
1284
|
-
readonly refs: Schema.Number;
|
|
1285
|
-
readonly packs: Schema.optionalKey<Schema.Number>;
|
|
1286
|
-
readonly packBytes: Schema.optionalKey<Schema.Number>;
|
|
1287
|
-
readonly ownBytes: Schema.optionalKey<Schema.Number>;
|
|
1288
|
-
readonly pushedAt: Schema.optionalKey<Schema.Number>;
|
|
1289
|
-
readonly maintainedAt: Schema.optionalKey<Schema.Number>;
|
|
1290
|
-
}>;
|
|
1291
|
-
readonly work: Schema.optionalKey<Schema.Struct<{
|
|
1292
|
-
readonly waiting: Schema.Number;
|
|
1293
|
-
readonly oldestDue: Schema.optionalKey<Schema.Number>;
|
|
1294
|
-
readonly failed: Schema.Number;
|
|
1295
|
-
readonly oldestFailed: Schema.optionalKey<Schema.Number>;
|
|
1296
|
-
readonly index: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
1297
|
-
readonly state: Schema.Literal<"refused">;
|
|
1298
|
-
readonly retryAt: Schema.Number;
|
|
1299
|
-
}>, Schema.Struct<{
|
|
1300
|
-
readonly state: Schema.Literal<"too-large">;
|
|
1301
|
-
}>]>>;
|
|
1314
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1315
|
+
readonly source: Schema.String;
|
|
1316
|
+
readonly head: Schema.optionalKey<Schema.String>;
|
|
1317
|
+
readonly tips: Schema.$Array<Schema.Struct<{
|
|
1318
|
+
readonly name: Schema.String;
|
|
1319
|
+
readonly oid: Schema.String;
|
|
1302
1320
|
}>>;
|
|
1303
1321
|
}>>, Schema.toCodecJson<HttpApiSchema.encodeToWithHeaders<Schema.Codec<{
|
|
1304
1322
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -1404,6 +1422,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1404
1422
|
readonly reason?: string;
|
|
1405
1423
|
readonly packs?: number;
|
|
1406
1424
|
readonly most?: number;
|
|
1425
|
+
readonly retryAfter?: number;
|
|
1407
1426
|
};
|
|
1408
1427
|
}, unknown, never, never>, Schema.Codec<{
|
|
1409
1428
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -1509,6 +1528,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1509
1528
|
readonly reason?: string;
|
|
1510
1529
|
readonly packs?: number;
|
|
1511
1530
|
readonly most?: number;
|
|
1531
|
+
readonly retryAfter?: number;
|
|
1512
1532
|
};
|
|
1513
1533
|
}, unknown, never, never>, {
|
|
1514
1534
|
"ref0-code": Schema.String;
|
|
@@ -1584,7 +1604,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1584
1604
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
1585
1605
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1586
1606
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1587
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1607
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1588
1608
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
1589
1609
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
1590
1610
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -1600,9 +1620,10 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1600
1620
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1601
1621
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1602
1622
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1603
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1623
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1604
1624
|
packs: Schema.optionalKey<Schema.Number>;
|
|
1605
1625
|
most: Schema.optionalKey<Schema.Number>;
|
|
1626
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
1606
1627
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
1607
1628
|
}>, Schema.Struct<{
|
|
1608
1629
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -1676,7 +1697,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1676
1697
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
1677
1698
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1678
1699
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1679
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1700
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1680
1701
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
1681
1702
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
1682
1703
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -1692,24 +1713,23 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1692
1713
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1693
1714
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
1694
1715
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
1695
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1716
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
1696
1717
|
packs: Schema.optionalKey<Schema.Number>;
|
|
1697
1718
|
most: Schema.optionalKey<Schema.Number>;
|
|
1719
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
1698
1720
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
1699
1721
|
}>, {
|
|
1700
1722
|
"ref0-code": Schema.String;
|
|
1701
1723
|
'www-authenticate': Schema.String;
|
|
1702
|
-
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
1724
|
+
}>>, GitCallerMiddleware, GitRestServices> | HttpApiEndpoint.HttpApiEndpoint<"get", "GET", "/repos/:repo/-/forks/:holder", Schema.toCodecStringTree<Schema.Struct<{
|
|
1703
1725
|
repo: Schema.String;
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
readonly key: Schema.optionalKey<Schema.String>;
|
|
1707
|
-
readonly name: Schema.optionalKey<Schema.String>;
|
|
1708
|
-
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
1726
|
+
holder: Schema.String;
|
|
1727
|
+
}>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
1709
1728
|
readonly name: Schema.String;
|
|
1710
1729
|
readonly defaultBranch: Schema.optionalKey<Schema.String>;
|
|
1711
1730
|
readonly public: Schema.Boolean;
|
|
1712
1731
|
readonly upstream: Schema.optionalKey<Schema.String>;
|
|
1732
|
+
readonly shallow: Schema.Boolean;
|
|
1713
1733
|
readonly stats: Schema.Struct<{
|
|
1714
1734
|
readonly repo: Schema.String;
|
|
1715
1735
|
readonly refs: Schema.Number;
|
|
@@ -1835,6 +1855,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1835
1855
|
readonly reason?: string;
|
|
1836
1856
|
readonly packs?: number;
|
|
1837
1857
|
readonly most?: number;
|
|
1858
|
+
readonly retryAfter?: number;
|
|
1838
1859
|
};
|
|
1839
1860
|
}, unknown, never, never>, Schema.Codec<{
|
|
1840
1861
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -1940,6 +1961,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
1940
1961
|
readonly reason?: string;
|
|
1941
1962
|
readonly packs?: number;
|
|
1942
1963
|
readonly most?: number;
|
|
1964
|
+
readonly retryAfter?: number;
|
|
1943
1965
|
};
|
|
1944
1966
|
}, unknown, never, never>, {
|
|
1945
1967
|
"ref0-code": Schema.String;
|
|
@@ -2015,7 +2037,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
2015
2037
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
2016
2038
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
2017
2039
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
2018
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2040
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2019
2041
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
2020
2042
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
2021
2043
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -2031,9 +2053,10 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
2031
2053
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
2032
2054
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
2033
2055
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
2034
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2056
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2035
2057
|
packs: Schema.optionalKey<Schema.Number>;
|
|
2036
2058
|
most: Schema.optionalKey<Schema.Number>;
|
|
2059
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
2037
2060
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
2038
2061
|
}>, Schema.Struct<{
|
|
2039
2062
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -2107,7 +2130,7 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
2107
2130
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
2108
2131
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
2109
2132
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
2110
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2133
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["too-large", "rate-limited", "walk-limit", "diff-limit", "object-too-large", "repo-too-large", "delta-too-large", "response-too-large", "too-many-pointers", "fetch-plan-too-large", "too-many-store-calls", "call-budget", "events-undelivered", "events-waiting", "name-churn", "queue-full", "queue-targets-full", "too-many-gitmodules-and-gitattributes", "prune-walk-too-large", "job-step-calls", "job-step-yielded"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2111
2134
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
2112
2135
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
2113
2136
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -2123,9 +2146,10 @@ declare const ForksApiGroup_base: HttpApiGroup.HttpApiGroup<"forks", HttpApiEndp
|
|
|
2123
2146
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
2124
2147
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
2125
2148
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
2126
|
-
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2149
|
+
reason: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["busy", "packs-awaiting-repack", "awaiting-index", "may-have-saved", "too-many-writes", "starting"]>, Schema.decodeTo<Schema.String, Schema.String, never, never>]>>;
|
|
2127
2150
|
packs: Schema.optionalKey<Schema.Number>;
|
|
2128
2151
|
most: Schema.optionalKey<Schema.Number>;
|
|
2152
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
2129
2153
|
}>, readonly [Schema.$Record<Schema.String, Schema.Union<readonly [Schema.decodeTo<Schema.String, Schema.String, never, never>, Schema.Number, Schema.Boolean, Schema.$Array<Schema.decodeTo<Schema.String, Schema.String, never, never>>, Schema.Undefined]>>]>>;
|
|
2130
2154
|
}>, {
|
|
2131
2155
|
"ref0-code": Schema.String;
|
package/dist/rest/handler.mjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { gitError } from "../contracts/result.mjs";
|
|
2
|
-
import { lazyParts, seamOf } from "../core/seam.mjs";
|
|
3
2
|
import { RequestCalls, RequestCount } from "../store/call-count.mjs";
|
|
4
3
|
import { isServerClosed } from "../store/closed.mjs";
|
|
5
4
|
import { GitRestApi } from "./api.mjs";
|
|
6
|
-
import {
|
|
5
|
+
import { IncomingRequest } from "./caller.mjs";
|
|
7
6
|
import { jsonError } from "./errors.mjs";
|
|
8
7
|
import { GitRestHandlers } from "./handlers.mjs";
|
|
9
8
|
import { normalBase, restPath, wireRepoPath } from "./paths.mjs";
|
|
10
9
|
import { exitIn, noCall } from "../store/crossing.mjs";
|
|
11
10
|
import { answerSpent } from "../store/errors.mjs";
|
|
12
|
-
import
|
|
11
|
+
import "effect/Effect";
|
|
13
12
|
import * as Option from "effect/Option";
|
|
14
13
|
import * as Cause from "effect/Cause";
|
|
15
14
|
import * as Exit from "effect/Exit";
|
|
@@ -31,11 +30,6 @@ const failed = (cause) => {
|
|
|
31
30
|
onSome: jsonError
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
|
-
/** `door`'s refusal now, thrown when it's the closed one: a failed build answers as JSON. */
|
|
35
|
-
const askClosed = (door) => {
|
|
36
|
-
const refused = door?.refusal();
|
|
37
|
-
if (refused !== void 0 && isServerClosed(refused)) throw refused;
|
|
38
|
-
};
|
|
39
33
|
const notFound = () => jsonError(gitError("NOT_FOUND", "Nothing is served at this URL"));
|
|
40
34
|
/** A 404 the router sent, not a handler: an owned URL with no route for its method or tail. */
|
|
41
35
|
const isRouterMiss = (response) => response.status === 404 && !(response.headers.get("content-type") ?? "").includes("json");
|
|
@@ -89,58 +83,11 @@ const restApp = (parts) => {
|
|
|
89
83
|
const url = new URL(request.url);
|
|
90
84
|
const path = restPath(base, url.pathname);
|
|
91
85
|
if (path === void 0) return void 0;
|
|
92
|
-
|
|
93
|
-
try {
|
|
94
|
-
return await answer(request, url, path);
|
|
95
|
-
} finally {
|
|
96
|
-
askClosed(parts.door);
|
|
97
|
-
}
|
|
86
|
+
return answer(request, url, path);
|
|
98
87
|
};
|
|
99
88
|
return {
|
|
100
89
|
owned,
|
|
101
90
|
dispose: web.dispose
|
|
102
91
|
};
|
|
103
92
|
};
|
|
104
|
-
|
|
105
|
-
const serveRest = (parts) => {
|
|
106
|
-
const { owned, dispose } = restApp(parts);
|
|
107
|
-
const route = async (request) => await owned(request) ?? await parts.route(request);
|
|
108
|
-
return {
|
|
109
|
-
fetch: async (request) => await route(request) ?? notFound(),
|
|
110
|
-
route,
|
|
111
|
-
dispose
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
/**
|
|
115
|
-
* Git's REST API over a server `createGitServer` made: `fetch` answers REST's URLs, then Git's
|
|
116
|
-
* `route`, then a JSON `404`; `route` answers the same and `undefined` outside them.
|
|
117
|
-
*/
|
|
118
|
-
const createRestHandler = (git) => {
|
|
119
|
-
const seam = seamOf(git);
|
|
120
|
-
if (seam === void 0) throw new TypeError("createRestHandler takes a server createGitServer made");
|
|
121
|
-
const { basePath, identify, authorize, callsFor, tokensOn, renamedTo, listen } = lazyParts(seam);
|
|
122
|
-
const { door } = seam;
|
|
123
|
-
const services = Context.make(GitRestServices, {
|
|
124
|
-
basePath,
|
|
125
|
-
identify,
|
|
126
|
-
callsFor,
|
|
127
|
-
tokensOn,
|
|
128
|
-
authorize,
|
|
129
|
-
listen
|
|
130
|
-
});
|
|
131
|
-
const renamedFor = (request, repo) => Effect.flatMap(identify(request), (caller) => renamedTo(caller, repo));
|
|
132
|
-
const requestMost = Effect.map(seam.parts, (built) => built.requestMost);
|
|
133
|
-
const { fetch, route } = serveRest({
|
|
134
|
-
basePath,
|
|
135
|
-
services,
|
|
136
|
-
route: git.route,
|
|
137
|
-
door,
|
|
138
|
-
renamedFor,
|
|
139
|
-
requestMost
|
|
140
|
-
});
|
|
141
|
-
return {
|
|
142
|
-
fetch,
|
|
143
|
-
route
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
export { createRestHandler, notFound, restApp, serveRest };
|
|
93
|
+
export { notFound, restApp };
|
package/dist/rest/handlers.d.mts
CHANGED
|
@@ -3,6 +3,6 @@ import * as Layer from "effect/Layer";
|
|
|
3
3
|
/**
|
|
4
4
|
* Every group's handlers and the middleware, over `GitRestServices`: each call decides for the
|
|
5
5
|
* caller `identify` answered. A host that serves REST under its own router provides it from
|
|
6
|
-
* the server's seam, as `
|
|
6
|
+
* the server's seam, as `Rest.layer` does.
|
|
7
7
|
*/
|
|
8
8
|
export declare const GitRestHandlers: Layer.Layer<import("effect/http-api/HttpApiGroup").Service<"git", "blobs"> | import("effect/http-api/HttpApiGroup").Service<"git", "commits"> | import("effect/http-api/HttpApiGroup").Service<"git", "events"> | import("effect/http-api/HttpApiGroup").Service<"git", "files"> | import("effect/http-api/HttpApiGroup").Service<"git", "forks"> | import("effect/http-api/HttpApiGroup").Service<"git", "me"> | import("effect/http-api/HttpApiGroup").Service<"git", "merges"> | import("effect/http-api/HttpApiGroup").Service<"git", "queue"> | import("effect/http-api/HttpApiGroup").Service<"git", "refs"> | import("effect/http-api/HttpApiGroup").Service<"git", "repos"> | import("effect/http-api/HttpApiGroup").Service<"git", "tags"> | import("effect/http-api/HttpApiGroup").Service<"git", "tokens"> | import("effect/http-api/HttpApiGroup").Service<"git", "topics"> | import("effect/http-api/HttpApiGroup").Service<"git", "trees"> | import("effect/http-api/HttpApiGroup").Service<"git", "work">, never, GitRestServices | import("effect/http/HttpRouter").Request<"Requires", GitRestServices>>;
|