@ref0/git 0.14.0 → 0.25.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 +1 -1
- package/dist/auth/access-jwt.mjs +4 -4
- package/dist/auth/auth-namespace.d.mts +3 -3
- package/dist/auth/auth-namespace.mjs +3 -2
- package/dist/auth/auth.d.mts +3 -3
- package/dist/auth/auth.mjs +9 -8
- package/dist/auth/authorize.mjs +4 -4
- package/dist/auth/fences.d.mts +1 -2
- package/dist/auth/fences.mjs +3 -3
- package/dist/auth/grants.mjs +4 -4
- package/dist/auth/host-function.mjs +19 -2
- package/dist/auth/host-services.mjs +4 -6
- package/dist/auth/identify.d.mts +1 -1
- package/dist/auth/identify.mjs +9 -3
- package/dist/auth/token-cleanup.mjs +67 -0
- package/dist/auth/token-rows.mjs +7 -2
- package/dist/auth/token-text.mjs +9 -1
- package/dist/auth/tokens-base.d.mts +35 -0
- package/dist/auth/tokens-base.mjs +13 -0
- package/dist/auth/tokens-layer.d.mts +2 -27
- package/dist/auth/tokens-layer.mjs +6 -11
- package/dist/auth/tokens-public.d.mts +3 -3
- package/dist/auth/tokens.d.mts +7 -10
- package/dist/auth/tokens.mjs +10 -81
- package/dist/client/answer.mjs +21 -42
- package/dist/client/client.d.mts +17 -11
- package/dist/client/client.mjs +21 -12
- package/dist/client/git-http.mjs +18 -8
- package/dist/client/local.mjs +74 -37
- package/dist/client/negotiate.mjs +3 -3
- package/dist/client/push-upload.mjs +34 -17
- package/dist/client/remote.mjs +12 -13
- package/dist/client/run-remote-helper.d.mts +2 -1
- package/dist/client/run-remote-helper.mjs +61 -27
- package/dist/client/slice-push.d.mts +1 -1
- package/dist/client/transport.mjs +105 -46
- package/dist/contracts/blobs.d.mts +58 -11
- package/dist/contracts/blobs.mjs +17 -3
- package/dist/contracts/call-allowance.d.mts +13 -0
- package/dist/contracts/call-allowance.mjs +44 -0
- package/dist/contracts/calls-spent.mjs +12 -35
- package/dist/contracts/client.d.mts +18 -18
- package/dist/contracts/commits.d.mts +28 -28
- package/dist/contracts/commits.mjs +1 -1
- package/dist/contracts/engine.d.mts +8 -3
- package/dist/contracts/engine.mjs +10 -1
- package/dist/contracts/events.d.mts +1 -1
- package/dist/contracts/events.mjs +1 -1
- package/dist/contracts/files.d.mts +14 -14
- package/dist/contracts/files.mjs +1 -1
- package/dist/contracts/forks.d.mts +21 -21
- package/dist/contracts/forks.mjs +1 -1
- package/dist/contracts/git-events.d.mts +29 -1
- package/dist/contracts/git-hooks.d.mts +2 -2
- package/dist/contracts/git.d.mts +30 -5
- package/dist/contracts/grants.d.mts +24 -4
- package/dist/contracts/handlers.d.mts +1 -1
- package/dist/contracts/lfs.d.mts +28 -2
- package/dist/contracts/merges.d.mts +3 -2
- package/dist/contracts/object-values.d.mts +1 -0
- package/dist/contracts/object-values.mjs +16 -1
- package/dist/contracts/objects.d.mts +42 -41
- package/dist/contracts/opaque.mjs +1 -1
- package/dist/contracts/operations.mjs +1 -1
- package/dist/contracts/queue.d.mts +247 -55
- package/dist/contracts/queue.mjs +8 -9
- package/dist/contracts/refs.d.mts +30 -27
- package/dist/contracts/refs.mjs +1 -1
- package/dist/contracts/remote.d.mts +8 -12
- package/dist/contracts/remote.mjs +4 -1
- package/dist/contracts/repos.d.mts +32 -141
- package/dist/contracts/repos.mjs +6 -4
- package/dist/contracts/result.d.mts +40 -18
- package/dist/contracts/result.mjs +42 -9
- package/dist/contracts/rules.d.mts +2 -2
- package/dist/contracts/server.d.mts +25 -52
- package/dist/contracts/services.d.mts +6 -9
- package/dist/contracts/services.mjs +1 -2
- package/dist/contracts/signin.d.mts +1 -1
- package/dist/contracts/store.d.mts +7 -6
- package/dist/contracts/sync.d.mts +73 -12
- package/dist/contracts/sync.mjs +14 -3
- package/dist/contracts/tags.d.mts +13 -13
- package/dist/contracts/tags.mjs +1 -1
- package/dist/contracts/time.d.mts +3 -0
- package/dist/contracts/{promises.mjs → time.mjs} +1 -1
- package/dist/contracts/tokens.d.mts +17 -19
- package/dist/contracts/tokens.mjs +4 -3
- package/dist/contracts/topics.d.mts +10 -10
- package/dist/contracts/trees.d.mts +16 -16
- package/dist/contracts/trees.mjs +1 -1
- package/dist/contracts/work.d.mts +28 -17
- package/dist/contracts/work.mjs +2 -2
- package/dist/core/access.d.mts +1 -2
- package/dist/core/access.mjs +20 -9
- package/dist/core/ancestry.d.mts +1 -0
- package/dist/core/ancestry.mjs +30 -34
- package/dist/core/asked.mjs +1 -1
- package/dist/core/call-groups.mjs +48 -0
- package/dist/core/call-names.mjs +6 -1
- package/dist/core/call-services.mjs +11 -3
- package/dist/core/events/deliver.d.mts +2 -3
- package/dist/core/events/deliver.mjs +45 -38
- package/dist/core/events/retired.mjs +119 -0
- package/dist/core/forks.mjs +929 -433
- package/dist/core/hooks/groups.mjs +3 -3
- package/dist/core/imports.mjs +127 -41
- package/dist/core/index-job.mjs +131 -38
- package/dist/core/index-lost.d.mts +1 -2
- package/dist/core/index-lost.mjs +2 -2
- package/dist/core/loose-tally.mjs +38 -15
- package/dist/core/merge-parts.d.mts +17 -4
- package/dist/core/merge-parts.mjs +7 -2
- package/dist/core/mirror-rows.mjs +31 -1
- package/dist/core/objects/blobs.mjs +127 -3
- package/dist/core/objects/files.mjs +20 -17
- package/dist/core/objects/lines.mjs +2 -2
- package/dist/core/objects/merges.mjs +4 -1
- package/dist/core/objects/objects-layer.d.mts +1 -1
- package/dist/core/objects/objects-layer.mjs +4 -4
- package/dist/core/objects/peel.mjs +1 -7
- package/dist/core/objects/reading.mjs +41 -29
- package/dist/core/objects/tags.mjs +4 -1
- package/dist/core/objects/tree-edits.mjs +1 -1
- package/dist/core/objects/trees.mjs +257 -58
- package/dist/core/objects/writing.mjs +4 -10
- package/dist/core/own-writes.mjs +2 -2
- package/dist/core/parts.d.mts +11 -5
- package/dist/core/parts.mjs +9 -10
- package/dist/core/purge.mjs +310 -93
- package/dist/core/push-decide.mjs +2 -0
- package/dist/core/push-files.d.mts +1 -1
- package/dist/core/push.d.mts +2 -2
- package/dist/core/push.mjs +170 -128
- package/dist/core/receipts.d.mts +2 -2
- package/dist/core/receipts.mjs +17 -5
- package/dist/core/ref-index-job.mjs +7 -7
- package/dist/core/ref-view.mjs +75 -32
- package/dist/core/refs.mjs +7 -7
- package/dist/core/registered-rows.mjs +2 -2
- package/dist/core/repack.mjs +58 -48
- package/dist/core/repo-info.mjs +3 -3
- package/dist/core/repos.mjs +21 -9
- package/dist/core/rules/changes.mjs +18 -40
- package/dist/core/rules/check.mjs +6 -5
- package/dist/core/rules/commit-changes.mjs +3 -15
- package/dist/core/rules/context.d.mts +3 -3
- package/dist/core/rules/context.mjs +18 -14
- package/dist/core/rules/fetch.mjs +1 -1
- package/dist/core/rules/protect.mjs +30 -17
- package/dist/core/saved-caller-views.d.mts +8 -3
- package/dist/core/saved-caller-views.mjs +4 -4
- package/dist/core/saved-callers.d.mts +19 -2
- package/dist/core/saved-callers.mjs +1 -1
- package/dist/core/seam.d.mts +17 -28
- package/dist/core/seam.mjs +7 -28
- package/dist/core/tokens.mjs +1 -1
- package/dist/core/view.d.mts +6 -3
- package/dist/core/view.mjs +18 -25
- package/dist/core/work.mjs +60 -15
- package/dist/engine/allotted-xdiff.mjs +3 -16
- package/dist/engine/combined.d.mts +3 -0
- package/dist/engine/combined.mjs +200 -185
- package/dist/engine/content.d.mts +2 -2
- package/dist/engine/content.mjs +1 -1
- package/dist/engine/failures.mjs +2 -1
- package/dist/engine/merge.mjs +7 -9
- package/dist/engine/reads.d.mts +2 -2
- package/dist/engine/reads.mjs +25 -17
- package/dist/engine/xdiff.d.mts +1 -1
- package/dist/engine/xdiff.mjs +1 -1
- 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 +3 -3
- package/dist/event-streams/stream.mjs +39 -16
- package/dist/extend.d.mts +2 -7
- package/dist/extend.mjs +1 -4
- package/dist/http/answers.mjs +8 -5
- package/dist/http/core-parts.mjs +169 -96
- package/dist/http/handler.mjs +82 -10
- package/dist/http/node.d.mts +14 -1
- package/dist/http/node.mjs +56 -27
- package/dist/http/parts.d.mts +2 -0
- package/dist/http/push-upload-job.mjs +165 -47
- package/dist/http/push-uploads.mjs +37 -22
- package/dist/http/receive-pack.mjs +14 -53
- package/dist/http/request-snapshot.mjs +258 -0
- package/dist/http/upload-pack.mjs +25 -20
- package/dist/index.d.mts +36 -28
- package/dist/index.mjs +12 -3
- package/dist/lfs/answer.mjs +37 -0
- package/dist/lfs/base.d.mts +3 -1
- package/dist/lfs/base.mjs +25 -1
- package/dist/lfs/copy.d.mts +70 -8
- package/dist/lfs/copy.mjs +217 -21
- package/dist/lfs/layer.d.mts +19 -4
- package/dist/lfs/layer.mjs +25 -13
- package/dist/lfs/locks.mjs +3 -3
- package/dist/lfs/objects.d.mts +2 -1
- package/dist/lfs/objects.mjs +89 -19
- package/dist/lfs/pointers.mjs +2 -2
- package/dist/lfs/rows.d.mts +1 -1
- package/dist/lfs/rows.mjs +50 -9
- package/dist/lfs/upkeep.mjs +82 -17
- package/dist/lfs/uploaded.mjs +1 -1
- package/dist/lfs/wire.mjs +7 -32
- package/dist/merges/merges.mjs +19 -4
- package/dist/node.d.mts +2 -2
- package/dist/protocol/bytes/buffers.d.mts +1 -1
- package/dist/protocol/bytes/buffers.mjs +14 -6
- package/dist/protocol/bytes/deflate.d.mts +1 -1
- package/dist/protocol/bytes/deflate.mjs +1 -1
- package/dist/protocol/bytes/inflate.d.mts +1 -1
- package/dist/protocol/bytes/inflate.mjs +1 -1
- package/dist/protocol/bytes/reader.mjs +6 -1
- package/dist/protocol/bytes/sha1.d.mts +1 -1
- package/dist/protocol/bytes/sha1.mjs +1 -1
- package/dist/protocol/bytes/streams.mjs +27 -1
- package/dist/protocol/diff/read.d.mts +6 -4
- package/dist/protocol/diff/read.mjs +110 -11
- package/dist/protocol/objects/lfs-pointer.d.mts +14 -2
- package/dist/protocol/objects/lfs-pointer.mjs +1 -3
- package/dist/protocol/objects/links-raw.mjs +24 -10
- package/dist/protocol/objects/tag.d.mts +1 -1
- package/dist/protocol/objects/tree.mjs +23 -6
- package/dist/protocol/packs/delta.d.mts +6 -3
- package/dist/protocol/packs/delta.mjs +96 -32
- package/dist/protocol/packs/graph.mjs +1 -1
- package/dist/protocol/packs/idx.d.mts +3 -2
- package/dist/protocol/packs/idx.mjs +23 -4
- package/dist/protocol/packs/parts.d.mts +4 -1
- package/dist/protocol/packs/parts.mjs +10 -7
- package/dist/protocol/packs/reader.d.mts +6 -1
- package/dist/protocol/packs/reader.mjs +4 -3
- package/dist/protocol/packs/write-error.d.mts +1 -1
- package/dist/protocol/packs/write-error.mjs +1 -1
- package/dist/protocol/packs/writer.mjs +26 -8
- package/dist/protocol/wire/advertisement.d.mts +1 -1
- package/dist/protocol/wire/advertisement.mjs +3 -2
- package/dist/protocol/wire/fetch.d.mts +1 -1
- package/dist/protocol/wire/fetch.mjs +1 -1
- package/dist/protocol/wire/lines.d.mts +9 -1
- package/dist/protocol/wire/lines.mjs +28 -1
- package/dist/protocol/wire/push-uploads.mjs +10 -7
- package/dist/protocol/wire/receive-pack.d.mts +1 -1
- package/dist/protocol/wire/receive-pack.mjs +1 -1
- package/dist/protocol/wire/report-status.d.mts +1 -1
- package/dist/protocol/wire/report-status.mjs +1 -1
- package/dist/protocol/wire/v2.d.mts +1 -1
- package/dist/protocol/wire/v2.mjs +1 -1
- package/dist/queue/advance.mjs +48 -44
- package/dist/queue/base.d.mts +57 -0
- package/dist/queue/base.mjs +44 -0
- package/dist/queue/calls.mjs +54 -57
- package/dist/queue/commit.mjs +2 -2
- package/dist/queue/host.d.mts +2 -16
- package/dist/queue/host.mjs +2 -7
- package/dist/queue/layer.d.mts +2 -2
- package/dist/queue/layer.mjs +19 -8
- package/dist/queue/limits.mjs +2 -0
- package/dist/queue/push-option.mjs +9 -24
- package/dist/queue/schedule.mjs +2 -2
- package/dist/queue/search.mjs +1 -1
- package/dist/queue/state.mjs +3 -11
- package/dist/queue/trim.mjs +6 -4
- package/dist/rest/blobs.mjs +29 -5
- package/dist/rest/caller.d.mts +4 -4271
- package/dist/rest/caller.mjs +4 -0
- package/dist/rest/client.d.mts +9 -6
- package/dist/rest/client.mjs +25 -8
- package/dist/rest/errors.mjs +1 -1
- package/dist/rest/handler.mjs +2 -2
- package/dist/rest/handlers.mjs +66 -11
- package/dist/rest/layer.d.mts +2 -2
- package/dist/rest/layer.mjs +6 -13
- package/dist/rest/listen.mjs +2 -2
- package/dist/rest/me.d.mts +3 -432
- package/dist/rest/refs.mjs +1 -1
- package/dist/server/check-fetch.mjs +3 -3
- package/dist/server/edge-node.d.mts +11 -8
- package/dist/server/edge-node.mjs +9 -6
- package/dist/server/edge.d.mts +21 -7
- package/dist/server/edge.mjs +56 -11
- package/dist/server/extension.mjs +1 -1
- package/dist/server/git-layer.d.mts +5 -6
- package/dist/server/git-layer.mjs +28 -23
- package/dist/server/git-namespace.d.mts +4 -3
- package/dist/server/git-namespace.mjs +3 -2
- package/dist/server/lifecycle.mjs +19 -107
- package/dist/server/registry.mjs +24 -13
- package/dist/server/server.mjs +249 -371
- package/dist/signin/context.d.mts +1 -2
- package/dist/signin/context.mjs +1 -1
- package/dist/signin/forms.mjs +1 -1
- package/dist/signin/grants.d.mts +2 -2
- package/dist/signin/grants.mjs +1 -1
- package/dist/signin/layer.d.mts +1 -1
- package/dist/signin/layer.mjs +1 -1
- package/dist/signin/wire.mjs +1 -1
- package/dist/storage/allotted.mjs +22 -12
- package/dist/storage/batch-upkeep.mjs +293 -0
- package/dist/storage/batches.d.mts +7 -0
- package/dist/storage/batches.mjs +347 -0
- package/dist/storage/budget.mjs +23 -1
- package/dist/storage/calls.d.mts +2 -3
- package/dist/storage/calls.mjs +166 -182
- package/dist/storage/charged-cache.mjs +180 -0
- package/dist/storage/chunks.d.mts +9 -0
- package/dist/storage/chunks.mjs +410 -0
- package/dist/storage/clean-up.mjs +72 -9
- package/dist/storage/counted-bucket.mjs +35 -13
- package/dist/storage/fetch-row-cache.d.mts +6 -0
- package/dist/storage/fetch-row-cache.mjs +211 -0
- package/dist/storage/fetch.d.mts +2 -0
- package/dist/storage/fetch.mjs +339 -450
- package/dist/storage/held-types.d.mts +0 -1
- package/dist/storage/host-bucket.mjs +10 -6
- package/dist/storage/id-mix.mjs +19 -5
- package/dist/storage/index-bitmaps.mjs +86 -51
- package/dist/storage/index-build.d.mts +2 -4
- package/dist/storage/index-build.mjs +324 -67
- package/dist/storage/index-fetch.d.mts +3 -1
- package/dist/storage/index-fetch.mjs +163 -83
- package/dist/storage/index-files.d.mts +3 -0
- package/dist/storage/index-files.mjs +10 -5
- package/dist/storage/index-graph.mjs +73 -23
- package/dist/storage/index-layers.mjs +55 -25
- package/dist/storage/index-reach.mjs +15 -22
- package/dist/storage/index-remap.mjs +200 -64
- package/dist/storage/index-whole.d.mts +7 -0
- package/dist/storage/index-whole.mjs +235 -0
- package/dist/storage/largest-files.mjs +1 -7
- package/dist/storage/layout.mjs +40 -1
- package/dist/storage/lfs-pointers.mjs +1 -6
- package/dist/storage/link-join.mjs +55 -16
- package/dist/storage/list-source.d.mts +7 -0
- package/dist/storage/list-source.mjs +288 -0
- package/dist/storage/loose.d.mts +10 -7
- package/dist/storage/loose.mjs +293 -82
- package/dist/storage/memory-budget.mjs +242 -26
- package/dist/storage/merge-cut.mjs +9 -6
- package/dist/storage/merge-fence.mjs +1 -1
- package/dist/storage/merge-plan.mjs +3 -2
- package/dist/storage/merge-row.mjs +8 -2
- package/dist/storage/merge-stream.mjs +164 -25
- package/dist/storage/merge-walk.mjs +8 -4
- package/dist/storage/merge-write.mjs +1 -1
- package/dist/storage/merge.d.mts +3 -4
- package/dist/storage/merge.mjs +3 -3
- package/dist/storage/object-rows.d.mts +4 -3
- package/dist/storage/object-rows.mjs +545 -84
- package/dist/storage/oid-table.mjs +171 -0
- package/dist/storage/pack-order.mjs +104 -47
- package/dist/storage/pack-ranges.d.mts +1 -2
- package/dist/storage/pack-ranges.mjs +48 -21
- package/dist/storage/pack-reads.d.mts +6 -3
- package/dist/storage/pack-reads.mjs +378 -98
- package/dist/storage/pack-receive.d.mts +2 -3
- package/dist/storage/pack-receive.mjs +22 -18
- package/dist/storage/packs.d.mts +2 -2
- package/dist/storage/packs.mjs +587 -156
- package/dist/storage/placed-reads.mjs +34 -17
- package/dist/storage/plan-columns.d.mts +4 -0
- package/dist/storage/plan-columns.mjs +238 -0
- package/dist/storage/prune-keep.mjs +134 -41
- package/dist/storage/prune-seen.mjs +1 -1
- package/dist/storage/prune-walk.mjs +203 -63
- package/dist/storage/prune.mjs +197 -121
- package/dist/storage/push-allotment.mjs +116 -25
- package/dist/storage/push-uploads.mjs +196 -58
- package/dist/storage/pushed-commits.mjs +24 -3
- package/dist/storage/quarantine.d.mts +3 -4
- package/dist/storage/range-cache.mjs +293 -41
- package/dist/storage/raw-ids.mjs +39 -10
- package/dist/storage/ready.d.mts +3 -4
- package/dist/storage/ready.mjs +121 -43
- package/dist/storage/receive-bounds.mjs +50 -13
- package/dist/storage/receive-cache.d.mts +7 -0
- package/dist/storage/receive-cache.mjs +147 -0
- package/dist/storage/receive-files.mjs +1 -1
- package/dist/storage/receive-links.mjs +1 -1
- package/dist/storage/receive-state.d.mts +2 -2
- package/dist/storage/receive-state.mjs +6 -8
- package/dist/storage/receive-steps.d.mts +20 -0
- package/dist/storage/receive-steps.mjs +298 -13
- package/dist/storage/repack-backlog.mjs +1 -3
- package/dist/storage/repack-contained.mjs +2 -2
- package/dist/storage/repack-job.mjs +1 -1
- package/dist/storage/repack.d.mts +3 -4
- package/dist/storage/repack.mjs +54 -9
- package/dist/storage/request-cache.mjs +57 -0
- package/dist/storage/roots.mjs +1 -24
- package/dist/storage/rows.d.mts +3 -3
- package/dist/storage/rows.mjs +2 -2
- package/dist/storage/runs.d.mts +2 -2
- package/dist/storage/runs.mjs +196 -44
- package/dist/storage/send-list.d.mts +1 -0
- package/dist/storage/send-list.mjs +112 -31
- package/dist/storage/single-flight.mjs +13 -7
- package/dist/storage/stream-whole.mjs +188 -66
- package/dist/storage/swap-walk.mjs +1 -1
- package/dist/storage/unpack.mjs +919 -199
- package/dist/storage/visible.mjs +112 -34
- package/dist/storage/walk.mjs +193 -38
- package/dist/storage/wants.mjs +27 -63
- package/dist/store/bodies.mjs +38 -0
- package/dist/store/call-count.d.mts +10 -14
- package/dist/store/call-count.mjs +58 -57
- package/dist/store/catalogue.d.mts +2 -2
- package/dist/store/catalogue.mjs +158 -36
- package/dist/store/crossing.mjs +1 -9
- package/dist/store/cursor-seal.d.mts +1 -2
- package/dist/store/cursor-seal.mjs +17 -7
- package/dist/store/door.mjs +188 -0
- package/dist/store/errors.d.mts +4 -5
- package/dist/store/errors.mjs +119 -49
- package/dist/store/git-store.mjs +30 -7
- package/dist/store/job-try.mjs +98 -40
- package/dist/store/list-job.mjs +32 -20
- package/dist/store/outbox.d.mts +2 -2
- package/dist/store/outbox.mjs +2 -2
- package/dist/store/queue-jobs.mjs +6 -12
- package/dist/store/records.d.mts +5 -2
- package/dist/store/records.mjs +5 -2
- package/dist/store/ref-rows.d.mts +2 -2
- package/dist/store/ref-rows.mjs +2 -2
- package/dist/store/repo-record.d.mts +2 -3
- package/dist/store/repo-record.mjs +34 -22
- package/dist/store/request-snapshot.mjs +5 -0
- package/dist/store/reservations.mjs +3 -3
- package/dist/store/scopes.mjs +11 -0
- package/dist/store/settle.mjs +4 -4
- package/dist/store/topic-jobs.mjs +5 -11
- package/dist/sync/bound.d.mts +3 -3
- package/dist/sync/bound.mjs +10 -7
- package/dist/sync/github.mjs +67 -69
- package/dist/sync/http.mjs +1 -1
- package/dist/sync/import.mjs +205 -57
- package/dist/sync/layer.d.mts +1 -1
- package/dist/sync/layer.mjs +6 -6
- package/dist/sync/lfs-batch.mjs +5 -6
- package/dist/sync/lfs-copy.mjs +191 -20
- package/dist/sync/mirror.mjs +34 -36
- package/dist/sync/said.mjs +17 -38
- package/dist/sync/step.mjs +292 -102
- package/dist/sync/tries.mjs +34 -15
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/topics/advance.mjs +12 -13
- package/dist/topics/base.d.mts +15 -0
- package/dist/topics/base.mjs +8 -0
- package/dist/topics/calls.mjs +1 -1
- package/dist/topics/host.mjs +1 -1
- package/dist/topics/layer.d.mts +17 -21
- package/dist/topics/layer.mjs +2 -3
- package/dist/topics/members.mjs +4 -4
- package/dist/topics/public.d.mts +2 -1
- package/dist/topics/topic.mjs +2 -2
- package/package.json +5 -14
- package/dist/auth/helpers.mjs +0 -17
- package/dist/auth.d.mts +0 -5
- package/dist/auth.mjs +0 -5
- package/dist/contracts/promises.d.mts +0 -39
- package/dist/core/call-names.d.mts +0 -3
- package/dist/core/clock.mjs +0 -18
- package/dist/core/promise.mjs +0 -74
- package/dist/core/rules/commit-changes.d.mts +0 -13
- package/dist/effect.d.mts +0 -18
- package/dist/effect.mjs +0 -16
- package/dist/lfs/calls.mjs +0 -26
- package/dist/rest/api.d.mts +0 -23
- package/dist/rest/blobs.d.mts +0 -833
- package/dist/rest/commits.d.mts +0 -3543
- package/dist/rest/errors.d.mts +0 -2124
- package/dist/rest/events.d.mts +0 -426
- package/dist/rest/files.d.mts +0 -1342
- package/dist/rest/forks.d.mts +0 -2160
- package/dist/rest/handlers.d.mts +0 -8
- package/dist/rest/merges.d.mts +0 -477
- package/dist/rest/queue.d.mts +0 -5917
- package/dist/rest/refs.d.mts +0 -2988
- package/dist/rest/repos.d.mts +0 -2567
- package/dist/rest/tags.d.mts +0 -1316
- package/dist/rest/tokens.d.mts +0 -2614
- package/dist/rest/topics.d.mts +0 -2224
- package/dist/rest/trees.d.mts +0 -1709
- package/dist/rest/work.d.mts +0 -1695
- package/dist/server/joined.d.mts +0 -82
- package/dist/server/joined.mjs +0 -68
- package/dist/server/lifecycle.d.mts +0 -2
- package/dist/store/promises.d.mts +0 -11
- package/dist/store/promises.mjs +0 -327
package/dist/index.d.mts
CHANGED
|
@@ -1,79 +1,85 @@
|
|
|
1
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
|
-
import { Acting, Blob, BlobCalls, BlobCreateInput, CreatedObject, ObjectInput, blobs_d_exports } from "./contracts/blobs.mjs";
|
|
3
|
+
import { Acting, Blob, BlobCalls, BlobCreateInput, BlobsRead, CreatedObject, GetManyInput, 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";
|
|
5
5
|
import "./client/namespace.mjs";
|
|
6
6
|
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,
|
|
10
|
+
import { CreatedToken, GrantScope, PrefixTarget, 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";
|
|
14
|
-
import { git_events_d_exports } from "./contracts/git-events.mjs";
|
|
15
14
|
import "./auth/namespaces.mjs";
|
|
16
15
|
import "./event-streams/namespace.mjs";
|
|
17
16
|
import "./rest/namespace.mjs";
|
|
18
17
|
import "./merges/namespace.mjs";
|
|
19
|
-
import { authorize_d_exports } from "./contracts/authorize.mjs";
|
|
20
18
|
import "./queue/namespace.mjs";
|
|
21
19
|
import "./lfs/namespace.mjs";
|
|
22
20
|
import "./store/cursor-seal-namespace.mjs";
|
|
23
21
|
import { QueueInternals } from "./queue/host.mjs";
|
|
22
|
+
import { git_events_d_exports } from "./contracts/git-events.mjs";
|
|
23
|
+
import { CallAllowance } from "./contracts/call-allowance.mjs";
|
|
24
|
+
import { CallBudget, CallBudgetOptions } from "./store/call-count.mjs";
|
|
25
|
+
import { commitCallsMost, storeCall } from "./store/errors.mjs";
|
|
26
|
+
import { bucketCall } from "./storage/calls.mjs";
|
|
27
|
+
import { isServerClosed } from "./store/closed.mjs";
|
|
28
|
+
import { client_d_exports } from "./client/client.mjs";
|
|
29
|
+
import { heldUntil, inTime } from "./store/repo-record.mjs";
|
|
24
30
|
import { CommitCalls, CommitCreateInput, CommitDiffInput, Compare, CompareInput, ComparisonFile, LineCounts, LogInput, RefPublication, Revision, commits_d_exports, logEmailsMost } from "./contracts/commits.mjs";
|
|
25
31
|
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";
|
|
26
32
|
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";
|
|
27
33
|
import { File, FileCalls, FileDiff, FileReadInput, FilesDiffInput, FilesListInput, FilesRead, files_d_exports } from "./contracts/files.mjs";
|
|
28
34
|
import { ForkCalls, ForkCreateInput, ForkFetched, ForkGetInput, ForkHolder, ForkListInput, forks_d_exports } from "./contracts/forks.mjs";
|
|
29
|
-
import {
|
|
30
|
-
import { LfsCalls, LfsGetInput, LfsObject, LfsOptions } from "./contracts/lfs.mjs";
|
|
35
|
+
import { LfsCalls, LfsGetInput, LfsGetManyInput, LfsObject, LfsObjects, LfsOptions } from "./contracts/lfs.mjs";
|
|
31
36
|
import { MergeAnswer, MergeCalls, MergeCreateInput } from "./contracts/merges.mjs";
|
|
37
|
+
import { RepoStreamEvent } from "./rest/wire.mjs";
|
|
32
38
|
import { HandlerOptions, SavedHandlerOptions } from "./contracts/handlers.mjs";
|
|
33
39
|
import { Grant, GrantAgainInput, GrantAgainRequest, GrantInput, GrantReachInput, GrantResolver } from "./contracts/grants.mjs";
|
|
40
|
+
import { authorize_d_exports } from "./contracts/authorize.mjs";
|
|
34
41
|
import { GitScope, InternalRepoId, Oid, RefName, RepoName, TopicId, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
|
|
35
42
|
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";
|
|
36
|
-
import { client_d_exports } from "./client/client.mjs";
|
|
37
43
|
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
|
-
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";
|
|
44
|
+
import { Added, BatchOptions, Bisect, Candidate, CandidateCloseReason, CandidateId, CandidateReportInput, CandidateState, Entry, EntryFailureReason, EntryFields, EntryGroups, EntryHoldInput, EntryHoldsInput, EntryId, EntryState, Held, Hold, HoldFields, HoldId, JoinInput, Judged, LanesInput, MergeInput, MergeMethod, MergePlan, MergeQueueCalls, MergeQueueLayerOptions, MergeQueueOptions, MetaValue, PreviousQueueSchedule, QueueAddInput, QueueFailureCounts, QueueKeys, QueueListInput, QueueMeta, QueueOf, QueueRecent, QueueTargetInput, QueueView, Released, Removed, Report, ReportDetails, ReportOptions, Reported, Restarted, Retried, ScheduleOption, TargetHoldInput } from "./contracts/queue.mjs";
|
|
40
45
|
import { Ref, RefCalls, RefCount, RefCountInput, RefEdit, RefGetInput, RefInput, RefListInput, RefProtection, RefSource, RefUpdate, RefUpdateKind, RefsUpdateInput, RefsUpdated, maxSeenRefs, refs_d_exports } from "./contracts/refs.mjs";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { PeelInput, Peeled, TagCalls, TagCreateInput, peelMost, peelTagsMost, tags_d_exports } from "./contracts/tags.mjs";
|
|
46
|
+
import { repo_records_d_exports } from "./contracts/repo-records.mjs";
|
|
47
|
+
import { BasicCredential, BearerCredential, ClientCredential, ClientCredentials, RemoteCalls, RemoteOptions, TransportFailure, TransportRetry, WithoutActor, WithoutSignal } from "./contracts/remote.mjs";
|
|
44
48
|
import { policy_d_exports } from "./auth/policy.mjs";
|
|
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
49
|
import { event_streams_d_exports } from "./event-streams/event-streams.mjs";
|
|
50
|
+
import { PinnedRepo, RenamedRepo, RepoCatalogueEntry, RepoCreateInput, RepoDeleted, RepoGetInput, RepoIndexHold, RepoInfo, RepoInfoStats, RepoInput, RepoListInput, RepoListOrder, RepoRecord, RepoRenameInput, RepoStats, RepoUpdateInput, RepoWork, repos_d_exports } from "./contracts/repos.mjs";
|
|
51
|
+
import { PeelInput, Peeled, TagCalls, TagCreateInput, peelMost, peelTagsMost, tags_d_exports } from "./contracts/tags.mjs";
|
|
52
|
+
import { Prepare, PrepareInput, Topic, TopicAddInput, TopicCalls, TopicCandidate, TopicEntry, TopicEntryInput, TopicFailure, TopicFailureReason, TopicListInput, TopicMergedEntry, TopicReportInput, TopicReportOptions, TopicReportQuestion, TopicState, TopicTarget, TopicWait } from "./contracts/topics.mjs";
|
|
47
53
|
import { TreeCalls, TreeCreateInput, TreeEdit, TreeEntry, TreeInput, trees_d_exports } from "./contracts/trees.mjs";
|
|
48
|
-
import { BlobLimit, BlobNone, Bytes, FetchRequest, Filter, LfsPointers, ObjectType, ReadLimits, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
|
|
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
54
|
import { git_namespace_d_exports } from "./server/git-namespace.mjs";
|
|
55
|
+
import { BlobLimit, BlobNone, Bytes, FetchRequest, Filter, LfsPointers, ObjectType, ReadLimits, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
|
|
56
|
+
import { Accepted, 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";
|
|
51
57
|
import { SliceRefusal } from "./client/slice-push.mjs";
|
|
52
58
|
import { gitPathOf } from "./http/paths.mjs";
|
|
53
59
|
import { branchRef, shortTarget } from "./queue/ids.mjs";
|
|
54
|
-
import { lfsPointerOid, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
|
|
55
|
-
import { LfsPointersBuilder, lfsPointers } from "./storage/lfs-pointers.mjs";
|
|
56
|
-
import { loose, looseLimits } from "./storage/loose.mjs";
|
|
57
60
|
import { objects_namespace_d_exports } from "./core/objects/objects-namespace.mjs";
|
|
58
61
|
import { saved_callers_public_d_exports } from "./core/saved-callers-public.mjs";
|
|
59
|
-
import {
|
|
62
|
+
import { LfsPointerTarget, lfsPointerOf, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
|
|
60
63
|
import { auth_namespace_d_exports } from "./auth/auth-namespace.mjs";
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
64
|
+
import { LfsPointersBuilder, lfsPointers } from "./storage/lfs-pointers.mjs";
|
|
65
|
+
import { loose, looseLimits } from "./storage/loose.mjs";
|
|
63
66
|
import { layer_d_exports } from "./rest/layer.mjs";
|
|
64
|
-
import "./
|
|
67
|
+
import { PacksOptions, UnpackOptions, packs } from "./storage/packs.mjs";
|
|
65
68
|
import { public_d_exports as public_d_exports$3 } from "./merges/public.mjs";
|
|
66
|
-
import {
|
|
69
|
+
import { PacksMemory, packsMemory } from "./storage/packs-memory.mjs";
|
|
67
70
|
import { public_d_exports as public_d_exports$2 } from "./queue/public.mjs";
|
|
68
|
-
import {
|
|
71
|
+
import { Option, RepackOptions } from "./storage/repack.mjs";
|
|
69
72
|
import { public_d_exports as public_d_exports$1 } from "./lfs/public.mjs";
|
|
70
|
-
import
|
|
73
|
+
import "./core/rules/namespace.mjs";
|
|
71
74
|
import { cursor_seal_public_d_exports } from "./store/cursor-seal-public.mjs";
|
|
75
|
+
import { FetchAdjustment, FetchReadInput, FetchReadTarget, FetchRule, FetchRuleInput, FileRuleOptions, ProtectOptions, PushContext, PushFacts, PushRule, PushRuleInput, RefPatterns, RuleOperation } from "./contracts/rules.mjs";
|
|
76
|
+
import { BeginPushUpload, FinishPushUpload, PushFileOptions, PushOptions, PushRepoOptions, PushUploadOptions, PushUploadPart, PushUploadReceiving, PushUploadStarted } from "./contracts/push-uploads.mjs";
|
|
77
|
+
import { GitNeeds, ServerCalls } from "./contracts/server.mjs";
|
|
72
78
|
import { ImportLfsMissed, ImportLfsReason, ImportState, ImportStatus } from "./contracts/sync.mjs";
|
|
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";
|
|
79
|
+
import { ApprovalBase, ApprovalDecision, ApprovalPageContext, ApprovalPageInput, ApprovalPrompt, ApprovedGrant, ConfirmApprovalPage, DeniedGrant, DeviceApproval, DeviceCodePage, DeviceCodeRequest, DeviceCodeResponse, DeviceExchange, OAuthClient, OAuthError, OAuthTokenResponse, WebApproval, WebAuthorize, WebExchange, ghWriteScope } from "./contracts/signin.mjs";
|
|
74
80
|
import { GitStore, GitStoreAddInput, GitStoreCommitInput, GitStoreReadInput, HeldPack, Holding, Listed, ListedInput, Pack } from "./contracts/store.mjs";
|
|
75
|
-
import { WorkCalls, WorkItem, WorkListInput, WorkWriteInput, work_d_exports } from "./contracts/work.mjs";
|
|
76
81
|
import { rules_d_exports } from "./core/rules/rules.mjs";
|
|
82
|
+
import { WorkCalls, WorkItem, WorkListInput, WorkWriteInput, work_d_exports } from "./contracts/work.mjs";
|
|
77
83
|
import "./access/namespace.mjs";
|
|
78
84
|
import { public_d_exports as public_d_exports$4 } from "./access/public.mjs";
|
|
79
85
|
import "./topics/namespace.mjs";
|
|
@@ -85,5 +91,7 @@ import { public_d_exports } from "./core/hooks/public.mjs";
|
|
|
85
91
|
import { PushHookInput } from "./contracts/git-hooks.mjs";
|
|
86
92
|
import { public_d_exports as public_d_exports$5 } from "./signin/public.mjs";
|
|
87
93
|
import "./signin/namespace.mjs";
|
|
94
|
+
import { ghClientId } from "./signin/context.mjs";
|
|
95
|
+
import { AccessTokenAnswer, DeviceCodeAnswer, deviceGrant, readAccessTokenAnswer, readDeviceCodeAnswer, signInPaths } from "./signin/wire.mjs";
|
|
88
96
|
import { jobStates } from "@ref0/infra";
|
|
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 };
|
|
97
|
+
export { type Accepted, type AccessOption, type AccessTokenAnswer, type Acting, Actor, type ActorId, type ActorInput, 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 BasicCredential, type BatchOptions, type BearerCredential, type BeforeAfter, BeginPushUpload, type Bisect, type Blob, type BlobCalls, type BlobCreateInput, BlobLimit, BlobNone, blobs_d_exports as Blobs, type BlobsRead, type BypassOperation, type Bytes, type CallAllowance, CallBudget, type CallBudgetOptions, type CallInput, type Caller, type CallerGrant, type Candidate, type CandidateCloseReason, type CandidateClosed, type CandidateClosedFields, type CandidateId, type CandidateOpened, type CandidateReportInput, type CandidateReported, type CandidateState, 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 Credentials, type CredentialsBasic, type CredentialsBearer, cursor_seal_public_d_exports as CursorSeal, DataLossContext, DataLossReason, type DecisionAnswer, type DeniedGrant, type DeviceApproval, type DeviceCodeAnswer, 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 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, type GetManyInput, git_namespace_d_exports as Git, 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 Holding, type HoldingsInput, type HoldingsWalked, 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 LfsGetManyInput, type LfsObject, type LfsObjects, type LfsOptions, type LfsPointerTarget, 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 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 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 Released, type RemoteCalls, type RemoteOptions, type RemoteRefsInput, type Removed, type RenamedRepo, type RenamesSkipped, type RepackOptions, type RepoAccess, 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, 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 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 Restarted, type Result, type Retried, 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 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, bucketCall, commitCallsMost, deviceGrant, ghClientId, ghWriteScope, gitError, gitPathOf, grantScopes, heldUntil, httpStatus, inTime, isGitError, isInternalId, isRefusalReason, isServerClosed, jobStates, lfsPointerOf, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, readAccessTokenAnswer, readDeviceCodeAnswer, shortTarget, signInPaths, storeCall, tokenScopes, tokenStates };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Actor } from "./contracts/actors.mjs";
|
|
1
2
|
import { client_exports } from "./client/client.mjs";
|
|
2
3
|
import { client_exports as client_exports$1 } from "./rest/client.mjs";
|
|
3
4
|
import { grantScopes, tokenScopes, tokenStates } from "./contracts/tokens.mjs";
|
|
@@ -25,12 +26,17 @@ import { public_exports as public_exports$3 } from "./merges/public.mjs";
|
|
|
25
26
|
import { public_exports as public_exports$2 } from "./queue/public.mjs";
|
|
26
27
|
import { public_exports as public_exports$1 } from "./lfs/public.mjs";
|
|
27
28
|
import { cursor_seal_public_exports } from "./store/cursor-seal-public.mjs";
|
|
28
|
-
import {
|
|
29
|
+
import { CallBudget } from "./store/call-count.mjs";
|
|
30
|
+
import { commitCallsMost, storeCall } from "./store/errors.mjs";
|
|
31
|
+
import { bucketCall } from "./storage/calls.mjs";
|
|
32
|
+
import { isServerClosed } from "./store/closed.mjs";
|
|
33
|
+
import { heldUntil, inTime } from "./store/repo-record.mjs";
|
|
34
|
+
import { InternalRepoId, RepoName, isInternalId, maxActorIdLength, maxRefNameLength } from "./contracts/ids.mjs";
|
|
29
35
|
import { BlobLimit, BlobNone, FetchRequest, Filter, TreeFilter, allotmentWithin, objectsReadMost } from "./contracts/object-values.mjs";
|
|
30
36
|
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
37
|
import { gitPathOf } from "./http/paths.mjs";
|
|
32
38
|
import { branchRef, shortTarget } from "./queue/ids.mjs";
|
|
33
|
-
import {
|
|
39
|
+
import { lfsPointerOf, maxLfsPointerBytes } from "./protocol/objects/lfs-pointer.mjs";
|
|
34
40
|
import { lfsPointers } from "./storage/lfs-pointers.mjs";
|
|
35
41
|
import { loose, looseLimits } from "./storage/loose.mjs";
|
|
36
42
|
import { packs } from "./storage/packs.mjs";
|
|
@@ -42,5 +48,8 @@ import { public_exports as public_exports$6 } from "./topics/public.mjs";
|
|
|
42
48
|
import { tokens_public_exports } from "./auth/tokens-public.mjs";
|
|
43
49
|
import { public_exports } from "./core/hooks/public.mjs";
|
|
44
50
|
import { public_exports as public_exports$5 } from "./signin/public.mjs";
|
|
51
|
+
import { ghClientId } from "./signin/context.mjs";
|
|
52
|
+
import { ghWriteScope } from "./contracts/signin.mjs";
|
|
53
|
+
import { deviceGrant, readAccessTokenAnswer, readDeviceCodeAnswer, signInPaths } from "./signin/wire.mjs";
|
|
45
54
|
import { jobStates } from "@ref0/infra";
|
|
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,
|
|
55
|
+
export { Actor, auth_namespace_exports as Auth, authorize_exports as Authorize, BeginPushUpload, BlobLimit, BlobNone, blobs_exports as Blobs, CallBudget, 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, RepoName, 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, bucketCall, commitCallsMost, deviceGrant, ghClientId, ghWriteScope, gitError, gitPathOf, grantScopes, heldUntil, httpStatus, inTime, isGitError, isInternalId, isRefusalReason, isServerClosed, jobStates, lfsPointerOf, lfsPointers, logEmailsMost, loose, looseLimits, maxActorIdLength, maxLfsPointerBytes, maxRefNameLength, maxSeenRefs, objectsReadMost, packs, packsMemory, peelMost, peelTagsMost, readAccessTokenAnswer, readDeviceCodeAnswer, shortTarget, signInPaths, storeCall, tokenScopes, tokenStates };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { httpStatus } from "../contracts/result.mjs";
|
|
2
|
+
// src/lfs/answer.ts
|
|
3
|
+
/**
|
|
4
|
+
* Git LFS's answers that carry no body of its own: a refusal's `{ message }`, which a server
|
|
5
|
+
* without `Lfs.layer` gives too, so a bare host keeps this and none of LFS's schemas. A 401 asks
|
|
6
|
+
* for Basic credentials as `LFS-Authenticate`, so the client asks Git's credential helper for the
|
|
7
|
+
* same ones a push sends.
|
|
8
|
+
*/
|
|
9
|
+
const lfsType = "application/vnd.git-lfs+json";
|
|
10
|
+
/** A JSON answer of LFS's, its body encoded already. */
|
|
11
|
+
const lfsResponse = (status, json, headers) => {
|
|
12
|
+
const answer = new Headers(headers);
|
|
13
|
+
answer.set("content-type", lfsType);
|
|
14
|
+
answer.set("cache-control", "no-store");
|
|
15
|
+
return new Response(json, {
|
|
16
|
+
status,
|
|
17
|
+
headers: answer
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
/** LFS's `{ message }`, as `LfsBody` encodes it: its one key. */
|
|
21
|
+
const lfsMessage = (status, message, headers) => lfsResponse(status, JSON.stringify({ message }), headers);
|
|
22
|
+
/** Where LFS's status differs from Git's: a body it can't take is its validation error. */
|
|
23
|
+
const lfsStatus = { INVALID_ARGUMENT: 422 };
|
|
24
|
+
/**
|
|
25
|
+
* A refusal as LFS answers one. An anonymous caller is asked for Basic credentials; a repo a
|
|
26
|
+
* caller can't read is a 404, as a missing one is, and so is a write's refusal for a caller
|
|
27
|
+
* that can't read the repo, which the caller of `lfsRefusal` arranges. A body LFS can't take is
|
|
28
|
+
* its validation error, 422, but one that ended early is a 400, as Git's is.
|
|
29
|
+
*/
|
|
30
|
+
const lfsRefusal = (error) => {
|
|
31
|
+
if (error.code === "UNAUTHENTICATED") return lfsMessage(401, error.message, { "lfs-authenticate": "Basic realm=\"Git LFS\"" });
|
|
32
|
+
if (error.code === "NOT_FOUND") return lfsMessage(404, error.message);
|
|
33
|
+
const status = error.code === "INVALID_ARGUMENT" && error.context?.reason === "body-ended" ? httpStatus[error.code] : lfsStatus[error.code] ?? httpStatus[error.code];
|
|
34
|
+
const retry = error.code === "UNAVAILABLE" ? { "retry-after": "1" } : void 0;
|
|
35
|
+
return lfsMessage(status, error.message, retry);
|
|
36
|
+
};
|
|
37
|
+
export { lfsMessage, lfsRefusal, lfsResponse, lfsType };
|
package/dist/lfs/base.d.mts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import "../contracts/actors.mjs";
|
|
1
2
|
import { LfsObject } from "../contracts/lfs.mjs";
|
|
2
3
|
import { GitError } from "../contracts/result.mjs";
|
|
4
|
+
import "../contracts/services.mjs";
|
|
3
5
|
import { RegisteredCheck } from "../core/rules/context.mjs";
|
|
4
6
|
import { Bucket as Bucket$1, Links } from "../contracts/objects.mjs";
|
|
5
7
|
import { CoreNeeds } from "../core/parts.mjs";
|
|
6
8
|
import { LfsCopy } from "./copy.mjs";
|
|
7
9
|
import { ObjectRead } from "./objects.mjs";
|
|
8
10
|
import { LfsService } from "./service.mjs";
|
|
9
|
-
import * as Effect from "effect/Effect";
|
|
10
11
|
import { RequestLimits } from "@ref0/infra";
|
|
12
|
+
import * as Effect from "effect/Effect";
|
|
11
13
|
import * as Context from "effect/Context";
|
|
12
14
|
/** A listed object's bytes, as `objectOf` reads them over LFS's parts. */
|
|
13
15
|
export type LfsRead = (read: ObjectRead) => Effect.Effect<LfsObject, GitError, CoreNeeds>;
|
package/dist/lfs/base.mjs
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { fail } from "../contracts/result.mjs";
|
|
2
|
+
import { callerFor, openFor } from "../core/access.mjs";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
1
4
|
import * as Context from "effect/Context";
|
|
2
5
|
// src/lfs/base.ts
|
|
3
6
|
/**
|
|
@@ -7,4 +10,25 @@ import * as Context from "effect/Context";
|
|
|
7
10
|
* `Sync.layer` built beside `Lfs.layer`, in either order, finds it: `undefined` without LFS.
|
|
8
11
|
*/
|
|
9
12
|
var LfsBase = class extends (/* @__PURE__ */ Context.Service()("@ref0/git/lfs/LfsBase")) {};
|
|
10
|
-
|
|
13
|
+
/**
|
|
14
|
+
* `lfs.get`: an object's bytes as the Worker's download reads them, for a call, not a client, through
|
|
15
|
+
* `read`, the one `Lfs.layer` attached. Without it, every object is `NOT_FOUND` to a caller who may
|
|
16
|
+
* read the repo. The drop-in's contents and archives call it until they move onto `Lfs` (2c).
|
|
17
|
+
*/
|
|
18
|
+
const lfsCalls = (read, bound) => {
|
|
19
|
+
const callerOf = callerFor(bound);
|
|
20
|
+
return { get: (repo, { oid, size, signal, internalId, request, ...input }) => {
|
|
21
|
+
const caller = callerOf(input);
|
|
22
|
+
const reading = read();
|
|
23
|
+
return reading === void 0 ? Effect.andThen(openFor(caller, repo, false, internalId), fail("NOT_FOUND", "Object does not exist")) : reading({
|
|
24
|
+
caller,
|
|
25
|
+
repo,
|
|
26
|
+
oid,
|
|
27
|
+
size,
|
|
28
|
+
signal,
|
|
29
|
+
internalId,
|
|
30
|
+
request
|
|
31
|
+
});
|
|
32
|
+
} };
|
|
33
|
+
};
|
|
34
|
+
export { LfsBase, lfsCalls };
|
package/dist/lfs/copy.d.mts
CHANGED
|
@@ -2,10 +2,12 @@ import "../contracts/git.mjs";
|
|
|
2
2
|
import { InternalRepoId } from "../contracts/ids.mjs";
|
|
3
3
|
import "../contracts/objects.mjs";
|
|
4
4
|
import { GitError } from "../contracts/result.mjs";
|
|
5
|
+
import { Sha256State } from "../protocol/bytes/sha256.mjs";
|
|
6
|
+
import { StagePart } from "../storage/receive-steps.mjs";
|
|
5
7
|
import { LfsStaging } from "./objects.mjs";
|
|
6
8
|
import { ListedRow } from "./rows.mjs";
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
9
|
import { Key, Row } from "@ref0/infra";
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
9
11
|
import * as Stream from "effect/Stream";
|
|
10
12
|
/**
|
|
11
13
|
* What import's copy of a source's Git LFS objects goes through, once `Lfs.layer` attached
|
|
@@ -16,10 +18,15 @@ export interface LfsCopy {
|
|
|
16
18
|
/** Of `oids`, those `repo` lists, with their rows. */
|
|
17
19
|
readonly listed: (repo: InternalRepoId, oids: readonly string[]) => Effect.Effect<ReadonlyMap<string, ListedRow>, GitError>;
|
|
18
20
|
/**
|
|
19
|
-
* A
|
|
20
|
-
*
|
|
21
|
+
* A stage for each of `objects`, in order. An object an earlier try staged keeps its copy row's
|
|
22
|
+
* key, `landed` when its bytes are there at the object's size, as `heldAt` reads, so the copy
|
|
23
|
+
* lists them without a download. With no bytes there, it keeps the key only while the stage has
|
|
24
|
+
* `streamMost` left, so its put lands before upkeep may end the stage. Any other gets a key of a
|
|
25
|
+
* new generation, its staging row, and its copy row unless one stands, added with upkeep's wake
|
|
26
|
+
* at their `removeAt`, `uploadGrace` from now: bytes put there that no commit lists are deleted
|
|
27
|
+
* then.
|
|
21
28
|
*/
|
|
22
|
-
readonly stage: (repo: InternalRepoId,
|
|
29
|
+
readonly stage: (repo: InternalRepoId, objects: readonly CopiedObject[]) => Effect.Effect<readonly LfsCopyStage[], GitError>;
|
|
23
30
|
/**
|
|
24
31
|
* `body`, `size` bytes whose SHA-256 is `oid`, put at `staging`'s key with nothing buffered, the
|
|
25
32
|
* bucket checking the SHA-256: other bytes fail `INVALID_ARGUMENT`, keeping nothing. No
|
|
@@ -28,15 +35,70 @@ export interface LfsCopy {
|
|
|
28
35
|
*/
|
|
29
36
|
readonly put: (staging: LfsStaging, body: Stream.Stream<Uint8Array, GitError>, size: number, oid: string) => Effect.Effect<void, GitError>;
|
|
30
37
|
/**
|
|
31
|
-
* The writes that list each of `landed` at its staging key and drop its staging row
|
|
32
|
-
* copy's own commit, which moves its cursor with them. A staged object that
|
|
33
|
-
* its
|
|
34
|
-
* `removeAt`.
|
|
38
|
+
* The writes that list each of `landed` at its staging key and drop its staging row and its
|
|
39
|
+
* copy row, for the copy's own commit, which moves its cursor with them. A staged object that
|
|
40
|
+
* didn't land keeps its rows: a put that failed may still have stored its bytes, which the next
|
|
41
|
+
* try finds, or upkeep deletes at `removeAt`.
|
|
35
42
|
*/
|
|
36
43
|
readonly listing: (landed: readonly LfsLanded[]) => {
|
|
37
44
|
readonly put: readonly Row[];
|
|
38
45
|
readonly delete: readonly Key[];
|
|
39
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* A multipart upload begun for `oid` at a key of a new generation, and its staging row naming
|
|
49
|
+
* the token, added with upkeep's wake at its `removeAt`, `uploadGrace` from now: an upload no
|
|
50
|
+
* commit lists by then is aborted, and its key deleted. With it, SHA-256's state over no bytes.
|
|
51
|
+
*/
|
|
52
|
+
readonly upload: (repo: InternalRepoId, oid: string) => Effect.Effect<{
|
|
53
|
+
readonly staging: LfsStaging;
|
|
54
|
+
readonly token: string;
|
|
55
|
+
readonly sha256: Sha256State;
|
|
56
|
+
}, GitError>;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the upload `staging` names may go on: its staging row is there, and more than
|
|
59
|
+
* `streamMost` from its `removeAt`, so a try's parts and complete land before upkeep ends the
|
|
60
|
+
* stage. One that may not is left to upkeep, which aborts it. `UNAVAILABLE` once the repo's rows
|
|
61
|
+
* moved past `version`, the caller's read.
|
|
62
|
+
*/
|
|
63
|
+
readonly resumable: (repo: InternalRepoId, staging: LfsStaging, version: number) => Effect.Effect<boolean, GitError>;
|
|
64
|
+
/**
|
|
65
|
+
* `body`, the bytes of `object` from `progress`'s offset, put as parts of `partBytes` of the
|
|
66
|
+
* upload `token`, each hashed as it goes on from `progress`, then handed to `saved`, as many
|
|
67
|
+
* whole parts as `bytes` holds, and at least one: `step` once those are put, `whole` once every byte is in and its SHA-256 is the
|
|
68
|
+
* oid, and `other` for bytes past the size, a body that ends short of it, or a digest of another
|
|
69
|
+
* oid. A part's `NOT_FOUND` is an upload the bucket no longer holds.
|
|
70
|
+
*/
|
|
71
|
+
readonly putParts: (input: {
|
|
72
|
+
readonly staging: LfsStaging;
|
|
73
|
+
readonly token: string;
|
|
74
|
+
readonly object: CopiedObject;
|
|
75
|
+
readonly progress: PartsProgress;
|
|
76
|
+
readonly body: Stream.Stream<Uint8Array, GitError>;
|
|
77
|
+
readonly bytes: number;
|
|
78
|
+
readonly saved: (progress: PartsProgress) => Effect.Effect<void, GitError>;
|
|
79
|
+
}) => Effect.Effect<'step' | 'whole' | 'other', GitError>;
|
|
80
|
+
/**
|
|
81
|
+
* The upload `token` ended in `parts`, `size` bytes at `staging`'s key. Only a caller that checked
|
|
82
|
+
* the bytes against their oid completes it: no bucket checks a SHA-256 of parts.
|
|
83
|
+
*/
|
|
84
|
+
readonly complete: (staging: LfsStaging, token: string, parts: readonly StagePart[], size: number) => Effect.Effect<void, GitError>;
|
|
85
|
+
/** The upload `token` dropped, with its parts. */
|
|
86
|
+
readonly abort: (staging: LfsStaging, token: string) => Effect.Effect<void, GitError>;
|
|
87
|
+
}
|
|
88
|
+
/** How far an upload in parts got: its parts, the bytes they hold, and SHA-256's state over them. */
|
|
89
|
+
export interface PartsProgress {
|
|
90
|
+
readonly offset: number;
|
|
91
|
+
readonly parts: readonly StagePart[];
|
|
92
|
+
readonly sha256: Sha256State;
|
|
93
|
+
}
|
|
94
|
+
/** An object the copy asks for: its oid, and its size as its pointer names it. */
|
|
95
|
+
export interface CopiedObject {
|
|
96
|
+
readonly oid: string;
|
|
97
|
+
readonly size: number;
|
|
98
|
+
}
|
|
99
|
+
/** An object's staging key and row, and whether an earlier try's bytes are there already. */
|
|
100
|
+
export interface LfsCopyStage extends LfsStaging {
|
|
101
|
+
readonly landed: boolean;
|
|
40
102
|
}
|
|
41
103
|
/** An object the copy put, checked, at its staging key. */
|
|
42
104
|
export interface LfsLanded {
|