@ref0/git 0.4.0 → 0.7.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/namespace.d.mts +2 -0
- package/dist/access/private-refs.d.mts +6 -29
- package/dist/access/private-refs.mjs +31 -17
- package/dist/access/public.d.mts +6 -0
- package/dist/access/public.mjs +9 -0
- package/dist/auth/access-jwt.d.mts +10 -6
- package/dist/auth/access-jwt.mjs +59 -40
- package/dist/auth/auth-namespace.d.mts +6 -0
- package/dist/auth/auth-namespace.mjs +12 -0
- package/dist/auth/auth.d.mts +3 -6
- package/dist/auth/auth.mjs +2 -9
- package/dist/auth/authorize.mjs +13 -9
- package/dist/auth/fences.d.mts +1 -1
- package/dist/auth/host-function.mjs +17 -8
- package/dist/auth/identify.d.mts +5 -3
- package/dist/auth/identify.mjs +2 -1
- package/dist/auth/namespaces.d.mts +2 -2
- package/dist/auth/token-rows.mjs +1 -1
- package/dist/auth/tokens-layer.d.mts +42 -0
- package/dist/auth/tokens-layer.mjs +29 -0
- package/dist/auth/tokens-namespace.d.mts +2 -0
- package/dist/auth/tokens-public.d.mts +6 -0
- package/dist/auth/tokens-public.mjs +29 -0
- package/dist/auth/tokens.d.mts +13 -6
- package/dist/auth/tokens.mjs +13 -12
- package/dist/auth.d.mts +2 -2
- package/dist/auth.mjs +2 -2
- package/dist/client/git-http.mjs +1 -1
- package/dist/client/local.mjs +6 -3
- package/dist/client/remote-helper.mjs +3 -8
- package/dist/client/remote.mjs +26 -7
- package/dist/client/run-remote-helper.d.mts +1 -1
- package/dist/client/run-remote-helper.mjs +2 -2
- package/dist/client/slice-push.d.mts +1 -1
- package/dist/contracts/access.d.mts +24 -12
- package/dist/contracts/access.mjs +17 -0
- package/dist/contracts/actors.d.mts +17 -1
- package/dist/contracts/actors.mjs +8 -1
- package/dist/contracts/authorize.d.mts +21 -14
- package/dist/contracts/blobs.d.mts +1 -1
- package/dist/contracts/blobs.mjs +1 -1
- package/dist/contracts/calls-spent.d.mts +6 -4
- package/dist/contracts/calls-spent.mjs +10 -8
- package/dist/contracts/commits.d.mts +2 -2
- package/dist/contracts/commits.mjs +1 -1
- package/dist/contracts/engine.d.mts +1 -1
- package/dist/contracts/events.d.mts +64 -26
- package/dist/contracts/events.mjs +26 -6
- package/dist/contracts/files.d.mts +2 -2
- package/dist/contracts/files.mjs +1 -1
- package/dist/contracts/forks.d.mts +58 -58
- package/dist/contracts/forks.mjs +1 -1
- package/dist/contracts/git-events.d.mts +50 -0
- package/dist/contracts/git-events.mjs +23 -0
- package/dist/contracts/git-hooks.d.mts +37 -0
- package/dist/contracts/git-hooks.mjs +10 -0
- package/dist/contracts/git.d.mts +138 -22
- package/dist/contracts/git.mjs +6 -5
- package/dist/contracts/grants.d.mts +6 -1
- package/dist/contracts/ids.d.mts +16 -0
- package/dist/contracts/ids.mjs +19 -4
- package/dist/contracts/lfs.d.mts +7 -2
- package/dist/contracts/namespaces.d.mts +2 -2
- package/dist/contracts/objects.d.mts +7 -2
- package/dist/contracts/opaque.mjs +9 -0
- package/dist/contracts/operations.d.mts +293 -100
- package/dist/contracts/promises.d.mts +4 -14
- package/dist/contracts/push-uploads.d.mts +5 -2
- package/dist/contracts/push-uploads.mjs +9 -4
- package/dist/contracts/queue.d.mts +233 -54
- package/dist/contracts/queue.mjs +81 -6
- package/dist/contracts/refs.d.mts +30 -8
- package/dist/contracts/refs.mjs +1 -1
- package/dist/contracts/remote.d.mts +42 -21
- package/dist/contracts/remote.mjs +22 -0
- package/dist/contracts/repo-records.d.mts +2 -2
- package/dist/contracts/repos.d.mts +126 -79
- package/dist/contracts/repos.mjs +43 -5
- package/dist/contracts/result.d.mts +50 -31
- package/dist/contracts/result.mjs +48 -16
- package/dist/contracts/rules.d.mts +50 -44
- package/dist/contracts/rules.mjs +5 -1
- package/dist/contracts/server.d.mts +282 -191
- package/dist/contracts/services.d.mts +1 -7
- package/dist/contracts/services.mjs +1 -3
- package/dist/contracts/signin.d.mts +140 -43
- package/dist/contracts/signin.mjs +35 -1
- package/dist/contracts/store.d.mts +1 -1
- package/dist/contracts/sync.d.mts +112 -90
- package/dist/contracts/sync.mjs +34 -7
- package/dist/contracts/tags.d.mts +1 -1
- package/dist/contracts/tags.mjs +1 -1
- package/dist/contracts/tokens.d.mts +232 -57
- package/dist/contracts/tokens.mjs +80 -19
- package/dist/contracts/topics.d.mts +22 -10
- package/dist/contracts/topics.mjs +6 -3
- package/dist/contracts/trees.d.mts +2 -2
- package/dist/contracts/trees.mjs +1 -1
- package/dist/contracts/work.d.mts +3 -3
- package/dist/contracts/work.mjs +2 -2
- package/dist/core/access.d.mts +10 -10
- package/dist/core/access.mjs +47 -8
- package/dist/core/call-names.d.mts +3 -1
- package/dist/core/clock.mjs +1 -1
- package/dist/core/events/deliver.d.mts +13 -0
- package/dist/core/events/deliver.mjs +475 -175
- package/dist/core/events/seen.mjs +17 -3
- package/dist/core/forks.mjs +131 -44
- package/dist/core/hooks/groups.d.mts +27 -0
- package/dist/core/hooks/groups.mjs +74 -0
- package/dist/core/hooks/namespace.d.mts +2 -0
- package/dist/core/hooks/order.d.mts +2 -2
- package/dist/core/hooks/order.mjs +6 -6
- package/dist/core/hooks/public.d.mts +7 -0
- package/dist/core/hooks/public.mjs +5 -0
- package/dist/core/imports.mjs +94 -10
- package/dist/core/index-job.mjs +31 -22
- package/dist/core/merge-parts.d.mts +1 -1
- package/dist/core/merge-parts.mjs +1 -1
- package/dist/core/mirror-rows.mjs +18 -0
- package/dist/core/names.mjs +1 -1
- package/dist/core/namespaces.d.mts +2 -1
- package/dist/core/objects/commit-writes.mjs +5 -5
- package/dist/core/objects/merges.mjs +1 -1
- package/dist/core/objects/objects-layer.mjs +1 -1
- package/dist/core/objects/reading.mjs +52 -7
- package/dist/core/objects/tree-edits.mjs +13 -28
- package/dist/core/objects/trees.mjs +4 -4
- package/dist/core/objects/writing.mjs +3 -3
- package/dist/core/own-writes.mjs +1 -1
- package/dist/core/parts.d.mts +27 -2
- package/dist/core/parts.mjs +5 -3
- package/dist/core/promise.mjs +23 -3
- package/dist/core/purge.d.mts +8 -0
- package/dist/core/purge.mjs +91 -46
- package/dist/core/push-decide.mjs +26 -4
- package/dist/core/push.mjs +104 -86
- package/dist/core/receipts.d.mts +2 -2
- package/dist/core/receipts.mjs +28 -4
- package/dist/core/ref-index-job.mjs +10 -15
- package/dist/core/ref-index.d.mts +1 -0
- package/dist/core/ref-index.mjs +28 -8
- package/dist/core/ref-view.mjs +16 -11
- package/dist/core/refs.mjs +54 -21
- package/dist/core/registered-records.mjs +30 -0
- package/dist/core/registered-rows.d.mts +4 -0
- package/dist/core/registered-rows.mjs +53 -0
- package/dist/core/repack.d.mts +3 -2
- package/dist/core/repack.mjs +70 -120
- package/dist/core/repo-info.mjs +59 -25
- package/dist/core/repos.mjs +22 -16
- package/dist/core/rules/changes.mjs +2 -2
- package/dist/core/rules/check.mjs +7 -6
- package/dist/core/rules/commit-changes.mjs +1 -1
- package/dist/core/rules/context.d.mts +4 -5
- package/dist/core/rules/context.mjs +3 -4
- package/dist/core/rules/fetch.mjs +74 -21
- package/dist/core/saved-caller-views.d.mts +72 -0
- package/dist/core/saved-caller-views.mjs +123 -0
- package/dist/core/saved-callers-public.d.mts +5 -0
- package/dist/core/saved-callers-public.mjs +10 -0
- package/dist/core/saved-callers.mjs +95 -0
- package/dist/core/seam.d.mts +67 -9
- package/dist/core/seam.mjs +11 -3
- package/dist/core/still-takes.mjs +75 -0
- package/dist/core/tokens.mjs +5 -1
- package/dist/core/view.d.mts +2 -1
- package/dist/core/view.mjs +9 -10
- package/dist/core/work.mjs +6 -5
- package/dist/effect.d.mts +2 -2
- package/dist/effect.mjs +2 -2
- package/dist/engine/content.d.mts +2 -2
- package/dist/engine/content.mjs +1 -1
- package/dist/engine/diff.mjs +2 -2
- package/dist/engine/merge-base-walk.d.mts +2 -2
- package/dist/engine/merge-base-walk.mjs +1 -1
- package/dist/engine/merge-renames.mjs +1 -1
- package/dist/engine/reads.d.mts +2 -2
- package/dist/engine/reads.mjs +1 -1
- package/dist/engine/xdiff.d.mts +1 -1
- package/dist/engine/xdiff.mjs +2 -2
- package/dist/event-streams/event-streams.d.mts +6 -2
- package/dist/event-streams/event-streams.mjs +6 -2
- package/dist/event-streams/stream.mjs +5 -2
- package/dist/extend.d.mts +5 -4
- package/dist/extend.mjs +3 -2
- package/dist/http/answers.mjs +4 -3
- package/dist/http/core-parts.mjs +21 -13
- package/dist/http/handler.mjs +3 -3
- package/dist/http/node.d.mts +2 -23
- package/dist/http/parts.d.mts +2 -0
- package/dist/http/push-uploads.d.mts +10 -2
- package/dist/http/push-uploads.mjs +38 -39
- package/dist/http/receive-pack.mjs +8 -6
- package/dist/http/upload-pack.mjs +8 -7
- package/dist/index.d.mts +36 -19
- package/dist/index.mjs +14 -6
- package/dist/lfs/base.d.mts +32 -0
- package/dist/lfs/base.mjs +8 -0
- package/dist/lfs/calls.mjs +22 -12
- package/dist/lfs/layer.d.mts +28 -0
- package/dist/lfs/layer.mjs +65 -0
- package/dist/lfs/locks.mjs +16 -30
- package/dist/lfs/namespace.d.mts +2 -0
- package/dist/lfs/objects.d.mts +26 -6
- package/dist/lfs/objects.mjs +197 -98
- package/dist/lfs/pointers.mjs +8 -6
- package/dist/lfs/public.d.mts +5 -0
- package/dist/lfs/public.mjs +8 -0
- package/dist/lfs/purge.mjs +19 -25
- package/dist/lfs/rows.mjs +22 -10
- package/dist/lfs/service.d.mts +9 -4
- package/dist/lfs/service.mjs +3 -12
- package/dist/lfs/upkeep.mjs +45 -56
- package/dist/lfs/wire.mjs +1 -1
- package/dist/node.d.mts +3 -2
- package/dist/node.mjs +1 -1
- package/dist/protocol/bytes/buffers.d.mts +1 -1
- package/dist/protocol/bytes/buffers.mjs +1 -1
- package/dist/protocol/bytes/deflate.d.mts +1 -1
- package/dist/protocol/bytes/deflate.mjs +1 -1
- package/dist/protocol/bytes/hmac-sha256.mjs +3 -6
- package/dist/protocol/bytes/inflate.d.mts +1 -1
- package/dist/protocol/bytes/inflate.mjs +1 -1
- package/dist/protocol/bytes/sha1.d.mts +1 -1
- package/dist/protocol/bytes/sha1.mjs +2 -2
- package/dist/protocol/diff/read.d.mts +1 -1
- package/dist/protocol/diff/read.mjs +1 -1
- package/dist/protocol/diff/tree-diff.d.mts +1 -1
- package/dist/protocol/diff/tree-diff.mjs +11 -11
- package/dist/protocol/objects/lfs-pointer.mjs +6 -1
- package/dist/protocol/objects/tag.mjs +1 -1
- package/dist/protocol/objects/tree.mjs +1 -1
- package/dist/protocol/packs/graph.mjs +1 -1
- package/dist/protocol/packs/idx.d.mts +1 -1
- package/dist/protocol/packs/idx.mjs +1 -1
- package/dist/protocol/packs/parts.mjs +1 -1
- package/dist/protocol/packs/reader.d.mts +1 -1
- package/dist/protocol/packs/reader.mjs +2 -2
- 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 +4 -4
- package/dist/protocol/wire/advertisement.d.mts +5 -11
- package/dist/protocol/wire/advertisement.mjs +17 -13
- package/dist/protocol/wire/fetch.d.mts +1 -1
- package/dist/protocol/wire/fetch.mjs +1 -1
- package/dist/protocol/wire/lines.d.mts +14 -2
- package/dist/protocol/wire/lines.mjs +32 -21
- package/dist/protocol/wire/push-uploads.mjs +4 -2
- 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 +5 -16
- package/dist/protocol/wire/v2.mjs +17 -15
- package/dist/queue/advance.mjs +227 -112
- package/dist/queue/callers.mjs +56 -69
- package/dist/queue/calls.mjs +24 -13
- package/dist/queue/commit.mjs +20 -7
- package/dist/queue/host.d.mts +12 -13
- package/dist/queue/host.mjs +15 -7
- package/dist/queue/lanes.mjs +9 -18
- package/dist/queue/layer.d.mts +6 -4
- package/dist/queue/layer.mjs +17 -11
- package/dist/queue/limits.mjs +53 -11
- package/dist/queue/rows.mjs +19 -15
- package/dist/queue/schedule.mjs +6 -5
- package/dist/queue/search.mjs +8 -13
- package/dist/queue/state.mjs +26 -7
- package/dist/queue/steps.mjs +10 -4
- package/dist/queue/trim.mjs +289 -0
- package/dist/rest/api.d.mts +1 -1
- package/dist/rest/blobs.d.mts +35 -35
- package/dist/rest/caller.d.mts +22 -20
- package/dist/rest/client.mjs +6 -6
- package/dist/rest/commits.d.mts +274 -274
- package/dist/rest/errors.d.mts +10 -10
- package/dist/rest/errors.mjs +1 -1
- package/dist/rest/events.d.mts +13 -11
- package/dist/rest/events.mjs +3 -1
- package/dist/rest/files.d.mts +78 -78
- package/dist/rest/forks.d.mts +170 -170
- package/dist/rest/handler.mjs +17 -8
- package/dist/rest/handlers.mjs +13 -7
- package/dist/rest/layer.d.mts +14 -0
- package/dist/rest/layer.mjs +53 -0
- package/dist/rest/listen.mjs +2 -2
- package/dist/rest/me.d.mts +18 -20
- package/dist/rest/me.mjs +1 -1
- package/dist/rest/merges.d.mts +10 -10
- package/dist/rest/namespace.d.mts +2 -0
- package/dist/rest/queue.d.mts +320 -320
- package/dist/rest/queue.mjs +1 -1
- package/dist/rest/refs.d.mts +207 -207
- package/dist/rest/refs.mjs +1 -1
- package/dist/rest/repos.d.mts +127 -127
- package/dist/rest/tags.d.mts +94 -94
- package/dist/rest/tokens.d.mts +248 -258
- package/dist/rest/tokens.mjs +10 -42
- package/dist/rest/topics.d.mts +154 -154
- package/dist/rest/topics.mjs +1 -1
- package/dist/rest/trees.d.mts +84 -84
- package/dist/rest/wire.d.mts +8 -4
- package/dist/rest/wire.mjs +3 -2
- package/dist/rest/work.d.mts +69 -69
- package/dist/rest/work.mjs +1 -1
- package/dist/server/check-fetch.mjs +9 -0
- package/dist/server/edge-node.d.mts +20 -0
- package/dist/server/edge-node.mjs +20 -0
- package/dist/server/edge.d.mts +10 -0
- package/dist/server/edge.mjs +23 -0
- package/dist/server/extension.mjs +3 -115
- package/dist/server/git-layer.d.mts +34 -6
- package/dist/server/git-layer.mjs +40 -18
- package/dist/server/git-namespace.d.mts +5 -4
- package/dist/server/git-namespace.mjs +10 -5
- package/dist/server/joined.d.mts +83 -0
- package/dist/server/joined.mjs +91 -0
- package/dist/server/registry.d.mts +9 -2
- package/dist/server/registry.mjs +179 -24
- package/dist/server/routes.mjs +2 -2
- package/dist/server/server.d.mts +11 -1
- package/dist/server/server.mjs +331 -201
- package/dist/server/uploads.d.mts +14 -0
- package/dist/server/uploads.mjs +15 -0
- package/dist/signin/context.d.mts +2 -1
- package/dist/signin/context.mjs +32 -37
- package/dist/signin/device.mjs +5 -5
- package/dist/signin/forms.mjs +1 -1
- package/dist/signin/grants.d.mts +2 -3
- package/dist/signin/grants.mjs +5 -5
- package/dist/signin/layer.d.mts +9 -0
- package/dist/signin/layer.mjs +41 -0
- package/dist/signin/namespace.d.mts +2 -0
- package/dist/signin/public.d.mts +6 -0
- package/dist/signin/public.mjs +5 -0
- package/dist/signin/route.mjs +47 -21
- package/dist/signin/web.mjs +3 -3
- package/dist/signin/wire.mjs +1 -1
- package/dist/storage/calls.d.mts +7 -8
- package/dist/storage/calls.mjs +17 -17
- package/dist/storage/clean-up.mjs +71 -34
- package/dist/storage/counted-bucket.mjs +34 -51
- package/dist/storage/fetch.mjs +1 -1
- package/dist/storage/host-bucket.mjs +17 -2
- package/dist/storage/index-build.d.mts +2 -2
- package/dist/storage/index-build.mjs +3 -3
- package/dist/storage/index-fetch.mjs +10 -6
- package/dist/storage/index-graph.mjs +1 -1
- package/dist/storage/index-layers.mjs +1 -1
- package/dist/storage/index-visible.mjs +1 -1
- package/dist/storage/layout.mjs +5 -0
- package/dist/storage/memory-budget.mjs +7 -1
- package/dist/storage/merge-cut.mjs +24 -1
- package/dist/storage/merge-fence.mjs +1 -1
- package/dist/storage/merge-plan.mjs +5 -2
- package/dist/storage/merge-row.mjs +1 -1
- package/dist/storage/merge-stream.mjs +16 -7
- package/dist/storage/merge-write.mjs +1 -1
- package/dist/storage/merge.d.mts +2 -2
- package/dist/storage/merge.mjs +1 -1
- package/dist/storage/object-rows.d.mts +2 -2
- package/dist/storage/object-rows.mjs +3 -3
- package/dist/storage/pack-ranges.d.mts +3 -1
- package/dist/storage/pack-ranges.mjs +168 -69
- package/dist/storage/pack-reads.mjs +4 -4
- package/dist/storage/pack-receive.d.mts +1 -1
- package/dist/storage/pack-receive.mjs +7 -9
- package/dist/storage/packs.d.mts +1 -1
- package/dist/storage/packs.mjs +45 -52
- package/dist/storage/placed-reads.mjs +81 -15
- package/dist/storage/prune-seen.mjs +126 -0
- package/dist/storage/prune-walk.mjs +87 -99
- package/dist/storage/prune.mjs +49 -14
- package/dist/storage/push-uploads.mjs +16 -18
- package/dist/storage/quarantine.d.mts +2 -2
- package/dist/storage/quarantine.mjs +51 -12
- package/dist/storage/ready.d.mts +2 -2
- package/dist/storage/ready.mjs +3 -3
- package/dist/storage/receive-bounds.d.mts +1 -1
- 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 +1 -1
- package/dist/storage/receive-steps.mjs +1 -1
- package/dist/storage/repack-contained.mjs +2 -2
- package/dist/storage/repack-job.d.mts +2 -2
- package/dist/storage/repack-job.mjs +11 -17
- package/dist/storage/repack.d.mts +1 -1
- package/dist/storage/repack.mjs +9 -3
- package/dist/storage/rows.d.mts +2 -2
- package/dist/storage/rows.mjs +43 -4
- package/dist/storage/runs.d.mts +2 -2
- package/dist/storage/runs.mjs +15 -6
- package/dist/storage/send-list.mjs +6 -6
- package/dist/storage/single-flight.mjs +2 -2
- package/dist/storage/swap-walk.mjs +1 -1
- package/dist/storage/unpack.mjs +1 -1
- package/dist/store/call-count.d.mts +1 -1
- package/dist/store/call-count.mjs +125 -34
- package/dist/store/catalogue.d.mts +1 -1
- package/dist/store/catalogue.mjs +2 -2
- package/dist/store/crossing.mjs +2 -6
- package/dist/store/cursor-seal.mjs +1 -1
- package/dist/store/errors.d.mts +7 -3
- package/dist/store/errors.mjs +41 -13
- package/dist/store/job-try.mjs +130 -0
- package/dist/store/list-job.mjs +22 -16
- package/dist/store/outbox.d.mts +2 -2
- package/dist/store/outbox.mjs +112 -27
- package/dist/store/promises.d.mts +8 -3
- package/dist/store/promises.mjs +104 -94
- package/dist/store/queue-jobs.mjs +23 -2
- package/dist/store/records.d.mts +2 -2
- package/dist/store/records.mjs +16 -24
- package/dist/store/ref-rows.d.mts +2 -2
- package/dist/store/ref-rows.mjs +6 -6
- package/dist/store/reservations.mjs +35 -8
- package/dist/store/scopes.mjs +6 -14
- package/dist/store/topic-jobs.mjs +8 -8
- package/dist/sync/bound.d.mts +1 -3
- package/dist/sync/bound.mjs +30 -42
- package/dist/sync/bridge.d.mts +6 -0
- package/dist/sync/bridge.mjs +29 -0
- package/dist/sync/github.d.mts +5 -6
- package/dist/sync/github.mjs +37 -42
- package/dist/sync/http.mjs +15 -0
- package/dist/sync/import.mjs +17 -18
- package/dist/sync/layer.d.mts +9 -0
- package/dist/sync/layer.mjs +68 -0
- package/dist/sync/mirror.mjs +138 -59
- package/dist/sync/publish.mjs +15 -13
- package/dist/sync/step.mjs +221 -79
- package/dist/sync/tries.mjs +22 -15
- package/dist/sync.d.mts +3 -6
- package/dist/sync.mjs +3 -6
- package/dist/topics/advance.mjs +205 -90
- package/dist/topics/calls.mjs +8 -8
- package/dist/topics/directory.mjs +35 -12
- package/dist/topics/host.d.mts +5 -8
- package/dist/topics/host.mjs +42 -19
- package/dist/topics/layer.d.mts +381 -0
- package/dist/topics/layer.mjs +62 -0
- package/dist/topics/members.mjs +1 -1
- package/dist/topics/namespace.d.mts +2 -0
- package/dist/topics/public.d.mts +6 -0
- package/dist/topics/public.mjs +13 -0
- package/dist/topics/rows.mjs +12 -3
- package/dist/topics/topic.mjs +11 -10
- package/package.json +8 -13
- package/dist/access.d.mts +0 -2
- package/dist/access.mjs +0 -1
- package/dist/core/hooks/post-receive.mjs +0 -213
- package/dist/core/hooks/pre-receive.d.mts +0 -12
- package/dist/core/hooks/pre-receive.mjs +0 -36
- package/dist/lfs/repo.mjs +0 -42
- package/dist/server/extension.d.mts +0 -21
- package/dist/storage/promise-calls.mjs +0 -29
- package/dist/sync/import.d.mts +0 -10
- package/dist/sync/jobs.d.mts +0 -9
- package/dist/sync/jobs.mjs +0 -75
- package/dist/sync/mirror.d.mts +0 -13
- package/dist/sync/publish.d.mts +0 -6
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { gitError } from "../contracts/result.mjs";
|
|
2
2
|
import { hexOf } from "../protocol/bytes/hex.mjs";
|
|
3
3
|
import { oidBytes } from "../protocol/packs/idx.mjs";
|
|
4
|
-
import { checkTypesHeader, typeAt, typeCode } from "../protocol/packs/types-file.mjs";
|
|
5
4
|
import { bestEffort } from "../store/errors.mjs";
|
|
6
5
|
import { randomText } from "../store/random.mjs";
|
|
7
6
|
import { readerFloors, readerMost } from "./budget.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { readWhole } from "./calls.mjs";
|
|
8
|
+
import { putOnce } from "./index-build.mjs";
|
|
9
|
+
import { runKey } from "./layout.mjs";
|
|
10
|
+
import { pruneSeenBytes, upkeepMemoryOf, upkeepRuns, upkeepTooLarge } from "./memory-budget.mjs";
|
|
12
11
|
import { blockBytes, blocksHeld, indexBytes, packReader } from "./pack-reads.mjs";
|
|
13
|
-
import {
|
|
12
|
+
import { SeenSaved, seenSet } from "./prune-seen.mjs";
|
|
13
|
+
import { StoredRuns, dedupeTableBytes, dropRuns, mergeHeld, mergeRuns, narrowed, narrowedCalls, runWriter, writerHeld } from "./runs.mjs";
|
|
14
14
|
import { countedReads } from "./walk.mjs";
|
|
15
|
-
import * as Schema from "effect/Schema";
|
|
16
15
|
import * as Effect from "effect/Effect";
|
|
16
|
+
import * as Schema from "effect/Schema";
|
|
17
17
|
import * as Data from "effect/Data";
|
|
18
18
|
// src/storage/prune-walk.ts
|
|
19
|
-
/**
|
|
20
|
-
* The most history objects, commits and tags, a prune pass's walk holds in its table: about
|
|
21
|
-
* 34 MB at `historySlotBytes` (maintenance-1m, invariant 2). A repo past it is refused by name.
|
|
22
|
-
*/
|
|
23
|
-
const pruneCommitsMost = 1e6;
|
|
24
19
|
/** The tree IDs a level reads at once, in pack order, at `fetchEntryBytes` each: about 9.2 MB. */
|
|
25
20
|
const pruneTreesAtOnce = 131072;
|
|
26
21
|
/** The bytes of a reached run, and of a frontier's. */
|
|
@@ -46,8 +41,6 @@ const frontierDedupe = {
|
|
|
46
41
|
},
|
|
47
42
|
hash: (bytes, at) => (bytes[at] ?? 0) << 24 | (bytes[at + 1] ?? 0) << 16 | (bytes[at + 2] ?? 0) << 8 | (bytes[at + 3] ?? 0)
|
|
48
43
|
};
|
|
49
|
-
/** The history table's bytes a slot: a 20-byte ID, at most 60% full, so about 34 B an object. */
|
|
50
|
-
const historySlotBytes = 20;
|
|
51
44
|
/** `a`'s runs and `b`'s, of one width, as one: `kind` names where a merge of them narrows. */
|
|
52
45
|
const joined = (a, b, kind = a.kind) => {
|
|
53
46
|
const { keys, lengths, rows } = b;
|
|
@@ -90,33 +83,31 @@ const pruneWalkSizes = (objects, blocks) => {
|
|
|
90
83
|
/** A walk's sizes at its bounds, the most any repo's take. */
|
|
91
84
|
const boundSizes = /* @__PURE__ */ pruneWalkSizes(Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY);
|
|
92
85
|
/**
|
|
93
|
-
* What a walk at `sizes` holds besides its
|
|
86
|
+
* What a walk at `sizes` holds besides its seen set and its reader's: its trees, its
|
|
94
87
|
* writers and the frontier's dedupe table, and its merge. At the bounds unless given.
|
|
95
88
|
*/
|
|
96
89
|
const pruneWalkTables = (sizes = boundSizes) => sizes.trees * 70 + 2 * writerHeld(rowBytes, sizes.runBytes) + dedupeTableBytes(sizes.runBytes, rowBytes) + mergeHeld(rowBytes, sizes.runs);
|
|
97
|
-
/** The slots a history table for `count` objects is made with, so it's at most 60% full. */
|
|
98
|
-
const historySlots = (count) => Math.max(1, Math.ceil(count * 5 / 3));
|
|
99
90
|
/**
|
|
100
|
-
* What a walk
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* invariant 2).
|
|
91
|
+
* What a walk at `sizes` holds at its most besides its seen set, the IDs it starts from and its
|
|
92
|
+
* reader's indexes: its tables, and its reader's blocks and cache at their most. At the bounds
|
|
93
|
+
* unless given.
|
|
104
94
|
*/
|
|
105
|
-
const pruneWalkHeld = (
|
|
95
|
+
const pruneWalkHeld = (sizes = boundSizes) => pruneWalkTables(sizes) + sizes.blocks + readerMost.cache;
|
|
106
96
|
/** A save's count, checked as a row's is, so a bad one is refused at its decode. */
|
|
107
97
|
const Count = /* @__PURE__ */ Schema.Int.check(Schema.isGreaterThanOrEqualTo(0));
|
|
108
98
|
/** The ID a save's merge stopped at, likewise. */
|
|
109
99
|
const LastId = /* @__PURE__ */ Schema.String.check(Schema.isPattern(/^[0-9a-f]{40}$/));
|
|
110
100
|
/**
|
|
111
101
|
* Where a walk stopped, for its next try to go on from, as `PruneStarted.walk` holds it: in its
|
|
112
|
-
* history, the runs it has put, the IDs it has yet to read
|
|
113
|
-
* level, the runs reached so far and the next level's
|
|
114
|
-
* level after it. `refs` holds the `start` its first
|
|
102
|
+
* history, the runs it has put, the IDs it has yet to read, how many history objects it has seen
|
|
103
|
+
* and its seen set's object; or after a tree level, the runs reached so far and the next level's
|
|
104
|
+
* frontier, and with `at` partway through the level after it. `refs` holds the `start` its first
|
|
115
105
|
* try was given, which a later try walks from whatever the refs are then.
|
|
116
106
|
*/
|
|
117
107
|
const WalkSaved = /* @__PURE__ */ Schema.Union([Schema.Struct({
|
|
118
108
|
phase: Schema.Literal("history"),
|
|
119
109
|
count: Count,
|
|
110
|
+
seen: SeenSaved,
|
|
120
111
|
refs: StoredRuns,
|
|
121
112
|
reached: StoredRuns,
|
|
122
113
|
frontier: StoredRuns,
|
|
@@ -142,67 +133,30 @@ const fits = (calls, needs) => {
|
|
|
142
133
|
const made = calls.made();
|
|
143
134
|
return made.bucket + needs < calls.most.bucket && made.subrequests + needs < calls.most.subrequests;
|
|
144
135
|
};
|
|
145
|
-
/**
|
|
146
|
-
* A walk refused: its history past `pruneCommitsMost`, its charge past its allotment, or one step
|
|
147
|
-
* past a whole try's calls.
|
|
148
|
-
*/
|
|
136
|
+
/** A walk refused: its charge past its allotment, or one step past a whole try's calls. */
|
|
149
137
|
var PruneWalkTooLarge = class extends Data.TaggedError("PruneWalkTooLarge") {};
|
|
150
|
-
/** The all-zero ID, which names no object: a free slot's. */
|
|
151
|
-
const empty = /* @__PURE__ */ new Uint8Array(20);
|
|
152
|
-
/** Whether the 20-byte IDs at `a`'s `at` and `b`'s `bt` are one. */
|
|
153
|
-
const sameId = (a, at, b, bt) => {
|
|
154
|
-
for (let i = 0; i < 20; i += 1) if (a[at + i] !== b[bt + i]) return false;
|
|
155
|
-
return true;
|
|
156
|
-
};
|
|
157
138
|
/**
|
|
158
|
-
* The
|
|
159
|
-
*
|
|
139
|
+
* The bucket keys `saved` names: its runs, and in its history its seen set's object, so a pass
|
|
140
|
+
* that drops what its walks left can keep what its mark still reads.
|
|
160
141
|
*/
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
return {
|
|
178
|
-
add,
|
|
179
|
-
size: () => size
|
|
180
|
-
};
|
|
142
|
+
const walkKeys = (saved) => {
|
|
143
|
+
const keys = (saved.phase === "history" ? [
|
|
144
|
+
saved.refs,
|
|
145
|
+
saved.reached,
|
|
146
|
+
saved.frontier,
|
|
147
|
+
saved.pending,
|
|
148
|
+
saved.known
|
|
149
|
+
] : [
|
|
150
|
+
saved.refs,
|
|
151
|
+
saved.reached,
|
|
152
|
+
saved.frontier,
|
|
153
|
+
saved.at?.reached,
|
|
154
|
+
saved.at?.frontier,
|
|
155
|
+
saved.at?.trees
|
|
156
|
+
]).flatMap((each) => each?.keys ?? []);
|
|
157
|
+
return saved.phase === "history" ? [...keys, saved.seen.key] : keys;
|
|
181
158
|
};
|
|
182
159
|
/**
|
|
183
|
-
* The most history objects a walk from `refs` can reach: the commits and tags the listed packs'
|
|
184
|
-
* `.types` count, an object each tag names, each ref's own and each of `rows` object rows. Read
|
|
185
|
-
* by range, `typesRunRanks` bytes at a time.
|
|
186
|
-
*/
|
|
187
|
-
const historyCount = /* @__PURE__ */ Effect.fnUntraced(function* (input, refs, rows) {
|
|
188
|
-
const commit = typeCode("commit");
|
|
189
|
-
const tag = typeCode("tag");
|
|
190
|
-
let commits = 0;
|
|
191
|
-
let tags = 0;
|
|
192
|
-
for (const pack of input.listed.packs) {
|
|
193
|
-
const key = isPackId(pack.id) ? packFiles(pack.id).types : pack.id;
|
|
194
|
-
const head = yield* readExactly(input.bucket, key, 0, 12);
|
|
195
|
-
yield* Effect.mapError(checkTypesHeader(head, pack.objects), (error) => gitError("DATA_LOSS", `Pack ${pack.id}'s types: ${error.message}`));
|
|
196
|
-
for (let rank = 0; rank < pack.objects; rank += typesRunRanks) {
|
|
197
|
-
const length = Math.min(typesRunRanks, pack.objects - rank);
|
|
198
|
-
const types = yield* readExactly(input.bucket, key, typeAt(rank), length);
|
|
199
|
-
for (const byte of types) if (byte === commit) commits += 1;
|
|
200
|
-
else if (byte === tag) tags += 1;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
return commits + 2 * tags + refs + rows;
|
|
204
|
-
});
|
|
205
|
-
/**
|
|
206
160
|
* `walk` in its own scope, a fresh walk's runs dropped once it's refused, so it keeps none. A walk
|
|
207
161
|
* that goes on from `saved` or `known` keeps them: the pass's mark names them, and the parked
|
|
208
162
|
* pass's retry goes on from there.
|
|
@@ -210,7 +164,8 @@ const historyCount = /* @__PURE__ */ Effect.fnUntraced(function* (input, refs, r
|
|
|
210
164
|
const droppedOnRefusal = (walk, input, pack, _start, _missing, options = {}) => Effect.tapError(Effect.scoped(walk), (error) => error instanceof PruneWalkTooLarge && options.saved === void 0 && options.known === void 0 ? bestEffort(dropRuns(input.bucket, pack)) : Effect.void);
|
|
211
165
|
/**
|
|
212
166
|
* Every object `start` reaches, as reached runs under `pack`: the history first, commits and tags
|
|
213
|
-
* in a
|
|
167
|
+
* each marked in a seen set of a bit an object of the listed packs; then the trees a level at a
|
|
168
|
+
* time, each level's
|
|
214
169
|
* frontier merged against the runs reached so far, which the merge carries on as the next
|
|
215
170
|
* level's, so a tree is read once and a blob put once, by the ID its tree names and never read.
|
|
216
171
|
* `missing` says what an object the repo doesn't hold does to the walk: a tree it passes over is
|
|
@@ -222,10 +177,10 @@ const droppedOnRefusal = (walk, input, pack, _start, _missing, options = {}) =>
|
|
|
222
177
|
* try given it as `saved` goes on from there, never from `start`. A batch reads as many objects as
|
|
223
178
|
* their delta chains' gets fit. A step that passes a whole try is refused by name.
|
|
224
179
|
* `known`'s rows, from an earlier walk, are reached already: a tree they hold isn't read again.
|
|
225
|
-
* A refused fresh walk drops its runs; one given `saved` or `known` keeps them. A test sets
|
|
226
|
-
*
|
|
180
|
+
* A refused fresh walk drops its runs; one given `saved` or `known` keeps them. A test sets
|
|
181
|
+
* `treesAtOnce` below its bound.
|
|
227
182
|
*/
|
|
228
|
-
const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, start, missing, { rows = 0,
|
|
183
|
+
const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, start, missing, { rows = 0, treesAtOnce = pruneTreesAtOnce, calls, saved, known } = {}) {
|
|
229
184
|
const { allotment, listed } = input;
|
|
230
185
|
const objects = listed.packs.reduce((sum, each) => sum + each.objects, 0) + rows;
|
|
231
186
|
const blocks = listed.packs.reduce((sum, each) => sum + Math.ceil(each.bytes / blockBytes), 0);
|
|
@@ -238,14 +193,14 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
238
193
|
const knownRuns = history?.known ?? known;
|
|
239
194
|
if (knownRuns !== void 0 && knownRuns.width !== rowBytes) return yield* Effect.fail(gitError("DATA_LOSS", `The known runs are not ${rowBytes}-byte rows`));
|
|
240
195
|
const named = new Set(start).size;
|
|
241
|
-
const
|
|
196
|
+
const outsideMost = rows + named;
|
|
242
197
|
const namesBytes = (saved === void 0 ? named : history?.pending.rows ?? 0) * 70;
|
|
243
|
-
const
|
|
198
|
+
const seenBytes = saved?.phase === "trees" ? 0 : pruneSeenBytes(listed.packs, outsideMost);
|
|
244
199
|
const indexes = listed.packs.reduce((sum, each) => sum + indexBytes(each), 0);
|
|
245
|
-
const charge = pruneWalkHeld(
|
|
200
|
+
const charge = pruneWalkHeld(sizes) + namesBytes + seenBytes + indexes;
|
|
246
201
|
if (charge - own > allotment.growable) return yield* new PruneWalkTooLarge({ message: `its walk charges ${charge} bytes with its packs' indexes, past the ${own + allotment.growable} its allotment holds: the repo is past what one prune walk holds` });
|
|
247
|
-
|
|
248
|
-
|
|
202
|
+
const heldBytes = namesBytes + seenBytes;
|
|
203
|
+
yield* Effect.acquireRelease(allotment.grow(heldBytes, upkeepTooLarge), () => Effect.sync(() => allotment.shrink(heldBytes)));
|
|
249
204
|
const reader = packReader({
|
|
250
205
|
...input,
|
|
251
206
|
memory
|
|
@@ -260,6 +215,25 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
260
215
|
allotment.shrink(bytes);
|
|
261
216
|
});
|
|
262
217
|
const reads = countedReads(reader, objects + 1e6, charged, void 0, release);
|
|
218
|
+
/** Where each of `oids` is for the seen set: its first listed pack and its rank there. */
|
|
219
|
+
const ranksOf = Effect.fnUntraced(function* (oids) {
|
|
220
|
+
const at = /* @__PURE__ */ new Map();
|
|
221
|
+
let left = [...oids];
|
|
222
|
+
for (const pack of listed.packs) {
|
|
223
|
+
if (left.length === 0) break;
|
|
224
|
+
const { index } = yield* reader.indexed(pack);
|
|
225
|
+
left = left.filter((oid) => {
|
|
226
|
+
const rank = index.rankOf(oid);
|
|
227
|
+
if (rank === void 0) return true;
|
|
228
|
+
at.set(oid, {
|
|
229
|
+
pack: pack.id,
|
|
230
|
+
rank
|
|
231
|
+
});
|
|
232
|
+
return false;
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
return at;
|
|
236
|
+
});
|
|
263
237
|
/** Lets go of what `found` holds of `batch`, once each of it is put. */
|
|
264
238
|
const letGo = (found, batch) => {
|
|
265
239
|
for (const object of found.values()) reads.letGo(object);
|
|
@@ -388,9 +362,16 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
388
362
|
let names = [...new Set(start)];
|
|
389
363
|
let parents = [];
|
|
390
364
|
let prior;
|
|
365
|
+
let seenFrom;
|
|
391
366
|
if (history !== void 0) {
|
|
392
|
-
const rebuild =
|
|
367
|
+
const rebuild = narrowedCalls(history.reached.lengths, rowBytes, sizes.runs, input.bucket.multipart).calls + narrowedCalls(history.frontier.lengths, rowBytes, sizes.runs, input.bucket.multipart).calls + mergeCalls(history.pending) + 1;
|
|
393
368
|
if (!fits(calls, rebuild + 6)) return yield* tooMany("a history resume", rebuild + 6);
|
|
369
|
+
const bytes = yield* readWhole(input.bucket, history.seen.key);
|
|
370
|
+
if (bytes === void 0) return yield* Effect.fail(gitError("DATA_LOSS", `The walk's seen object ${history.seen.key} is gone`));
|
|
371
|
+
seenFrom = {
|
|
372
|
+
saved: history.seen,
|
|
373
|
+
bytes
|
|
374
|
+
};
|
|
394
375
|
const narrow = (runs, kind) => narrowed(input.bucket, pack, {
|
|
395
376
|
...runs,
|
|
396
377
|
kind: `${kind}.${tried}`
|
|
@@ -400,9 +381,12 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
400
381
|
frontier: yield* narrow(history.frontier, "frontier-h")
|
|
401
382
|
};
|
|
402
383
|
names = [];
|
|
403
|
-
yield* eachOf(prior.reached, (id) => void table.add(id));
|
|
404
384
|
yield* eachOf(history.pending, (id, tag) => (tag === tags.tree ? names : parents).push(hexOf(id)));
|
|
405
385
|
}
|
|
386
|
+
const seen = yield* seenSet(listed.packs, outsideMost, seenFrom === void 0 ? void 0 : {
|
|
387
|
+
...seenFrom,
|
|
388
|
+
place: ranksOf
|
|
389
|
+
});
|
|
406
390
|
const reached = writer("reached-0", sizes.runBytes);
|
|
407
391
|
const frontier = frontierWriter("frontier-0");
|
|
408
392
|
while (names.length > 0 || parents.length > 0) {
|
|
@@ -412,7 +396,7 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
412
396
|
else parents = [];
|
|
413
397
|
for (let at = 0; at < level.length;) {
|
|
414
398
|
const left = level.length - at + names.length + parents.length;
|
|
415
|
-
const { count: admits, needs } = yield* admitted(level.slice(at, at + 64),
|
|
399
|
+
const { count: admits, needs } = yield* admitted(level.slice(at, at + 64), 5 + putCalls(left));
|
|
416
400
|
if (admits === 0) {
|
|
417
401
|
if (!moved) return yield* tooMany("a history batch", needs);
|
|
418
402
|
const reachedRuns = yield* reached.finish;
|
|
@@ -421,9 +405,13 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
421
405
|
const rest = level.slice(at);
|
|
422
406
|
for (const oid of fromNames ? [...rest, ...names] : names) yield* put(pending, oidBytes(oid), tags.tree);
|
|
423
407
|
for (const oid of fromNames ? parents : [...rest, ...parents]) yield* put(pending, oidBytes(oid), tags.reached);
|
|
408
|
+
const key = runKey(pack, `seen.${tried}`, 0);
|
|
409
|
+
const { layout, bytes } = seen.saved(key);
|
|
410
|
+
yield* putOnce(input.bucket, key, bytes);
|
|
424
411
|
return { more: {
|
|
425
412
|
phase: "history",
|
|
426
|
-
count,
|
|
413
|
+
count: seen.size(),
|
|
414
|
+
seen: layout,
|
|
427
415
|
refs,
|
|
428
416
|
reached: after(prior?.reached, reachedRuns),
|
|
429
417
|
frontier: after(prior?.frontier, frontierRuns),
|
|
@@ -435,12 +423,12 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
435
423
|
const slice = level.slice(at, at + admits);
|
|
436
424
|
at += admits;
|
|
437
425
|
const blobs = fromNames ? yield* reader.wholeBlobs(slice) : /* @__PURE__ */ new Set();
|
|
426
|
+
const ranked = yield* ranksOf(slice);
|
|
438
427
|
const batch = [];
|
|
439
428
|
for (const oid of slice) {
|
|
440
429
|
const id = oidBytes(oid);
|
|
441
|
-
const added =
|
|
442
|
-
if (added === "full"
|
|
443
|
-
if (added === "full") return yield* Effect.fail(gitError("DATA_LOSS", `The packs' types count ${count} history objects: the walk reaches more`));
|
|
430
|
+
const added = seen.add(oid, ranked.get(oid));
|
|
431
|
+
if (added === "full") return yield* Effect.fail(gitError("DATA_LOSS", `The walk reaches more than ${outsideMost} objects no listed pack holds: past its rows and refs`));
|
|
444
432
|
if (!added) continue;
|
|
445
433
|
if (blobs.has(oid)) yield* put(reached, id, tags.reached);
|
|
446
434
|
else batch.push(oid);
|
|
@@ -465,7 +453,7 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
465
453
|
runs = after(prior?.reached, yield* reached.finish);
|
|
466
454
|
next = after(prior?.frontier, yield* frontier.finish);
|
|
467
455
|
if (knownRuns !== void 0) runs = joined(runs, knownRuns);
|
|
468
|
-
commits =
|
|
456
|
+
commits = seen.size();
|
|
469
457
|
}
|
|
470
458
|
let within = saved?.phase === "trees" ? saved.at : void 0;
|
|
471
459
|
for (let depth = from + 1; next.rows > 0; depth += 1) {
|
|
@@ -575,4 +563,4 @@ const pruneWalk = /* @__PURE__ */ Effect.fnUntraced(function* (input, pack, star
|
|
|
575
563
|
refs
|
|
576
564
|
};
|
|
577
565
|
}, droppedOnRefusal);
|
|
578
|
-
export { PruneWalkTooLarge, WalkSaved,
|
|
566
|
+
export { PruneWalkTooLarge, WalkSaved, pruneTreesAtOnce, pruneWalk, pruneWalkHeld, pruneWalkSizes, pruneWalkTables, reachedRunBytes, walkKeys };
|
package/dist/storage/prune.mjs
CHANGED
|
@@ -14,14 +14,14 @@ import { mergeInputsMost } from "./merge-most.mjs";
|
|
|
14
14
|
import { opensWithin, resumeMerge, streamMerge } from "./merge-stream.mjs";
|
|
15
15
|
import { objectKey } from "./object-rows.mjs";
|
|
16
16
|
import { bitsBytes, hasBit, keepBits, keptAt, setBit } from "./prune-keep.mjs";
|
|
17
|
-
import { WalkSaved, pruneWalk } from "./prune-walk.mjs";
|
|
17
|
+
import { WalkSaved, pruneWalk, walkKeys } from "./prune-walk.mjs";
|
|
18
18
|
import { defaultRepack, leavingRows, loadAll, mergeWith, namedOf, replacing, wholeRows } from "./repack.mjs";
|
|
19
19
|
import { decodeHeld, pruneFloor, pruneWait } from "./rows.mjs";
|
|
20
20
|
import { StoredRuns, dropRuns, mergeHeld, mergeRuns } from "./runs.mjs";
|
|
21
21
|
import { lost } from "./walk.mjs";
|
|
22
|
-
import * as Schema from "effect/Schema";
|
|
23
22
|
import * as Effect from "effect/Effect";
|
|
24
23
|
import * as Option from "effect/Option";
|
|
24
|
+
import * as Schema from "effect/Schema";
|
|
25
25
|
import * as DateTime from "effect/DateTime";
|
|
26
26
|
// src/storage/prune.ts
|
|
27
27
|
/** A cruft pack's row, by its pack: when a prune pass found its objects unreached. */
|
|
@@ -143,10 +143,32 @@ const cruftOf = (read, pack) => isPackId(pack.id) ? read.cruft.get(pack.id) : vo
|
|
|
143
143
|
const pruneWhole = /* @__PURE__ */ WholeRepo.mint();
|
|
144
144
|
/**
|
|
145
145
|
* The scratch pack a pass's walk of `kind` puts its runs under: `r` for what the refs reach, `n`
|
|
146
|
-
* for what the unreached objects name. One a pass, by its mark's time, so a try that
|
|
147
|
-
* runs the next try's step drops before it walks again
|
|
146
|
+
* for what the unreached objects name. One a pass, by its repo and its mark's time, so a try that
|
|
147
|
+
* dies leaves runs the next try's step drops before it walks again, and two repos whose passes
|
|
148
|
+
* are marked at one moment, in the one bucket every repo's packs share, never share one.
|
|
149
|
+
*/
|
|
150
|
+
const walkPackOf = (repo, at, kind) => `p_${kind}${repo.slice(2)}${at.toString(36).padStart(15, "0")}`;
|
|
151
|
+
/**
|
|
152
|
+
* The scratch packs of the pass marked at `at` dropped, pages at most each, once its commit is
|
|
153
|
+
* in: `'more'` while keys are left, for the next step to drop.
|
|
148
154
|
*/
|
|
149
|
-
const
|
|
155
|
+
const passScratch = (input, at) => Effect.map(Effect.all([dropRuns(input.bucket, walkPackOf(input.listed.repo, at, "r")), dropRuns(input.bucket, walkPackOf(input.listed.repo, at, "n"))]), (drops) => drops.includes("more") ? "more" : "done");
|
|
156
|
+
/**
|
|
157
|
+
* The bucket keys `started` names under its pass's scratch packs: each walk's runs, saved or
|
|
158
|
+
* done, and its classes object. Bounded by the mark's record, so a drop of them takes one call.
|
|
159
|
+
*/
|
|
160
|
+
const markKeys = (started, repo, at) => {
|
|
161
|
+
const keys = /* @__PURE__ */ new Set();
|
|
162
|
+
const carries = [started?.walks?.r, started?.walks?.n];
|
|
163
|
+
for (const carry of carries) {
|
|
164
|
+
if (carry === void 0) continue;
|
|
165
|
+
for (const key of carry.refs?.keys ?? []) keys.add(key);
|
|
166
|
+
if ("done" in carry) for (const key of carry.done.keys) keys.add(key);
|
|
167
|
+
else for (const key of walkKeys(carry.saved)) keys.add(key);
|
|
168
|
+
}
|
|
169
|
+
if (started?.classes !== void 0) keys.add(classesKey(repo, at, started.classes.n));
|
|
170
|
+
return keys;
|
|
171
|
+
};
|
|
150
172
|
/**
|
|
151
173
|
* A pass's reach, as a set: an ID is in it when the bits' rows hold it, or its first pack among
|
|
152
174
|
* `packs` keeps it at its rank, as D3's `keptAt` says. Its IDs run each pack's set bits, then the
|
|
@@ -273,7 +295,7 @@ const sameIds = (a, b) => {
|
|
|
273
295
|
return a.length === b.length && b.every((id) => named.has(id));
|
|
274
296
|
};
|
|
275
297
|
/** The key of a pass's classes object `n`, under its `r` walk's scratch, which its last step drops. */
|
|
276
|
-
const classesKey = (at, n) => runKey(walkPackOf(at, "r"), "classes", n);
|
|
298
|
+
const classesKey = (repo, at, n) => runKey(walkPackOf(repo, at, "r"), "classes", n);
|
|
277
299
|
const ClassesHeader = /* @__PURE__ */ Schema.fromJsonString(Schema.Struct({ packs: Schema.Array(Schema.Struct({
|
|
278
300
|
pack: Schema.String.pipe(Schema.refine(isPackId)),
|
|
279
301
|
count: Schema.Int.check(Schema.isBetween({
|
|
@@ -528,7 +550,7 @@ const passSteps = /* @__PURE__ */ Effect.fnUntraced(function* (input, read, pack
|
|
|
528
550
|
const carried = read.started?.walks ?? {};
|
|
529
551
|
const classes = read.started?.classes;
|
|
530
552
|
const redos = read.started?.redos ?? 0;
|
|
531
|
-
const scratch = walkPackOf(at, "r");
|
|
553
|
+
const scratch = walkPackOf(input.listed.repo, at, "r");
|
|
532
554
|
const saving = (walks) => ({
|
|
533
555
|
step: {
|
|
534
556
|
change: {},
|
|
@@ -575,7 +597,7 @@ const passSteps = /* @__PURE__ */ Effect.fnUntraced(function* (input, read, pack
|
|
|
575
597
|
};
|
|
576
598
|
if (classes.kind === "cruft" || merge.value.pass !== "commit" || seenHolds(classes)) return went(yield* resumeMerge(input, merge, most, calls, listingOf(classes)), classes.kind);
|
|
577
599
|
}
|
|
578
|
-
const chosen = merge === void 0 && classes !== void 0 && (classes.kind === "cruft" ? sameIds(classes.packs, ids) : seenHolds(classes)) ? yield* readClasses(input, classesKey(at, classes.n), classes.bytes) : void 0;
|
|
600
|
+
const chosen = merge === void 0 && classes !== void 0 && (classes.kind === "cruft" ? sameIds(classes.packs, ids) : seenHolds(classes)) ? yield* readClasses(input, classesKey(input.listed.repo, at, classes.n), classes.bytes) : void 0;
|
|
579
601
|
if (chosen !== void 0 && classes !== void 0 && !chosen.some((each) => youngIds.has(each.pack))) return went(yield* classMerge(input, read, chosen, most, calls, listingOf(classes)), classes.kind);
|
|
580
602
|
const reachedRuns = carry.done;
|
|
581
603
|
const bits = yield* keepBits(input, scratch, reachedRuns, rowOids, lost);
|
|
@@ -627,7 +649,7 @@ const passSteps = /* @__PURE__ */ Effect.fnUntraced(function* (input, read, pack
|
|
|
627
649
|
const copies = (yield* classBits(input, fresh, (indexed, rank) => !reachedAt(indexed, rank) && !apart(indexed.index.oidAt(rank)))).filter((each) => each.set > 0);
|
|
628
650
|
if (copies.length === 0) return { start };
|
|
629
651
|
const n = (classes?.n ?? -1) + 1;
|
|
630
|
-
const bytes = yield* putClasses(input, classesKey(at, n), copies);
|
|
652
|
+
const bytes = yield* putClasses(input, classesKey(input.listed.repo, at, n), copies);
|
|
631
653
|
return { classes: {
|
|
632
654
|
kind: "cruft",
|
|
633
655
|
n,
|
|
@@ -644,7 +666,7 @@ const passSteps = /* @__PURE__ */ Effect.fnUntraced(function* (input, read, pack
|
|
|
644
666
|
},
|
|
645
667
|
mark: { classes: first.classes }
|
|
646
668
|
};
|
|
647
|
-
const named = walkPackOf(at, "n");
|
|
669
|
+
const named = walkPackOf(input.listed.repo, at, "n");
|
|
648
670
|
const neededCarry = carried.n;
|
|
649
671
|
if (packs.old.length > 0 && (neededCarry === void 0 || "saved" in neededCarry)) {
|
|
650
672
|
const start = neededCarry === void 0 ? first.start : [];
|
|
@@ -676,7 +698,7 @@ const passSteps = /* @__PURE__ */ Effect.fnUntraced(function* (input, read, pack
|
|
|
676
698
|
const inRows = new Set(rowOids);
|
|
677
699
|
const keep = (oid) => reached.has(oid) || !apart(oid) && (inFresh(oid) || inRows.has(oid) || needed.has(oid));
|
|
678
700
|
if (merge !== void 0 && classes !== void 0) {
|
|
679
|
-
const before = yield* readClasses(input, classesKey(at, classes.n), classes.bytes);
|
|
701
|
+
const before = yield* readClasses(input, classesKey(input.listed.repo, at, classes.n), classes.bytes);
|
|
680
702
|
const byPack = new Map((before ?? []).map((each) => [each.pack, each.bits]));
|
|
681
703
|
const inputs = new Set(merge.value.inputs);
|
|
682
704
|
if (!merging.some(({ pack, index }) => {
|
|
@@ -719,13 +741,18 @@ const passSteps = /* @__PURE__ */ Effect.fnUntraced(function* (input, read, pack
|
|
|
719
741
|
n,
|
|
720
742
|
packs: ids,
|
|
721
743
|
reads: digest,
|
|
722
|
-
bytes: yield* putClasses(input, classesKey(at, n), rewrites)
|
|
744
|
+
bytes: yield* putClasses(input, classesKey(input.listed.repo, at, n), rewrites)
|
|
723
745
|
} }
|
|
724
746
|
};
|
|
725
747
|
}
|
|
726
748
|
const held = carry.refs === void 0 || (yield* refsHeld(input, scratch, carry.refs, refs));
|
|
727
|
-
|
|
728
|
-
yield* dropRuns(input.bucket,
|
|
749
|
+
const marked = markKeys(read.started, input.listed.repo, at);
|
|
750
|
+
const scratchDropped = yield* dropRuns(input.bucket, scratch, marked);
|
|
751
|
+
const namedDropped = yield* dropRuns(input.bucket, named, marked);
|
|
752
|
+
if (scratchDropped === "more" || namedDropped === "more") return { step: {
|
|
753
|
+
change: {},
|
|
754
|
+
more: true
|
|
755
|
+
} };
|
|
729
756
|
const step = {
|
|
730
757
|
change: { put: [{
|
|
731
758
|
...prunePassKey,
|
|
@@ -814,6 +841,14 @@ const pruneStep = /* @__PURE__ */ Effect.fnUntraced(function* (input, prune, rep
|
|
|
814
841
|
next: after
|
|
815
842
|
};
|
|
816
843
|
}
|
|
844
|
+
const ended = read.started?.at;
|
|
845
|
+
if (ended !== void 0 && last !== void 0 && ended <= last && (yield* passScratch(input, ended)) === "more") return {
|
|
846
|
+
step: {
|
|
847
|
+
change: {},
|
|
848
|
+
more: true
|
|
849
|
+
},
|
|
850
|
+
next
|
|
851
|
+
};
|
|
817
852
|
if (markHeld && read.cruft.size === 0 && merge === void 0) return {
|
|
818
853
|
step: {
|
|
819
854
|
change: { put: [{
|
|
@@ -2,10 +2,10 @@ import { millis } from "../contracts/promises.mjs";
|
|
|
2
2
|
import { gitError } from "../contracts/result.mjs";
|
|
3
3
|
import { decodeRow, storeCall } from "../store/errors.mjs";
|
|
4
4
|
import { collections, newChangeId, repoScope } from "../store/scopes.mjs";
|
|
5
|
-
import { bucketCall } from "./calls.mjs";
|
|
6
|
-
import { limits } from "@ref0/infra";
|
|
7
|
-
import * as Schema from "effect/Schema";
|
|
5
|
+
import { bucketCall, bucketDo } from "./calls.mjs";
|
|
8
6
|
import * as Effect from "effect/Effect";
|
|
7
|
+
import * as Schema from "effect/Schema";
|
|
8
|
+
import { limits } from "@ref0/infra";
|
|
9
9
|
// src/storage/push-uploads.ts
|
|
10
10
|
/**
|
|
11
11
|
* A large push's pack, uploaded to the bucket in parts before the push: its row in the repo's
|
|
@@ -65,6 +65,8 @@ const PushUploadRow = /* @__PURE__ */ Schema.Struct({
|
|
|
65
65
|
atomic: Schema.Boolean,
|
|
66
66
|
/** Whether its begin asked for `ref0-push-reasons`, which complete's report tells. */
|
|
67
67
|
reasons: Schema.Boolean,
|
|
68
|
+
/** Its begin's `shallow` lines, which complete's push reads: none for a whole clone. */
|
|
69
|
+
shallow: Schema.Array(Schema.String),
|
|
68
70
|
/** When its last part link expires. */
|
|
69
71
|
expiresAt: Schema.Int,
|
|
70
72
|
/** When upkeep aborts its parts, and deletes its key and the row. */
|
|
@@ -100,16 +102,13 @@ const partBytes = (bytes, part, size) => Math.min(size, bytes - (part - 1) * siz
|
|
|
100
102
|
* `limits.valueBytes`, so a page of 8 stays within half of one answer's `limits.answerBytes`.
|
|
101
103
|
*/
|
|
102
104
|
const upkeepPage = /* @__PURE__ */ Math.floor(limits.answerBytes / limits.valueBytes / 2);
|
|
103
|
-
/** The bucket, when it signs parts and joins them: only then does a server take push uploads. */
|
|
104
|
-
const signedUploadOf = (bucket) => joinsParts(bucket) ? bucket : void 0;
|
|
105
|
-
/** A bucket made to sign parts, as `r2()` given S3 credentials makes one, has all five. */
|
|
106
|
-
const joinsParts = (bucket) => "beginUpload" in bucket && "uploadUrl" in bucket && "listParts" in bucket && "completeUpload" in bucket && "abortUpload" in bucket;
|
|
107
105
|
/**
|
|
108
|
-
* Ends the push uploads due at `at` in `repo`: each one's parts aborted,
|
|
109
|
-
*
|
|
110
|
-
*
|
|
106
|
+
* Ends the push uploads due at `at` in `repo`: each one's parts aborted, where the host has
|
|
107
|
+
* `uploads`, its key deleted from `bucket`, which charges each call, then its row, at the version
|
|
108
|
+
* the rows were read. A crash between leaves the row, and the next step ends it again: aborting an
|
|
109
|
+
* ended upload, and deleting a key that's gone, do nothing.
|
|
111
110
|
*/
|
|
112
|
-
const pushUploadUpkeep = (bucket) => Effect.fnUntraced(function* (store, repo, at) {
|
|
111
|
+
const pushUploadUpkeep = (bucket, uploads) => Effect.fnUntraced(function* (store, repo, at) {
|
|
113
112
|
const scope = repoScope(repo);
|
|
114
113
|
const due = [];
|
|
115
114
|
let next;
|
|
@@ -141,7 +140,7 @@ const pushUploadUpkeep = (bucket) => Effect.fnUntraced(function* (store, repo, a
|
|
|
141
140
|
more: false,
|
|
142
141
|
due: next
|
|
143
142
|
};
|
|
144
|
-
yield* Effect.forEach(due, ({ row }) => endUpload(bucket, row), {
|
|
143
|
+
yield* Effect.forEach(due, ({ row }) => endUpload(bucket, uploads, row), {
|
|
145
144
|
concurrency: 8,
|
|
146
145
|
discard: true
|
|
147
146
|
});
|
|
@@ -152,10 +151,9 @@ const pushUploadUpkeep = (bucket) => Effect.fnUntraced(function* (store, repo, a
|
|
|
152
151
|
}));
|
|
153
152
|
return { more: true };
|
|
154
153
|
});
|
|
155
|
-
/** An upload's parts aborted, where the
|
|
156
|
-
const endUpload = /* @__PURE__ */ Effect.fnUntraced(function* (bucket, row) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
yield* bucketCall((signal) => bucket.delete(row.key, { signal }));
|
|
154
|
+
/** An upload's parts aborted, where the host has `uploads`, then its key deleted. */
|
|
155
|
+
const endUpload = /* @__PURE__ */ Effect.fnUntraced(function* (bucket, uploads, row) {
|
|
156
|
+
if (uploads !== void 0) yield* bucketCall(uploads.abortUpload(row.key, row.uploadId));
|
|
157
|
+
yield* bucketDo(bucket.remove(row.key));
|
|
160
158
|
});
|
|
161
|
-
export { PushUploadRow, completeMost, endUpload, partBytes, partLinkLife, partSizeOf, partsOf, pushPackTooLarge, pushUploadGrace, pushUploadKey, pushUploadLife, pushUploadMost, pushUploadPart, pushUploadRead, pushUploadRowKey, pushUploadUpkeep
|
|
159
|
+
export { PushUploadRow, completeMost, endUpload, partBytes, partLinkLife, partSizeOf, partsOf, pushPackTooLarge, pushUploadGrace, pushUploadKey, pushUploadLife, pushUploadMost, pushUploadPart, pushUploadRead, pushUploadRowKey, pushUploadUpkeep };
|
|
@@ -6,5 +6,5 @@ import "../contracts/services.mjs";
|
|
|
6
6
|
import "../contracts/store.mjs";
|
|
7
7
|
import "./layout.mjs";
|
|
8
8
|
import "./pack-reads.mjs";
|
|
9
|
-
import
|
|
10
|
-
import "
|
|
9
|
+
import "effect/Effect";
|
|
10
|
+
import { JobInput, Key, Moment, Row } from "@ref0/infra";
|
|
@@ -27,6 +27,10 @@ const sharePacks = (bucket, packs, into) => Effect.forEach(packs, (pack) => isPa
|
|
|
27
27
|
* again; then its marker, named by the repo's internal ID. The pack's bytes go only after both.
|
|
28
28
|
* The add leaves a failed `git.repack` row failed, so clean-up past an outage longer than that
|
|
29
29
|
* row's tries, `repackRetry`'s week, waits for a host's retry (#1662).
|
|
30
|
+
*
|
|
31
|
+
* The row is read again after the marker's put: clean-up may have taken it between the two, and
|
|
32
|
+
* listed the pack's markers before this one was there (#1582). Then the marker goes again, and
|
|
33
|
+
* the write fails before any byte, so nothing is left that clean-up doesn't see.
|
|
30
34
|
*/
|
|
31
35
|
const openQuarantine = /* @__PURE__ */ Effect.fnUntraced(function* (input) {
|
|
32
36
|
const { store, bucket, repo, at, prune } = input;
|
|
@@ -43,6 +47,14 @@ const openQuarantine = /* @__PURE__ */ Effect.fnUntraced(function* (input) {
|
|
|
43
47
|
}
|
|
44
48
|
});
|
|
45
49
|
yield* putMarker(bucket, pack, repo);
|
|
50
|
+
if ((yield* quarantineState({
|
|
51
|
+
store,
|
|
52
|
+
repo,
|
|
53
|
+
pack
|
|
54
|
+
})) !== "open") {
|
|
55
|
+
yield* bucketDo(bucket.remove(markerKey(pack, repo)));
|
|
56
|
+
return yield* fail("UNAVAILABLE", "Clean-up ended the push's pack before its marker was put", { hint: "Push again" });
|
|
57
|
+
}
|
|
46
58
|
return {
|
|
47
59
|
pack,
|
|
48
60
|
quarantine: quarantineKey(pack),
|
|
@@ -69,18 +81,11 @@ const stillOpen = /* @__PURE__ */ Effect.fnUntraced(function* (input) {
|
|
|
69
81
|
return yield* fail("UNAVAILABLE", "The push's pack outlived its quarantine, so it may be gone", { hint: "Push again" });
|
|
70
82
|
});
|
|
71
83
|
/**
|
|
72
|
-
*
|
|
73
|
-
* `
|
|
74
|
-
* so a refused write keeps nothing. A row clean-up abandoned meanwhile is clean-up's to delete. A
|
|
75
|
-
* delete that fails, or other commits that keep moving the repo, leave the row for clean-up to end
|
|
76
|
-
* at its `removeAt`. Its own failure is dropped: the write's is the one its caller sees.
|
|
84
|
+
* Commits `body` over a pack's `quarantine` row while it's still `open`, each try at its own
|
|
85
|
+
* read's version, `dropTries` tries at most as other commits move the repo.
|
|
77
86
|
*/
|
|
78
|
-
const
|
|
79
|
-
const { store, bucket, repo, pack } = input;
|
|
80
|
-
input.indexes.forget(pack);
|
|
87
|
+
const whileOpen = /* @__PURE__ */ Effect.fnUntraced(function* ({ store, repo, pack }, body) {
|
|
81
88
|
const scope = repoScope(repo);
|
|
82
|
-
const keys = [markerKey(pack, repo), ...packFileKeys(pack)];
|
|
83
|
-
yield* Effect.forEach(keys, (key) => bucketDo(bucket.remove(key)), { discard: true });
|
|
84
89
|
for (let tried = 0; tried < 3; tried++) {
|
|
85
90
|
const snapshot = yield* store.read({
|
|
86
91
|
scope,
|
|
@@ -90,12 +95,46 @@ const dropRefused = (input) => bestEffort(Effect.gen(function* () {
|
|
|
90
95
|
const change = {
|
|
91
96
|
id: newChangeId(),
|
|
92
97
|
expect: snapshot.version,
|
|
93
|
-
|
|
98
|
+
...body
|
|
94
99
|
};
|
|
95
100
|
if ((yield* store.commit({
|
|
96
101
|
scope,
|
|
97
102
|
change
|
|
98
103
|
})).ok) return;
|
|
99
104
|
}
|
|
105
|
+
});
|
|
106
|
+
/**
|
|
107
|
+
* After a receive or a merge failed, its kept indexes let go, then its marker, files and
|
|
108
|
+
* `quarantine` row deleted before its refusal is answered, marker first, as clean-up orders them,
|
|
109
|
+
* so a refused write keeps nothing. A row clean-up abandoned meanwhile is clean-up's to delete. A
|
|
110
|
+
* delete that fails, or other commits that keep moving the repo, leave the row for clean-up to end
|
|
111
|
+
* at its `removeAt`. Its own failure is dropped: the write's is the one its caller sees.
|
|
112
|
+
*/
|
|
113
|
+
const dropRefused = (input) => bestEffort(Effect.gen(function* () {
|
|
114
|
+
const { store, bucket, repo, pack } = input;
|
|
115
|
+
input.indexes.forget(pack);
|
|
116
|
+
const keys = [markerKey(pack, repo), ...packFileKeys(pack)];
|
|
117
|
+
yield* Effect.forEach(keys, (key) => bucketDo(bucket.remove(key)), { discard: true });
|
|
118
|
+
yield* whileOpen({
|
|
119
|
+
store,
|
|
120
|
+
repo,
|
|
121
|
+
pack
|
|
122
|
+
}, { delete: [quarantineKey(pack)] });
|
|
123
|
+
}));
|
|
124
|
+
/**
|
|
125
|
+
* A push that ends with no commit that listed its pack commits its own `quarantine` row
|
|
126
|
+
* abandoned, due at `at`, with `git.repack` due then too, so the next clean-up deletes its marker,
|
|
127
|
+
* bytes and row, not one at its `removeAt`. Each try commits at its own read's version, over a row
|
|
128
|
+
* still `open`: a listing that landed, one whose answer was lost too, has taken the row, and one
|
|
129
|
+
* still on its way is refused by the version this moves. It deletes nothing itself, as a pack's
|
|
130
|
+
* bytes may be listed. Other commits that keep moving the repo, past `dropTries`, or a failure,
|
|
131
|
+
* leave the row for clean-up at its `removeAt`; its own failure is dropped.
|
|
132
|
+
*/
|
|
133
|
+
const abandonOwn = ({ at, repackJobRow: repackAt, ...input }) => bestEffort(whileOpen(input, {
|
|
134
|
+
put: [quarantineRow(input.pack, {
|
|
135
|
+
removeAt: at,
|
|
136
|
+
state: "abandoned"
|
|
137
|
+
})],
|
|
138
|
+
jobs: [repackAt(at)]
|
|
100
139
|
}));
|
|
101
|
-
export { deletePackFiles, dropRefused, openQuarantine, putMarker, quarantineOf, quarantineState, sharePacks, stillOpen };
|
|
140
|
+
export { abandonOwn, deletePackFiles, dropRefused, openQuarantine, putMarker, quarantineOf, quarantineState, sharePacks, stillOpen };
|