@ref0/git 0.11.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 +8 -7
- 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 +14 -3
- package/dist/contracts/git.d.mts +41 -12
- 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 +30 -23
- package/dist/contracts/result.mjs +24 -9
- 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 +90 -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.d.mts +1 -0
- package/dist/core/access.mjs +34 -13
- package/dist/core/ancestry.d.mts +9 -0
- package/dist/core/ancestry.mjs +6 -6
- package/dist/core/asked.mjs +68 -0
- package/dist/core/call-names.mjs +1 -0
- package/dist/core/call-services.mjs +2 -1
- package/dist/core/events/deliver.d.mts +1 -0
- package/dist/core/events/deliver.mjs +15 -3
- package/dist/core/forks.mjs +42 -16
- package/dist/core/imports.mjs +156 -13
- 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/objects/reading.mjs +17 -9
- package/dist/core/parts.d.mts +8 -2
- 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 +107 -32
- package/dist/core/receipts.mjs +26 -10
- package/dist/core/ref-view.mjs +59 -5
- package/dist/core/refs.mjs +18 -10
- package/dist/core/registered-rows.mjs +7 -5
- package/dist/core/repack.mjs +16 -11
- package/dist/core/repo-info.mjs +16 -9
- package/dist/core/repos.mjs +30 -14
- package/dist/core/saved-caller-views.d.mts +18 -0
- package/dist/core/saved-caller-views.mjs +17 -4
- package/dist/core/saved-callers-public.d.mts +3 -3
- package/dist/core/saved-callers-public.mjs +3 -2
- package/dist/core/saved-callers.d.mts +7 -0
- 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 +4 -3
- package/dist/extend.mjs +3 -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 +120 -59
- 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/locks.mjs +14 -9
- package/dist/lfs/objects.d.mts +6 -0
- package/dist/lfs/objects.mjs +95 -61
- 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/calls.mjs +21 -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 +16 -8
- 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 +272 -239
- 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 +112 -100
- package/dist/rest/forks.d.mts +146 -122
- 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 +10 -2
- 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 +292 -236
- package/dist/rest/refs.d.mts +98 -69
- package/dist/rest/repos.d.mts +133 -105
- package/dist/rest/tags.d.mts +100 -88
- package/dist/rest/tokens.d.mts +192 -168
- package/dist/rest/topics.d.mts +154 -134
- package/dist/rest/trees.d.mts +32 -16
- 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 +4 -4
- 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 +139 -216
- 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 +154 -8
- package/dist/storage/merge-cut.mjs +5 -4
- package/dist/storage/pack-reads.mjs +246 -34
- 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-seen.mjs +11 -6
- package/dist/storage/prune-walk.mjs +219 -81
- package/dist/storage/prune.mjs +629 -196
- package/dist/storage/push-uploads.mjs +36 -12
- package/dist/storage/quarantine.mjs +9 -7
- 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 +27 -0
- package/dist/store/repo-record.mjs +141 -4
- 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 +63 -42
- package/dist/sync/http.mjs +36 -1
- package/dist/sync/import.mjs +4 -2
- 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 +227 -147
- package/dist/sync/said.mjs +204 -0
- package/dist/sync/smart-http.mjs +4 -2
- package/dist/sync/step.mjs +33 -13
- package/dist/sync/tries.mjs +71 -24
- package/dist/sync.d.mts +2 -2
- package/dist/topics/advance.mjs +10 -3
- 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 -4
- 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
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadStarted } from "../contracts/push-uploads.mjs";
|
|
1
|
+
import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "../contracts/push-uploads.mjs";
|
|
2
2
|
import { fail, gitError } from "../contracts/result.mjs";
|
|
3
3
|
import { openFor } from "../core/access.mjs";
|
|
4
|
-
import { CoreParts } from "../core/parts.mjs";
|
|
4
|
+
import { CoreParts, ObjectsParts } from "../core/parts.mjs";
|
|
5
5
|
import { pushOptionsRefusal } from "../protocol/wire/receive-pack.mjs";
|
|
6
6
|
import { pushReasonsCapability } from "../protocol/wire/push-limits.mjs";
|
|
7
|
+
import { retryAfterOf } from "../protocol/wire/push-uploads.mjs";
|
|
7
8
|
import { decodeJson } from "../protocol/wire/json.mjs";
|
|
8
|
-
import { bucketCall,
|
|
9
|
-
import
|
|
9
|
+
import { bucketCall, readWhole } from "../storage/calls.mjs";
|
|
10
|
+
import "../storage/receive-bounds.mjs";
|
|
11
|
+
import { PushUploadRow, claimLapsed, completingMost, endUpload, partBytes, partLinkLife, partSizeOf, partsOf, pushPackTooLarge, pushUploadGrace, pushUploadKey, pushUploadLife, pushUploadMost, pushUploadRead, pushUploadRowKey } from "../storage/push-uploads.mjs";
|
|
10
12
|
import { afterWrites, bestEffort, decodeRow, storeCall } from "../store/errors.mjs";
|
|
11
13
|
import { randomText } from "../store/random.mjs";
|
|
14
|
+
import { heldAdd, heldStore } from "../store/repo-record.mjs";
|
|
12
15
|
import { newChangeId, repoScope } from "../store/scopes.mjs";
|
|
13
16
|
import { gitAnswer, resultType } from "./answers.mjs";
|
|
14
17
|
import { brokenBody, plainBody, readWhole as readWhole$1 } from "./bodies.mjs";
|
|
18
|
+
import { keptError } from "../core/receipts.mjs";
|
|
19
|
+
import { answerRow, pushedOf, rowsOf, startSteps } from "./push-upload-job.mjs";
|
|
15
20
|
import { refusalLog, reportOf, routeCounted, thrownLog } from "./receive-pack.mjs";
|
|
16
21
|
import * as Clock$1 from "effect/Clock";
|
|
17
22
|
import * as Effect from "effect/Effect";
|
|
@@ -23,8 +28,11 @@ const bodyMost = 1048576;
|
|
|
23
28
|
/** A pack's header: `PACK`, its version, and how many objects it holds. */
|
|
24
29
|
const packHeader = 12;
|
|
25
30
|
const zero = "0".repeat(40);
|
|
26
|
-
/**
|
|
27
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Push uploads over `needs`, the server's, staged in `staging`, offered above `above` bytes, on a
|
|
33
|
+
* host whose requests get `cpuMs` of CPU: complete's 202 asks a client to wait that long.
|
|
34
|
+
*/
|
|
35
|
+
const pushUploads = (needs, staging, above, cpuMs) => ({
|
|
28
36
|
above,
|
|
29
37
|
serve: (parts, call) => {
|
|
30
38
|
const { route } = call;
|
|
@@ -33,13 +41,15 @@ const pushUploads = (needs, staging, above) => ({
|
|
|
33
41
|
const parted = part(staging.uploads, call, route.upload, route.part);
|
|
34
42
|
return routeCounted(parts, Effect.provideContext(parted, needs));
|
|
35
43
|
}
|
|
36
|
-
|
|
44
|
+
const retryAfter = retryAfterOf((cpuMs ?? 3e4) / 1e3);
|
|
45
|
+
return routeCounted(parts, complete(staging, call, route.upload, retryAfter).pipe(Effect.tapError((error) => refusalLog(call.repo, error)), Effect.provideContext(needs)));
|
|
37
46
|
}
|
|
38
47
|
});
|
|
39
|
-
/** `body` as `schema`'s JSON, the answer a push upload's
|
|
40
|
-
const jsonAnswer = (schema, body) => new Response(Schema.encodeSync(Schema.fromJsonString(schema))(body), {
|
|
41
|
-
status
|
|
48
|
+
/** `body` as `schema`'s JSON, the answer a push upload's route gives, with `headers` beside. */
|
|
49
|
+
const jsonAnswer = (schema, body, status = 200, headers = {}) => new Response(Schema.encodeSync(Schema.fromJsonString(schema))(body), {
|
|
50
|
+
status,
|
|
42
51
|
headers: {
|
|
52
|
+
...headers,
|
|
43
53
|
"content-type": "application/json",
|
|
44
54
|
"cache-control": "no-store"
|
|
45
55
|
}
|
|
@@ -97,13 +107,15 @@ const begin = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call) {
|
|
|
97
107
|
state: "open"
|
|
98
108
|
};
|
|
99
109
|
const core = yield* CoreParts;
|
|
100
|
-
|
|
110
|
+
const { fetchLimits } = yield* ObjectsParts;
|
|
111
|
+
const addition = {
|
|
101
112
|
put: [{
|
|
102
113
|
...pushUploadRowKey(upload),
|
|
103
114
|
value: row
|
|
104
115
|
}],
|
|
105
116
|
jobs: [core.repackJobRow(removeAt)]
|
|
106
|
-
}
|
|
117
|
+
};
|
|
118
|
+
yield* heldAdd(heldStore(core.store), repo.internalId, fetchLimits, addition).pipe(Effect.catchTag("RepoGone", () => fail("NOT_FOUND", `No repo '${call.repo}'`)));
|
|
107
119
|
return jsonAnswer(PushUploadStarted, {
|
|
108
120
|
upload,
|
|
109
121
|
partSize: partSizeOf(body.bytes, uploads.maxParts),
|
|
@@ -144,18 +156,21 @@ const part = /* @__PURE__ */ Effect.fnUntraced(function* (uploads, call, upload,
|
|
|
144
156
|
});
|
|
145
157
|
/**
|
|
146
158
|
* The upload, `completing` from now: committed at the version its row was read, so of two
|
|
147
|
-
* completes only one pushes, and no part link is given after.
|
|
159
|
+
* completes only one pushes, and no part link is given after. `undefined` when another complete
|
|
160
|
+
* claimed it first.
|
|
148
161
|
*/
|
|
149
162
|
const claim = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor, parts, maxParts) {
|
|
150
163
|
for (let tries = 0; tries < 5; tries += 1) {
|
|
151
164
|
const { row, version } = yield* rowOf(repo, upload, actor);
|
|
165
|
+
if (row.state !== "open") return void 0;
|
|
152
166
|
const at = yield* Clock$1.currentTimeMillis;
|
|
153
|
-
if (
|
|
167
|
+
if (at >= row.removeAt - 432e5) return yield* ended(upload);
|
|
154
168
|
const count = partsOf(row.bytes, partSizeOf(row.bytes, maxParts));
|
|
155
169
|
if (!(parts.length === count && parts.every((one, at) => one.part === at + 1))) return yield* fail("INVALID_ARGUMENT", `Name each of its ${count} parts, in order`);
|
|
156
170
|
const claimed = {
|
|
157
171
|
...row,
|
|
158
|
-
state: "completing"
|
|
172
|
+
state: "completing",
|
|
173
|
+
claimedAt: at
|
|
159
174
|
};
|
|
160
175
|
const { store } = yield* CoreParts;
|
|
161
176
|
if ((yield* storeCall(() => store.commit(repoScope(repo), {
|
|
@@ -200,20 +215,49 @@ const startOf = (row) => ({
|
|
|
200
215
|
packOffset: 0
|
|
201
216
|
});
|
|
202
217
|
/**
|
|
203
|
-
* `POST <repo>/push-uploads/{upload}/complete`:
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* and
|
|
218
|
+
* `POST <repo>/push-uploads/{upload}/complete`: an open upload claimed, its parts joined, and
|
|
219
|
+
* handed to `git.push-upload`'s steps, which check the caller's grant again each try; then the
|
|
220
|
+
* same complete sent again answers 202 while they receive it, asking the client to wait
|
|
221
|
+
* `retryAfter` seconds, and once the upload ended, the report its push answered, as
|
|
222
|
+
* `git-receive-pack` does. Upkeep at its `removeAt` deletes the upload, and its answer with it.
|
|
207
223
|
*/
|
|
208
|
-
const complete = /* @__PURE__ */ Effect.fnUntraced(function* (staging,
|
|
224
|
+
const complete = /* @__PURE__ */ Effect.fnUntraced(function* (staging, call, upload, retryAfter) {
|
|
209
225
|
const finish = yield* bodyOf(call.request, FinishPushUpload);
|
|
210
226
|
const repo = yield* openFor(call.caller, call.repo, true);
|
|
211
227
|
const actor = yield* actorOf(call.caller);
|
|
212
|
-
const
|
|
213
|
-
const
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
|
|
228
|
+
const first = yield* uploadOf(repo.internalId, upload, actor);
|
|
229
|
+
const receiving = (step) => jsonAnswer(PushUploadReceiving, { step }, 202, { "retry-after": String(retryAfter) });
|
|
230
|
+
const handed = first.row.state === "open" ? yield* handOff(staging, repo.internalId, upload, call.caller, finish.parts) : void 0;
|
|
231
|
+
if (handed?.kind === "handed") return receiving(0);
|
|
232
|
+
const refused = handed?.kind === "refused" ? Result.fail(handed.error) : void 0;
|
|
233
|
+
if (refused !== void 0) yield* thrownLog(call.repo, refused);
|
|
234
|
+
const read = first.row.state === "open" ? yield* uploadOf(repo.internalId, upload, actor) : first;
|
|
235
|
+
const at = yield* Clock$1.currentTimeMillis;
|
|
236
|
+
const lapsed = read.row.state === "completing" && at >= (read.row.claimedAt ?? 0) + completingMost;
|
|
237
|
+
if (lapsed) {
|
|
238
|
+
const failed = {
|
|
239
|
+
kind: "failed",
|
|
240
|
+
error: keptError(claimLapsed)
|
|
241
|
+
};
|
|
242
|
+
yield* ending(staging, repo.internalId, upload, read.row, failed);
|
|
243
|
+
}
|
|
244
|
+
const { row, steps, answer } = lapsed ? yield* uploadOf(repo.internalId, upload, actor) : read;
|
|
245
|
+
if (row.state === "ended" && answer !== void 0) return yield* report(row, pushedOf(answer));
|
|
246
|
+
if (refused !== void 0) return yield* report(first.row, refused);
|
|
247
|
+
if (row.state === "completing" || row.state === "receiving") return receiving(steps?.step ?? 0);
|
|
248
|
+
return yield* ended(upload);
|
|
249
|
+
});
|
|
250
|
+
/** `pushed` as receive-pack's report on the start `row` names. */
|
|
251
|
+
const report = (row, pushed) => Effect.map(reportOf(startOf(row), pushed), (body) => gitAnswer(resultType("git-receive-pack"), body));
|
|
252
|
+
/** The upload's rows, when it's `actor`'s: its own, its steps' and its answer. */
|
|
253
|
+
const uploadOf = /* @__PURE__ */ Effect.fnUntraced(function* (repo, upload, actor) {
|
|
254
|
+
const { row, steps, answer } = yield* rowsOf(repo, upload);
|
|
255
|
+
if (row === void 0 || row.actor !== actor) return yield* ended(upload);
|
|
256
|
+
return {
|
|
257
|
+
row,
|
|
258
|
+
steps,
|
|
259
|
+
answer
|
|
260
|
+
};
|
|
217
261
|
});
|
|
218
262
|
/** The upload's parts as the bucket lists them, each the length signed and the one named. */
|
|
219
263
|
const checkedParts = (row, size, named, listed) => {
|
|
@@ -231,11 +275,12 @@ const checkedParts = (row, size, named, listed) => {
|
|
|
231
275
|
etag
|
|
232
276
|
})));
|
|
233
277
|
};
|
|
278
|
+
const notAPack = () => gitError("INVALID_ARGUMENT", "the push's pack is missing or isn't a pack");
|
|
234
279
|
/**
|
|
235
|
-
* The parts checked and joined,
|
|
236
|
-
*
|
|
280
|
+
* The upload's parts checked and joined, or why they can't be. The join names the ETags the bucket
|
|
281
|
+
* listed, so a part sent again after the check makes the bucket refuse it.
|
|
237
282
|
*/
|
|
238
|
-
const
|
|
283
|
+
const joinedParts = /* @__PURE__ */ Effect.fnUntraced(function* ({ uploads }, row, named) {
|
|
239
284
|
const listed = yield* Effect.result(bucketCall(uploads.listParts(row.key, row.uploadId)));
|
|
240
285
|
const size = partSizeOf(row.bytes, uploads.maxParts);
|
|
241
286
|
const parts = Result.flatMap(listed, (listing) => checkedParts(row, size, named, listing));
|
|
@@ -244,52 +289,68 @@ const pushStaged = /* @__PURE__ */ Effect.fnUntraced(function* ({ bucket, upload
|
|
|
244
289
|
uploadId: row.uploadId,
|
|
245
290
|
parts: parts.success
|
|
246
291
|
})));
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
292
|
+
return Result.map(stored, () => void 0);
|
|
293
|
+
});
|
|
294
|
+
/**
|
|
295
|
+
* An upload `actor` claims, its parts joined, handed to `git.push-upload`'s steps as `caller`:
|
|
296
|
+
* what complete does with an open upload, `handed` once the job is saved, or `undefined` when
|
|
297
|
+
* another complete claimed it first. An upload whose parts or pack are refused after the claim,
|
|
298
|
+
* or whose claim lapsed, ends with the refusal as its answer, unless another complete ended it
|
|
299
|
+
* first, and complete reports the answer that's stored.
|
|
300
|
+
*/
|
|
301
|
+
const handOff = /* @__PURE__ */ Effect.fnUntraced(function* (staging, internalId, upload, caller, named) {
|
|
302
|
+
const actor = yield* actorOf(caller);
|
|
303
|
+
const row = yield* claim(internalId, upload, actor, named, staging.uploads.maxParts);
|
|
304
|
+
if (row === void 0) return void 0;
|
|
305
|
+
const started = Effect.gen(function* () {
|
|
306
|
+
const joined = yield* joinedParts(staging, row, named);
|
|
307
|
+
if (Result.isFailure(joined)) return joined;
|
|
308
|
+
const objects = yield* objectsOf(staging.bucket, row.key);
|
|
309
|
+
if (objects === void 0) return Result.fail(notAPack());
|
|
310
|
+
return yield* startSteps(internalId, upload, actor, caller, objects, row.claimedAt);
|
|
311
|
+
});
|
|
312
|
+
const failed = (error) => ending(staging, internalId, upload, row, {
|
|
313
|
+
kind: "failed",
|
|
314
|
+
error: keptError(error)
|
|
315
|
+
});
|
|
316
|
+
const begun = yield* started.pipe(Effect.mapError(afterWrites), Effect.tapError(failed), Effect.map(Result.mapError(afterWrites)));
|
|
317
|
+
if (Result.isSuccess(begun)) return { kind: "handed" };
|
|
318
|
+
yield* failed(begun.failure);
|
|
319
|
+
return {
|
|
320
|
+
kind: "refused",
|
|
321
|
+
error: begun.failure
|
|
262
322
|
};
|
|
263
|
-
if (row.shallow.length > 0) input.shallow = row.shallow;
|
|
264
|
-
return yield* Effect.result(push(input));
|
|
265
323
|
});
|
|
266
324
|
/**
|
|
267
|
-
* The upload ended
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
*
|
|
325
|
+
* The upload ended, with `answer` when given, while its row is as `row` holds it, the same state
|
|
326
|
+
* and the same claim: its row marked `ended`, its answer beside it, at the version it was read,
|
|
327
|
+
* then, only once that lands, its parts aborted and its key deleted. An end that loses to a
|
|
328
|
+
* hand-off frees nothing, so the job the hand-off saved still finds its pack. Upkeep at its
|
|
329
|
+
* `removeAt` deletes the key again, and the row, so a PUT that lands while a link lives goes too.
|
|
330
|
+
* A row upkeep already deleted, or one a hand-off moved on, is left as it is. An end refused, as
|
|
331
|
+
* past a spent count, is logged at warning, and upkeep ends it instead.
|
|
271
332
|
*/
|
|
272
|
-
const ending = /* @__PURE__ */ Effect.fnUntraced(function* (staging, repo, upload, row) {
|
|
273
|
-
yield* endUpload(staging.bucket, staging.uploads, row);
|
|
333
|
+
const ending = /* @__PURE__ */ Effect.fnUntraced(function* (staging, repo, upload, row, answer) {
|
|
274
334
|
const { store } = yield* CoreParts;
|
|
275
|
-
const
|
|
276
|
-
if ((
|
|
277
|
-
yield* storeCall(() => store.commit(repoScope(repo), {
|
|
335
|
+
const now = yield* rowsOf(repo, upload);
|
|
336
|
+
if (!(now.row?.state === row.state && now.row.claimedAt === row.claimedAt)) return;
|
|
337
|
+
if (!(yield* storeCall(() => store.commit(repoScope(repo), {
|
|
278
338
|
id: newChangeId(),
|
|
279
|
-
expect:
|
|
339
|
+
expect: now.version,
|
|
280
340
|
put: [{
|
|
281
341
|
...pushUploadRowKey(upload),
|
|
282
342
|
value: {
|
|
283
343
|
...row,
|
|
284
344
|
state: "ended"
|
|
285
345
|
}
|
|
286
|
-
}]
|
|
287
|
-
}));
|
|
288
|
-
|
|
346
|
+
}, ...answer === void 0 ? [] : [answerRow(upload, answer)]]
|
|
347
|
+
}))).ok) return;
|
|
348
|
+
yield* endUpload(staging.bucket, staging.uploads, row);
|
|
349
|
+
}, (ended, _staging, repo, upload, row, _answer) => bestEffort(ended, (error) => Effect.logWarning("An upload's end was refused: upkeep ends it at its removeAt").pipe(Effect.annotateLogs({
|
|
289
350
|
repo,
|
|
290
351
|
upload,
|
|
291
352
|
key: row.key,
|
|
292
353
|
code: error.code,
|
|
293
354
|
reason: error.message
|
|
294
355
|
}))));
|
|
295
|
-
export { pushUploads };
|
|
356
|
+
export { handOff, pushUploads };
|
|
@@ -69,19 +69,20 @@ const wentAwayMidAnswer = (request) => request.method === "HEAD" ? Effect.void :
|
|
|
69
69
|
}));
|
|
70
70
|
/**
|
|
71
71
|
* A listing's body (Q884): `lines.start`, then each page `next` answers as the client reads it,
|
|
72
|
-
* then `lines.end
|
|
72
|
+
* then `lines.end` with the roots `roots` answers once the last page is read, so it holds one page
|
|
73
|
+
* at a time. Its pages' reads count on the request's one
|
|
73
74
|
* count (#709). Once its status has gone, a failure can't be one: a page that fails, a tag row
|
|
74
75
|
* with no stored peel, a store's refusal or a spent count among them, ends the body with an `ERR`
|
|
75
76
|
* in its words, which Git prints as `remote error:`, or, before any page, `refused`'s bytes. A
|
|
76
77
|
* page asked past `deadline`, as a client that stalls asks it, ends the body so too, unread. A
|
|
77
78
|
* client that cancels the body logs `wentAwayMidAnswer` of `request`.
|
|
78
79
|
*/
|
|
79
|
-
const listingBody = (lines, next, refused, deadline, request) => Effect.suspend(() => {
|
|
80
|
+
const listingBody = (lines, next, roots, refused, deadline, request) => Effect.suspend(() => {
|
|
80
81
|
let begun = false;
|
|
81
82
|
const chunk = Effect.gen(function* () {
|
|
82
83
|
const refs = yield* next;
|
|
83
84
|
const start = begun ? /* @__PURE__ */ new Uint8Array() : yield* lines.start;
|
|
84
|
-
const body = refs === void 0 ? yield* lines.end : yield* lines.page(refs);
|
|
85
|
+
const body = refs === void 0 ? yield* lines.end(roots === void 0 ? [] : yield* roots) : yield* lines.page(refs);
|
|
85
86
|
return {
|
|
86
87
|
bytes: joinedBytes([start, body]),
|
|
87
88
|
done: refs === void 0
|
|
@@ -111,7 +112,7 @@ const uploadPackRefs = (parts, caller, repo, request, started, missing) => {
|
|
|
111
112
|
if (v2) return gitAnswer(advertisementType(service), yield* encodeV2Capabilities(v2Capabilities(parts.agent)));
|
|
112
113
|
const listed = yield* open.lists;
|
|
113
114
|
const capabilities = uploadPackCapabilities(servedHead(listed), parts.agent);
|
|
114
|
-
const body = yield* listingBody(advertisementPages(service, listed, capabilities, listed.hidden), listed.next, (message) => encodeRefusedAdvertisement(service, message), deadline, request);
|
|
115
|
+
const body = yield* listingBody(advertisementPages(service, listed, capabilities, listed.hidden), listed.next, listed.roots, (message) => encodeRefusedAdvertisement(service, message), deadline, request);
|
|
115
116
|
return gitAnswer(advertisementType(service), body);
|
|
116
117
|
}).pipe(Effect.catchTag("WireEncodeError", (error) => Effect.fail(unwritable(error))), Effect.catch(missing));
|
|
117
118
|
return countedRequest(parts, Effect.fail)(answered);
|
|
@@ -169,7 +170,7 @@ const uploadPack = (parts, caller, repo, request, started) => {
|
|
|
169
170
|
if (command.command === "ls-refs") {
|
|
170
171
|
const asked = yield* readLsRefs(command);
|
|
171
172
|
const listed = yield* open.lists;
|
|
172
|
-
const pages = yield* listingBody(lsRefsPages(listed, asked, listed.hidden), listed.next, encodeErr, deadline, request);
|
|
173
|
+
const pages = yield* listingBody(lsRefsPages(listed, asked, listed.hidden), listed.next, void 0, encodeErr, deadline, request);
|
|
173
174
|
return gitAnswer(resultType(service), pages);
|
|
174
175
|
}
|
|
175
176
|
const served = yield* open.serve;
|
|
@@ -213,7 +214,7 @@ const answerRound = /* @__PURE__ */ Effect.fnUntraced(function* (served, asked,
|
|
|
213
214
|
const fetched = yield* Effect.result(served.fetch(request, AbortSignal.any([http.signal, stop.signal]))).pipe(Effect.onInterrupt(() => Effect.sync(() => stop.abort())));
|
|
214
215
|
if (Result.isFailure(fetched)) return yield* errAnswer(refusalOf(request, fetched.failure));
|
|
215
216
|
const answer = fetched.success;
|
|
216
|
-
const shallowLines = version === "v2" ? deepens || request.shallows.length > 0 ? encodeShallowInfo(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array()) : deepens ? encodeV0Shallow(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array());
|
|
217
|
+
const shallowLines = version === "v2" ? deepens || request.shallows.length > 0 || answer.shallow.length > 0 ? encodeShallowInfo(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array()) : deepens ? encodeV0Shallow(answer) : Effect.succeed(/* @__PURE__ */ new Uint8Array());
|
|
217
218
|
const shallow = yield* Effect.mapError(shallowLines, unwritable);
|
|
218
219
|
const acks = version === "v2" ? Effect.succeed(packfileLine) : round.wantsOnly ? Effect.succeed(/* @__PURE__ */ new Uint8Array()) : Effect.mapError(encodeV0Acks(round, held), unwritable);
|
|
219
220
|
const before = joinedBytes([shallow, yield* acks]);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Actor, ActorId, ActorInput, AnonymousActor, AuthInput, AuthorizeAnswer, AuthorizeInput, CallInput, Caller, CallerGrant, Credentials, CredentialsBasic, CredentialsBearer,
|
|
1
|
+
import { Actor, ActorId, ActorInput, AnonymousActor, AuthInput, AuthorizeAnswer, AuthorizeInput, CallInput, Caller, CallerGrant, Credentials, CredentialsBasic, CredentialsBearer, NamedActor, RepoAccess, WriteInput } from "./contracts/actors.mjs";
|
|
2
2
|
import { AccessOption, HiddenSpan, RefAudience, RefView } from "./contracts/access.mjs";
|
|
3
3
|
import { Acting, Blob, BlobCalls, BlobCreateInput, CreatedObject, ObjectInput, blobs_d_exports } from "./contracts/blobs.mjs";
|
|
4
4
|
import { ClientAdapter, ClientFetchInput, ClientFetchResult, ClientPushInput, GitClientCalls, GitClientOptions, Localize, PagedInput, RefForced, RemoteRefsInput } from "./contracts/client.mjs";
|
|
@@ -7,7 +7,7 @@ import "./rest/client-namespace.mjs";
|
|
|
7
7
|
import { RestClientCalls, RestTokenCalls, client_d_exports as client_d_exports$1 } from "./rest/client.mjs";
|
|
8
8
|
import { ListenInput, RestEvents } from "./rest/listen.mjs";
|
|
9
9
|
import { Me } from "./rest/me.mjs";
|
|
10
|
-
import { CreatedToken, GrantScope, PrefixTarget, TokenCalls, TokenCoverage, TokenCreateInput, TokenFields, TokenId, TokenInfo, TokenListInput, TokenRecord, TokenScope, TokenState, TokenTarget,
|
|
10
|
+
import { CreatedToken, GrantScope, PrefixTarget, TokenCalls, TokenCoverage, TokenCreateInput, TokenFields, TokenId, TokenInfo, TokenListInput, TokenRecord, TokenScope, TokenState, TokenTarget, TrustedWriteInput, VerifiedToken, grantScopes, tokenScopes, tokenStates } from "./contracts/tokens.mjs";
|
|
11
11
|
import "./contracts/namespaces.mjs";
|
|
12
12
|
import "./server/namespaces.mjs";
|
|
13
13
|
import "./core/namespaces.mjs";
|
|
@@ -19,58 +19,57 @@ import "./merges/namespace.mjs";
|
|
|
19
19
|
import { authorize_d_exports } from "./contracts/authorize.mjs";
|
|
20
20
|
import "./queue/namespace.mjs";
|
|
21
21
|
import "./lfs/namespace.mjs";
|
|
22
|
-
import
|
|
22
|
+
import "./store/cursor-seal-namespace.mjs";
|
|
23
|
+
import { QueueInternals } from "./queue/host.mjs";
|
|
23
24
|
import { CommitCalls, CommitCreateInput, CommitDiffInput, Compare, CompareInput, ComparisonFile, LineCounts, LogInput, RefPublication, Revision, commits_d_exports, logEmailsMost } from "./contracts/commits.mjs";
|
|
24
25
|
import { Commit, DiffListing, MergeBaseInput, MergeBases, MergeLabels, MergeTree, ObjectWrite, ObjectWrites, PathObject, ReadOptions, ReadPage, RenamesSkipped, Signature, Tag, TagFields, TreeChange, TreeChanges, TreeDiffInput, TreeMergeInput, WalkInput } from "./contracts/engine.mjs";
|
|
25
26
|
import { BeforeAfter, CandidateClosed, CandidateClosedFields, CandidateOpened, CandidateReported, EntryAdded, EntryFailed, EntryMerged, EntryRemoved, EntryRetried, EventEnvelope, EventFeature, FeedItem, FenceReason, FencedPack, GitEvent, HoldEvent, HoldEventFields, IndexRefusal, QueueEvent, QueueRestarted, RefPush, RefUpdated, RepoCreated, RepoDeletedEvent, RepoEnvelope, RepoEvent, RepoIndexRefused, RepoJobFailed, RepoMaintained, RepoPruneRefused, RepoRenamed, RepoVisibilityChanged, RepoWorkFailed, TokenEvent, TokenEventFields, TopicAdded, TopicEnvelope, TopicEvent, TopicFailed, TopicMerged, TopicOpened, TopicRemoved, TopicReported, TopicWorkFailed, events_d_exports } from "./contracts/events.mjs";
|
|
26
27
|
import { File, FileCalls, FileDiff, FileReadInput, FilesDiffInput, FilesListInput, FilesRead, files_d_exports } from "./contracts/files.mjs";
|
|
27
28
|
import { ForkCalls, ForkCreateInput, ForkFetched, ForkGetInput, ForkHolder, ForkListInput, forks_d_exports } from "./contracts/forks.mjs";
|
|
28
|
-
import { LfsCalls, LfsFeature, LfsGetInput, LfsObject, LfsOptions } from "./contracts/lfs.mjs";
|
|
29
29
|
import { repo_records_d_exports } from "./contracts/repo-records.mjs";
|
|
30
|
+
import { LfsCalls, LfsGetInput, LfsObject, LfsOptions } from "./contracts/lfs.mjs";
|
|
30
31
|
import { MergeAnswer, MergeCalls, MergeCreateInput } from "./contracts/merges.mjs";
|
|
31
32
|
import { HandlerOptions, SavedHandlerOptions } from "./contracts/handlers.mjs";
|
|
32
33
|
import { Grant, GrantAgainInput, GrantAgainRequest, GrantInput, GrantReachInput, GrantResolver } from "./contracts/grants.mjs";
|
|
33
34
|
import { GitScope, InternalRepoId, Oid, RefName, RepoName, TopicId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
|
|
34
35
|
import { Allotment, CopyRow, CopyRowsInput, CopyRowsPage, EffectiveLimits, FetchAnswer, GitObject, GitObjects, HoldingsInput, HoldingsWalked, IndexCalls, IndexReachInput, IndexReached, IndexStatus, IndexTip, IndexTry, IndexTryInput, LinkedObjects, MaintainInput, ObjectHeader, ObjectHeadersInput, ObjectReadInput, ObjectReadResult, ObjectReader, ObjectReaderInput, ObjectSizesInput, ObjectsChange, ObjectsFactory, ObjectsFetchInput, ObjectsOpenInput, ObjectsRead, ObjectsReadInput, ObjectsStarting, ObjectsStartingInput, ObjectsStep, PushedCommit, PushedCommitsInput, Quarantine, ReadObject, ReadObjects, ReceiveInput, RowsMoved, ShareInput, StageInput, Staged, StepAnswer, StepInput, WholeObject } from "./contracts/objects.mjs";
|
|
35
|
-
import { BypassOperation, FilesAllowOperation, ForkOperation, MeOperation, Operation, OperationKind, PushOperation, QueueAddOperation, QueueCandidateOperation, QueueEntryOperation, QueueReleaseOperation, QueueTargetOperation, RefsPrivateOperation, RepoListOperation, RepoOperation, TokenCreateOperation, TokenOperation, TokenParties, TopicOperation, WorkOperation } from "./contracts/operations.mjs";
|
|
36
36
|
import { client_d_exports } from "./client/client.mjs";
|
|
37
|
-
import {
|
|
37
|
+
import { BypassOperation, FilesAllowOperation, ForkOperation, MeOperation, Operation, OperationKind, PushOperation, QueueAddOperation, QueueCandidateOperation, QueueEntryOperation, QueueReleaseOperation, QueueTargetOperation, RefsPrivateOperation, RepoListOperation, RepoOperation, TokenCreateOperation, TokenOperation, TokenParties, TopicOperation, WorkOperation } from "./contracts/operations.mjs";
|
|
38
38
|
import { RepoStreamEvent } from "./rest/wire.mjs";
|
|
39
|
-
import {
|
|
39
|
+
import { AddResult, Added, BatchOptions, Bisect, Candidate, CandidateCloseReason, CandidateId, CandidateReportInput, CandidateResult, CandidateState, CandidatesResult, Entry, EntryFailureReason, EntryFields, EntryGroups, EntryHoldInput, EntryHoldsInput, EntryId, EntryResult, EntryState, Held, Hold, HoldFields, HoldId, HoldResult, HoldsResult, JoinInput, Judged, LanesInput, MergeInput, MergeMethod, MergePlan, MergeQueueCalls, MergeQueueLayerOptions, MergeQueueOptions, MetaValue, PreviousQueueSchedule, QueueAddInput, QueueFailureCounts, QueueKeys, QueueListInput, QueueListResult, QueueMeta, QueueOf, QueueRecent, QueueTargetInput, QueueView, ReleaseResult, Released, RemoveResult, Removed, Report, ReportDetails, ReportOptions, ReportResult, Reported, RestartResult, Restarted, Retried, RetryResult, ScheduleOption, TargetHoldInput } from "./contracts/queue.mjs";
|
|
40
|
+
import { Ref, RefCalls, RefCount, RefCountInput, RefEdit, RefGetInput, RefInput, RefListInput, RefProtection, RefSource, RefUpdate, RefUpdateKind, RefsUpdateInput, RefsUpdated, maxSeenRefs, refs_d_exports } from "./contracts/refs.mjs";
|
|
40
41
|
import { BasicCredential, BearerCredential, ClientCredential, ClientCredentials, CredentialInput, RemoteCalls, RemoteOptions, TransportFailure, TransportRetry, WithoutActor, WithoutSignal } from "./contracts/remote.mjs";
|
|
41
|
-
import { PinnedRepo, RepoCalls, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoGetInput, RepoIndexHold, RepoInfo, RepoInfoStats, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.mjs";
|
|
42
|
+
import { PinnedRepo, RenamedRepo, RepoCalls, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoGetInput, RepoIndexHold, RepoInfo, RepoInfoStats, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.mjs";
|
|
42
43
|
import { PeelInput, Peeled, TagCalls, TagCreateInput, peelMost, peelTagsMost, tags_d_exports } from "./contracts/tags.mjs";
|
|
43
|
-
import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait, TopicsFactory } from "./contracts/topics.mjs";
|
|
44
44
|
import { policy_d_exports } from "./auth/policy.mjs";
|
|
45
|
-
import {
|
|
45
|
+
import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait } from "./contracts/topics.mjs";
|
|
46
46
|
import { event_streams_d_exports } from "./event-streams/event-streams.mjs";
|
|
47
|
+
import { TreeCalls, TreeCreateInput, TreeEdit, TreeEntry, TreeInput, trees_d_exports } from "./contracts/trees.mjs";
|
|
47
48
|
import { BlobLimit, BlobNone, Bytes, FetchRequest, Filter, LfsPointers, ObjectType, ReadLimits, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
|
|
48
|
-
import { Accepted, Awaitable, ContextValue, DataLossContext, DataLossReason, DecisionAnswer, ErrorContext, ExistingContext, ExistingReason, FailureResult, GitError, GitErrorBody, GitErrorCode, GitErrorContexts, GitErrorFields, GitErrorInput, GitErrorTagged, HostErrorContext, HostFunctionName, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, RefusalReason, RejectInput, Rejected, ResourceContext, ResourceReason, Result, Success, UnavailableContext, UnavailableReason, Verdict,
|
|
49
|
+
import { Accepted, Awaitable, ContextValue, DataLossContext, DataLossReason, DecisionAnswer, ErrorContext, ExistingContext, ExistingReason, FailureResult, GitError, GitErrorBody, GitErrorCode, GitErrorContexts, GitErrorFields, GitErrorInput, GitErrorTagged, HostErrorContext, HostFunctionName, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, RefusalReason, RejectInput, Rejected, ResourceContext, ResourceReason, Result, Success, UnavailableContext, UnavailableReason, Verdict, gitError, httpStatus, isGitError, isRefusalReason } from "./contracts/result.mjs";
|
|
50
|
+
import { git_namespace_d_exports } from "./server/git-namespace.mjs";
|
|
49
51
|
import { SliceRefusal } from "./client/slice-push.mjs";
|
|
50
52
|
import { gitPathOf } from "./http/paths.mjs";
|
|
51
|
-
import { git_namespace_d_exports } from "./server/git-namespace.mjs";
|
|
52
|
-
import { createGitServer } from "./server/server.mjs";
|
|
53
|
-
import { lfs } from "./lfs/service.mjs";
|
|
54
53
|
import { branchRef, shortTarget } from "./queue/ids.mjs";
|
|
55
|
-
import { topics } from "./topics/host.mjs";
|
|
56
54
|
import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
|
|
57
55
|
import { LfsPointersBuilder, lfsPointers } from "./storage/lfs-pointers.mjs";
|
|
56
|
+
import { loose, looseLimits } from "./storage/loose.mjs";
|
|
58
57
|
import { objects_namespace_d_exports } from "./core/objects/objects-namespace.mjs";
|
|
59
58
|
import { saved_callers_public_d_exports } from "./core/saved-callers-public.mjs";
|
|
60
|
-
import { loose, looseLimits } from "./storage/loose.mjs";
|
|
61
|
-
import { auth_namespace_d_exports } from "./auth/auth-namespace.mjs";
|
|
62
59
|
import { PacksOptions, UnpackOptions, packs } from "./storage/packs.mjs";
|
|
60
|
+
import { auth_namespace_d_exports } from "./auth/auth-namespace.mjs";
|
|
63
61
|
import { PacksMemory, packsMemory } from "./storage/packs-memory.mjs";
|
|
64
|
-
import { layer_d_exports } from "./rest/layer.mjs";
|
|
65
62
|
import { Option, RepackOptions } from "./storage/repack.mjs";
|
|
66
|
-
import {
|
|
63
|
+
import { layer_d_exports } from "./rest/layer.mjs";
|
|
67
64
|
import "./core/rules/namespace.mjs";
|
|
68
|
-
import { public_d_exports as public_d_exports$
|
|
65
|
+
import { public_d_exports as public_d_exports$3 } from "./merges/public.mjs";
|
|
69
66
|
import { FetchAdjustment, FetchReadInput, FetchReadTarget, FetchRule, FetchRuleInput, FileRuleOptions, ProtectOptions, PushContext, PushFacts, PushRule, PushRuleInput, RefPatterns, RuleOperation } from "./contracts/rules.mjs";
|
|
67
|
+
import { public_d_exports as public_d_exports$2 } from "./queue/public.mjs";
|
|
68
|
+
import { BeginPushUpload, FinishPushUpload, PushFileOptions, PushOptions, PushRepoOptions, PushUploadOptions, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "./contracts/push-uploads.mjs";
|
|
70
69
|
import { public_d_exports as public_d_exports$1 } from "./lfs/public.mjs";
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import { ImportState } from "./contracts/sync.mjs";
|
|
70
|
+
import { GitAdapter, GitNeeds, ProvidedBy, ServerCalls } from "./contracts/server.mjs";
|
|
71
|
+
import { cursor_seal_public_d_exports } from "./store/cursor-seal-public.mjs";
|
|
72
|
+
import { ImportLfsMissed, ImportLfsReason, ImportState, ImportStatus } from "./contracts/sync.mjs";
|
|
74
73
|
import { ApprovalBase, ApprovalDecision, ApprovalPageContext, ApprovalPageInput, ApprovalPrompt, ApprovedGrant, ConfirmApprovalPage, DeniedGrant, DeviceApproval, DeviceCodePage, DeviceCodeRequest, DeviceCodeResponse, DeviceExchange, OAuthClient, OAuthError, OAuthTokenResponse, WebApproval, WebAuthorize, WebExchange } from "./contracts/signin.mjs";
|
|
75
74
|
import { GitStore, GitStoreAddInput, GitStoreCommitInput, GitStoreReadInput, HeldPack, Holding, Listed, ListedInput, Pack } from "./contracts/store.mjs";
|
|
76
75
|
import { WorkCalls, WorkItem, WorkListInput, WorkWriteInput, work_d_exports } from "./contracts/work.mjs";
|
|
@@ -87,4 +86,4 @@ import { PushHookInput } from "./contracts/git-hooks.mjs";
|
|
|
87
86
|
import { public_d_exports as public_d_exports$5 } from "./signin/public.mjs";
|
|
88
87
|
import "./signin/namespace.mjs";
|
|
89
88
|
import { jobStates } from "@ref0/infra";
|
|
90
|
-
export { type Accepted, type AccessOption, type Acting, type Actor, type ActorId, type ActorInput, type AddResult, type Added, type Allotment, type AnonymousActor, type ApprovalBase, type ApprovalDecision, type ApprovalPageContext, type ApprovalPageInput, type ApprovalPrompt, type ApprovedGrant, auth_namespace_d_exports as Auth, type AuthInput, authorize_d_exports as Authorize, type AuthorizeAnswer, type AuthorizeInput, type Awaitable, type BasicCredential, type BatchOptions, type BearerCredential, type BeforeAfter, BeginPushUpload, type Bisect, type Blob, type BlobCalls, type BlobCreateInput, BlobLimit, BlobNone, blobs_d_exports as Blobs, type BypassOperation, type Bytes, type CallInput, type Caller, type CallerGrant, type Candidate, type CandidateCloseReason, type CandidateClosed, type CandidateClosedFields, type CandidateId, type CandidateOpened, type CandidateReportInput, type CandidateReported, type CandidateResult, type CandidateState, type CandidatesResult, type ClientAdapter, type ClientCredential, type ClientCredentials, type ClientFetchInput, type ClientFetchResult, type ClientPushInput, type Commit, type CommitCalls, type CommitCreateInput, type CommitDiffInput, commits_d_exports as Commits, type Compare, type CompareInput, type ComparisonFile, type ConfirmApprovalPage, ContextValue, type CopyRow, type CopyRowsInput, type CopyRowsPage, type CreatedObject, type CreatedToken, type CredentialInput, type Credentials, type CredentialsBasic, type CredentialsBearer, DataLossContext, DataLossReason, type DecisionAnswer, type DeniedGrant, type DeviceApproval, type DeviceCodePage, type DeviceCodeRequest, type DeviceCodeResponse, type DeviceExchange, type DiffListing, type EffectiveLimits, type Entry, type EntryAdded, type EntryFailed, type EntryFailureReason, type EntryFields, type EntryGroups, type EntryHoldInput, type EntryHoldsInput, type EntryId, type EntryMerged, type EntryRemoved, type EntryResult, type EntryRetried, type EntryState, ErrorContext, type EventEnvelope, type EventFeature, event_streams_d_exports as EventStreams, events_d_exports as Events, ExistingContext, ExistingReason, type FailureResult, type FeedItem, type FenceReason, type FencedPack, type FetchAdjustment, type FetchAnswer, type FetchReadInput, type FetchReadTarget, FetchRequest, type FetchRule, type FetchRuleInput, type File, type FileCalls, type FileDiff, type FileReadInput, type FileRuleOptions, files_d_exports as Files, type FilesAllowOperation, type FilesDiffInput, type FilesListInput, type FilesRead, Filter, FinishPushUpload, type ForkCalls, type ForkCreateInput, type ForkFetched, type ForkGetInput, type ForkHolder, type ForkListInput, type ForkOperation, forks_d_exports as Forks, git_namespace_d_exports as Git, type GitAdapter, type GitAuth, type GitAuthorize, client_d_exports as GitClient, type GitClientCalls, type GitClientOptions, type GitError, GitErrorBody, type GitErrorCode, type GitErrorContexts, type GitErrorFields, type GitErrorInput, type GitErrorTagged, type GitEvent, git_events_d_exports as GitEvents, public_d_exports as GitHooks, type GitNeeds, type GitObject, type GitObjects, type GitScope, type GitServer, type GitServerOptions, type GitStore, type GitStoreAddInput, type GitStoreCommitInput, type GitStoreReadInput, type Grant, type GrantAgainInput, type GrantAgainRequest, type GrantInput, type GrantReachInput, type GrantResolver, type GrantScope, type HandlerOptions, type Held, type HeldPack, type HiddenSpan, type Hold, type HoldEvent, type HoldEventFields, type HoldFields, type HoldId, type HoldResult, type Holding, type HoldingsInput, type HoldingsWalked, type HoldsResult, HostErrorContext, type HostFunctionName, type ImportState, type IndexCalls, type IndexReachInput, type IndexReached, type IndexRefusal, type IndexStatus, type IndexTip, type IndexTry, type IndexTryInput, InternalRepoId, InvalidInputContext, InvalidInputReason, type JoinInput, type Judged, type LanesInput, public_d_exports$1 as Lfs, type LfsCalls, type LfsFeature, type LfsGetInput, type LfsObject, type LfsOptions, type LfsPointers, type LfsPointersBuilder, type LineCounts, type LinkedObjects, type Listed, type ListedInput, type ListenInput, type Localize, type LogInput, type MaintainInput, type Me, type MeOperation, type MergeAnswer, type MergeBaseInput, type MergeBases, type MergeCalls, type MergeCreateInput, type MergeInput, type MergeLabels, type MergeMethod, type MergePlan, public_d_exports$2 as MergeQueue, type MergeQueueCalls, type MergeQueueLayerOptions, type MergeQueueOptions, type MergeTree, public_d_exports$3 as Merges, type MetaValue, MissingContext, MissingReason, type NamedActor, NotAllowedContext, NotAllowedReason, type OAuthClient, type OAuthError, type OAuthTokenResponse, type ObjectHeader, type ObjectHeadersInput, type ObjectInput, type ObjectReadInput, type ObjectReadResult, type ObjectReader, type ObjectReaderInput, type ObjectSizesInput, type ObjectType, type ObjectWrite, type ObjectWrites, objects_namespace_d_exports as Objects, type ObjectsChange, type ObjectsFactory, type ObjectsFetchInput, type ObjectsOpenInput, type ObjectsRead, type ObjectsReadInput, type ObjectsStarting, type ObjectsStartingInput, type ObjectsStep, type Oid, type Operation, type OperationKind, type Option, type Pack, type PacksMemory, type PacksOptions, type PagedInput, type PathObject, type PeelInput, type Peeled, type PinnedRepo, policy_d_exports as Policy, PreconditionContext, PreconditionReason, type PrefixTarget, type Prepare, type PrepareInput, type PreviousQueueSchedule, public_d_exports$4 as PrivateRefs, type ProtectOptions, type ProvidedBy, type PushContext, type PushFacts, type PushHookInput, type PushOperation, type PushOptions, type PushRule, type PushRuleInput, type PushUploadOptions, PushUploadPart, PushUploadStarted, type PushedCommit, type PushedCommitsInput, type Quarantine, type QueueAddInput, type QueueAddOperation, type QueueCandidateOperation, type QueueEntryOperation, type QueueEvent, type QueueFailureCounts, type QueueInternals, type QueueKeys, type QueueListInput, type QueueListResult, type QueueMeta, type QueueOf, type QueueRecent, type QueueReleaseOperation, type QueueRestarted, type QueueTargetInput, type QueueTargetOperation, type QueueView, type ReadLimits, type ReadObject, type ReadObjects, type ReadOptions, type ReadPage, type ReceiveInput, type Ref, type RefAudience, type RefCalls, type RefCount, type RefCountInput, type RefEdit, type RefForced, type RefInput, type RefListInput, type RefName, type RefPatterns, type RefProtection, type RefPublication, type RefPush, type RefSource, type RefUpdate, type RefUpdateKind, type RefUpdated, type RefView, refs_d_exports as Refs, type RefsPrivateOperation, type RefsUpdateInput, type RefsUpdated, type RefusalReason, type RejectInput, type Rejected, type ReleaseResult, type Released, type RemoteCalls, type RemoteOptions, type RemoteRefsInput, type RemoveResult, type Removed, type RenamesSkipped, type RepackOptions, type RepoAccess, type RepoCalls, type RepoCatalogueEntry, type RepoCreateInput, type RepoCreated, type RepoDeleted, type RepoDeletedEvent, type RepoEnvelope, type RepoEvent, type RepoGetInput, type RepoIndexHold, type RepoIndexRefused, type RepoInfo, type RepoInfoStats, type RepoInput, type RepoJobFailed, type RepoListInput, type RepoListOperation, type RepoListOrder, type RepoMaintained, type RepoName, type RepoOperation, type RepoPruneRefused, type RepoRecord, repo_records_d_exports as RepoRecords, type RepoRenameInput, type RepoRenamed, type RepoStats, type RepoStreamEvent, type RepoUpdateInput, type RepoVisibilityChanged, type RepoWork, type RepoWorkFailed, type Report, type ReportDetails, type ReportOptions, type ReportResult, type Reported, repos_d_exports as Repos, ResourceContext, ResourceReason, layer_d_exports as Rest, client_d_exports$1 as RestClient, type RestClientCalls, type RestEvents, type RestTokenCalls, type RestartResult, type Restarted, type Result, type Retried, type RetryResult, type Revision, type RowsMoved, type RuleOperation, rules_d_exports as Rules, saved_callers_public_d_exports as SavedCallers, type SavedHandlerOptions, type ScheduleOption, type ServerCalls, type ServerSetup, type ShareInput, public_d_exports$5 as SignIn, type Signature, type SliceRefusal, type StageInput, type Staged, type StepAnswer, type StepInput, type Success, type Tag, type TagCalls, type TagCreateInput, type TagFields, tags_d_exports as Tags, type TargetHoldInput, type TokenCalls, type TokenCoverage, type TokenCreateInput, type TokenCreateOperation, type TokenEvent, type TokenEventFields, type TokenFields, type TokenId, type TokenInfo, type TokenListInput, type TokenOperation, type TokenParties, type TokenRecord, type TokenScope, type TokenState, type TokenTarget, tokens_public_d_exports as Tokens, type TokensFeature, type Topic, type TopicAddInput, type TopicAdded, type TopicCalls, type TopicCandidate, type TopicEntry, type TopicEntryInput, type TopicEnvelope, type TopicEvent, type TopicFailed, type TopicFailure, type TopicFailureReason, type TopicId, type TopicListInput, type TopicMerged, type TopicMergedEntry, type TopicOpened, type TopicOperation, type TopicRemoved, type TopicReportInput, type TopicReportOptions, type TopicReportQuestion, type TopicReported, type TopicState, type TopicTarget, type TopicWait, type TopicWorkFailed, public_d_exports$6 as Topics, type TopicsFactory, type TransportFailure, type TransportRetry, type TreeCalls, type TreeChange, type TreeChanges, type TreeCreateInput, type TreeDiffInput, type TreeEdit, type TreeEntry, TreeFilter, type TreeInput, type TreeMergeInput, trees_d_exports as Trees, type TrustedWriteInput, UnavailableContext, UnavailableReason, type UnpackOptions, Verdict, type VerifiedToken, type WalkInput, type WebApproval, type WebAuthorize, type WebExchange, type WholeObject, type WithoutActor, type WithoutSignal, work_d_exports as Work, type WorkCalls, type WorkItem, type WorkListInput, type WorkOperation, type WorkWriteInput, type WriteInput, accept, allotmentWithin, branchRef, createGitServer, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfs, lfsPointerOid, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, mergeQueue, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, reject, shortTarget, tokenScopes, tokenStates, topics };
|
|
89
|
+
export { type Accepted, type AccessOption, type Acting, type Actor, type ActorId, type ActorInput, type AddResult, type Added, type Allotment, type AnonymousActor, type ApprovalBase, type ApprovalDecision, type ApprovalPageContext, type ApprovalPageInput, type ApprovalPrompt, type ApprovedGrant, auth_namespace_d_exports as Auth, type AuthInput, authorize_d_exports as Authorize, type AuthorizeAnswer, type AuthorizeInput, type Awaitable, type BasicCredential, type BatchOptions, type BearerCredential, type BeforeAfter, BeginPushUpload, type Bisect, type Blob, type BlobCalls, type BlobCreateInput, BlobLimit, BlobNone, blobs_d_exports as Blobs, type BypassOperation, type Bytes, type CallInput, type Caller, type CallerGrant, type Candidate, type CandidateCloseReason, type CandidateClosed, type CandidateClosedFields, type CandidateId, type CandidateOpened, type CandidateReportInput, type CandidateReported, type CandidateResult, type CandidateState, type CandidatesResult, type ClientAdapter, type ClientCredential, type ClientCredentials, type ClientFetchInput, type ClientFetchResult, type ClientPushInput, type Commit, type CommitCalls, type CommitCreateInput, type CommitDiffInput, commits_d_exports as Commits, type Compare, type CompareInput, type ComparisonFile, type ConfirmApprovalPage, ContextValue, type CopyRow, type CopyRowsInput, type CopyRowsPage, type CreatedObject, type CreatedToken, type CredentialInput, type Credentials, type CredentialsBasic, type CredentialsBearer, cursor_seal_public_d_exports as CursorSeal, DataLossContext, DataLossReason, type DecisionAnswer, type DeniedGrant, type DeviceApproval, type DeviceCodePage, type DeviceCodeRequest, type DeviceCodeResponse, type DeviceExchange, type DiffListing, type EffectiveLimits, type Entry, type EntryAdded, type EntryFailed, type EntryFailureReason, type EntryFields, type EntryGroups, type EntryHoldInput, type EntryHoldsInput, type EntryId, type EntryMerged, type EntryRemoved, type EntryResult, type EntryRetried, type EntryState, ErrorContext, type EventEnvelope, type EventFeature, event_streams_d_exports as EventStreams, events_d_exports as Events, ExistingContext, ExistingReason, type FailureResult, type FeedItem, type FenceReason, type FencedPack, type FetchAdjustment, type FetchAnswer, type FetchReadInput, type FetchReadTarget, FetchRequest, type FetchRule, type FetchRuleInput, type File, type FileCalls, type FileDiff, type FileReadInput, type FileRuleOptions, files_d_exports as Files, type FilesAllowOperation, type FilesDiffInput, type FilesListInput, type FilesRead, Filter, FinishPushUpload, type ForkCalls, type ForkCreateInput, type ForkFetched, type ForkGetInput, type ForkHolder, type ForkListInput, type ForkOperation, forks_d_exports as Forks, git_namespace_d_exports as Git, type GitAdapter, client_d_exports as GitClient, type GitClientCalls, type GitClientOptions, type GitError, GitErrorBody, type GitErrorCode, type GitErrorContexts, type GitErrorFields, type GitErrorInput, type GitErrorTagged, type GitEvent, git_events_d_exports as GitEvents, public_d_exports as GitHooks, type GitNeeds, type GitObject, type GitObjects, type GitScope, type GitStore, type GitStoreAddInput, type GitStoreCommitInput, type GitStoreReadInput, type Grant, type GrantAgainInput, type GrantAgainRequest, type GrantInput, type GrantReachInput, type GrantResolver, type GrantScope, type HandlerOptions, type Held, type HeldPack, type HiddenSpan, type Hold, type HoldEvent, type HoldEventFields, type HoldFields, type HoldId, type HoldResult, type Holding, type HoldingsInput, type HoldingsWalked, type HoldsResult, HostErrorContext, type HostFunctionName, type ImportLfsMissed, type ImportLfsReason, type ImportState, type ImportStatus, type IndexCalls, type IndexReachInput, type IndexReached, type IndexRefusal, type IndexStatus, type IndexTip, type IndexTry, type IndexTryInput, InternalRepoId, InvalidInputContext, InvalidInputReason, type JoinInput, type Judged, type LanesInput, public_d_exports$1 as Lfs, type LfsCalls, type LfsGetInput, type LfsObject, type LfsOptions, type LfsPointers, type LfsPointersBuilder, type LineCounts, type LinkedObjects, type Listed, type ListedInput, type ListenInput, type Localize, type LogInput, type MaintainInput, type Me, type MeOperation, type MergeAnswer, type MergeBaseInput, type MergeBases, type MergeCalls, type MergeCreateInput, type MergeInput, type MergeLabels, type MergeMethod, type MergePlan, public_d_exports$2 as MergeQueue, type MergeQueueCalls, type MergeQueueLayerOptions, type MergeQueueOptions, type MergeTree, public_d_exports$3 as Merges, type MetaValue, MissingContext, MissingReason, type NamedActor, NotAllowedContext, NotAllowedReason, type OAuthClient, type OAuthError, type OAuthTokenResponse, type ObjectHeader, type ObjectHeadersInput, type ObjectInput, type ObjectReadInput, type ObjectReadResult, type ObjectReader, type ObjectReaderInput, type ObjectSizesInput, type ObjectType, type ObjectWrite, type ObjectWrites, objects_namespace_d_exports as Objects, type ObjectsChange, type ObjectsFactory, type ObjectsFetchInput, type ObjectsOpenInput, type ObjectsRead, type ObjectsReadInput, type ObjectsStarting, type ObjectsStartingInput, type ObjectsStep, type Oid, type Operation, type OperationKind, type Option, type Pack, type PacksMemory, type PacksOptions, type PagedInput, type PathObject, type PeelInput, type Peeled, type PinnedRepo, policy_d_exports as Policy, PreconditionContext, PreconditionReason, type PrefixTarget, type Prepare, type PrepareInput, type PreviousQueueSchedule, public_d_exports$4 as PrivateRefs, type ProtectOptions, type ProvidedBy, type PushContext, type PushFacts, type PushFileOptions, type PushHookInput, type PushOperation, type PushOptions, type PushRepoOptions, type PushRule, type PushRuleInput, type PushUploadOptions, PushUploadPart, PushUploadReceiving, PushUploadStarted, type PushedCommit, type PushedCommitsInput, type Quarantine, type QueueAddInput, type QueueAddOperation, type QueueCandidateOperation, type QueueEntryOperation, type QueueEvent, type QueueFailureCounts, type QueueInternals, type QueueKeys, type QueueListInput, type QueueListResult, type QueueMeta, type QueueOf, type QueueRecent, type QueueReleaseOperation, type QueueRestarted, type QueueTargetInput, type QueueTargetOperation, type QueueView, type ReadLimits, type ReadObject, type ReadObjects, type ReadOptions, type ReadPage, type ReceiveInput, type Ref, type RefAudience, type RefCalls, type RefCount, type RefCountInput, type RefEdit, type RefForced, type RefGetInput, type RefInput, type RefListInput, type RefName, type RefPatterns, type RefProtection, type RefPublication, type RefPush, type RefSource, type RefUpdate, type RefUpdateKind, type RefUpdated, type RefView, refs_d_exports as Refs, type RefsPrivateOperation, type RefsUpdateInput, type RefsUpdated, type RefusalReason, type RejectInput, type Rejected, type ReleaseResult, type Released, type RemoteCalls, type RemoteOptions, type RemoteRefsInput, type RemoveResult, type Removed, type RenamedRepo, type RenamesSkipped, type RepackOptions, type RepoAccess, type RepoCalls, type RepoCatalogueEntry, type RepoCreateInput, type RepoCreated, type RepoDeleted, type RepoDeletedEvent, type RepoEnvelope, type RepoEvent, type RepoGetInput, type RepoIndexHold, type RepoIndexRefused, type RepoInfo, type RepoInfoStats, type RepoInput, type RepoJobFailed, type RepoListInput, type RepoListOperation, type RepoListOrder, type RepoMaintained, type RepoName, type RepoOperation, type RepoPruneRefused, type RepoRecord, repo_records_d_exports as RepoRecords, type RepoRenameInput, type RepoRenamed, type RepoStats, type RepoStreamEvent, type RepoUpdateInput, type RepoVisibilityChanged, type RepoWork, type RepoWorkFailed, type Report, type ReportDetails, type ReportOptions, type ReportResult, type Reported, repos_d_exports as Repos, ResourceContext, ResourceReason, layer_d_exports as Rest, client_d_exports$1 as RestClient, type RestClientCalls, type RestEvents, type RestTokenCalls, type RestartResult, type Restarted, type Result, type Retried, type RetryResult, type Revision, type RowsMoved, type RuleOperation, rules_d_exports as Rules, saved_callers_public_d_exports as SavedCallers, type SavedHandlerOptions, type ScheduleOption, type ServerCalls, type ShareInput, public_d_exports$5 as SignIn, type Signature, type SliceRefusal, type StageInput, type Staged, type StepAnswer, type StepInput, type Success, type Tag, type TagCalls, type TagCreateInput, type TagFields, tags_d_exports as Tags, type TargetHoldInput, type TokenCalls, type TokenCoverage, type TokenCreateInput, type TokenCreateOperation, type TokenEvent, type TokenEventFields, type TokenFields, type TokenId, type TokenInfo, type TokenListInput, type TokenOperation, type TokenParties, type TokenRecord, type TokenScope, type TokenState, type TokenTarget, tokens_public_d_exports as Tokens, type Topic, type TopicAddInput, type TopicAdded, type TopicCalls, type TopicCandidate, type TopicEntry, type TopicEntryInput, type TopicEnvelope, type TopicEvent, type TopicFailed, type TopicFailure, type TopicFailureReason, type TopicId, type TopicListInput, type TopicMerged, type TopicMergedEntry, type TopicOpened, type TopicOperation, type TopicRemoved, type TopicReportInput, type TopicReportOptions, type TopicReportQuestion, type TopicReported, type TopicState, type TopicTarget, type TopicWait, type TopicWorkFailed, public_d_exports$6 as Topics, type TransportFailure, type TransportRetry, type TreeCalls, type TreeChange, type TreeChanges, type TreeCreateInput, type TreeDiffInput, type TreeEdit, type TreeEntry, TreeFilter, type TreeInput, type TreeMergeInput, trees_d_exports as Trees, type TrustedWriteInput, UnavailableContext, UnavailableReason, type UnpackOptions, Verdict, type VerifiedToken, type WalkInput, type WebApproval, type WebAuthorize, type WebExchange, type WholeObject, type WithoutActor, type WithoutSignal, work_d_exports as Work, type WorkCalls, type WorkItem, type WorkListInput, type WorkOperation, type WorkWriteInput, type WriteInput, allotmentWithin, branchRef, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfsPointerOid, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, shortTarget, tokenScopes, tokenStates };
|
package/dist/index.mjs
CHANGED
|
@@ -24,26 +24,23 @@ import { layer_exports } from "./rest/layer.mjs";
|
|
|
24
24
|
import { public_exports as public_exports$3 } from "./merges/public.mjs";
|
|
25
25
|
import { public_exports as public_exports$2 } from "./queue/public.mjs";
|
|
26
26
|
import { public_exports as public_exports$1 } from "./lfs/public.mjs";
|
|
27
|
-
import {
|
|
27
|
+
import { cursor_seal_public_exports } from "./store/cursor-seal-public.mjs";
|
|
28
28
|
import { InternalRepoId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
|
|
29
29
|
import { BlobLimit, BlobNone, FetchRequest, Filter, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
|
|
30
|
-
import { ContextValue, DataLossContext, DataLossReason, ErrorContext, ExistingContext, ExistingReason, GitErrorBody, HostErrorContext, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, ResourceContext, ResourceReason, UnavailableContext, UnavailableReason, Verdict,
|
|
30
|
+
import { ContextValue, DataLossContext, DataLossReason, ErrorContext, ExistingContext, ExistingReason, GitErrorBody, HostErrorContext, InvalidInputContext, InvalidInputReason, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, PreconditionContext, PreconditionReason, ResourceContext, ResourceReason, UnavailableContext, UnavailableReason, Verdict, gitError, httpStatus, isGitError, isRefusalReason } from "./contracts/result.mjs";
|
|
31
31
|
import { gitPathOf } from "./http/paths.mjs";
|
|
32
|
-
import { createGitServer } from "./server/server.mjs";
|
|
33
|
-
import { lfs } from "./lfs/service.mjs";
|
|
34
32
|
import { branchRef, shortTarget } from "./queue/ids.mjs";
|
|
35
|
-
import { topics } from "./topics/host.mjs";
|
|
36
33
|
import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
|
|
37
34
|
import { lfsPointers } from "./storage/lfs-pointers.mjs";
|
|
38
35
|
import { loose, looseLimits } from "./storage/loose.mjs";
|
|
39
36
|
import { packs } from "./storage/packs.mjs";
|
|
40
37
|
import { packsMemory } from "./storage/packs-memory.mjs";
|
|
41
38
|
import { rules_exports } from "./core/rules/rules.mjs";
|
|
42
|
-
import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadStarted } from "./contracts/push-uploads.mjs";
|
|
39
|
+
import { BeginPushUpload, FinishPushUpload, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "./contracts/push-uploads.mjs";
|
|
43
40
|
import { public_exports as public_exports$4 } from "./access/public.mjs";
|
|
44
41
|
import { public_exports as public_exports$6 } from "./topics/public.mjs";
|
|
45
42
|
import { tokens_public_exports } from "./auth/tokens-public.mjs";
|
|
46
43
|
import { public_exports } from "./core/hooks/public.mjs";
|
|
47
44
|
import { public_exports as public_exports$5 } from "./signin/public.mjs";
|
|
48
45
|
import { jobStates } from "@ref0/infra";
|
|
49
|
-
export { auth_namespace_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, commits_exports as Commits, ContextValue, DataLossContext, DataLossReason, ErrorContext, event_streams_exports as EventStreams, events_exports as Events, ExistingContext, ExistingReason, FetchRequest, files_exports as Files, Filter, FinishPushUpload, forks_exports as Forks, git_namespace_exports as Git, client_exports as GitClient, GitErrorBody, git_events_exports as GitEvents, public_exports as GitHooks, HostErrorContext, InternalRepoId, InvalidInputContext, InvalidInputReason, public_exports$1 as Lfs, public_exports$2 as MergeQueue, public_exports$3 as Merges, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, objects_namespace_exports as Objects, policy_exports as Policy, PreconditionContext, PreconditionReason, public_exports$4 as PrivateRefs, PushUploadPart, PushUploadStarted, refs_exports as Refs, repo_records_exports as RepoRecords, repos_exports as Repos, ResourceContext, ResourceReason, layer_exports as Rest, client_exports$1 as RestClient, rules_exports as Rules, saved_callers_public_exports as SavedCallers, public_exports$5 as SignIn, tags_exports as Tags, tokens_public_exports as Tokens, public_exports$6 as Topics, TreeFilter, trees_exports as Trees, UnavailableContext, UnavailableReason, Verdict, work_exports as Work,
|
|
46
|
+
export { auth_namespace_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, commits_exports as Commits, ContextValue, cursor_seal_public_exports as CursorSeal, DataLossContext, DataLossReason, ErrorContext, event_streams_exports as EventStreams, events_exports as Events, ExistingContext, ExistingReason, FetchRequest, files_exports as Files, Filter, FinishPushUpload, forks_exports as Forks, git_namespace_exports as Git, client_exports as GitClient, GitErrorBody, git_events_exports as GitEvents, public_exports as GitHooks, HostErrorContext, InternalRepoId, InvalidInputContext, InvalidInputReason, public_exports$1 as Lfs, public_exports$2 as MergeQueue, public_exports$3 as Merges, MissingContext, MissingReason, NotAllowedContext, NotAllowedReason, objects_namespace_exports as Objects, policy_exports as Policy, PreconditionContext, PreconditionReason, public_exports$4 as PrivateRefs, PushUploadPart, PushUploadReceiving, PushUploadStarted, refs_exports as Refs, repo_records_exports as RepoRecords, repos_exports as Repos, ResourceContext, ResourceReason, layer_exports as Rest, client_exports$1 as RestClient, rules_exports as Rules, saved_callers_public_exports as SavedCallers, public_exports$5 as SignIn, tags_exports as Tags, tokens_public_exports as Tokens, public_exports$6 as Topics, TreeFilter, trees_exports as Trees, UnavailableContext, UnavailableReason, Verdict, work_exports as Work, allotmentWithin, branchRef, gitError, gitPathOf, grantScopes, httpStatus, isGitError, isInternalId, isRefusalReason, jobStates, lfsPointerOid, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, shortTarget, tokenScopes, tokenStates };
|
package/dist/lfs/base.d.mts
CHANGED
|
@@ -3,6 +3,7 @@ import { GitError } from "../contracts/result.mjs";
|
|
|
3
3
|
import { RegisteredCheck } from "../core/rules/context.mjs";
|
|
4
4
|
import { Bucket as Bucket$1, Links } from "../contracts/objects.mjs";
|
|
5
5
|
import { CoreNeeds } from "../core/parts.mjs";
|
|
6
|
+
import { LfsCopy } from "./copy.mjs";
|
|
6
7
|
import { ObjectRead } from "./objects.mjs";
|
|
7
8
|
import { LfsService } from "./service.mjs";
|
|
8
9
|
import * as Effect from "effect/Effect";
|
|
@@ -11,13 +12,14 @@ import * as Context from "effect/Context";
|
|
|
11
12
|
/** A listed object's bytes, as `objectOf` reads them over LFS's parts. */
|
|
12
13
|
export type LfsRead = (read: ObjectRead) => Effect.Effect<LfsObject, GitError, CoreNeeds>;
|
|
13
14
|
/**
|
|
14
|
-
* What LFS attaches to the server: its routes, which Git's handler serves, its push check,
|
|
15
|
-
* object reads, which `git.lfs.get` calls.
|
|
15
|
+
* What LFS attaches to the server: its routes, which Git's handler serves, its push check, its
|
|
16
|
+
* object reads, which `git.lfs.get` calls, and the copy import lists a source's objects through.
|
|
16
17
|
*/
|
|
17
18
|
export interface LfsAttached {
|
|
18
19
|
readonly service: LfsService;
|
|
19
20
|
readonly check: RegisteredCheck;
|
|
20
21
|
readonly read: LfsRead;
|
|
22
|
+
readonly copy: LfsCopy;
|
|
21
23
|
}
|
|
22
24
|
declare const LfsBase_base: Context.ServiceClass<LfsBase, "@ref0/git/lfs/LfsBase", {
|
|
23
25
|
readonly needs: Context.Context<CoreNeeds>;
|
|
@@ -25,11 +27,13 @@ declare const LfsBase_base: Context.ServiceClass<LfsBase, "@ref0/git/lfs/LfsBase
|
|
|
25
27
|
readonly links: Links | undefined;
|
|
26
28
|
readonly requestLimits: RequestLimits.RequestLimits['Service'];
|
|
27
29
|
readonly attach: (lfs: LfsAttached) => Effect.Effect<void>;
|
|
30
|
+
readonly copy: Effect.Effect<LfsCopy | undefined>;
|
|
28
31
|
}>;
|
|
29
32
|
/**
|
|
30
33
|
* What `Git.layer` gives `Lfs.layer`: the server's services, the adapter's bucket, each call it
|
|
31
34
|
* makes charged, its links, when it has them, and its `RequestLimits`, none when it gives none;
|
|
32
|
-
* and `attach`, once, before the seal.
|
|
35
|
+
* and `attach`, once, before the seal. `copy` is the attached LFS's copy, read as a call runs, so
|
|
36
|
+
* `Sync.layer` built beside `Lfs.layer`, in either order, finds it: `undefined` without LFS.
|
|
33
37
|
*/
|
|
34
38
|
export declare class LfsBase extends /* @__PURE__ */ LfsBase_base {}
|
|
35
39
|
export {};
|
package/dist/lfs/base.mjs
CHANGED
|
@@ -3,7 +3,8 @@ import * as Context from "effect/Context";
|
|
|
3
3
|
/**
|
|
4
4
|
* What `Git.layer` gives `Lfs.layer`: the server's services, the adapter's bucket, each call it
|
|
5
5
|
* makes charged, its links, when it has them, and its `RequestLimits`, none when it gives none;
|
|
6
|
-
* and `attach`, once, before the seal.
|
|
6
|
+
* and `attach`, once, before the seal. `copy` is the attached LFS's copy, read as a call runs, so
|
|
7
|
+
* `Sync.layer` built beside `Lfs.layer`, in either order, finds it: `undefined` without LFS.
|
|
7
8
|
*/
|
|
8
9
|
var LfsBase = class extends (/* @__PURE__ */ Context.Service()("@ref0/git/lfs/LfsBase")) {};
|
|
9
10
|
export { LfsBase };
|