@ref0/git 0.7.0 → 0.9.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 +0 -2
- package/dist/auth/authorize.mjs +31 -24
- package/dist/auth/bridge.mjs +8 -8
- package/dist/auth/fences.d.mts +0 -1
- package/dist/auth/fences.mjs +1 -1
- package/dist/auth/grants.d.mts +0 -1
- package/dist/auth/grants.mjs +2 -2
- package/dist/auth/host-function.d.mts +1 -7
- package/dist/auth/host-function.mjs +38 -38
- package/dist/auth/identify.d.mts +0 -1
- package/dist/auth/identify.mjs +1 -1
- package/dist/auth/policy.d.mts +7 -4
- package/dist/auth/policy.mjs +13 -10
- package/dist/auth/token-rows.mjs +2 -5
- package/dist/auth/tokens-layer.d.mts +0 -2
- package/dist/auth/tokens-public.d.mts +3 -3
- package/dist/auth/tokens-public.mjs +4 -2
- package/dist/auth/tokens.d.mts +6 -1
- package/dist/auth/tokens.mjs +7 -1
- package/dist/client/client.d.mts +22 -15
- package/dist/client/client.mjs +31 -27
- package/dist/client/git-http.mjs +22 -5
- package/dist/client/local.mjs +1 -1
- package/dist/client/namespace.d.mts +2 -0
- package/dist/client/push-upload.d.mts +1 -0
- package/dist/client/push-upload.mjs +169 -2
- package/dist/client/remote-helper.mjs +2 -4
- package/dist/client/remote.mjs +37 -15
- package/dist/client/run-remote-helper.mjs +4 -4
- package/dist/client/transport.mjs +26 -19
- package/dist/contracts/actors.d.mts +57 -28
- package/dist/contracts/actors.mjs +38 -2
- package/dist/contracts/authorize.d.mts +21 -15
- package/dist/contracts/callers.mjs +40 -0
- package/dist/contracts/calls-spent.d.mts +2 -12
- package/dist/contracts/calls-spent.mjs +4 -5
- package/dist/contracts/client.d.mts +16 -9
- package/dist/contracts/events.d.mts +82 -14
- package/dist/contracts/events.mjs +35 -9
- package/dist/contracts/files.d.mts +42 -42
- package/dist/contracts/forks.d.mts +0 -24
- package/dist/contracts/git-hooks.d.mts +217 -0
- package/dist/contracts/git-hooks.mjs +3 -1
- package/dist/contracts/git.d.mts +13 -3
- package/dist/contracts/grants.d.mts +46 -27
- package/dist/contracts/lfs.d.mts +17 -4
- package/dist/contracts/merges.d.mts +7 -7
- package/dist/contracts/objects.d.mts +38 -4
- package/dist/contracts/opaque.mjs +19 -1
- package/dist/contracts/operations.d.mts +8 -1
- package/dist/contracts/operations.mjs +209 -0
- package/dist/contracts/queue.d.mts +6 -5
- package/dist/contracts/queue.mjs +9 -20
- package/dist/contracts/remote.d.mts +13 -4
- package/dist/contracts/remote.mjs +3 -3
- package/dist/contracts/repos.d.mts +11 -40
- package/dist/contracts/repos.mjs +11 -10
- package/dist/contracts/result.d.mts +28 -11
- package/dist/contracts/result.mjs +32 -2
- package/dist/contracts/rules.d.mts +706 -46
- package/dist/contracts/rules.mjs +81 -2
- package/dist/contracts/server.d.mts +5 -275
- package/dist/contracts/services.d.mts +0 -3
- package/dist/contracts/services.mjs +1 -3
- package/dist/contracts/signin.d.mts +2 -2
- package/dist/contracts/signin.mjs +4 -5
- package/dist/contracts/sync.d.mts +1 -4
- package/dist/contracts/tokens.d.mts +29 -17
- package/dist/contracts/tokens.mjs +14 -3
- package/dist/contracts/topics.d.mts +38 -11
- package/dist/contracts/topics.mjs +8 -2
- package/dist/core/access.d.mts +0 -2
- package/dist/core/access.mjs +15 -4
- package/dist/core/ancestry.mjs +5 -4
- package/dist/core/events/deliver.mjs +19 -1
- package/dist/core/forks.mjs +30 -11
- package/dist/core/hooks/groups.d.mts +0 -1
- package/dist/core/hooks/groups.mjs +8 -9
- package/dist/core/index-job.mjs +23 -1
- package/dist/core/index-lost.d.mts +11 -0
- package/dist/core/index-lost.mjs +55 -0
- package/dist/core/loose-tally.mjs +46 -0
- package/dist/core/objects/commit-writes.mjs +1 -1
- package/dist/core/objects/commits.mjs +10 -9
- package/dist/core/objects/merges.mjs +1 -1
- package/dist/core/objects/reading.mjs +28 -13
- package/dist/core/objects/trees.mjs +1 -1
- package/dist/core/objects/writing.mjs +1 -0
- package/dist/core/parts.d.mts +7 -0
- package/dist/core/promise.mjs +1 -15
- package/dist/core/publish.mjs +9 -5
- package/dist/core/purge.mjs +30 -12
- package/dist/core/push.mjs +39 -16
- package/dist/core/ref-view.mjs +14 -6
- package/dist/core/repack.mjs +54 -27
- package/dist/core/repo-info.mjs +8 -6
- package/dist/core/repos.mjs +1 -0
- package/dist/core/rules/check.mjs +10 -10
- package/dist/core/rules/context.d.mts +3 -1
- package/dist/core/rules/context.mjs +16 -13
- package/dist/core/rules/fetch.mjs +17 -23
- package/dist/core/tokens.mjs +2 -1
- package/dist/core/view.d.mts +10 -1
- package/dist/core/view.mjs +15 -6
- package/dist/effect.d.mts +3 -6
- package/dist/effect.mjs +3 -6
- package/dist/engine/commits.mjs +23 -50
- package/dist/engine/failures.d.mts +1 -2
- package/dist/engine/failures.mjs +1 -3
- package/dist/engine/merge-base-walk.mjs +57 -142
- package/dist/engine/merge-bases.mjs +9 -7
- package/dist/engine/merge.mjs +20 -17
- package/dist/engine/parts.d.mts +1 -0
- package/dist/engine/parts.mjs +1 -1
- package/dist/engine/walk.mjs +15 -11
- package/dist/extend.d.mts +1 -2
- package/dist/extend.mjs +1 -2
- package/dist/http/core-parts.mjs +18 -10
- package/dist/http/handler.mjs +11 -31
- package/dist/http/parts.d.mts +0 -1
- package/dist/index.d.mts +29 -22
- package/dist/index.mjs +5 -2
- package/dist/lfs/base.d.mts +6 -3
- package/dist/lfs/base.mjs +2 -1
- package/dist/lfs/layer.d.mts +4 -3
- package/dist/lfs/layer.mjs +23 -9
- package/dist/lfs/objects.mjs +93 -41
- package/dist/lfs/pointers.mjs +69 -18
- package/dist/lfs/purge.mjs +6 -2
- package/dist/lfs/rows.mjs +24 -7
- package/dist/lfs/service.d.mts +6 -3
- package/dist/lfs/service.mjs +8 -2
- package/dist/lfs/upkeep.mjs +47 -28
- package/dist/lfs/upload-most.mjs +47 -0
- package/dist/lfs/uploaded.mjs +59 -0
- package/dist/protocol/bytes/sha256-hasher.mjs +51 -0
- package/dist/protocol/bytes/streams.mjs +84 -2
- package/dist/protocol/bytes/text.mjs +6 -1
- package/dist/protocol/diff/read.d.mts +1 -0
- package/dist/protocol/diff/read.mjs +5 -2
- package/dist/protocol/objects/commit.d.mts +7 -0
- package/dist/protocol/objects/commit.mjs +5 -1
- package/dist/protocol/objects/fsck.mjs +6 -3
- package/dist/queue/advance.mjs +77 -18
- package/dist/queue/calls.mjs +4 -14
- package/dist/queue/host.d.mts +4 -0
- package/dist/queue/lanes.mjs +1 -1
- package/dist/queue/layer.mjs +4 -2
- package/dist/queue/limits.mjs +18 -2
- package/dist/queue/rows.mjs +10 -1
- package/dist/queue/schedule.mjs +1 -1
- package/dist/queue/search.mjs +3 -4
- package/dist/queue/trim.mjs +2 -2
- package/dist/rest/client-namespace.d.mts +2 -0
- package/dist/rest/client.d.mts +32 -8
- package/dist/rest/client.mjs +308 -382
- package/dist/rest/commits.d.mts +150 -150
- package/dist/rest/files.d.mts +18 -18
- package/dist/rest/forks.d.mts +77 -89
- package/dist/rest/handlers.mjs +2 -1
- package/dist/rest/listen.d.mts +8 -6
- package/dist/rest/listen.mjs +31 -75
- package/dist/rest/me.d.mts +2 -2
- package/dist/rest/merges.d.mts +7 -7
- package/dist/rest/refs.d.mts +27 -27
- package/dist/rest/repos.d.mts +40 -52
- package/dist/rest/tokens.d.mts +12 -12
- package/dist/rest/topics.d.mts +13 -13
- package/dist/rest/trees.d.mts +66 -66
- package/dist/rest/wire.d.mts +20 -2
- package/dist/rest/work.d.mts +39 -39
- package/dist/rest.d.mts +1 -7
- package/dist/rest.mjs +1 -5
- package/dist/server/git-layer.d.mts +10 -2
- package/dist/server/git-layer.mjs +29 -10
- package/dist/server/joined.d.mts +12 -6
- package/dist/server/joined.mjs +3 -2
- package/dist/server/registry.mjs +11 -5
- package/dist/server/server.d.mts +0 -1
- package/dist/server/server.mjs +42 -49
- package/dist/signin/context.d.mts +0 -1
- package/dist/signin/context.mjs +5 -9
- package/dist/storage/clean-up.mjs +3 -1
- package/dist/storage/fsck.mjs +12 -2
- package/dist/storage/graph-rebuild.mjs +262 -0
- package/dist/storage/index-bitmaps.mjs +16 -10
- package/dist/storage/index-build.mjs +160 -24
- package/dist/storage/index-graph.d.mts +1 -0
- package/dist/storage/index-graph.mjs +29 -5
- package/dist/storage/index-layers.d.mts +1 -0
- package/dist/storage/index-layers.mjs +5 -2
- package/dist/storage/index-reach.mjs +7 -5
- package/dist/storage/index-remap.mjs +5 -5
- package/dist/storage/index-visible.mjs +16 -5
- package/dist/storage/lfs-pointers.d.mts +5 -5
- package/dist/storage/lfs-pointers.mjs +37 -11
- package/dist/storage/links.mjs +3 -3
- package/dist/storage/loose.mjs +4 -1
- package/dist/storage/memory-budget.mjs +1 -1
- package/dist/storage/merge-fence.mjs +81 -19
- package/dist/storage/merge-most.mjs +1 -0
- package/dist/storage/merge-row.mjs +16 -4
- package/dist/storage/merge-stream.mjs +9 -6
- package/dist/storage/object-rows.mjs +17 -1
- package/dist/storage/pack-order.d.mts +1 -0
- package/dist/storage/pack-order.mjs +18 -1
- package/dist/storage/pack-receive.mjs +10 -6
- package/dist/storage/packs.mjs +58 -27
- package/dist/storage/prune-walk.mjs +5 -2
- package/dist/storage/prune.mjs +168 -70
- package/dist/storage/ready.d.mts +1 -1
- package/dist/storage/ready.mjs +12 -3
- package/dist/storage/receive-bounds.mjs +3 -2
- package/dist/storage/receive-state.mjs +1 -1
- package/dist/storage/repack-contained.mjs +22 -14
- package/dist/storage/repack.d.mts +1 -1
- package/dist/storage/repack.mjs +3 -2
- package/dist/storage/unpack.mjs +7 -0
- package/dist/storage/visible.mjs +3 -2
- package/dist/storage/walk.d.mts +1 -0
- package/dist/storage/walk.mjs +9 -5
- package/dist/storage/wants.mjs +17 -11
- package/dist/store/call-count.d.mts +31 -3
- package/dist/store/call-count.mjs +51 -20
- package/dist/store/errors.d.mts +7 -1
- package/dist/store/errors.mjs +7 -1
- package/dist/store/job-try.mjs +3 -1
- package/dist/store/records.mjs +26 -5
- package/dist/store/repo-record.mjs +36 -12
- package/dist/store/scopes.mjs +15 -2
- package/dist/sync/bound.d.mts +1 -1
- package/dist/sync/import.mjs +15 -3
- package/dist/sync/layer.d.mts +5 -1
- package/dist/sync/layer.mjs +11 -9
- package/dist/sync/mirror.mjs +1 -1
- package/dist/sync/step.mjs +15 -15
- package/dist/topics/advance.mjs +11 -10
- package/dist/topics/layer.mjs +1 -1
- package/dist/topics/members.mjs +38 -9
- package/package.json +3 -3
- package/dist/engine/merge-base-walk.d.mts +0 -3
- package/dist/server/routes.d.mts +0 -32
- package/dist/server/routes.mjs +0 -69
- package/dist/sync/bridge.d.mts +0 -6
- package/dist/sync/bridge.mjs +0 -29
|
@@ -47,9 +47,11 @@ export declare const Actor: Schema.Union<readonly [Schema.Struct<{
|
|
|
47
47
|
* has no `meta`, which was a snapshot of the sign-in at `queue.add`, and replaying it would decide
|
|
48
48
|
* the publish on what held then.
|
|
49
49
|
*/
|
|
50
|
-
export
|
|
51
|
-
readonly
|
|
52
|
-
|
|
50
|
+
export declare const QueuedActor: Schema.Struct<{
|
|
51
|
+
readonly id: Schema.String;
|
|
52
|
+
readonly anonymous: Schema.optionalKey<Schema.Literal<false>>;
|
|
53
|
+
}>;
|
|
54
|
+
export type QueuedActor = typeof QueuedActor.Type;
|
|
53
55
|
/**
|
|
54
56
|
* Who a check is asked about. `at: 'queued'`: the merge queue's publish of an entry that waited,
|
|
55
57
|
* asked again as the caller that added it, its actor named by ID alone, with no `meta`. Narrow on
|
|
@@ -63,9 +65,10 @@ export type Acting<Meta = unknown> = {
|
|
|
63
65
|
readonly at: 'queued';
|
|
64
66
|
readonly actor: QueuedActor;
|
|
65
67
|
};
|
|
66
|
-
export
|
|
67
|
-
readonly signal
|
|
68
|
-
}
|
|
68
|
+
export declare const CallInput: Schema.Struct<{
|
|
69
|
+
readonly signal: Schema.optionalKey<Schema.declare<AbortSignal, AbortSignal>>;
|
|
70
|
+
}>;
|
|
71
|
+
export type CallInput = typeof CallInput.Type;
|
|
69
72
|
/** Every call names who it acts for, reads included, and `authorize` decides it. */
|
|
70
73
|
export interface ActorInput<Meta = unknown> extends CallInput {
|
|
71
74
|
readonly actor: Actor<Meta>;
|
|
@@ -81,26 +84,46 @@ export interface ActorInput<Meta = unknown> extends CallInput {
|
|
|
81
84
|
* `INVALID_ARGUMENT`, `context.field` naming it.
|
|
82
85
|
* `tokens.create`'s key is refused for the token's life instead, since its secret is shown once.
|
|
83
86
|
* A resent fork key answers the fork as it is now, read as `repos.get` reads it for that caller,
|
|
84
|
-
* while every other key answers as it first did.
|
|
87
|
+
* while every other key answers as it first did. An object write, such as `blobs.create` or
|
|
88
|
+
* `commits.create`, sent again once its repo is deleted answers `NOT_FOUND`, as any call on the
|
|
89
|
+
* repo does then: its answer reads objects the delete lets go of.
|
|
85
90
|
*/
|
|
86
91
|
export interface WriteInput<Meta = unknown> extends ActorInput<Meta> {
|
|
87
92
|
readonly key?: string;
|
|
88
93
|
}
|
|
89
|
-
export
|
|
90
|
-
readonly kind:
|
|
91
|
-
readonly username:
|
|
92
|
-
readonly password:
|
|
93
|
-
}
|
|
94
|
-
export
|
|
95
|
-
|
|
96
|
-
readonly
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
export
|
|
100
|
-
|
|
101
|
-
readonly
|
|
102
|
-
readonly
|
|
103
|
-
|
|
94
|
+
export declare const CredentialsBasic: Schema.Struct<{
|
|
95
|
+
readonly kind: Schema.Literal<"basic">;
|
|
96
|
+
readonly username: Schema.String;
|
|
97
|
+
readonly password: Schema.String;
|
|
98
|
+
}>;
|
|
99
|
+
export type CredentialsBasic = typeof CredentialsBasic.Type;
|
|
100
|
+
export declare const CredentialsBearer: Schema.Struct<{
|
|
101
|
+
readonly kind: Schema.Literal<"bearer">;
|
|
102
|
+
readonly token: Schema.String;
|
|
103
|
+
}>;
|
|
104
|
+
export type CredentialsBearer = typeof CredentialsBearer.Type;
|
|
105
|
+
export declare const Credentials: Schema.Union<readonly [Schema.Struct<{
|
|
106
|
+
readonly kind: Schema.Literal<"basic">;
|
|
107
|
+
readonly username: Schema.String;
|
|
108
|
+
readonly password: Schema.String;
|
|
109
|
+
}>, Schema.Struct<{
|
|
110
|
+
readonly kind: Schema.Literal<"bearer">;
|
|
111
|
+
readonly token: Schema.String;
|
|
112
|
+
}>]>;
|
|
113
|
+
export type Credentials = typeof Credentials.Type;
|
|
114
|
+
export declare const AuthInput: Schema.Struct<{
|
|
115
|
+
readonly request: Schema.declare<Request, Request>;
|
|
116
|
+
readonly credentials: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
|
|
117
|
+
readonly kind: Schema.Literal<"basic">;
|
|
118
|
+
readonly username: Schema.String;
|
|
119
|
+
readonly password: Schema.String;
|
|
120
|
+
}>, Schema.Struct<{
|
|
121
|
+
readonly kind: Schema.Literal<"bearer">;
|
|
122
|
+
readonly token: Schema.String;
|
|
123
|
+
}>]>>;
|
|
124
|
+
readonly signal: Schema.declare<AbortSignal, AbortSignal>;
|
|
125
|
+
}>;
|
|
126
|
+
export type AuthInput = typeof AuthInput.Type;
|
|
104
127
|
/** Who is calling: `undefined` for a credential it doesn't know. */
|
|
105
128
|
export type GitAuth<Meta = unknown> = (input: AuthInput) => Awaitable<Actor<Meta> | undefined>;
|
|
106
129
|
/**
|
|
@@ -108,14 +131,16 @@ export type GitAuth<Meta = unknown> = (input: AuthInput) => Awaitable<Actor<Meta
|
|
|
108
131
|
* never trusts it, so a caller built by hand with it is a plain caller. To keep a caller's grant,
|
|
109
132
|
* such as a link or a queued entry does, read `Authorize.grantOf`.
|
|
110
133
|
*/
|
|
111
|
-
export
|
|
112
|
-
readonly resolver:
|
|
113
|
-
}
|
|
134
|
+
export declare const CallerGrant: Schema.Struct<{
|
|
135
|
+
readonly resolver: Schema.String;
|
|
136
|
+
}>;
|
|
137
|
+
export type CallerGrant = typeof CallerGrant.Type;
|
|
114
138
|
/**
|
|
115
139
|
* `subject`: whom the actor acts for. `token`: set when the credential is one of Git's tokens.
|
|
116
140
|
* `grant`: set when an extension's grant resolver identified the caller, and absent for a token
|
|
117
141
|
* or the host's `auth`. `at: 'queued'`: the merge queue publishing an entry as the caller that
|
|
118
|
-
* added it, its token and grant identified again, its actor with no `meta`.
|
|
142
|
+
* added it, its token and grant identified again, its actor with no `meta`. Its Schema is
|
|
143
|
+
* `callers.ts`' `Caller`.
|
|
119
144
|
*/
|
|
120
145
|
export interface Caller<Meta = unknown> {
|
|
121
146
|
readonly actor: Actor<Meta>;
|
|
@@ -138,7 +163,8 @@ export type RepoAccess = typeof RepoAccess.Type;
|
|
|
138
163
|
/**
|
|
139
164
|
* `subject` and `token`: the caller's, as `Caller` has them. With `at: 'queued'`, the merge
|
|
140
165
|
* queue's publish of an entry that waited, asked as the caller that added it, again: its actor
|
|
141
|
-
* is its ID alone, with no `meta`, and its token is the one it added with, read again live.
|
|
166
|
+
* is its ID alone, with no `meta`, and its token is the one it added with, read again live. Its
|
|
167
|
+
* Schema is `callers.ts`' `AuthorizeInput`.
|
|
142
168
|
*/
|
|
143
169
|
export type AuthorizeInput<Meta = unknown> = Acting<Meta> & {
|
|
144
170
|
readonly subject?: ActorId;
|
|
@@ -167,7 +193,10 @@ export type AuthorizeInput<Meta = unknown> = Acting<Meta> & {
|
|
|
167
193
|
* Decided 21 Nov by the coordinator.
|
|
168
194
|
*
|
|
169
195
|
* A `refs.private` operation, asked only of a server made with `access`, is accepted with the
|
|
170
|
-
* caller's `RefAudience`: `accept({ read, publish })`. Any other is accepted with no value.
|
|
196
|
+
* caller's `RefAudience`: `accept({ read, publish })`. Any other is accepted with no value. One
|
|
197
|
+
* asked with no `repo` is an import's, before it makes the repo the operation names: decide it
|
|
198
|
+
* from the caller, the name and the patterns, as `repo.create`, and read no repo, as none is
|
|
199
|
+
* there yet. An importer who reads fewer than every pattern is refused the import.
|
|
171
200
|
*
|
|
172
201
|
* Decide about a repo by its `repo.internalId`, the repo the call then acts on. A name can move
|
|
173
202
|
* between repos while you decide: swap two repos' names and back around one call, and a host that
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AbortSignalValue } from "./opaque.mjs";
|
|
1
2
|
import { PinnedRepo } from "./repos.mjs";
|
|
2
3
|
import * as Schema from "effect/Schema";
|
|
3
4
|
// src/contracts/actors.ts
|
|
@@ -20,5 +21,40 @@ const AnonymousActor = /* @__PURE__ */ Schema.Struct({
|
|
|
20
21
|
});
|
|
21
22
|
/** An `Actor` as JSON names one, its `meta` unread. */
|
|
22
23
|
const Actor = /* @__PURE__ */ Schema.Union([NamedActor, AnonymousActor]);
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The actor of a merge queue's publish of an entry, asked again after it waited: its ID alone. It
|
|
26
|
+
* has no `meta`, which was a snapshot of the sign-in at `queue.add`, and replaying it would decide
|
|
27
|
+
* the publish on what held then.
|
|
28
|
+
*/
|
|
29
|
+
const QueuedActor = /* @__PURE__ */ Schema.Struct({
|
|
30
|
+
...ActorId.fields,
|
|
31
|
+
anonymous: Schema.optionalKey(Schema.Literal(false))
|
|
32
|
+
});
|
|
33
|
+
const CallInput = /* @__PURE__ */ Schema.Struct({ signal: Schema.optionalKey(AbortSignalValue) });
|
|
34
|
+
const CredentialsBasic = /* @__PURE__ */ Schema.Struct({
|
|
35
|
+
kind: Schema.Literal("basic"),
|
|
36
|
+
username: Schema.String,
|
|
37
|
+
password: Schema.String
|
|
38
|
+
});
|
|
39
|
+
const CredentialsBearer = /* @__PURE__ */ Schema.Struct({
|
|
40
|
+
kind: Schema.Literal("bearer"),
|
|
41
|
+
token: Schema.String
|
|
42
|
+
});
|
|
43
|
+
const Credentials = /* @__PURE__ */ Schema.Union([CredentialsBasic, CredentialsBearer]);
|
|
44
|
+
Schema.optionalKey(Credentials);
|
|
45
|
+
/**
|
|
46
|
+
* The extension's grant resolver that identified a caller, by its `name`, for reading only: Git
|
|
47
|
+
* never trusts it, so a caller built by hand with it is a plain caller. To keep a caller's grant,
|
|
48
|
+
* such as a link or a queued entry does, read `Authorize.grantOf`.
|
|
49
|
+
*/
|
|
50
|
+
const CallerGrant = /* @__PURE__ */ Schema.Struct({ resolver: Schema.String });
|
|
51
|
+
/**
|
|
52
|
+
* The repo an operation names, when it exists: its name, its visibility and which repo it is
|
|
53
|
+
* underneath, all read in one snapshot. `internalId` stays with the repo across a rename, so a
|
|
54
|
+
* host that keys its grants by it decides about the repo the call then acts on.
|
|
55
|
+
*/
|
|
56
|
+
const RepoAccess = /* @__PURE__ */ Schema.Struct({
|
|
57
|
+
...PinnedRepo.fields,
|
|
58
|
+
public: Schema.Boolean
|
|
59
|
+
});
|
|
60
|
+
export { Actor, ActorId, AnonymousActor, CallInput, CallerGrant, Credentials, CredentialsBasic, CredentialsBearer, NamedActor, QueuedActor, RepoAccess };
|
|
@@ -4,11 +4,11 @@ import { GrantAgainRequest } from "./grants.mjs";
|
|
|
4
4
|
import { InternalRepoId, RefName, RepoName } from "./ids.mjs";
|
|
5
5
|
import { Operation } from "./operations.mjs";
|
|
6
6
|
import { GitError } from "./result.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { GrantScope } from "./tokens.mjs";
|
|
8
8
|
import * as Effect from "effect/Effect";
|
|
9
9
|
import * as Context from "effect/Context";
|
|
10
10
|
declare namespace authorize_d_exports {
|
|
11
|
-
export { Authorize, AuthorizeRequest, CeilingInput, audience, ceiling, check, grantAgain, grantOf };
|
|
11
|
+
export { AudienceInput, Authorize, AuthorizeRequest, CeilingInput, audience, ceiling, check, grantAgain, grantOf };
|
|
12
12
|
}
|
|
13
13
|
/** What `check` is asked: who acts, what they do, and the repo it names, when it names one. */
|
|
14
14
|
export interface AuthorizeRequest {
|
|
@@ -27,21 +27,31 @@ export interface CeilingInput {
|
|
|
27
27
|
readonly repo: RepoName;
|
|
28
28
|
readonly internalId?: InternalRepoId;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* What `audience` is asked: who acts and the private patterns, about `repo`, a repo that exists,
|
|
32
|
+
* or `creating`, the name of one an import is about to make, which no repo has yet.
|
|
33
|
+
*/
|
|
34
|
+
export type AudienceInput = {
|
|
35
|
+
readonly caller: Caller;
|
|
36
|
+
readonly patterns: readonly RefName[];
|
|
37
|
+
} & ({
|
|
38
|
+
readonly repo: RepoAccess;
|
|
39
|
+
readonly creating?: never;
|
|
40
|
+
} | {
|
|
41
|
+
readonly creating: RepoName;
|
|
42
|
+
readonly repo?: never;
|
|
43
|
+
});
|
|
30
44
|
declare const Authorize_base: Context.ServiceClass<Authorize, "@ref0/git/Authorize", {
|
|
31
45
|
/** Nothing when `request.caller` may do `request.operation`, else the refusal. */
|
|
32
46
|
readonly check: (request: AuthorizeRequest) => Effect.Effect<void, GitError>;
|
|
33
47
|
/** `refs.private`'s answer for `patterns`, for a server with `access`. */
|
|
34
|
-
readonly audience: (input:
|
|
35
|
-
readonly caller: Caller;
|
|
36
|
-
readonly repo: RepoAccess;
|
|
37
|
-
readonly patterns: readonly RefName[];
|
|
38
|
-
}) => Effect.Effect<RefAudience, GitError>;
|
|
48
|
+
readonly audience: (input: AudienceInput) => Effect.Effect<RefAudience, GitError>;
|
|
39
49
|
/**
|
|
40
50
|
* Git's own ceiling on `caller` for `repo`: its token's scope when the token covers the repo,
|
|
41
|
-
* its grant's when the grant reaches it, `undefined` when either doesn't, and `'write'` for
|
|
42
|
-
* caller with neither.
|
|
51
|
+
* its grant's when the grant reaches it, `undefined` when either doesn't, and `'write'` for an
|
|
52
|
+
* `admin` token or a caller with neither.
|
|
43
53
|
*/
|
|
44
|
-
readonly ceiling: (input: CeilingInput) => Effect.Effect<
|
|
54
|
+
readonly ceiling: (input: CeilingInput) => Effect.Effect<GrantScope | undefined, GitError>;
|
|
45
55
|
/** The resolver and grant that gave `caller`, if a grant did. */
|
|
46
56
|
readonly grantOf: (caller: Caller) => {
|
|
47
57
|
readonly resolver: string;
|
|
@@ -64,11 +74,7 @@ declare const Authorize_base: Context.ServiceClass<Authorize, "@ref0/git/Authori
|
|
|
64
74
|
*/
|
|
65
75
|
export declare class Authorize extends /* @__PURE__ */ Authorize_base {}
|
|
66
76
|
export declare const check: (request: AuthorizeRequest) => Effect.Effect<void, GitError, Authorize>;
|
|
67
|
-
export declare const audience: (input: {
|
|
68
|
-
readonly caller: Caller;
|
|
69
|
-
readonly repo: RepoAccess;
|
|
70
|
-
readonly patterns: readonly RefName[];
|
|
71
|
-
}) => Effect.Effect<{
|
|
77
|
+
export declare const audience: (input: AudienceInput) => Effect.Effect<{
|
|
72
78
|
readonly read?: readonly string[];
|
|
73
79
|
readonly publish?: readonly string[];
|
|
74
80
|
}, GitError, Authorize>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Actor, ActorId, CallInput, CallerGrant, QueuedActor, RepoAccess } from "./actors.mjs";
|
|
2
|
+
import "./opaque.mjs";
|
|
3
|
+
import "./operations.mjs";
|
|
4
|
+
import { TokenInfo } from "./tokens.mjs";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
// src/contracts/callers.ts
|
|
7
|
+
/** An `Acting`: by the caller, or queued. */
|
|
8
|
+
const Acting = /* @__PURE__ */ Schema.Union([Schema.Struct({
|
|
9
|
+
at: Schema.optionalKey(Schema.Never),
|
|
10
|
+
actor: Actor
|
|
11
|
+
}), Schema.Struct({
|
|
12
|
+
at: Schema.Literal("queued"),
|
|
13
|
+
actor: QueuedActor
|
|
14
|
+
})]);
|
|
15
|
+
const ActorInput = /* @__PURE__ */ Schema.Struct({
|
|
16
|
+
...CallInput.fields,
|
|
17
|
+
actor: Actor
|
|
18
|
+
});
|
|
19
|
+
({ ...ActorInput.fields }), Schema.optionalKey(Schema.String);
|
|
20
|
+
/** A `Caller` as Git identified it. */
|
|
21
|
+
const Caller = /* @__PURE__ */ Schema.Struct({
|
|
22
|
+
actor: Actor,
|
|
23
|
+
subject: Schema.optionalKey(ActorId),
|
|
24
|
+
token: Schema.optionalKey(TokenInfo),
|
|
25
|
+
grant: Schema.optionalKey(CallerGrant),
|
|
26
|
+
at: Schema.optionalKey(Schema.Literal("queued"))
|
|
27
|
+
});
|
|
28
|
+
Schema.optionalKey(ActorId), Schema.optionalKey(TokenInfo), Schema.optionalKey(RepoAccess);
|
|
29
|
+
/**
|
|
30
|
+
* The Schema of a shape typed `Acting & { …fields }`: each arm of `Acting` with `fields`, so a
|
|
31
|
+
* queued arm's actor is read as `QueuedActor`'s.
|
|
32
|
+
*/
|
|
33
|
+
const actingWith = (fields) => Schema.Union([Schema.Struct({
|
|
34
|
+
...Acting.members[0].fields,
|
|
35
|
+
...fields
|
|
36
|
+
}), Schema.Struct({
|
|
37
|
+
...Acting.members[1].fields,
|
|
38
|
+
...fields
|
|
39
|
+
})]);
|
|
40
|
+
export { Acting, ActorInput, Caller, actingWith };
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./result.mjs";
|
|
2
2
|
import "effect/Effect";
|
|
3
3
|
import "effect/Cause";
|
|
4
|
-
import "effect/Exit";
|
|
5
|
-
/**
|
|
6
|
-
* The refusal of the spent bound `cause` holds, `spentAt`'s, or `undefined` for a cause that holds
|
|
7
|
-
* none. A Promise edge reads it for its answer, such as a host's route catching what a door's
|
|
8
|
-
* defect rejected with (Q826): a bridge, as Q787 names one, carrying a spent bound across a
|
|
9
|
-
* Promise edge, where `answerSpent` can't reach, since Effect's context stops at a Promise. The
|
|
10
|
-
* drop-in's import reads it too, outside Git, where `answerSpent` isn't exported: a spent
|
|
11
|
-
* publication answers `RESOURCE_EXHAUSTED`, typed. The drop-in's Effect step 2b (Q783) deletes
|
|
12
|
-
* the edges' reads with the Promise edges, once its routes answer as Effects.
|
|
13
|
-
*/
|
|
14
|
-
export declare const spentRefusalOf: (cause: unknown) => GitError | undefined;
|
|
4
|
+
import "effect/Exit";
|
|
@@ -45,7 +45,8 @@ const callLimitTry = "The server reached its limit of store calls for one reques
|
|
|
45
45
|
/**
|
|
46
46
|
* `spent`'s refusal, as an edge answers it, with `spent` its cause: a request's count's, named by
|
|
47
47
|
* its bound, which a fetch's route words as `tooManyCalls`, and the platform cap's, its own
|
|
48
|
-
* message, each with `callLimitTry`; or a budget's, `reason: 'call-budget'`.
|
|
48
|
+
* message, each with `callLimitTry`; or a budget's, `reason: 'call-budget'`. The drop-in words each the
|
|
49
|
+
* same, in `shapes/spent.ts`, since no entry exports this one.
|
|
49
50
|
*/
|
|
50
51
|
const spentRefusal = (spent) => spent.of === "budget" ? gitError("RESOURCE_EXHAUSTED", spent.message, {
|
|
51
52
|
hint: "Make fewer calls inside it",
|
|
@@ -130,10 +131,8 @@ const catchSpent = (effect, spent) => Effect.catchCause(effect, (cause) => {
|
|
|
130
131
|
* The refusal of the spent bound `cause` holds, `spentAt`'s, or `undefined` for a cause that holds
|
|
131
132
|
* none. A Promise edge reads it for its answer, such as a host's route catching what a door's
|
|
132
133
|
* defect rejected with (Q826): a bridge, as Q787 names one, carrying a spent bound across a
|
|
133
|
-
* Promise edge, where `answerSpent` can't reach, since Effect's context stops at a Promise.
|
|
134
|
-
* drop-in
|
|
135
|
-
* publication answers `RESOURCE_EXHAUSTED`, typed. The drop-in's Effect step 2b (Q783) deletes
|
|
136
|
-
* the edges' reads with the Promise edges, once its routes answer as Effects.
|
|
134
|
+
* Promise edge, where `answerSpent` can't reach, since Effect's context stops at a Promise. Internal:
|
|
135
|
+
* the drop-in keeps its own, `shapes/spent.ts`.
|
|
137
136
|
*/
|
|
138
137
|
const spentRefusalOf = (cause) => {
|
|
139
138
|
const spent = spentAt(cause);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { CallInput } from "./actors.mjs";
|
|
2
1
|
import { BlobCalls } from "./blobs.mjs";
|
|
3
2
|
import { CommitCalls } from "./commits.mjs";
|
|
4
|
-
import { Filter } from "./object-values.mjs";
|
|
5
3
|
import { FileCalls } from "./files.mjs";
|
|
6
4
|
import { Oid, RefName, RepoName } from "./ids.mjs";
|
|
5
|
+
import { Filter } from "./object-values.mjs";
|
|
7
6
|
import { MergeCalls } from "./merges.mjs";
|
|
8
7
|
import { ObjectsFactory } from "./objects.mjs";
|
|
9
8
|
import { Ref, RefApplied, RefCalls, RefEdit, RefRejected, RefsUpdated } from "./refs.mjs";
|
|
10
|
-
import { RemoteOptions, WithoutActor } from "./remote.mjs";
|
|
9
|
+
import { RemoteOptions, WithoutActor, WithoutSignal } from "./remote.mjs";
|
|
11
10
|
import { Result } from "./result.mjs";
|
|
11
|
+
import { EffectCalls } from "./services.mjs";
|
|
12
12
|
import { TagCalls } from "./tags.mjs";
|
|
13
13
|
import { TreeCalls } from "./trees.mjs";
|
|
14
14
|
import { Listing, Page, Records } from "@ref0/infra";
|
|
@@ -28,7 +28,7 @@ export interface GitClientOptions extends RemoteOptions {
|
|
|
28
28
|
readonly adapter?: ClientAdapter;
|
|
29
29
|
readonly objects?: ObjectsFactory<false>;
|
|
30
30
|
}
|
|
31
|
-
export interface RemoteRefsInput
|
|
31
|
+
export interface RemoteRefsInput {
|
|
32
32
|
/** Only refs whose full name starts with it, such as `refs/heads/`. */
|
|
33
33
|
readonly prefix?: string;
|
|
34
34
|
readonly page?: Page;
|
|
@@ -39,7 +39,7 @@ export interface RemoteRefsInput extends CallInput {
|
|
|
39
39
|
* partial fetch, such as `{ kind: 'blob:none' }`. `force`: move a local ref that holds commits
|
|
40
40
|
* the remote's tip doesn't to that tip anyway, as `git fetch --force` does.
|
|
41
41
|
*/
|
|
42
|
-
export interface ClientFetchInput
|
|
42
|
+
export interface ClientFetchInput {
|
|
43
43
|
readonly refs?: readonly RefName[];
|
|
44
44
|
readonly depth?: number;
|
|
45
45
|
readonly filter?: Filter;
|
|
@@ -63,14 +63,15 @@ export interface ClientFetchResult {
|
|
|
63
63
|
readonly updates: readonly (RefApplied | RefForced | RefRejected)[];
|
|
64
64
|
}
|
|
65
65
|
/** `from` is the remote's tip as last seen; `atomic`: all move or none, where the remote can. */
|
|
66
|
-
export interface ClientPushInput
|
|
66
|
+
export interface ClientPushInput {
|
|
67
67
|
readonly updates: readonly RefEdit[];
|
|
68
68
|
readonly atomic?: boolean;
|
|
69
69
|
readonly pushOptions?: readonly string[];
|
|
70
70
|
}
|
|
71
|
-
/** A server's call group as a client makes it: no repo, and no
|
|
72
|
-
export type Localize<Calls> = { readonly [Key in keyof Calls]: Calls[Key] extends ((repo: RepoName, input: infer Input) => infer Answer) ? (input: WithoutActor<Input
|
|
73
|
-
|
|
71
|
+
/** A server's call group as a client makes it: no repo, no actor, and no `signal`. */
|
|
72
|
+
export type Localize<Calls> = { readonly [Key in keyof Calls]: Calls[Key] extends ((repo: RepoName, input: infer Input) => infer Answer) ? (input: WithoutSignal<WithoutActor<Input>>) => Answer : never; };
|
|
73
|
+
/** A client's calls as their Promise twins describe them: `GitClientCalls` is their Effect face. */
|
|
74
|
+
export interface GitClientPromises {
|
|
74
75
|
readonly remoteRefs: (input?: RemoteRefsInput) => Promise<Result<Listing<Ref>>>;
|
|
75
76
|
readonly fetch: (input?: ClientFetchInput) => Promise<Result<ClientFetchResult>>;
|
|
76
77
|
readonly push: (input: ClientPushInput) => Promise<Result<RefsUpdated>>;
|
|
@@ -82,6 +83,12 @@ export interface GitClient {
|
|
|
82
83
|
readonly files: Localize<FileCalls>;
|
|
83
84
|
readonly merges: Localize<MergeCalls>;
|
|
84
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* A client of one remote, as `GitClient.make` gives it: `remoteRefs`, `fetch` and `push` on the
|
|
88
|
+
* remote, and the server's calls on its own storage, with no repo. Each call is an Effect that
|
|
89
|
+
* fails with the call's `GitError`.
|
|
90
|
+
*/
|
|
91
|
+
export type GitClientCalls = EffectCalls<GitClientPromises>;
|
|
85
92
|
/** A list call's input: the page it starts from. */
|
|
86
93
|
export interface PagedInput {
|
|
87
94
|
readonly page?: Page;
|
|
@@ -2,7 +2,7 @@ import * as Schema from "effect/Schema";
|
|
|
2
2
|
import { JobInput } from "@ref0/infra";
|
|
3
3
|
import * as Context from "effect/Context";
|
|
4
4
|
declare namespace events_d_exports {
|
|
5
|
-
export { BeforeAfter, CandidateClosed, CandidateClosedFields, CandidateOpened, CandidateReported, EntryAdded, EntryFailed, EntryMerged, EntryPinned, EntryRemoved, EntryRetried, EventEnvelope, EventFeature, EventLog, Events, EventsService, FeedItem, FenceReason, FencedPack, GitEvent, HoldEvent, HoldEventFields, IndexRefusal, QueueEvent, QueueRestarted, RefPush, RefUpdated, RepoCreated, RepoDeletedEvent, RepoEnvelope, RepoEvent, RepoIndexRefused, RepoJobFailed, RepoMaintained, RepoRenamed, RepoTokenEvent, RepoVisibilityChanged, RepoWorkFailed, TokenEvent, TokenEventFields, TopicAdded, TopicEnvelope, TopicEvent, TopicFailed, TopicMerged, TopicOpened, TopicRemoved, TopicReported, TopicWorkFailed, keepsEvents };
|
|
5
|
+
export { BeforeAfter, CandidateClosed, CandidateClosedFields, CandidateOpened, CandidateReported, EntryAdded, EntryFailed, EntryMerged, EntryPinned, EntryRemoved, EntryRetried, EventEnvelope, EventFeature, EventLog, Events, EventsService, FeedItem, FenceReason, FencedPack, GitEvent, HoldEvent, HoldEventFields, IndexRefusal, QueueEvent, QueueRestarted, RefPush, RefUpdated, RepoCreated, RepoDeletedEvent, RepoEnvelope, RepoEvent, RepoIndexRefused, RepoJobFailed, RepoMaintained, RepoPruneRefused, RepoRenamed, RepoTokenEvent, RepoVisibilityChanged, RepoWorkFailed, TokenEvent, TokenEventFields, TopicAdded, TopicEnvelope, TopicEvent, TopicFailed, TopicMerged, TopicOpened, TopicRemoved, TopicReported, TopicWorkFailed, keepsEvents };
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* What every event carries. `seq` orders a scope's events: a repo's name keeps one sequence
|
|
@@ -247,11 +247,12 @@ export type BeforeAfter = typeof BeforeAfter.Type;
|
|
|
247
247
|
* Why a geometric merge left a pack out. A fenced pack is left as it is: it stays listed, its
|
|
248
248
|
* objects read, clone and fetch as before, and nothing is lost. Upkeep never merges it again on its
|
|
249
249
|
* own while it stays listed, and no prune pass rewrites it, since a pass reads its classes over the
|
|
250
|
-
* packs out of the fence and keeps a fenced pack whole.
|
|
250
|
+
* packs out of the fence and keeps a fenced pack whole. A fence for calls lifts on its own once a
|
|
251
|
+
* fresh try has more than the one that fenced it. So each reason names what the host can do:
|
|
251
252
|
* - `open-past-try`: opening a merge of it alone, its choose, its quarantine and its walk's first
|
|
252
253
|
* reads, takes more calls than a fresh merge try has, about 1.84M objects at R2's charges, fenced
|
|
253
|
-
* before the merge reads anything. Raise the host's `callLimits
|
|
254
|
-
*
|
|
254
|
+
* before the merge reads anything. Raise the host's `callLimits`, and the next step merges the
|
|
255
|
+
* pack again; one still past the try is fenced again at its calls.
|
|
255
256
|
* - `entry-past-try`: one of its entries takes more calls to resolve than a merge try has. As for
|
|
256
257
|
* `open-past-try`.
|
|
257
258
|
* - `resolve-past-try`: its longest delta chain could take more calls to resolve than a fresh
|
|
@@ -259,8 +260,9 @@ export type BeforeAfter = typeof BeforeAfter.Type;
|
|
|
259
260
|
* `open-past-try`.
|
|
260
261
|
* - `graph-length`: its `.graph` reads past the bytes its pack row records, or ends short of them.
|
|
261
262
|
* - `graph-broken`: its `.graph` is missing or broken, or counts a commit past 4,096 parents, which
|
|
262
|
-
* every write refuses.
|
|
263
|
-
* pack
|
|
263
|
+
* every write refuses. For either `.graph` reason, the next upkeep steps rebuild the file from the
|
|
264
|
+
* pack's commits, a part each step, and then the pack merges again. One whose commits can't be
|
|
265
|
+
* read stays fenced, and no step rebuilds it again.
|
|
264
266
|
* - `packs-past-most`: the merge would write more than `mergePacksMost` packs, about 418, and this
|
|
265
267
|
* pack held the step that reached them. A prune that keeps deltas whose bases it drops writes them
|
|
266
268
|
* whole, so each pack fills a try's calls after a few dozen. The host can do nothing for it yet:
|
|
@@ -361,7 +363,37 @@ export declare const RepoIndexRefused: Schema.Struct<{
|
|
|
361
363
|
readonly error: Schema.String;
|
|
362
364
|
}>;
|
|
363
365
|
export type RepoIndexRefused = typeof RepoIndexRefused.Type;
|
|
364
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* The repo's prune pass has waited `periods` prune periods in a row, each because pushes moved its
|
|
368
|
+
* refs onto what its rewrite was about to drop: the repo's unreachable objects stay until a period
|
|
369
|
+
* quiet enough for a pass to end. Sent once the pass has waited `prunePeriodsMost` periods, then
|
|
370
|
+
* once each further one, in the commit that writes the wait, and no more once a pass ends. No job
|
|
371
|
+
* is failed, so there is nothing to retry or discard. `error` says why, in the core's words.
|
|
372
|
+
*/
|
|
373
|
+
export declare const RepoPruneRefused: Schema.Struct<{
|
|
374
|
+
readonly seq: Schema.Int;
|
|
375
|
+
readonly at: Schema.Number;
|
|
376
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
377
|
+
readonly id: Schema.String;
|
|
378
|
+
}>>;
|
|
379
|
+
readonly subject: Schema.optionalKey<Schema.Struct<{
|
|
380
|
+
readonly id: Schema.String;
|
|
381
|
+
}>>;
|
|
382
|
+
readonly repo: Schema.String;
|
|
383
|
+
readonly internalId: Schema.TemplateLiteral<readonly ["r_", Schema.String]>;
|
|
384
|
+
readonly token: Schema.optionalKey<Schema.String>;
|
|
385
|
+
readonly type: Schema.Literal<"repo.work.failed">;
|
|
386
|
+
readonly name: Schema.Literal<"git.repack">;
|
|
387
|
+
readonly key: Schema.Literal<"prune">;
|
|
388
|
+
readonly refused: Schema.Literal<"busy">;
|
|
389
|
+
readonly periods: Schema.Int;
|
|
390
|
+
readonly error: Schema.String;
|
|
391
|
+
}>;
|
|
392
|
+
export type RepoPruneRefused = typeof RepoPruneRefused.Type;
|
|
393
|
+
/**
|
|
394
|
+
* `repo.work.failed`: a job's last try failed, a round of index builds was refused, or pushes kept
|
|
395
|
+
* the prune pass from ending.
|
|
396
|
+
*/
|
|
365
397
|
export declare const RepoWorkFailed: Schema.Union<readonly [Schema.Struct<{
|
|
366
398
|
readonly name: Schema.String;
|
|
367
399
|
readonly key: Schema.String;
|
|
@@ -395,6 +427,24 @@ export declare const RepoWorkFailed: Schema.Union<readonly [Schema.Struct<{
|
|
|
395
427
|
readonly type: Schema.Literal<"repo.work.failed">;
|
|
396
428
|
readonly refused: Schema.Literals<readonly ["spent", "too-large"]>;
|
|
397
429
|
readonly error: Schema.String;
|
|
430
|
+
}>, Schema.Struct<{
|
|
431
|
+
readonly seq: Schema.Int;
|
|
432
|
+
readonly at: Schema.Number;
|
|
433
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
434
|
+
readonly id: Schema.String;
|
|
435
|
+
}>>;
|
|
436
|
+
readonly subject: Schema.optionalKey<Schema.Struct<{
|
|
437
|
+
readonly id: Schema.String;
|
|
438
|
+
}>>;
|
|
439
|
+
readonly repo: Schema.String;
|
|
440
|
+
readonly internalId: Schema.TemplateLiteral<readonly ["r_", Schema.String]>;
|
|
441
|
+
readonly token: Schema.optionalKey<Schema.String>;
|
|
442
|
+
readonly type: Schema.Literal<"repo.work.failed">;
|
|
443
|
+
readonly name: Schema.Literal<"git.repack">;
|
|
444
|
+
readonly key: Schema.Literal<"prune">;
|
|
445
|
+
readonly refused: Schema.Literal<"busy">;
|
|
446
|
+
readonly periods: Schema.Int;
|
|
447
|
+
readonly error: Schema.String;
|
|
398
448
|
}>]>;
|
|
399
449
|
export type RepoWorkFailed = typeof RepoWorkFailed.Type;
|
|
400
450
|
export declare const RepoEvent: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
|
|
@@ -579,6 +629,24 @@ export declare const RepoEvent: Schema.Union<readonly [Schema.Union<readonly [Sc
|
|
|
579
629
|
readonly type: Schema.Literal<"repo.work.failed">;
|
|
580
630
|
readonly refused: Schema.Literals<readonly ["spent", "too-large"]>;
|
|
581
631
|
readonly error: Schema.String;
|
|
632
|
+
}>, Schema.Struct<{
|
|
633
|
+
readonly seq: Schema.Int;
|
|
634
|
+
readonly at: Schema.Number;
|
|
635
|
+
readonly actor: Schema.optionalKey<Schema.Struct<{
|
|
636
|
+
readonly id: Schema.String;
|
|
637
|
+
}>>;
|
|
638
|
+
readonly subject: Schema.optionalKey<Schema.Struct<{
|
|
639
|
+
readonly id: Schema.String;
|
|
640
|
+
}>>;
|
|
641
|
+
readonly repo: Schema.String;
|
|
642
|
+
readonly internalId: Schema.TemplateLiteral<readonly ["r_", Schema.String]>;
|
|
643
|
+
readonly token: Schema.optionalKey<Schema.String>;
|
|
644
|
+
readonly type: Schema.Literal<"repo.work.failed">;
|
|
645
|
+
readonly name: Schema.Literal<"git.repack">;
|
|
646
|
+
readonly key: Schema.Literal<"prune">;
|
|
647
|
+
readonly refused: Schema.Literal<"busy">;
|
|
648
|
+
readonly periods: Schema.Int;
|
|
649
|
+
readonly error: Schema.String;
|
|
582
650
|
}>]>]>;
|
|
583
651
|
export type RepoEvent = typeof RepoEvent.Type;
|
|
584
652
|
export declare const TokenEventFields: Schema.Struct<{
|
|
@@ -589,7 +657,7 @@ export declare const TokenEventFields: Schema.Struct<{
|
|
|
589
657
|
}>>;
|
|
590
658
|
readonly type: Schema.Literals<readonly ["token.created", "token.revoked"]>;
|
|
591
659
|
readonly token: Schema.String;
|
|
592
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
|
|
660
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
593
661
|
readonly subject: Schema.Struct<{
|
|
594
662
|
readonly id: Schema.String;
|
|
595
663
|
}>;
|
|
@@ -604,7 +672,7 @@ export declare const RepoTokenEvent: Schema.Struct<{
|
|
|
604
672
|
}>>;
|
|
605
673
|
readonly type: Schema.Literals<readonly ["token.created", "token.revoked"]>;
|
|
606
674
|
readonly token: Schema.String;
|
|
607
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
|
|
675
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
608
676
|
readonly subject: Schema.Struct<{
|
|
609
677
|
readonly id: Schema.String;
|
|
610
678
|
}>;
|
|
@@ -622,7 +690,7 @@ export declare const TokenEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
622
690
|
}>>;
|
|
623
691
|
readonly type: Schema.Literals<readonly ["token.created", "token.revoked"]>;
|
|
624
692
|
readonly token: Schema.String;
|
|
625
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
|
|
693
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
626
694
|
readonly subject: Schema.Struct<{
|
|
627
695
|
readonly id: Schema.String;
|
|
628
696
|
}>;
|
|
@@ -637,7 +705,7 @@ export declare const TokenEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
637
705
|
}>>;
|
|
638
706
|
readonly type: Schema.Literals<readonly ["token.created", "token.revoked"]>;
|
|
639
707
|
readonly token: Schema.String;
|
|
640
|
-
readonly scope: Schema.Literals<readonly ["read", "report", "write"]>;
|
|
708
|
+
readonly scope: Schema.Literals<readonly ["read", "report", "write", "admin"]>;
|
|
641
709
|
readonly subject: Schema.Struct<{
|
|
642
710
|
readonly id: Schema.String;
|
|
643
711
|
}>;
|
|
@@ -685,7 +753,7 @@ export declare const EntryMerged: Schema.Struct<{
|
|
|
685
753
|
readonly commit: Schema.String;
|
|
686
754
|
}>;
|
|
687
755
|
export type EntryMerged = typeof EntryMerged.Type;
|
|
688
|
-
/** `error`: for `host-error`, the failure's ID, which
|
|
756
|
+
/** `error`: for `host-error`, the failure's ID, which the host's log line names too. */
|
|
689
757
|
export declare const EntryFailed: Schema.Struct<{
|
|
690
758
|
readonly seq: Schema.Int;
|
|
691
759
|
readonly at: Schema.Number;
|
|
@@ -702,7 +770,7 @@ export declare const EntryFailed: Schema.Struct<{
|
|
|
702
770
|
readonly url: Schema.optionalKey<Schema.String>;
|
|
703
771
|
readonly type: Schema.Literal<"queue.entry.failed">;
|
|
704
772
|
readonly entry: Schema.String;
|
|
705
|
-
readonly reason: Schema.Literals<readonly ["conflict", "reported", "host-error", "interaction", "refused", "tooManyCommits"]>;
|
|
773
|
+
readonly reason: Schema.Literals<readonly ["conflict", "reported", "host-error", "interaction", "refused", "tooManyCommits", "tooLarge"]>;
|
|
706
774
|
readonly candidate: Schema.optionalKey<Schema.String>;
|
|
707
775
|
readonly error: Schema.optionalKey<Schema.String>;
|
|
708
776
|
}>;
|
|
@@ -986,7 +1054,7 @@ export declare const QueueEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
986
1054
|
readonly url: Schema.optionalKey<Schema.String>;
|
|
987
1055
|
readonly type: Schema.Literal<"queue.entry.failed">;
|
|
988
1056
|
readonly entry: Schema.String;
|
|
989
|
-
readonly reason: Schema.Literals<readonly ["conflict", "reported", "host-error", "interaction", "refused", "tooManyCommits"]>;
|
|
1057
|
+
readonly reason: Schema.Literals<readonly ["conflict", "reported", "host-error", "interaction", "refused", "tooManyCommits", "tooLarge"]>;
|
|
990
1058
|
readonly candidate: Schema.optionalKey<Schema.String>;
|
|
991
1059
|
readonly error: Schema.optionalKey<Schema.String>;
|
|
992
1060
|
}>, Schema.Struct<{
|