@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/handlers.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isInternalId } from "../contracts/ids.mjs";
|
|
1
2
|
import { noTokens } from "../auth/tokens-layer.mjs";
|
|
2
3
|
import { tokenParties } from "../auth/tokens.mjs";
|
|
3
4
|
import { treeOrChanges } from "../core/objects/commit-writes.mjs";
|
|
@@ -5,7 +6,7 @@ import { base64Size, jsonSize, responseBytes, responseTooLarge } from "../core/o
|
|
|
5
6
|
import { treeEditOf } from "../core/objects/tree-edits.mjs";
|
|
6
7
|
import { boundedBytes } from "../protocol/bytes/reader.mjs";
|
|
7
8
|
import { tryUnlessSpent } from "../contracts/calls-spent.mjs";
|
|
8
|
-
import { gitError } from "../contracts/result.mjs";
|
|
9
|
+
import { fail, gitError } from "../contracts/result.mjs";
|
|
9
10
|
import { GitCaller } from "../contracts/services.mjs";
|
|
10
11
|
import { Topics } from "../topics/layer.mjs";
|
|
11
12
|
import { GitRestApi } from "./api.mjs";
|
|
@@ -265,6 +266,14 @@ const WorkHandlers = HttpApiBuilder.group(GitRestApi, "work", (handlers) => hand
|
|
|
265
266
|
...listInput(query),
|
|
266
267
|
actor: yield* actor
|
|
267
268
|
});
|
|
269
|
+
})).handle("listById", ({ params, query }) => Effect.gen(function* () {
|
|
270
|
+
const server = yield* callsFor;
|
|
271
|
+
const { internalId } = params;
|
|
272
|
+
if (!isInternalId(internalId)) return yield* fail("NOT_FOUND", `No repo '${internalId}'`);
|
|
273
|
+
return yield* server.work.listById(internalId, {
|
|
274
|
+
...listInput(query),
|
|
275
|
+
actor: yield* actor
|
|
276
|
+
});
|
|
268
277
|
})).handle("retry", ({ params, payload }) => Effect.gen(function* () {
|
|
269
278
|
return yield* (yield* callsFor).work.retry(params.repo, {
|
|
270
279
|
...payload,
|
|
@@ -325,8 +334,13 @@ const TreesHandlers = HttpApiBuilder.group(GitRestApi, "trees", (handlers) => ha
|
|
|
325
334
|
});
|
|
326
335
|
})));
|
|
327
336
|
const CommitsHandlers = HttpApiBuilder.group(GitRestApi, "commits", (handlers) => handlers.handle("list", ({ params, query }) => Effect.gen(function* () {
|
|
328
|
-
|
|
329
|
-
|
|
337
|
+
const server = yield* callsFor;
|
|
338
|
+
const limit = query.limit === void 0 ? {} : { limit: Math.min(query.limit, 200) };
|
|
339
|
+
return yield* server.commits.list(params.repo, {
|
|
340
|
+
...readInput({
|
|
341
|
+
...query,
|
|
342
|
+
...limit
|
|
343
|
+
}),
|
|
330
344
|
actor: yield* actor
|
|
331
345
|
});
|
|
332
346
|
})).handle("get", ({ params, query }) => Effect.gen(function* () {
|
|
@@ -586,7 +600,7 @@ const TopicsHandlers = HttpApiBuilder.group(GitRestApi, "topics", (handlers) =>
|
|
|
586
600
|
/**
|
|
587
601
|
* Every group's handlers and the middleware, over `GitRestServices`: each call decides for the
|
|
588
602
|
* caller `identify` answered. A host that serves REST under its own router provides it from
|
|
589
|
-
* the server's seam, as `
|
|
603
|
+
* the server's seam, as `Rest.layer` does.
|
|
590
604
|
*/
|
|
591
605
|
const GitRestHandlers = Layer.mergeAll(ReposHandlers, ForksHandlers, RefsHandlers, WorkHandlers, TokensHandlers, MeHandlers, BlobsHandlers, TreesHandlers, CommitsHandlers, TagsHandlers, MergesHandlers, FilesHandlers, EventsHandlers, QueueHandlers, TopicsHandlers).pipe(Layer.provide(GitCallerMiddlewareLive));
|
|
592
606
|
export { GitRestHandlers };
|
package/dist/rest/layer.mjs
CHANGED
package/dist/rest/me.d.mts
CHANGED
|
@@ -135,6 +135,7 @@ declare const MeApiGroup_base: HttpApiGroup.HttpApiGroup<"me", HttpApiEndpoint.H
|
|
|
135
135
|
readonly reason?: string;
|
|
136
136
|
readonly packs?: number;
|
|
137
137
|
readonly most?: number;
|
|
138
|
+
readonly retryAfter?: number;
|
|
138
139
|
};
|
|
139
140
|
}, unknown, never, never>, Schema.Codec<{
|
|
140
141
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -240,6 +241,7 @@ declare const MeApiGroup_base: HttpApiGroup.HttpApiGroup<"me", HttpApiEndpoint.H
|
|
|
240
241
|
readonly reason?: string;
|
|
241
242
|
readonly packs?: number;
|
|
242
243
|
readonly most?: number;
|
|
244
|
+
readonly retryAfter?: number;
|
|
243
245
|
};
|
|
244
246
|
}, unknown, never, never>, {
|
|
245
247
|
"ref0-code": Schema.String;
|
|
@@ -315,7 +317,7 @@ declare const MeApiGroup_base: HttpApiGroup.HttpApiGroup<"me", HttpApiEndpoint.H
|
|
|
315
317
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
316
318
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
317
319
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
318
|
-
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>]>>;
|
|
320
|
+
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>]>>;
|
|
319
321
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
320
322
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
321
323
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -331,9 +333,10 @@ declare const MeApiGroup_base: HttpApiGroup.HttpApiGroup<"me", HttpApiEndpoint.H
|
|
|
331
333
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
332
334
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
333
335
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
334
|
-
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>]>>;
|
|
336
|
+
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>]>>;
|
|
335
337
|
packs: Schema.optionalKey<Schema.Number>;
|
|
336
338
|
most: Schema.optionalKey<Schema.Number>;
|
|
339
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
337
340
|
}>, 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]>>]>>;
|
|
338
341
|
}>, Schema.Struct<{
|
|
339
342
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -407,7 +410,7 @@ declare const MeApiGroup_base: HttpApiGroup.HttpApiGroup<"me", HttpApiEndpoint.H
|
|
|
407
410
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
408
411
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
409
412
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
410
|
-
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>]>>;
|
|
413
|
+
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>]>>;
|
|
411
414
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
412
415
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
413
416
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -423,9 +426,10 @@ declare const MeApiGroup_base: HttpApiGroup.HttpApiGroup<"me", HttpApiEndpoint.H
|
|
|
423
426
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
424
427
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
425
428
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
426
|
-
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>]>>;
|
|
429
|
+
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>]>>;
|
|
427
430
|
packs: Schema.optionalKey<Schema.Number>;
|
|
428
431
|
most: Schema.optionalKey<Schema.Number>;
|
|
432
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
429
433
|
}>, 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]>>]>>;
|
|
430
434
|
}>, {
|
|
431
435
|
"ref0-code": Schema.String;
|
package/dist/rest/merges.d.mts
CHANGED
|
@@ -168,6 +168,7 @@ declare const MergesApiGroup_base: HttpApiGroup.HttpApiGroup<"merges", HttpApiEn
|
|
|
168
168
|
readonly reason?: string;
|
|
169
169
|
readonly packs?: number;
|
|
170
170
|
readonly most?: number;
|
|
171
|
+
readonly retryAfter?: number;
|
|
171
172
|
};
|
|
172
173
|
}, unknown, never, never>, Schema.Codec<{
|
|
173
174
|
readonly code: "ALREADY_EXISTS";
|
|
@@ -273,6 +274,7 @@ declare const MergesApiGroup_base: HttpApiGroup.HttpApiGroup<"merges", HttpApiEn
|
|
|
273
274
|
readonly reason?: string;
|
|
274
275
|
readonly packs?: number;
|
|
275
276
|
readonly most?: number;
|
|
277
|
+
readonly retryAfter?: number;
|
|
276
278
|
};
|
|
277
279
|
}, unknown, never, never>, {
|
|
278
280
|
"ref0-code": Schema.String;
|
|
@@ -348,7 +350,7 @@ declare const MergesApiGroup_base: HttpApiGroup.HttpApiGroup<"merges", HttpApiEn
|
|
|
348
350
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
349
351
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
350
352
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
351
|
-
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>]>>;
|
|
353
|
+
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>]>>;
|
|
352
354
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
353
355
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
354
356
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -364,9 +366,10 @@ declare const MergesApiGroup_base: HttpApiGroup.HttpApiGroup<"merges", HttpApiEn
|
|
|
364
366
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
365
367
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
366
368
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
367
|
-
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>]>>;
|
|
369
|
+
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>]>>;
|
|
368
370
|
packs: Schema.optionalKey<Schema.Number>;
|
|
369
371
|
most: Schema.optionalKey<Schema.Number>;
|
|
372
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
370
373
|
}>, 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]>>]>>;
|
|
371
374
|
}>, Schema.Struct<{
|
|
372
375
|
readonly code: Schema.Literal<"ALREADY_EXISTS">;
|
|
@@ -440,7 +443,7 @@ declare const MergesApiGroup_base: HttpApiGroup.HttpApiGroup<"merges", HttpApiEn
|
|
|
440
443
|
readonly message: Schema.decodeTo<Schema.String, Schema.String, never, never>;
|
|
441
444
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
442
445
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
443
|
-
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>]>>;
|
|
446
|
+
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>]>>;
|
|
444
447
|
indexBytes: Schema.optionalKey<Schema.Number>;
|
|
445
448
|
pushBytes: Schema.optionalKey<Schema.Number>;
|
|
446
449
|
most: Schema.optionalKey<Schema.Number>;
|
|
@@ -456,9 +459,10 @@ declare const MergesApiGroup_base: HttpApiGroup.HttpApiGroup<"merges", HttpApiEn
|
|
|
456
459
|
readonly hint: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
457
460
|
readonly context: Schema.optionalKey<Schema.StructWithRest<Schema.Struct<{
|
|
458
461
|
id: Schema.optionalKey<Schema.decodeTo<Schema.String, Schema.String, never, never>>;
|
|
459
|
-
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>]>>;
|
|
462
|
+
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>]>>;
|
|
460
463
|
packs: Schema.optionalKey<Schema.Number>;
|
|
461
464
|
most: Schema.optionalKey<Schema.Number>;
|
|
465
|
+
retryAfter: Schema.optionalKey<Schema.Number>;
|
|
462
466
|
}>, 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]>>]>>;
|
|
463
467
|
}>, {
|
|
464
468
|
"ref0-code": Schema.String;
|
package/dist/rest/paths.mjs
CHANGED
|
@@ -65,6 +65,7 @@ const restPath = (base, pathname) => {
|
|
|
65
65
|
if (segments[0] === "repos") return repoPath(segments.slice(1));
|
|
66
66
|
if (segments[0] === "queue") return { path: under };
|
|
67
67
|
if (segments[0] === "topics") return { path: under };
|
|
68
|
+
if (segments[0] === "work" && segments.length === 2 && segments[1] !== "") return { path: under };
|
|
68
69
|
};
|
|
69
70
|
/** A repo's URL on the wire, its slashes kept: what a 301 names and what the client sends. */
|
|
70
71
|
const wireRepoPath = (repo) => repo.split("/").map(encodeURIComponent).join("/");
|