@earendil-works/chord 1.5.0 → 1.5.1
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/CHANGELOG.md +51 -0
- package/README.md +50 -90
- package/dist/contracts/accepts.d.ts +81 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +121 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js.map +1 -0
- package/dist/contracts/fingerprint.d.ts +16 -0
- package/dist/contracts/fingerprint.d.ts.map +1 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts.map +1 -0
- package/dist/contracts/names.js.map +1 -0
- package/dist/contracts/params.d.ts +28 -0
- package/dist/contracts/params.d.ts.map +1 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js.map +1 -0
- package/dist/contracts/snapshot.d.ts +16 -0
- package/dist/contracts/snapshot.d.ts.map +1 -0
- package/dist/contracts/snapshot.js +167 -0
- package/dist/contracts/snapshot.js.map +1 -0
- package/dist/data/args.d.ts +50 -0
- package/dist/data/args.d.ts.map +1 -0
- package/dist/data/args.js.map +1 -0
- package/dist/data/errors.d.ts +80 -0
- package/dist/data/errors.d.ts.map +1 -0
- package/dist/data/errors.js +116 -0
- package/dist/data/errors.js.map +1 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +77 -0
- package/dist/data/failure.js.map +1 -0
- package/dist/data/index.d.ts +4 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/index.js +5 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/internal.d.ts +7 -0
- package/dist/data/internal.d.ts.map +1 -0
- package/dist/data/internal.js +8 -0
- package/dist/data/internal.js.map +1 -0
- package/dist/data/params.d.ts +20 -0
- package/dist/data/params.d.ts.map +1 -0
- package/dist/data/params.js.map +1 -0
- package/dist/data/principal.d.ts +22 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +49 -0
- package/dist/data/principal.js.map +1 -0
- package/dist/data/validator.d.ts +12 -0
- package/dist/data/validator.d.ts.map +1 -0
- package/dist/data/validator.js +35 -0
- package/dist/data/validator.js.map +1 -0
- package/dist/documents/address-source.d.ts +20 -0
- package/dist/documents/address-source.d.ts.map +1 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +84 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +74 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +126 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +248 -0
- package/dist/documents/documents.js.map +1 -0
- package/dist/documents/fence.d.ts.map +1 -0
- package/dist/documents/fence.js.map +1 -0
- package/dist/documents/handles.d.ts +76 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js.map +1 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/internal.d.ts +9 -0
- package/dist/documents/internal.d.ts.map +1 -0
- package/dist/documents/internal.js.map +1 -0
- package/dist/documents/keyed-slot.d.ts +103 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +395 -0
- package/dist/documents/keyed-slot.js.map +1 -0
- package/dist/documents/line.d.ts.map +1 -0
- package/dist/documents/line.js.map +1 -0
- package/dist/documents/persistence.d.ts +104 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +129 -0
- package/dist/documents/persistence.js.map +1 -0
- package/dist/documents/residency.d.ts +31 -0
- package/dist/documents/residency.d.ts.map +1 -0
- package/dist/documents/residency.js.map +1 -0
- package/dist/documents/slot.d.ts +109 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +181 -0
- package/dist/documents/slot.js.map +1 -0
- package/dist/documents/transaction.d.ts +143 -0
- package/dist/documents/transaction.d.ts.map +1 -0
- package/dist/documents/transaction.js +442 -0
- package/dist/documents/transaction.js.map +1 -0
- package/dist/host/activity.d.ts +31 -0
- package/dist/host/activity.d.ts.map +1 -0
- package/dist/host/activity.js +40 -0
- package/dist/host/activity.js.map +1 -0
- package/dist/host/adapted.d.ts +49 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/attempt.d.ts +308 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1199 -0
- package/dist/host/attempt.js.map +1 -0
- package/dist/host/backoff.d.ts.map +1 -0
- package/dist/host/backoff.js.map +1 -0
- package/dist/host/ctx.d.ts +94 -0
- package/dist/host/ctx.d.ts.map +1 -0
- package/dist/host/ctx.js +200 -0
- package/dist/host/ctx.js.map +1 -0
- package/dist/host/deadline.d.ts.map +1 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js.map +1 -0
- package/dist/host/destination.d.ts +48 -0
- package/dist/host/destination.d.ts.map +1 -0
- package/dist/host/destination.js.map +1 -0
- package/dist/host/facet.d.ts +84 -0
- package/dist/host/facet.d.ts.map +1 -0
- package/dist/host/facet.js.map +1 -0
- package/dist/host/follow.d.ts +52 -0
- package/dist/host/follow.d.ts.map +1 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/host.d.ts +571 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1318 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +17 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +11 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +9 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/members.d.ts +50 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/native.d.ts +64 -0
- package/dist/host/native.d.ts.map +1 -0
- package/dist/host/native.js +126 -0
- package/dist/host/native.js.map +1 -0
- package/dist/host/object.d.ts +331 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1296 -0
- package/dist/host/object.js.map +1 -0
- package/dist/host/old-work.d.ts +34 -0
- package/dist/host/old-work.d.ts.map +1 -0
- package/dist/host/old-work.js +52 -0
- package/dist/host/old-work.js.map +1 -0
- package/dist/host/parked.d.ts +23 -0
- package/dist/host/parked.d.ts.map +1 -0
- package/dist/host/parked.js.map +1 -0
- package/dist/host/presence.d.ts +34 -0
- package/dist/host/presence.d.ts.map +1 -0
- package/dist/host/presence.js.map +1 -0
- package/dist/host/readiness.d.ts +27 -0
- package/dist/host/readiness.d.ts.map +1 -0
- package/dist/host/readiness.js +134 -0
- package/dist/host/readiness.js.map +1 -0
- package/dist/host/ref-state.d.ts +53 -0
- package/dist/host/ref-state.d.ts.map +1 -0
- package/dist/host/ref-state.js +83 -0
- package/dist/host/ref-state.js.map +1 -0
- package/dist/host/reference-keys.d.ts +36 -0
- package/dist/host/reference-keys.d.ts.map +1 -0
- package/dist/host/reference-keys.js +168 -0
- package/dist/host/reference-keys.js.map +1 -0
- package/dist/host/reference-source.d.ts +65 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +285 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +321 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +797 -0
- package/dist/host/reference.js.map +1 -0
- package/dist/host/reload-cycle.d.ts +16 -0
- package/dist/host/reload-cycle.d.ts.map +1 -0
- package/dist/host/reload-cycle.js +81 -0
- package/dist/host/reload-cycle.js.map +1 -0
- package/dist/host/retry-on.d.ts.map +1 -0
- package/dist/host/retry-on.js.map +1 -0
- package/dist/host/revocation.d.ts +16 -0
- package/dist/host/revocation.d.ts.map +1 -0
- package/dist/host/revocation.js.map +1 -0
- package/dist/host/root.d.ts +37 -0
- package/dist/host/root.d.ts.map +1 -0
- package/dist/host/root.js +68 -0
- package/dist/host/root.js.map +1 -0
- package/dist/host/route.d.ts +64 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +227 -0
- package/dist/host/route.js.map +1 -0
- package/dist/host/routines.d.ts +78 -0
- package/dist/host/routines.d.ts.map +1 -0
- package/dist/host/routines.js +398 -0
- package/dist/host/routines.js.map +1 -0
- package/dist/host/sleep.d.ts +9 -0
- package/dist/host/sleep.d.ts.map +1 -0
- package/dist/host/sleep.js.map +1 -0
- package/dist/host/staging.d.ts +94 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +304 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/unbound-clock.d.ts +23 -0
- package/dist/host/unbound-clock.d.ts.map +1 -0
- package/dist/host/unbound-clock.js +58 -0
- package/dist/host/unbound-clock.js.map +1 -0
- package/dist/host/unbound.d.ts +37 -0
- package/dist/host/unbound.d.ts.map +1 -0
- package/dist/host/unbound.js +88 -0
- package/dist/host/unbound.js.map +1 -0
- package/dist/host/uuid.d.ts.map +1 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +29 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -10
- package/dist/index.js.map +1 -1
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts.map +1 -0
- package/dist/jobs/internal.js.map +1 -0
- package/dist/jobs/job.d.ts +149 -0
- package/dist/jobs/job.d.ts.map +1 -0
- package/dist/jobs/job.js +387 -0
- package/dist/jobs/job.js.map +1 -0
- package/dist/jobs/persisted.d.ts +38 -0
- package/dist/jobs/persisted.d.ts.map +1 -0
- package/dist/jobs/persisted.js.map +1 -0
- package/dist/jobs/records.d.ts +231 -0
- package/dist/jobs/records.d.ts.map +1 -0
- package/dist/jobs/records.js +871 -0
- package/dist/jobs/records.js.map +1 -0
- package/dist/jobs/run-states.d.ts +69 -0
- package/dist/jobs/run-states.d.ts.map +1 -0
- package/dist/jobs/run-states.js +228 -0
- package/dist/jobs/run-states.js.map +1 -0
- package/dist/jobs/run.d.ts +117 -0
- package/dist/jobs/run.d.ts.map +1 -0
- package/dist/jobs/run.js +204 -0
- package/dist/jobs/run.js.map +1 -0
- package/dist/jobs/running.d.ts +44 -0
- package/dist/jobs/running.d.ts.map +1 -0
- package/dist/jobs/running.js.map +1 -0
- package/dist/jobs/stored.d.ts +63 -0
- package/dist/jobs/stored.d.ts.map +1 -0
- package/dist/jobs/stored.js.map +1 -0
- package/dist/link/binary.d.ts.map +1 -0
- package/dist/link/binary.js +544 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +68 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +215 -0
- package/dist/link/channel.js.map +1 -0
- package/dist/link/errors.d.ts.map +1 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/message.d.ts +262 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +156 -0
- package/dist/link/message.js.map +1 -0
- package/dist/link/part.d.ts +80 -0
- package/dist/link/part.d.ts.map +1 -0
- package/dist/link/part.js +165 -0
- package/dist/link/part.js.map +1 -0
- package/dist/link/text.d.ts.map +1 -0
- package/dist/link/text.js +355 -0
- package/dist/link/text.js.map +1 -0
- package/dist/link/values.d.ts.map +1 -0
- package/dist/link/values.js +121 -0
- package/dist/link/values.js.map +1 -0
- package/dist/link/websocket.d.ts.map +1 -0
- package/dist/link/websocket.js.map +1 -0
- package/dist/node/app/app.d.ts +269 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +513 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +37 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +204 -0
- package/dist/node/app/archive.js.map +1 -0
- package/dist/node/app/blobs.d.ts +23 -0
- package/dist/node/app/blobs.d.ts.map +1 -0
- package/dist/node/app/blobs.js +64 -0
- package/dist/node/app/blobs.js.map +1 -0
- package/dist/node/app/data.d.ts +35 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +44 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sessions.d.ts +20 -0
- package/dist/node/app/ephemeral-sessions.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sessions.js +69 -0
- package/dist/node/app/ephemeral-sessions.js.map +1 -0
- package/dist/node/app/ephemeral.d.ts +11 -0
- package/dist/node/app/ephemeral.d.ts.map +1 -0
- package/dist/node/app/ephemeral.js +34 -0
- package/dist/node/app/ephemeral.js.map +1 -0
- package/dist/node/app/files-copy.d.ts +13 -0
- package/dist/node/app/files-copy.d.ts.map +1 -0
- package/dist/node/app/files-copy.js +86 -0
- package/dist/node/app/files-copy.js.map +1 -0
- package/dist/node/app/files-entry.d.ts +4 -0
- package/dist/node/app/files-entry.d.ts.map +1 -0
- package/dist/node/app/files-entry.js +7 -0
- package/dist/node/app/files-entry.js.map +1 -0
- package/dist/node/app/files-index.d.ts +180 -0
- package/dist/node/app/files-index.d.ts.map +1 -0
- package/dist/node/app/files-index.js +535 -0
- package/dist/node/app/files-index.js.map +1 -0
- package/dist/node/app/files.d.ts +363 -0
- package/dist/node/app/files.d.ts.map +1 -0
- package/dist/node/app/files.js +368 -0
- package/dist/node/app/files.js.map +1 -0
- package/dist/node/app/folder-views.d.ts +21 -0
- package/dist/node/app/folder-views.d.ts.map +1 -0
- package/dist/node/app/folder-views.js +55 -0
- package/dist/node/app/folder-views.js.map +1 -0
- package/dist/node/app/index.d.ts +12 -0
- package/dist/node/app/index.d.ts.map +1 -0
- package/dist/node/app/index.js +15 -0
- package/dist/node/app/index.js.map +1 -0
- package/dist/node/app/info.d.ts +66 -0
- package/dist/node/app/info.d.ts.map +1 -0
- package/dist/node/app/info.js +37 -0
- package/dist/node/app/info.js.map +1 -0
- package/dist/node/app/invite.d.ts +5 -0
- package/dist/node/app/invite.d.ts.map +1 -0
- package/dist/node/app/invite.js +64 -0
- package/dist/node/app/invite.js.map +1 -0
- package/dist/node/app/layout.d.ts +36 -0
- package/dist/node/app/layout.d.ts.map +1 -0
- package/dist/node/app/layout.js +87 -0
- package/dist/node/app/layout.js.map +1 -0
- package/dist/node/app/owner.d.ts +31 -0
- package/dist/node/app/owner.d.ts.map +1 -0
- package/dist/node/app/owner.js +104 -0
- package/dist/node/app/owner.js.map +1 -0
- package/dist/node/app/pairing.d.ts +55 -0
- package/dist/node/app/pairing.d.ts.map +1 -0
- package/dist/node/app/pairing.js +183 -0
- package/dist/node/app/pairing.js.map +1 -0
- package/dist/node/app/secrets.d.ts +16 -0
- package/dist/node/app/secrets.d.ts.map +1 -0
- package/dist/node/app/secrets.js +72 -0
- package/dist/node/app/secrets.js.map +1 -0
- package/dist/node/app/sessions.d.ts +72 -0
- package/dist/node/app/sessions.d.ts.map +1 -0
- package/dist/node/app/sessions.js +222 -0
- package/dist/node/app/sessions.js.map +1 -0
- package/dist/node/app/tar.d.ts +24 -0
- package/dist/node/app/tar.d.ts.map +1 -0
- package/dist/node/app/tar.js +167 -0
- package/dist/node/app/tar.js.map +1 -0
- package/dist/node/app/uploads.d.ts +37 -0
- package/dist/node/app/uploads.d.ts.map +1 -0
- package/dist/node/app/uploads.js +157 -0
- package/dist/node/app/uploads.js.map +1 -0
- package/dist/node/app/users.d.ts +37 -0
- package/dist/node/app/users.d.ts.map +1 -0
- package/dist/node/app/users.js +62 -0
- package/dist/node/app/users.js.map +1 -0
- package/dist/node/app/worker.d.ts +18 -0
- package/dist/node/app/worker.d.ts.map +1 -0
- package/dist/node/app/worker.js +84 -0
- package/dist/node/app/worker.js.map +1 -0
- package/dist/node/compression.d.ts +7 -0
- package/dist/node/compression.d.ts.map +1 -0
- package/dist/node/compression.js +25 -0
- package/dist/node/compression.js.map +1 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js.map +1 -0
- package/dist/node/http/authenticate.d.ts +21 -0
- package/dist/node/http/authenticate.d.ts.map +1 -0
- package/dist/node/http/authenticate.js +34 -0
- package/dist/node/http/authenticate.js.map +1 -0
- package/dist/node/http/cookies.d.ts +32 -0
- package/dist/node/http/cookies.d.ts.map +1 -0
- package/dist/node/http/cookies.js +70 -0
- package/dist/node/http/cookies.js.map +1 -0
- package/dist/node/http/file.d.ts.map +1 -0
- package/dist/node/http/file.js.map +1 -0
- package/dist/node/http/headers.d.ts.map +1 -0
- package/dist/node/http/headers.js +136 -0
- package/dist/node/http/headers.js.map +1 -0
- package/dist/node/http/http.d.ts +111 -0
- package/dist/node/http/http.d.ts.map +1 -0
- package/dist/node/http/http.js +524 -0
- package/dist/node/http/http.js.map +1 -0
- package/dist/node/http/incoming.d.ts.map +1 -0
- package/dist/node/http/incoming.js.map +1 -0
- package/dist/node/http/index.d.ts +11 -0
- package/dist/node/http/index.d.ts.map +1 -0
- package/dist/node/http/index.js +12 -0
- package/dist/node/http/index.js.map +1 -0
- package/dist/node/http/node.d.ts.map +1 -0
- package/dist/node/http/node.js.map +1 -0
- package/dist/node/http/request.d.ts +60 -0
- package/dist/node/http/request.d.ts.map +1 -0
- package/dist/node/http/request.js +118 -0
- package/dist/node/http/request.js.map +1 -0
- package/dist/node/http/response.d.ts +63 -0
- package/dist/node/http/response.d.ts.map +1 -0
- package/dist/node/http/response.js.map +1 -0
- package/dist/node/http/router.d.ts +132 -0
- package/dist/node/http/router.d.ts.map +1 -0
- package/dist/node/http/router.js +267 -0
- package/dist/node/http/router.js.map +1 -0
- package/dist/node/http/upgrades.d.ts +61 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +192 -0
- package/dist/node/http/upgrades.js.map +1 -0
- package/dist/node/plugins/base-inputs.d.ts +14 -0
- package/dist/node/plugins/base-inputs.d.ts.map +1 -0
- package/dist/node/plugins/base-inputs.js +33 -0
- package/dist/node/plugins/base-inputs.js.map +1 -0
- package/dist/node/plugins/build.d.ts +77 -0
- package/dist/node/plugins/build.d.ts.map +1 -0
- package/dist/node/plugins/build.js +576 -0
- package/dist/node/plugins/build.js.map +1 -0
- package/dist/node/plugins/css-modules.d.ts +13 -0
- package/dist/node/plugins/css-modules.d.ts.map +1 -0
- package/dist/node/plugins/css-modules.js +58 -0
- package/dist/node/plugins/css-modules.js.map +1 -0
- package/dist/node/plugins/discover.d.ts +67 -0
- package/dist/node/plugins/discover.d.ts.map +1 -0
- package/dist/node/plugins/discover.js +369 -0
- package/dist/node/plugins/discover.js.map +1 -0
- package/dist/node/plugins/evaluate.d.ts +33 -0
- package/dist/node/plugins/evaluate.d.ts.map +1 -0
- package/dist/node/plugins/evaluate.js +121 -0
- package/dist/node/plugins/evaluate.js.map +1 -0
- package/dist/node/plugins/index.d.ts +11 -0
- package/dist/node/plugins/index.d.ts.map +1 -0
- package/dist/node/plugins/index.js +13 -0
- package/dist/node/plugins/index.js.map +1 -0
- package/dist/node/plugins/install.d.ts +38 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +213 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +162 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +244 -0
- package/dist/node/plugins/plugins.js.map +1 -0
- package/dist/node/plugins/runtime.d.ts +57 -0
- package/dist/node/plugins/runtime.d.ts.map +1 -0
- package/dist/node/plugins/runtime.js +92 -0
- package/dist/node/plugins/runtime.js.map +1 -0
- package/dist/node/plugins/stack.d.ts.map +1 -0
- package/dist/node/plugins/stack.js.map +1 -0
- package/dist/node/plugins/testing.d.ts +58 -0
- package/dist/node/plugins/testing.d.ts.map +1 -0
- package/dist/node/plugins/testing.js +210 -0
- package/dist/node/plugins/testing.js.map +1 -0
- package/dist/node/plugins/watcher.d.ts +69 -0
- package/dist/node/plugins/watcher.d.ts.map +1 -0
- package/dist/node/plugins/watcher.js +622 -0
- package/dist/node/plugins/watcher.js.map +1 -0
- package/dist/node/surfaces/bundle.d.ts +31 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +118 -0
- package/dist/node/surfaces/bundle.js.map +1 -0
- package/dist/node/surfaces/current.d.ts +17 -0
- package/dist/node/surfaces/current.d.ts.map +1 -0
- package/dist/node/surfaces/current.js +54 -0
- package/dist/node/surfaces/current.js.map +1 -0
- package/dist/node/surfaces/index.d.ts +6 -0
- package/dist/node/surfaces/index.d.ts.map +1 -0
- package/dist/node/surfaces/index.js +6 -0
- package/dist/node/surfaces/index.js.map +1 -0
- package/dist/node/surfaces/published.d.ts +27 -0
- package/dist/node/surfaces/published.d.ts.map +1 -0
- package/dist/node/surfaces/published.js +142 -0
- package/dist/node/surfaces/published.js.map +1 -0
- package/dist/node/surfaces/served.d.ts +15 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +42 -0
- package/dist/node/surfaces/served.js.map +1 -0
- package/dist/node/surfaces/surface-build.d.ts +53 -0
- package/dist/node/surfaces/surface-build.d.ts.map +1 -0
- package/dist/node/surfaces/surface-build.js +105 -0
- package/dist/node/surfaces/surface-build.js.map +1 -0
- package/dist/node/surfaces/tui.d.ts +40 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +55 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +56 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +108 -0
- package/dist/node/surfaces/web.js.map +1 -0
- package/dist/node/tui/actions.d.ts +49 -0
- package/dist/node/tui/actions.d.ts.map +1 -0
- package/dist/node/tui/actions.js +195 -0
- package/dist/node/tui/actions.js.map +1 -0
- package/dist/node/tui/credentials.d.ts +17 -0
- package/dist/node/tui/credentials.d.ts.map +1 -0
- package/dist/node/tui/credentials.js +54 -0
- package/dist/node/tui/credentials.js.map +1 -0
- package/dist/node/tui/filter.d.ts +5 -0
- package/dist/node/tui/filter.d.ts.map +1 -0
- package/dist/node/tui/filter.js +79 -0
- package/dist/node/tui/filter.js.map +1 -0
- package/dist/node/tui/index.d.ts +6 -0
- package/dist/node/tui/index.d.ts.map +1 -0
- package/dist/node/tui/index.js +6 -0
- package/dist/node/tui/index.js.map +1 -0
- package/dist/node/tui/launcher.d.ts +40 -0
- package/dist/node/tui/launcher.d.ts.map +1 -0
- package/dist/node/tui/launcher.js +439 -0
- package/dist/node/tui/launcher.js.map +1 -0
- package/dist/node/tui/pipe.d.ts +18 -0
- package/dist/node/tui/pipe.d.ts.map +1 -0
- package/dist/node/tui/pipe.js +134 -0
- package/dist/node/tui/pipe.js.map +1 -0
- package/dist/node/tui/sandbox.d.ts +54 -0
- package/dist/node/tui/sandbox.d.ts.map +1 -0
- package/dist/node/tui/sandbox.js +431 -0
- package/dist/node/tui/sandbox.js.map +1 -0
- package/dist/node/workers/base.d.ts +30 -0
- package/dist/node/workers/base.d.ts.map +1 -0
- package/dist/node/workers/base.js +255 -0
- package/dist/node/workers/base.js.map +1 -0
- package/dist/node/workers/child.d.ts +4 -0
- package/dist/node/workers/child.d.ts.map +1 -0
- package/dist/node/workers/child.js +6 -0
- package/dist/node/workers/child.js.map +1 -0
- package/dist/node/workers/control.d.ts +83 -0
- package/dist/node/workers/control.d.ts.map +1 -0
- package/dist/node/workers/control.js +77 -0
- package/dist/node/workers/control.js.map +1 -0
- package/dist/node/workers/index.d.ts +4 -0
- package/dist/node/workers/index.d.ts.map +1 -0
- package/dist/node/workers/index.js +7 -0
- package/dist/node/workers/index.js.map +1 -0
- package/dist/node/workers/lock.d.ts +30 -0
- package/dist/node/workers/lock.d.ts.map +1 -0
- package/dist/node/workers/lock.js +180 -0
- package/dist/node/workers/lock.js.map +1 -0
- package/dist/node/workers/main.d.ts +46 -0
- package/dist/node/workers/main.d.ts.map +1 -0
- package/dist/node/workers/main.js +230 -0
- package/dist/node/workers/main.js.map +1 -0
- package/dist/node/workers/process.d.ts +42 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +125 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +122 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +677 -0
- package/dist/node/workers/workers.js.map +1 -0
- package/dist/react/hooks.d.ts +43 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +82 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +4 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/stores.d.ts +9 -0
- package/dist/react/stores.d.ts.map +1 -0
- package/dist/react/stores.js +37 -0
- package/dist/react/stores.js.map +1 -0
- package/dist/registries/contribution.d.ts.map +1 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts.map +1 -0
- package/dist/registries/internal.js.map +1 -0
- package/dist/registries/record.d.ts +115 -0
- package/dist/registries/record.d.ts.map +1 -0
- package/dist/registries/record.js +283 -0
- package/dist/registries/record.js.map +1 -0
- package/dist/registries/registry.d.ts +74 -0
- package/dist/registries/registry.d.ts.map +1 -0
- package/dist/registries/registry.js.map +1 -0
- package/dist/registries/value.d.ts.map +1 -0
- package/dist/registries/value.js +224 -0
- package/dist/registries/value.js.map +1 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +43 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +350 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +141 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +579 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +77 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +184 -0
- package/dist/remote/host-link.js.map +1 -0
- package/dist/remote/internal.d.ts.map +1 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +89 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +597 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +69 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +219 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +138 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +492 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +59 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +125 -0
- package/dist/remote/replica.js.map +1 -0
- package/dist/sqlite/node.d.ts +9 -1
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/sqlite/node.js +9 -3
- package/dist/sqlite/node.js.map +1 -1
- package/dist/state/batch.d.ts +64 -0
- package/dist/state/batch.d.ts.map +1 -0
- package/dist/state/batch.js +164 -0
- package/dist/state/batch.js.map +1 -0
- package/dist/state/derive.d.ts +52 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +182 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/index.d.ts +6 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js.map +1 -0
- package/dist/state/native-source.d.ts +106 -0
- package/dist/state/native-source.d.ts.map +1 -0
- package/dist/state/native-source.js +240 -0
- package/dist/state/native-source.js.map +1 -0
- package/dist/state/watchable.d.ts +114 -0
- package/dist/state/watchable.d.ts.map +1 -0
- package/dist/state/watchable.js +156 -0
- package/dist/state/watchable.js.map +1 -0
- package/dist/state/writable.d.ts +32 -0
- package/dist/state/writable.d.ts.map +1 -0
- package/dist/state/writable.js.map +1 -0
- package/dist/store/adapter.d.ts +67 -0
- package/dist/store/adapter.d.ts.map +1 -0
- package/dist/store/adapter.js.map +1 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts.map +1 -0
- package/dist/store/applier.js.map +1 -0
- package/dist/store/apply-batch.d.ts +12 -0
- package/dist/store/apply-batch.d.ts.map +1 -0
- package/dist/store/apply-batch.js.map +1 -0
- package/dist/store/archive.d.ts +32 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +130 -0
- package/dist/store/archive.js.map +1 -0
- package/dist/store/backend.d.ts +10 -0
- package/dist/store/backend.d.ts.map +1 -0
- package/dist/store/backend.js.map +1 -0
- package/dist/store/catalog.d.ts +24 -0
- package/dist/store/catalog.d.ts.map +1 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +176 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +283 -0
- package/dist/store/engine.js.map +1 -0
- package/dist/store/evaluate.d.ts +17 -0
- package/dist/store/evaluate.d.ts.map +1 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +17 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +200 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +150 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/import.d.ts +10 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +276 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/json-column.d.ts +33 -0
- package/dist/store/json-column.d.ts.map +1 -0
- package/dist/store/json-column.js +62 -0
- package/dist/store/json-column.js.map +1 -0
- package/dist/store/jsonl.d.ts.map +1 -0
- package/dist/store/jsonl.js.map +1 -0
- package/dist/store/live-query.d.ts +108 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +254 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/outbox.d.ts +26 -0
- package/dist/store/outbox.d.ts.map +1 -0
- package/dist/store/outbox.js.map +1 -0
- package/dist/store/query.d.ts +39 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/refusal.d.ts.map +1 -0
- package/dist/store/refusal.js.map +1 -0
- package/dist/store/rows.d.ts +80 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js.map +1 -0
- package/dist/store/schema.d.ts +25 -0
- package/dist/store/schema.d.ts.map +1 -0
- package/dist/store/schema.js +115 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/sql.d.ts +73 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +50 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +52 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +171 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +818 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +29 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +73 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +101 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +16 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +202 -0
- package/dist/store/table-migration.js.map +1 -0
- package/dist/store/table-writes.d.ts.map +1 -0
- package/dist/store/table-writes.js +170 -0
- package/dist/store/table-writes.js.map +1 -0
- package/dist/store/table.d.ts +80 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js.map +1 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js.map +1 -0
- package/dist/surfaces/active-language.d.ts +20 -0
- package/dist/surfaces/active-language.d.ts.map +1 -0
- package/dist/surfaces/active-language.js +78 -0
- package/dist/surfaces/active-language.js.map +1 -0
- package/dist/surfaces/active-theme.d.ts +16 -0
- package/dist/surfaces/active-theme.d.ts.map +1 -0
- package/dist/surfaces/active-theme.js +47 -0
- package/dist/surfaces/active-theme.js.map +1 -0
- package/dist/surfaces/client.d.ts +96 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +264 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +49 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +142 -0
- package/dist/surfaces/connection.js.map +1 -0
- package/dist/surfaces/format.d.ts +5 -0
- package/dist/surfaces/format.d.ts.map +1 -0
- package/dist/surfaces/format.js +37 -0
- package/dist/surfaces/format.js.map +1 -0
- package/dist/surfaces/index.d.ts +15 -0
- package/dist/surfaces/index.d.ts.map +1 -0
- package/dist/surfaces/index.js +18 -0
- package/dist/surfaces/index.js.map +1 -0
- package/dist/surfaces/language.d.ts +53 -0
- package/dist/surfaces/language.d.ts.map +1 -0
- package/dist/surfaces/language.js +74 -0
- package/dist/surfaces/language.js.map +1 -0
- package/dist/surfaces/loaded.d.ts +42 -0
- package/dist/surfaces/loaded.d.ts.map +1 -0
- package/dist/surfaces/loaded.js +116 -0
- package/dist/surfaces/loaded.js.map +1 -0
- package/dist/surfaces/locale-choice.d.ts +25 -0
- package/dist/surfaces/locale-choice.d.ts.map +1 -0
- package/dist/surfaces/locale-choice.js +14 -0
- package/dist/surfaces/locale-choice.js.map +1 -0
- package/dist/surfaces/messages.d.ts +67 -0
- package/dist/surfaces/messages.d.ts.map +1 -0
- package/dist/surfaces/messages.js +112 -0
- package/dist/surfaces/messages.js.map +1 -0
- package/dist/surfaces/page-state.d.ts +14 -0
- package/dist/surfaces/page-state.d.ts.map +1 -0
- package/dist/surfaces/page-state.js +43 -0
- package/dist/surfaces/page-state.js.map +1 -0
- package/dist/surfaces/preference.d.ts +32 -0
- package/dist/surfaces/preference.d.ts.map +1 -0
- package/dist/surfaces/preference.js +72 -0
- package/dist/surfaces/preference.js.map +1 -0
- package/dist/surfaces/registered.d.ts +33 -0
- package/dist/surfaces/registered.d.ts.map +1 -0
- package/dist/surfaces/registered.js +51 -0
- package/dist/surfaces/registered.js.map +1 -0
- package/dist/surfaces/scripts.d.ts +84 -0
- package/dist/surfaces/scripts.d.ts.map +1 -0
- package/dist/surfaces/scripts.js +28 -0
- package/dist/surfaces/scripts.js.map +1 -0
- package/dist/surfaces/theme-choice.d.ts +31 -0
- package/dist/surfaces/theme-choice.d.ts.map +1 -0
- package/dist/surfaces/theme-choice.js +18 -0
- package/dist/surfaces/theme-choice.js.map +1 -0
- package/dist/surfaces/themes.d.ts +43 -0
- package/dist/surfaces/themes.d.ts.map +1 -0
- package/dist/surfaces/themes.js +110 -0
- package/dist/surfaces/themes.js.map +1 -0
- package/dist/surfaces/translations.d.ts +29 -0
- package/dist/surfaces/translations.d.ts.map +1 -0
- package/dist/surfaces/translations.js +57 -0
- package/dist/surfaces/translations.js.map +1 -0
- package/dist/sync/batch.d.ts +18 -0
- package/dist/sync/batch.d.ts.map +1 -0
- package/dist/sync/batch.js +125 -0
- package/dist/sync/batch.js.map +1 -0
- package/dist/sync/client.d.ts +166 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +438 -0
- package/dist/sync/client.js.map +1 -0
- package/dist/sync/files.d.ts +46 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +13 -0
- package/dist/sync/files.js.map +1 -0
- package/dist/sync/filesystem.d.ts +37 -0
- package/dist/sync/filesystem.d.ts.map +1 -0
- package/dist/sync/filesystem.js +185 -0
- package/dist/sync/filesystem.js.map +1 -0
- package/dist/sync/index.d.ts +8 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/lines.d.ts +18 -0
- package/dist/sync/lines.d.ts.map +1 -0
- package/dist/sync/lines.js +46 -0
- package/dist/sync/lines.js.map +1 -0
- package/dist/sync/remote.d.ts +130 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +46 -0
- package/dist/sync/remote.js.map +1 -0
- package/dist/sync/state.d.ts +17 -0
- package/dist/sync/state.d.ts.map +1 -0
- package/dist/sync/state.js +40 -0
- package/dist/sync/state.js.map +1 -0
- package/dist/telemetry-ingest/batch.d.ts +70 -0
- package/dist/telemetry-ingest/batch.d.ts.map +1 -0
- package/dist/telemetry-ingest/batch.js +110 -0
- package/dist/telemetry-ingest/batch.js.map +1 -0
- package/dist/telemetry-ingest/facet.d.ts +21 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +96 -0
- package/dist/telemetry-ingest/facet.js.map +1 -0
- package/dist/telemetry-ingest/index.d.ts +5 -0
- package/dist/telemetry-ingest/index.d.ts.map +1 -0
- package/dist/telemetry-ingest/index.js +8 -0
- package/dist/telemetry-ingest/index.js.map +1 -0
- package/dist/telemetry-ingest/recorder.d.ts +50 -0
- package/dist/telemetry-ingest/recorder.d.ts.map +1 -0
- package/dist/telemetry-ingest/recorder.js +298 -0
- package/dist/telemetry-ingest/recorder.js.map +1 -0
- package/dist/telemetry-ingest/sender.d.ts +14 -0
- package/dist/telemetry-ingest/sender.d.ts.map +1 -0
- package/dist/telemetry-ingest/sender.js +64 -0
- package/dist/telemetry-ingest/sender.js.map +1 -0
- package/dist/telemetry-sqlite/index.d.ts +13 -4
- package/dist/telemetry-sqlite/index.d.ts.map +1 -1
- package/dist/telemetry-sqlite/index.js +81 -241
- package/dist/telemetry-sqlite/index.js.map +1 -1
- package/dist/telemetry-sqlite/node.d.ts +13 -0
- package/dist/telemetry-sqlite/node.d.ts.map +1 -0
- package/dist/telemetry-sqlite/node.js +27 -0
- package/dist/telemetry-sqlite/node.js.map +1 -0
- package/dist/telemetry-sqlite/schema.d.ts +9 -0
- package/dist/telemetry-sqlite/schema.d.ts.map +1 -0
- package/dist/telemetry-sqlite/schema.js +61 -0
- package/dist/telemetry-sqlite/schema.js.map +1 -0
- package/dist/telemetry-sqlite/store.d.ts +3 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -1
- package/dist/telemetry-sqlite/store.js +24 -13
- package/dist/telemetry-sqlite/store.js.map +1 -1
- package/dist/telemetry.d.ts +937 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +470 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/tui/bridge.d.ts +112 -0
- package/dist/tui/bridge.d.ts.map +1 -0
- package/dist/tui/bridge.js +9 -0
- package/dist/tui/bridge.js.map +1 -0
- package/dist/tui/channel.d.ts +44 -0
- package/dist/tui/channel.d.ts.map +1 -0
- package/dist/tui/channel.js +150 -0
- package/dist/tui/channel.js.map +1 -0
- package/dist/tui/frames.d.ts +5 -0
- package/dist/tui/frames.d.ts.map +1 -0
- package/dist/tui/frames.js +52 -0
- package/dist/tui/frames.js.map +1 -0
- package/dist/tui/index.d.ts +7 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +8 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/runtime.d.ts +46 -0
- package/dist/tui/runtime.d.ts.map +1 -0
- package/dist/tui/runtime.js +101 -0
- package/dist/tui/runtime.js.map +1 -0
- package/dist/tui/scope.d.ts +46 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +141 -0
- package/dist/tui/scope.js.map +1 -0
- package/dist/tui/terminal.d.ts +15 -0
- package/dist/tui/terminal.d.ts.map +1 -0
- package/dist/tui/terminal.js +37 -0
- package/dist/tui/terminal.js.map +1 -0
- package/dist/tui/theme.d.ts +17 -0
- package/dist/tui/theme.d.ts.map +1 -0
- package/dist/tui/theme.js +38 -0
- package/dist/tui/theme.js.map +1 -0
- package/dist/web/environment.d.ts +4 -0
- package/dist/web/environment.d.ts.map +1 -0
- package/dist/web/environment.js +37 -0
- package/dist/web/environment.js.map +1 -0
- package/dist/web/index.d.ts +5 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +7 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/language.d.ts +7 -0
- package/dist/web/language.d.ts.map +1 -0
- package/dist/web/language.js +21 -0
- package/dist/web/language.js.map +1 -0
- package/dist/web/page.d.ts +29 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +92 -0
- package/dist/web/page.js.map +1 -0
- package/dist/web/scripts.d.ts +23 -0
- package/dist/web/scripts.d.ts.map +1 -0
- package/dist/web/scripts.js +50 -0
- package/dist/web/scripts.js.map +1 -0
- package/dist/web/styles.d.ts +17 -0
- package/dist/web/styles.d.ts.map +1 -0
- package/dist/web/styles.js +218 -0
- package/dist/web/styles.js.map +1 -0
- package/dist/web/themes.d.ts +6 -0
- package/dist/web/themes.d.ts.map +1 -0
- package/dist/web/themes.js +31 -0
- package/dist/web/themes.js.map +1 -0
- package/docs/benchmarks.md +1036 -0
- package/docs/decisions.md +3436 -0
- package/docs/dependencies/book.md +1671 -0
- package/docs/dependencies/index.html +2641 -0
- package/docs/design.md +3065 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/guide-plugins-hosts/book.md +957 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/http-workers/book.md +378 -0
- package/docs/http-workers/index.html +515 -0
- package/docs/i18n/book.md +217 -0
- package/docs/i18n/index.html +344 -0
- package/docs/layer-1.md +311 -0
- package/docs/layer-2.md +216 -0
- package/docs/p3-features/README.md +6 -0
- package/docs/p3-features/book.md +478 -0
- package/docs/plugin-authoring.md +276 -0
- package/docs/plugin-model/book.md +186 -0
- package/docs/plugin-model/index.html +310 -0
- package/docs/plugin-primer/book.md +273 -0
- package/docs/plugin-primer/index.html +430 -0
- package/docs/slice-1.md +236 -0
- package/docs/slice-10.md +288 -0
- package/docs/slice-11.md +114 -0
- package/docs/slice-12.md +132 -0
- package/docs/slice-13.md +121 -0
- package/docs/slice-2.md +174 -0
- package/docs/slice-3a.md +296 -0
- package/docs/slice-3b.md +197 -0
- package/docs/slice-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -0
- package/docs/slice-7b/book.md +608 -0
- package/docs/slice-7b/index.html +842 -0
- package/docs/slice-7b.md +255 -0
- package/docs/slice-7c.md +165 -0
- package/docs/slice-9.md +110 -0
- package/docs/slices.md +241 -0
- package/docs/store/book.md +670 -0
- package/docs/store/index.html +861 -0
- package/docs/store/walkthrough.md +193 -0
- package/docs/theming/book.md +223 -0
- package/docs/theming/index.html +371 -0
- package/docs/tutorial/book.md +2169 -0
- package/docs/tutorial/index.html +2112 -0
- package/docs/tutorial/screens/click-after.png +0 -0
- package/docs/tutorial/screens/click-before.png +0 -0
- package/docs/tutorial/screens/edited.png +0 -0
- package/docs/tutorial/screens/french.png +0 -0
- package/docs/tutorial/screens/harbor.png +0 -0
- package/docs/tutorial/screens/page.png +0 -0
- package/docs/tutorial/screens/traces-ada.png +0 -0
- package/docs/tutorial/screens/traces.png +0 -0
- package/package.json +99 -21
- package/dist/cell.d.ts +0 -122
- package/dist/cell.d.ts.map +0 -1
- package/dist/cell.js +0 -356
- package/dist/cell.js.map +0 -1
- package/dist/cluster.d.ts +0 -27
- package/dist/cluster.d.ts.map +0 -1
- package/dist/cluster.js +0 -230
- package/dist/cluster.js.map +0 -1
- package/dist/connection.d.ts +0 -270
- package/dist/connection.d.ts.map +0 -1
- package/dist/connection.js +0 -1216
- package/dist/connection.js.map +0 -1
- package/dist/contract.d.ts +0 -207
- package/dist/contract.d.ts.map +0 -1
- package/dist/contract.js +0 -241
- package/dist/contract.js.map +0 -1
- package/dist/declare.d.ts +0 -33
- package/dist/declare.d.ts.map +0 -1
- package/dist/declare.js +0 -2
- package/dist/declare.js.map +0 -1
- package/dist/errors.d.ts +0 -28
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -59
- package/dist/errors.js.map +0 -1
- package/dist/host.d.ts +0 -348
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -1002
- package/dist/host.js.map +0 -1
- package/dist/link.d.ts +0 -107
- package/dist/link.d.ts.map +0 -1
- package/dist/link.js +0 -355
- package/dist/link.js.map +0 -1
- package/dist/loader.d.ts +0 -4
- package/dist/loader.d.ts.map +0 -1
- package/dist/loader.js +0 -73
- package/dist/loader.js.map +0 -1
- package/dist/manager.d.ts +0 -115
- package/dist/manager.d.ts.map +0 -1
- package/dist/manager.js +0 -345
- package/dist/manager.js.map +0 -1
- package/dist/next/contracts/accepts.d.ts +0 -81
- package/dist/next/contracts/accepts.d.ts.map +0 -1
- package/dist/next/contracts/accepts.js.map +0 -1
- package/dist/next/contracts/contract.d.ts +0 -121
- package/dist/next/contracts/contract.d.ts.map +0 -1
- package/dist/next/contracts/contract.js.map +0 -1
- package/dist/next/contracts/declare.d.ts.map +0 -1
- package/dist/next/contracts/declare.js.map +0 -1
- package/dist/next/contracts/evolve.d.ts.map +0 -1
- package/dist/next/contracts/evolve.js.map +0 -1
- package/dist/next/contracts/fingerprint.d.ts +0 -16
- package/dist/next/contracts/fingerprint.d.ts.map +0 -1
- package/dist/next/contracts/fingerprint.js.map +0 -1
- package/dist/next/contracts/history.d.ts.map +0 -1
- package/dist/next/contracts/history.js.map +0 -1
- package/dist/next/contracts/host-kind.d.ts.map +0 -1
- package/dist/next/contracts/host-kind.js.map +0 -1
- package/dist/next/contracts/index.d.ts.map +0 -1
- package/dist/next/contracts/index.js.map +0 -1
- package/dist/next/contracts/internal.d.ts.map +0 -1
- package/dist/next/contracts/internal.js.map +0 -1
- package/dist/next/contracts/names.d.ts.map +0 -1
- package/dist/next/contracts/names.js.map +0 -1
- package/dist/next/contracts/params.d.ts +0 -28
- package/dist/next/contracts/params.d.ts.map +0 -1
- package/dist/next/contracts/params.js.map +0 -1
- package/dist/next/contracts/schema.d.ts.map +0 -1
- package/dist/next/contracts/schema.js.map +0 -1
- package/dist/next/contracts/snapshot.d.ts +0 -16
- package/dist/next/contracts/snapshot.d.ts.map +0 -1
- package/dist/next/contracts/snapshot.js +0 -167
- package/dist/next/contracts/snapshot.js.map +0 -1
- package/dist/next/data/args.d.ts +0 -50
- package/dist/next/data/args.d.ts.map +0 -1
- package/dist/next/data/args.js.map +0 -1
- package/dist/next/data/errors.d.ts +0 -73
- package/dist/next/data/errors.d.ts.map +0 -1
- package/dist/next/data/errors.js +0 -107
- package/dist/next/data/errors.js.map +0 -1
- package/dist/next/data/failure.d.ts.map +0 -1
- package/dist/next/data/failure.js +0 -72
- package/dist/next/data/failure.js.map +0 -1
- package/dist/next/data/index.d.ts +0 -4
- package/dist/next/data/index.d.ts.map +0 -1
- package/dist/next/data/index.js +0 -4
- package/dist/next/data/index.js.map +0 -1
- package/dist/next/data/internal.d.ts +0 -7
- package/dist/next/data/internal.d.ts.map +0 -1
- package/dist/next/data/internal.js +0 -8
- package/dist/next/data/internal.js.map +0 -1
- package/dist/next/data/params.d.ts +0 -20
- package/dist/next/data/params.d.ts.map +0 -1
- package/dist/next/data/params.js.map +0 -1
- package/dist/next/data/principal.d.ts +0 -17
- package/dist/next/data/principal.d.ts.map +0 -1
- package/dist/next/data/principal.js +0 -41
- package/dist/next/data/principal.js.map +0 -1
- package/dist/next/data/validator.d.ts +0 -12
- package/dist/next/data/validator.d.ts.map +0 -1
- package/dist/next/data/validator.js +0 -34
- package/dist/next/data/validator.js.map +0 -1
- package/dist/next/documents/address-source.d.ts +0 -20
- package/dist/next/documents/address-source.d.ts.map +0 -1
- package/dist/next/documents/address-source.js.map +0 -1
- package/dist/next/documents/definition.d.ts +0 -84
- package/dist/next/documents/definition.d.ts.map +0 -1
- package/dist/next/documents/definition.js +0 -73
- package/dist/next/documents/definition.js.map +0 -1
- package/dist/next/documents/documents.d.ts +0 -106
- package/dist/next/documents/documents.d.ts.map +0 -1
- package/dist/next/documents/documents.js +0 -224
- package/dist/next/documents/documents.js.map +0 -1
- package/dist/next/documents/fence.d.ts.map +0 -1
- package/dist/next/documents/fence.js.map +0 -1
- package/dist/next/documents/handles.d.ts +0 -76
- package/dist/next/documents/handles.d.ts.map +0 -1
- package/dist/next/documents/handles.js.map +0 -1
- package/dist/next/documents/index.d.ts.map +0 -1
- package/dist/next/documents/index.js.map +0 -1
- package/dist/next/documents/internal.d.ts +0 -9
- package/dist/next/documents/internal.d.ts.map +0 -1
- package/dist/next/documents/internal.js.map +0 -1
- package/dist/next/documents/keyed-slot.d.ts +0 -103
- package/dist/next/documents/keyed-slot.d.ts.map +0 -1
- package/dist/next/documents/keyed-slot.js +0 -395
- package/dist/next/documents/keyed-slot.js.map +0 -1
- package/dist/next/documents/line.d.ts.map +0 -1
- package/dist/next/documents/line.js.map +0 -1
- package/dist/next/documents/persistence.d.ts +0 -104
- package/dist/next/documents/persistence.d.ts.map +0 -1
- package/dist/next/documents/persistence.js +0 -128
- package/dist/next/documents/persistence.js.map +0 -1
- package/dist/next/documents/residency.d.ts +0 -31
- package/dist/next/documents/residency.d.ts.map +0 -1
- package/dist/next/documents/residency.js.map +0 -1
- package/dist/next/documents/slot.d.ts +0 -109
- package/dist/next/documents/slot.d.ts.map +0 -1
- package/dist/next/documents/slot.js +0 -181
- package/dist/next/documents/slot.js.map +0 -1
- package/dist/next/documents/transaction.d.ts +0 -133
- package/dist/next/documents/transaction.d.ts.map +0 -1
- package/dist/next/documents/transaction.js +0 -409
- package/dist/next/documents/transaction.js.map +0 -1
- package/dist/next/host/activity.d.ts +0 -31
- package/dist/next/host/activity.d.ts.map +0 -1
- package/dist/next/host/activity.js +0 -40
- package/dist/next/host/activity.js.map +0 -1
- package/dist/next/host/adapted.d.ts +0 -49
- package/dist/next/host/adapted.d.ts.map +0 -1
- package/dist/next/host/adapted.js.map +0 -1
- package/dist/next/host/attempt.d.ts +0 -278
- package/dist/next/host/attempt.d.ts.map +0 -1
- package/dist/next/host/attempt.js +0 -1072
- package/dist/next/host/attempt.js.map +0 -1
- package/dist/next/host/backoff.d.ts.map +0 -1
- package/dist/next/host/backoff.js.map +0 -1
- package/dist/next/host/ctx.d.ts +0 -47
- package/dist/next/host/ctx.d.ts.map +0 -1
- package/dist/next/host/ctx.js +0 -108
- package/dist/next/host/ctx.js.map +0 -1
- package/dist/next/host/deadline.d.ts.map +0 -1
- package/dist/next/host/deadline.js.map +0 -1
- package/dist/next/host/dependencies.d.ts.map +0 -1
- package/dist/next/host/dependencies.js.map +0 -1
- package/dist/next/host/destination.d.ts +0 -48
- package/dist/next/host/destination.d.ts.map +0 -1
- package/dist/next/host/destination.js.map +0 -1
- package/dist/next/host/facet.d.ts +0 -79
- package/dist/next/host/facet.d.ts.map +0 -1
- package/dist/next/host/facet.js.map +0 -1
- package/dist/next/host/follow.d.ts +0 -52
- package/dist/next/host/follow.d.ts.map +0 -1
- package/dist/next/host/follow.js.map +0 -1
- package/dist/next/host/host.d.ts +0 -495
- package/dist/next/host/host.d.ts.map +0 -1
- package/dist/next/host/host.js +0 -1075
- package/dist/next/host/host.js.map +0 -1
- package/dist/next/host/index.d.ts +0 -17
- package/dist/next/host/index.d.ts.map +0 -1
- package/dist/next/host/index.js.map +0 -1
- package/dist/next/host/internal.d.ts +0 -10
- package/dist/next/host/internal.d.ts.map +0 -1
- package/dist/next/host/internal.js +0 -8
- package/dist/next/host/internal.js.map +0 -1
- package/dist/next/host/members.d.ts +0 -50
- package/dist/next/host/members.d.ts.map +0 -1
- package/dist/next/host/members.js.map +0 -1
- package/dist/next/host/native.d.ts +0 -55
- package/dist/next/host/native.d.ts.map +0 -1
- package/dist/next/host/native.js +0 -92
- package/dist/next/host/native.js.map +0 -1
- package/dist/next/host/object.d.ts +0 -290
- package/dist/next/host/object.d.ts.map +0 -1
- package/dist/next/host/object.js +0 -1127
- package/dist/next/host/object.js.map +0 -1
- package/dist/next/host/parked.d.ts +0 -23
- package/dist/next/host/parked.d.ts.map +0 -1
- package/dist/next/host/parked.js.map +0 -1
- package/dist/next/host/presence.d.ts +0 -34
- package/dist/next/host/presence.d.ts.map +0 -1
- package/dist/next/host/presence.js.map +0 -1
- package/dist/next/host/ref-state.d.ts +0 -53
- package/dist/next/host/ref-state.d.ts.map +0 -1
- package/dist/next/host/ref-state.js +0 -83
- package/dist/next/host/ref-state.js.map +0 -1
- package/dist/next/host/reference-keys.d.ts +0 -36
- package/dist/next/host/reference-keys.d.ts.map +0 -1
- package/dist/next/host/reference-keys.js +0 -168
- package/dist/next/host/reference-keys.js.map +0 -1
- package/dist/next/host/reference-source.d.ts +0 -65
- package/dist/next/host/reference-source.d.ts.map +0 -1
- package/dist/next/host/reference-source.js +0 -285
- package/dist/next/host/reference-source.js.map +0 -1
- package/dist/next/host/reference.d.ts +0 -308
- package/dist/next/host/reference.d.ts.map +0 -1
- package/dist/next/host/reference.js +0 -775
- package/dist/next/host/reference.js.map +0 -1
- package/dist/next/host/retry-on.d.ts.map +0 -1
- package/dist/next/host/retry-on.js.map +0 -1
- package/dist/next/host/revocation.d.ts +0 -16
- package/dist/next/host/revocation.d.ts.map +0 -1
- package/dist/next/host/revocation.js.map +0 -1
- package/dist/next/host/root.d.ts +0 -27
- package/dist/next/host/root.d.ts.map +0 -1
- package/dist/next/host/root.js +0 -68
- package/dist/next/host/root.js.map +0 -1
- package/dist/next/host/route.d.ts +0 -64
- package/dist/next/host/route.d.ts.map +0 -1
- package/dist/next/host/route.js +0 -190
- package/dist/next/host/route.js.map +0 -1
- package/dist/next/host/routines.d.ts +0 -76
- package/dist/next/host/routines.d.ts.map +0 -1
- package/dist/next/host/routines.js +0 -350
- package/dist/next/host/routines.js.map +0 -1
- package/dist/next/host/sleep.d.ts +0 -9
- package/dist/next/host/sleep.d.ts.map +0 -1
- package/dist/next/host/sleep.js.map +0 -1
- package/dist/next/host/staging.d.ts +0 -94
- package/dist/next/host/staging.d.ts.map +0 -1
- package/dist/next/host/staging.js +0 -302
- package/dist/next/host/staging.js.map +0 -1
- package/dist/next/host/unbound.d.ts +0 -30
- package/dist/next/host/unbound.d.ts.map +0 -1
- package/dist/next/host/unbound.js +0 -67
- package/dist/next/host/unbound.js.map +0 -1
- package/dist/next/host/uuid.d.ts.map +0 -1
- package/dist/next/host/uuid.js.map +0 -1
- package/dist/next/index.d.ts +0 -28
- package/dist/next/index.d.ts.map +0 -1
- package/dist/next/index.js +0 -18
- package/dist/next/index.js.map +0 -1
- package/dist/next/jobs/definition.d.ts.map +0 -1
- package/dist/next/jobs/definition.js.map +0 -1
- package/dist/next/jobs/index.d.ts.map +0 -1
- package/dist/next/jobs/index.js.map +0 -1
- package/dist/next/jobs/internal.d.ts.map +0 -1
- package/dist/next/jobs/internal.js.map +0 -1
- package/dist/next/jobs/job.d.ts +0 -152
- package/dist/next/jobs/job.d.ts.map +0 -1
- package/dist/next/jobs/job.js +0 -320
- package/dist/next/jobs/job.js.map +0 -1
- package/dist/next/jobs/persisted.d.ts +0 -38
- package/dist/next/jobs/persisted.d.ts.map +0 -1
- package/dist/next/jobs/persisted.js.map +0 -1
- package/dist/next/jobs/records.d.ts +0 -231
- package/dist/next/jobs/records.d.ts.map +0 -1
- package/dist/next/jobs/records.js +0 -869
- package/dist/next/jobs/records.js.map +0 -1
- package/dist/next/jobs/run-states.d.ts +0 -69
- package/dist/next/jobs/run-states.d.ts.map +0 -1
- package/dist/next/jobs/run-states.js +0 -228
- package/dist/next/jobs/run-states.js.map +0 -1
- package/dist/next/jobs/run.d.ts +0 -113
- package/dist/next/jobs/run.d.ts.map +0 -1
- package/dist/next/jobs/run.js +0 -200
- package/dist/next/jobs/run.js.map +0 -1
- package/dist/next/jobs/running.d.ts +0 -44
- package/dist/next/jobs/running.d.ts.map +0 -1
- package/dist/next/jobs/running.js.map +0 -1
- package/dist/next/jobs/stored.d.ts +0 -63
- package/dist/next/jobs/stored.d.ts.map +0 -1
- package/dist/next/jobs/stored.js.map +0 -1
- package/dist/next/link/binary.d.ts.map +0 -1
- package/dist/next/link/binary.js +0 -534
- package/dist/next/link/binary.js.map +0 -1
- package/dist/next/link/channel.d.ts +0 -63
- package/dist/next/link/channel.d.ts.map +0 -1
- package/dist/next/link/channel.js +0 -202
- package/dist/next/link/channel.js.map +0 -1
- package/dist/next/link/errors.d.ts.map +0 -1
- package/dist/next/link/errors.js.map +0 -1
- package/dist/next/link/index.d.ts.map +0 -1
- package/dist/next/link/index.js.map +0 -1
- package/dist/next/link/internal.d.ts.map +0 -1
- package/dist/next/link/internal.js.map +0 -1
- package/dist/next/link/ipc.d.ts.map +0 -1
- package/dist/next/link/ipc.js.map +0 -1
- package/dist/next/link/link.d.ts.map +0 -1
- package/dist/next/link/link.js.map +0 -1
- package/dist/next/link/message.d.ts +0 -249
- package/dist/next/link/message.d.ts.map +0 -1
- package/dist/next/link/message.js +0 -123
- package/dist/next/link/message.js.map +0 -1
- package/dist/next/link/part.d.ts +0 -80
- package/dist/next/link/part.d.ts.map +0 -1
- package/dist/next/link/part.js +0 -164
- package/dist/next/link/part.js.map +0 -1
- package/dist/next/link/text.d.ts.map +0 -1
- package/dist/next/link/text.js +0 -335
- package/dist/next/link/text.js.map +0 -1
- package/dist/next/link/values.d.ts.map +0 -1
- package/dist/next/link/values.js +0 -117
- package/dist/next/link/values.js.map +0 -1
- package/dist/next/link/websocket.d.ts.map +0 -1
- package/dist/next/link/websocket.js.map +0 -1
- package/dist/next/registries/contribution.d.ts.map +0 -1
- package/dist/next/registries/contribution.js.map +0 -1
- package/dist/next/registries/entries.d.ts.map +0 -1
- package/dist/next/registries/entries.js.map +0 -1
- package/dist/next/registries/index.d.ts.map +0 -1
- package/dist/next/registries/index.js.map +0 -1
- package/dist/next/registries/internal.d.ts.map +0 -1
- package/dist/next/registries/internal.js.map +0 -1
- package/dist/next/registries/record.d.ts +0 -94
- package/dist/next/registries/record.d.ts.map +0 -1
- package/dist/next/registries/record.js +0 -253
- package/dist/next/registries/record.js.map +0 -1
- package/dist/next/registries/registry.d.ts +0 -74
- package/dist/next/registries/registry.d.ts.map +0 -1
- package/dist/next/registries/registry.js.map +0 -1
- package/dist/next/registries/value.d.ts.map +0 -1
- package/dist/next/registries/value.js +0 -199
- package/dist/next/registries/value.js.map +0 -1
- package/dist/next/remote/calls.d.ts.map +0 -1
- package/dist/next/remote/calls.js.map +0 -1
- package/dist/next/remote/consumer.d.ts +0 -42
- package/dist/next/remote/consumer.d.ts.map +0 -1
- package/dist/next/remote/consumer.js +0 -343
- package/dist/next/remote/consumer.js.map +0 -1
- package/dist/next/remote/hold.d.ts +0 -130
- package/dist/next/remote/hold.d.ts.map +0 -1
- package/dist/next/remote/hold.js +0 -537
- package/dist/next/remote/hold.js.map +0 -1
- package/dist/next/remote/host-link.d.ts +0 -77
- package/dist/next/remote/host-link.d.ts.map +0 -1
- package/dist/next/remote/host-link.js +0 -182
- package/dist/next/remote/host-link.js.map +0 -1
- package/dist/next/remote/internal.d.ts.map +0 -1
- package/dist/next/remote/internal.js.map +0 -1
- package/dist/next/remote/path.d.ts.map +0 -1
- package/dist/next/remote/path.js.map +0 -1
- package/dist/next/remote/provider.d.ts +0 -76
- package/dist/next/remote/provider.d.ts.map +0 -1
- package/dist/next/remote/provider.js +0 -506
- package/dist/next/remote/provider.js.map +0 -1
- package/dist/next/remote/relay.d.ts +0 -58
- package/dist/next/remote/relay.d.ts.map +0 -1
- package/dist/next/remote/relay.js +0 -117
- package/dist/next/remote/relay.js.map +0 -1
- package/dist/next/remote/remote-object.d.ts +0 -133
- package/dist/next/remote/remote-object.d.ts.map +0 -1
- package/dist/next/remote/remote-object.js +0 -411
- package/dist/next/remote/remote-object.js.map +0 -1
- package/dist/next/remote/replica.d.ts +0 -59
- package/dist/next/remote/replica.d.ts.map +0 -1
- package/dist/next/remote/replica.js +0 -125
- package/dist/next/remote/replica.js.map +0 -1
- package/dist/next/state/batch.d.ts +0 -64
- package/dist/next/state/batch.d.ts.map +0 -1
- package/dist/next/state/batch.js +0 -163
- package/dist/next/state/batch.js.map +0 -1
- package/dist/next/state/derive.d.ts +0 -52
- package/dist/next/state/derive.d.ts.map +0 -1
- package/dist/next/state/derive.js +0 -182
- package/dist/next/state/derive.js.map +0 -1
- package/dist/next/state/index.d.ts +0 -6
- package/dist/next/state/index.d.ts.map +0 -1
- package/dist/next/state/index.js.map +0 -1
- package/dist/next/state/internal.d.ts.map +0 -1
- package/dist/next/state/internal.js.map +0 -1
- package/dist/next/state/native-source.d.ts +0 -106
- package/dist/next/state/native-source.d.ts.map +0 -1
- package/dist/next/state/native-source.js +0 -240
- package/dist/next/state/native-source.js.map +0 -1
- package/dist/next/state/watchable.d.ts +0 -114
- package/dist/next/state/watchable.d.ts.map +0 -1
- package/dist/next/state/watchable.js +0 -156
- package/dist/next/state/watchable.js.map +0 -1
- package/dist/next/state/writable.d.ts +0 -32
- package/dist/next/state/writable.d.ts.map +0 -1
- package/dist/next/state/writable.js.map +0 -1
- package/dist/next/store/adapter.d.ts +0 -67
- package/dist/next/store/adapter.d.ts.map +0 -1
- package/dist/next/store/adapter.js.map +0 -1
- package/dist/next/store/allocator.d.ts.map +0 -1
- package/dist/next/store/allocator.js.map +0 -1
- package/dist/next/store/applier.d.ts.map +0 -1
- package/dist/next/store/applier.js.map +0 -1
- package/dist/next/store/apply-batch.d.ts +0 -12
- package/dist/next/store/apply-batch.d.ts.map +0 -1
- package/dist/next/store/apply-batch.js.map +0 -1
- package/dist/next/store/archive.d.ts +0 -32
- package/dist/next/store/archive.d.ts.map +0 -1
- package/dist/next/store/archive.js +0 -129
- package/dist/next/store/archive.js.map +0 -1
- package/dist/next/store/backend.d.ts +0 -10
- package/dist/next/store/backend.d.ts.map +0 -1
- package/dist/next/store/backend.js.map +0 -1
- package/dist/next/store/catalog.d.ts +0 -24
- package/dist/next/store/catalog.d.ts.map +0 -1
- package/dist/next/store/catalog.js.map +0 -1
- package/dist/next/store/claims.d.ts.map +0 -1
- package/dist/next/store/claims.js.map +0 -1
- package/dist/next/store/columns.d.ts.map +0 -1
- package/dist/next/store/columns.js.map +0 -1
- package/dist/next/store/engine.d.ts +0 -176
- package/dist/next/store/engine.d.ts.map +0 -1
- package/dist/next/store/engine.js +0 -283
- package/dist/next/store/engine.js.map +0 -1
- package/dist/next/store/evaluate.d.ts +0 -17
- package/dist/next/store/evaluate.d.ts.map +0 -1
- package/dist/next/store/evaluate.js.map +0 -1
- package/dist/next/store/export.d.ts +0 -17
- package/dist/next/store/export.d.ts.map +0 -1
- package/dist/next/store/export.js +0 -200
- package/dist/next/store/export.js.map +0 -1
- package/dist/next/store/expression.d.ts +0 -150
- package/dist/next/store/expression.d.ts.map +0 -1
- package/dist/next/store/expression.js.map +0 -1
- package/dist/next/store/import.d.ts +0 -10
- package/dist/next/store/import.d.ts.map +0 -1
- package/dist/next/store/import.js +0 -276
- package/dist/next/store/import.js.map +0 -1
- package/dist/next/store/index.d.ts.map +0 -1
- package/dist/next/store/index.js.map +0 -1
- package/dist/next/store/json-column.d.ts +0 -33
- package/dist/next/store/json-column.d.ts.map +0 -1
- package/dist/next/store/json-column.js +0 -61
- package/dist/next/store/json-column.js.map +0 -1
- package/dist/next/store/jsonl.d.ts.map +0 -1
- package/dist/next/store/jsonl.js.map +0 -1
- package/dist/next/store/outbox.d.ts +0 -26
- package/dist/next/store/outbox.d.ts.map +0 -1
- package/dist/next/store/outbox.js.map +0 -1
- package/dist/next/store/query.d.ts +0 -39
- package/dist/next/store/query.d.ts.map +0 -1
- package/dist/next/store/query.js.map +0 -1
- package/dist/next/store/refusal.d.ts.map +0 -1
- package/dist/next/store/refusal.js.map +0 -1
- package/dist/next/store/rows.d.ts +0 -80
- package/dist/next/store/rows.d.ts.map +0 -1
- package/dist/next/store/rows.js.map +0 -1
- package/dist/next/store/schema.d.ts +0 -25
- package/dist/next/store/schema.d.ts.map +0 -1
- package/dist/next/store/schema.js +0 -115
- package/dist/next/store/schema.js.map +0 -1
- package/dist/next/store/sql.d.ts +0 -73
- package/dist/next/store/sql.d.ts.map +0 -1
- package/dist/next/store/sql.js.map +0 -1
- package/dist/next/store/step.d.ts +0 -48
- package/dist/next/store/step.d.ts.map +0 -1
- package/dist/next/store/step.js +0 -50
- package/dist/next/store/step.js.map +0 -1
- package/dist/next/store/store.d.ts +0 -161
- package/dist/next/store/store.d.ts.map +0 -1
- package/dist/next/store/store.js +0 -627
- package/dist/next/store/store.js.map +0 -1
- package/dist/next/store/table-changes.d.ts +0 -29
- package/dist/next/store/table-changes.d.ts.map +0 -1
- package/dist/next/store/table-changes.js.map +0 -1
- package/dist/next/store/table-evolve.d.ts.map +0 -1
- package/dist/next/store/table-evolve.js.map +0 -1
- package/dist/next/store/table-handle.d.ts +0 -67
- package/dist/next/store/table-handle.d.ts.map +0 -1
- package/dist/next/store/table-handle.js +0 -101
- package/dist/next/store/table-handle.js.map +0 -1
- package/dist/next/store/table-history.d.ts.map +0 -1
- package/dist/next/store/table-history.js.map +0 -1
- package/dist/next/store/table-migration.d.ts +0 -16
- package/dist/next/store/table-migration.d.ts.map +0 -1
- package/dist/next/store/table-migration.js +0 -202
- package/dist/next/store/table-migration.js.map +0 -1
- package/dist/next/store/table-writes.d.ts.map +0 -1
- package/dist/next/store/table-writes.js +0 -165
- package/dist/next/store/table-writes.js.map +0 -1
- package/dist/next/store/table.d.ts +0 -80
- package/dist/next/store/table.d.ts.map +0 -1
- package/dist/next/store/table.js.map +0 -1
- package/dist/next/store/text.d.ts.map +0 -1
- package/dist/next/store/text.js.map +0 -1
- package/dist/next/store/writes.d.ts.map +0 -1
- package/dist/next/store/writes.js.map +0 -1
- package/dist/next-node/compression.d.ts +0 -7
- package/dist/next-node/compression.d.ts.map +0 -1
- package/dist/next-node/compression.js +0 -24
- package/dist/next-node/compression.js.map +0 -1
- package/dist/next-node/http/admission.d.ts.map +0 -1
- package/dist/next-node/http/admission.js.map +0 -1
- package/dist/next-node/http/authenticate.d.ts +0 -21
- package/dist/next-node/http/authenticate.d.ts.map +0 -1
- package/dist/next-node/http/authenticate.js +0 -34
- package/dist/next-node/http/authenticate.js.map +0 -1
- package/dist/next-node/http/cookies.d.ts +0 -24
- package/dist/next-node/http/cookies.d.ts.map +0 -1
- package/dist/next-node/http/cookies.js +0 -62
- package/dist/next-node/http/cookies.js.map +0 -1
- package/dist/next-node/http/file.d.ts.map +0 -1
- package/dist/next-node/http/file.js.map +0 -1
- package/dist/next-node/http/headers.d.ts.map +0 -1
- package/dist/next-node/http/headers.js +0 -129
- package/dist/next-node/http/headers.js.map +0 -1
- package/dist/next-node/http/http.d.ts +0 -100
- package/dist/next-node/http/http.d.ts.map +0 -1
- package/dist/next-node/http/http.js +0 -462
- package/dist/next-node/http/http.js.map +0 -1
- package/dist/next-node/http/incoming.d.ts.map +0 -1
- package/dist/next-node/http/incoming.js.map +0 -1
- package/dist/next-node/http/index.d.ts +0 -11
- package/dist/next-node/http/index.d.ts.map +0 -1
- package/dist/next-node/http/index.js +0 -12
- package/dist/next-node/http/index.js.map +0 -1
- package/dist/next-node/http/node.d.ts.map +0 -1
- package/dist/next-node/http/node.js.map +0 -1
- package/dist/next-node/http/request.d.ts +0 -54
- package/dist/next-node/http/request.d.ts.map +0 -1
- package/dist/next-node/http/request.js +0 -116
- package/dist/next-node/http/request.js.map +0 -1
- package/dist/next-node/http/response.d.ts +0 -63
- package/dist/next-node/http/response.d.ts.map +0 -1
- package/dist/next-node/http/response.js.map +0 -1
- package/dist/next-node/http/router.d.ts +0 -114
- package/dist/next-node/http/router.d.ts.map +0 -1
- package/dist/next-node/http/router.js +0 -261
- package/dist/next-node/http/router.js.map +0 -1
- package/dist/next-node/http/upgrades.d.ts +0 -58
- package/dist/next-node/http/upgrades.d.ts.map +0 -1
- package/dist/next-node/http/upgrades.js +0 -184
- package/dist/next-node/http/upgrades.js.map +0 -1
- package/dist/next-node/plugins/build.d.ts +0 -57
- package/dist/next-node/plugins/build.d.ts.map +0 -1
- package/dist/next-node/plugins/build.js +0 -334
- package/dist/next-node/plugins/build.js.map +0 -1
- package/dist/next-node/plugins/discover.d.ts +0 -36
- package/dist/next-node/plugins/discover.d.ts.map +0 -1
- package/dist/next-node/plugins/discover.js +0 -91
- package/dist/next-node/plugins/discover.js.map +0 -1
- package/dist/next-node/plugins/evaluate.d.ts +0 -33
- package/dist/next-node/plugins/evaluate.d.ts.map +0 -1
- package/dist/next-node/plugins/evaluate.js +0 -98
- package/dist/next-node/plugins/evaluate.js.map +0 -1
- package/dist/next-node/plugins/index.d.ts +0 -9
- package/dist/next-node/plugins/index.d.ts.map +0 -1
- package/dist/next-node/plugins/index.js +0 -11
- package/dist/next-node/plugins/index.js.map +0 -1
- package/dist/next-node/plugins/install.d.ts +0 -13
- package/dist/next-node/plugins/install.d.ts.map +0 -1
- package/dist/next-node/plugins/install.js +0 -37
- package/dist/next-node/plugins/install.js.map +0 -1
- package/dist/next-node/plugins/plugins.d.ts +0 -135
- package/dist/next-node/plugins/plugins.d.ts.map +0 -1
- package/dist/next-node/plugins/plugins.js +0 -206
- package/dist/next-node/plugins/plugins.js.map +0 -1
- package/dist/next-node/plugins/runtime.d.ts +0 -41
- package/dist/next-node/plugins/runtime.d.ts.map +0 -1
- package/dist/next-node/plugins/runtime.js +0 -136
- package/dist/next-node/plugins/runtime.js.map +0 -1
- package/dist/next-node/plugins/stack.d.ts.map +0 -1
- package/dist/next-node/plugins/stack.js.map +0 -1
- package/dist/next-node/plugins/watcher.d.ts +0 -58
- package/dist/next-node/plugins/watcher.d.ts.map +0 -1
- package/dist/next-node/plugins/watcher.js +0 -281
- package/dist/next-node/plugins/watcher.js.map +0 -1
- package/dist/next-node/workers/control.d.ts +0 -83
- package/dist/next-node/workers/control.d.ts.map +0 -1
- package/dist/next-node/workers/control.js +0 -77
- package/dist/next-node/workers/control.js.map +0 -1
- package/dist/next-node/workers/index.d.ts +0 -5
- package/dist/next-node/workers/index.d.ts.map +0 -1
- package/dist/next-node/workers/index.js +0 -7
- package/dist/next-node/workers/index.js.map +0 -1
- package/dist/next-node/workers/lock.d.ts +0 -21
- package/dist/next-node/workers/lock.d.ts.map +0 -1
- package/dist/next-node/workers/lock.js +0 -137
- package/dist/next-node/workers/lock.js.map +0 -1
- package/dist/next-node/workers/main.d.ts +0 -46
- package/dist/next-node/workers/main.d.ts.map +0 -1
- package/dist/next-node/workers/main.js +0 -230
- package/dist/next-node/workers/main.js.map +0 -1
- package/dist/next-node/workers/process.d.ts +0 -42
- package/dist/next-node/workers/process.d.ts.map +0 -1
- package/dist/next-node/workers/process.js +0 -125
- package/dist/next-node/workers/process.js.map +0 -1
- package/dist/next-node/workers/workers.d.ts +0 -80
- package/dist/next-node/workers/workers.d.ts.map +0 -1
- package/dist/next-node/workers/workers.js +0 -572
- package/dist/next-node/workers/workers.js.map +0 -1
- package/dist/node.d.ts +0 -4
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -4
- package/dist/node.js.map +0 -1
- package/dist/object.d.ts +0 -438
- package/dist/object.d.ts.map +0 -1
- package/dist/object.js +0 -1570
- package/dist/object.js.map +0 -1
- package/dist/publish.d.ts +0 -5
- package/dist/publish.d.ts.map +0 -1
- package/dist/publish.js +0 -40
- package/dist/publish.js.map +0 -1
- package/dist/registry.d.ts +0 -25
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js +0 -6
- package/dist/registry.js.map +0 -1
- package/dist/reload.d.ts +0 -126
- package/dist/reload.d.ts.map +0 -1
- package/dist/reload.js +0 -653
- package/dist/reload.js.map +0 -1
- package/dist/remote.d.ts +0 -165
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js +0 -612
- package/dist/remote.js.map +0 -1
- package/dist/schema.d.ts +0 -25
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -403
- package/dist/schema.js.map +0 -1
- package/dist/state.d.ts +0 -92
- package/dist/state.d.ts.map +0 -1
- package/dist/state.js +0 -287
- package/dist/state.js.map +0 -1
- package/dist/types.d.ts +0 -88
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/websocket.d.ts +0 -15
- package/dist/websocket.d.ts.map +0 -1
- package/dist/websocket.js +0 -16
- package/dist/websocket.js.map +0 -1
- package/dist/wire.d.ts +0 -197
- package/dist/wire.d.ts.map +0 -1
- package/dist/wire.js +0 -166
- package/dist/wire.js.map +0 -1
- package/docs/guide.md +0 -814
- package/docs/next/benchmarks.md +0 -959
- package/docs/next/decisions.md +0 -2957
- package/docs/next/dependencies/book.md +0 -1671
- package/docs/next/dependencies/index.html +0 -2641
- package/docs/next/design.md +0 -2554
- package/docs/next/durable-observers/book.md +0 -432
- package/docs/next/durable-observers/index.html +0 -517
- package/docs/next/guide-plugins-hosts/book.md +0 -607
- package/docs/next/guide-plugins-hosts/index.html +0 -652
- package/docs/next/http-workers/book.md +0 -378
- package/docs/next/http-workers/index.html +0 -515
- package/docs/next/layer-1.md +0 -311
- package/docs/next/layer-2.md +0 -216
- package/docs/next/plugin-model/book.md +0 -186
- package/docs/next/plugin-model/index.html +0 -310
- package/docs/next/plugin-primer/book.md +0 -273
- package/docs/next/plugin-primer/index.html +0 -430
- package/docs/next/slice-1.md +0 -236
- package/docs/next/slice-10.md +0 -285
- package/docs/next/slice-11.md +0 -93
- package/docs/next/slice-2.md +0 -174
- package/docs/next/slice-3a.md +0 -296
- package/docs/next/slice-3b.md +0 -197
- package/docs/next/slice-4a.md +0 -418
- package/docs/next/slice-4b.md +0 -208
- package/docs/next/slice-6a.md +0 -676
- package/docs/next/slice-6b.md +0 -332
- package/docs/next/slice-7b/book.md +0 -608
- package/docs/next/slice-7b/index.html +0 -842
- package/docs/next/slice-7b.md +0 -255
- package/docs/next/slice-7c.md +0 -165
- package/docs/next/slices.md +0 -230
- package/docs/next/store/book.md +0 -665
- package/docs/next/store/index.html +0 -861
- package/docs/next/store/walkthrough.md +0 -193
- package/docs/spec.md +0 -288
- package/docs/tutorial.md +0 -932
- /package/dist/{next/contracts → contracts}/accepts.js +0 -0
- /package/dist/{next/contracts → contracts}/contract.js +0 -0
- /package/dist/{next/contracts → contracts}/declare.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/declare.js +0 -0
- /package/dist/{next/contracts → contracts}/evolve.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/evolve.js +0 -0
- /package/dist/{next/contracts → contracts}/fingerprint.js +0 -0
- /package/dist/{next/contracts → contracts}/history.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/history.js +0 -0
- /package/dist/{next/contracts → contracts}/host-kind.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/host-kind.js +0 -0
- /package/dist/{next/contracts → contracts}/index.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/index.js +0 -0
- /package/dist/{next/contracts → contracts}/internal.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/internal.js +0 -0
- /package/dist/{next/contracts → contracts}/names.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/names.js +0 -0
- /package/dist/{next/contracts → contracts}/params.js +0 -0
- /package/dist/{next/contracts → contracts}/schema.d.ts +0 -0
- /package/dist/{next/contracts → contracts}/schema.js +0 -0
- /package/dist/{next/data → data}/args.js +0 -0
- /package/dist/{next/data → data}/failure.d.ts +0 -0
- /package/dist/{next/data → data}/params.js +0 -0
- /package/dist/{next/documents → documents}/address-source.js +0 -0
- /package/dist/{next/documents → documents}/fence.d.ts +0 -0
- /package/dist/{next/documents → documents}/fence.js +0 -0
- /package/dist/{next/documents → documents}/handles.js +0 -0
- /package/dist/{next/documents → documents}/index.d.ts +0 -0
- /package/dist/{next/documents → documents}/index.js +0 -0
- /package/dist/{next/documents → documents}/internal.js +0 -0
- /package/dist/{next/documents → documents}/line.d.ts +0 -0
- /package/dist/{next/documents → documents}/line.js +0 -0
- /package/dist/{next/documents → documents}/residency.js +0 -0
- /package/dist/{next/host → host}/adapted.js +0 -0
- /package/dist/{next/host → host}/backoff.d.ts +0 -0
- /package/dist/{next/host → host}/backoff.js +0 -0
- /package/dist/{next/host → host}/deadline.d.ts +0 -0
- /package/dist/{next/host → host}/deadline.js +0 -0
- /package/dist/{next/host → host}/dependencies.d.ts +0 -0
- /package/dist/{next/host → host}/dependencies.js +0 -0
- /package/dist/{next/host → host}/destination.js +0 -0
- /package/dist/{next/host → host}/facet.js +0 -0
- /package/dist/{next/host → host}/follow.js +0 -0
- /package/dist/{next/host → host}/index.js +0 -0
- /package/dist/{next/host → host}/members.js +0 -0
- /package/dist/{next/host → host}/parked.js +0 -0
- /package/dist/{next/host → host}/presence.js +0 -0
- /package/dist/{next/host → host}/retry-on.d.ts +0 -0
- /package/dist/{next/host → host}/retry-on.js +0 -0
- /package/dist/{next/host → host}/revocation.js +0 -0
- /package/dist/{next/host → host}/sleep.js +0 -0
- /package/dist/{next/host → host}/uuid.d.ts +0 -0
- /package/dist/{next/host → host}/uuid.js +0 -0
- /package/dist/{next/jobs → jobs}/definition.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/definition.js +0 -0
- /package/dist/{next/jobs → jobs}/index.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/index.js +0 -0
- /package/dist/{next/jobs → jobs}/internal.d.ts +0 -0
- /package/dist/{next/jobs → jobs}/internal.js +0 -0
- /package/dist/{next/jobs → jobs}/persisted.js +0 -0
- /package/dist/{next/jobs → jobs}/running.js +0 -0
- /package/dist/{next/jobs → jobs}/stored.js +0 -0
- /package/dist/{next/link → link}/binary.d.ts +0 -0
- /package/dist/{next/link → link}/errors.d.ts +0 -0
- /package/dist/{next/link → link}/errors.js +0 -0
- /package/dist/{next/link → link}/index.d.ts +0 -0
- /package/dist/{next/link → link}/index.js +0 -0
- /package/dist/{next/link → link}/internal.d.ts +0 -0
- /package/dist/{next/link → link}/internal.js +0 -0
- /package/dist/{next/link → link}/ipc.d.ts +0 -0
- /package/dist/{next/link → link}/ipc.js +0 -0
- /package/dist/{next/link → link}/link.d.ts +0 -0
- /package/dist/{next/link → link}/link.js +0 -0
- /package/dist/{next/link → link}/text.d.ts +0 -0
- /package/dist/{next/link → link}/values.d.ts +0 -0
- /package/dist/{next/link → link}/websocket.d.ts +0 -0
- /package/dist/{next/link → link}/websocket.js +0 -0
- /package/dist/{next-node → node}/http/admission.d.ts +0 -0
- /package/dist/{next-node → node}/http/admission.js +0 -0
- /package/dist/{next-node → node}/http/file.d.ts +0 -0
- /package/dist/{next-node → node}/http/file.js +0 -0
- /package/dist/{next-node → node}/http/headers.d.ts +0 -0
- /package/dist/{next-node → node}/http/incoming.d.ts +0 -0
- /package/dist/{next-node → node}/http/incoming.js +0 -0
- /package/dist/{next-node → node}/http/node.d.ts +0 -0
- /package/dist/{next-node → node}/http/node.js +0 -0
- /package/dist/{next-node → node}/http/response.js +0 -0
- /package/dist/{next-node → node}/plugins/stack.d.ts +0 -0
- /package/dist/{next-node → node}/plugins/stack.js +0 -0
- /package/dist/{next/registries → registries}/contribution.d.ts +0 -0
- /package/dist/{next/registries → registries}/contribution.js +0 -0
- /package/dist/{next/registries → registries}/entries.d.ts +0 -0
- /package/dist/{next/registries → registries}/entries.js +0 -0
- /package/dist/{next/registries → registries}/index.d.ts +0 -0
- /package/dist/{next/registries → registries}/index.js +0 -0
- /package/dist/{next/registries → registries}/internal.d.ts +0 -0
- /package/dist/{next/registries → registries}/internal.js +0 -0
- /package/dist/{next/registries → registries}/registry.js +0 -0
- /package/dist/{next/registries → registries}/value.d.ts +0 -0
- /package/dist/{next/remote → remote}/calls.d.ts +0 -0
- /package/dist/{next/remote → remote}/calls.js +0 -0
- /package/dist/{next/remote → remote}/internal.d.ts +0 -0
- /package/dist/{next/remote → remote}/internal.js +0 -0
- /package/dist/{next/remote → remote}/path.d.ts +0 -0
- /package/dist/{next/remote → remote}/path.js +0 -0
- /package/dist/{next/state → state}/index.js +0 -0
- /package/dist/{next/state → state}/internal.d.ts +0 -0
- /package/dist/{next/state → state}/internal.js +0 -0
- /package/dist/{next/state → state}/writable.js +0 -0
- /package/dist/{next/store → store}/adapter.js +0 -0
- /package/dist/{next/store → store}/allocator.d.ts +0 -0
- /package/dist/{next/store → store}/allocator.js +0 -0
- /package/dist/{next/store → store}/applier.d.ts +0 -0
- /package/dist/{next/store → store}/applier.js +0 -0
- /package/dist/{next/store → store}/apply-batch.js +0 -0
- /package/dist/{next/store → store}/backend.js +0 -0
- /package/dist/{next/store → store}/catalog.js +0 -0
- /package/dist/{next/store → store}/claims.d.ts +0 -0
- /package/dist/{next/store → store}/claims.js +0 -0
- /package/dist/{next/store → store}/columns.d.ts +0 -0
- /package/dist/{next/store → store}/columns.js +0 -0
- /package/dist/{next/store → store}/evaluate.js +0 -0
- /package/dist/{next/store → store}/expression.js +0 -0
- /package/dist/{next/store → store}/index.d.ts +0 -0
- /package/dist/{next/store → store}/index.js +0 -0
- /package/dist/{next/store → store}/jsonl.d.ts +0 -0
- /package/dist/{next/store → store}/jsonl.js +0 -0
- /package/dist/{next/store → store}/outbox.js +0 -0
- /package/dist/{next/store → store}/query.js +0 -0
- /package/dist/{next/store → store}/refusal.d.ts +0 -0
- /package/dist/{next/store → store}/refusal.js +0 -0
- /package/dist/{next/store → store}/rows.js +0 -0
- /package/dist/{next/store → store}/sql.js +0 -0
- /package/dist/{next/store → store}/table-changes.js +0 -0
- /package/dist/{next/store → store}/table-evolve.d.ts +0 -0
- /package/dist/{next/store → store}/table-evolve.js +0 -0
- /package/dist/{next/store → store}/table-history.d.ts +0 -0
- /package/dist/{next/store → store}/table-history.js +0 -0
- /package/dist/{next/store → store}/table-writes.d.ts +0 -0
- /package/dist/{next/store → store}/table.js +0 -0
- /package/dist/{next/store → store}/text.d.ts +0 -0
- /package/dist/{next/store → store}/text.js +0 -0
- /package/dist/{next/store → store}/writes.d.ts +0 -0
- /package/dist/{next/store → store}/writes.js +0 -0
- /package/docs/{next/dependencies → dependencies}/model.md +0 -0
- /package/docs/{next/flow-control → flow-control}/book.md +0 -0
- /package/docs/{next/flow-control → flow-control}/fold/index.html +0 -0
- /package/docs/{next/flow-control → flow-control}/index.html +0 -0
- /package/docs/{next/flow-control → flow-control}/window/index.html +0 -0
- /package/docs/{next/slice-4.md → slice-4.md} +0 -0
- /package/docs/{next/slice-5.md → slice-5.md} +0 -0
- /package/docs/{next/slice-7a.md → slice-7a.md} +0 -0
- /package/docs/{next/slice-8.md → slice-8.md} +0 -0
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
// The documents engine (S13, slice 6a §8, slice 6b §1.5): one record per incarnation of an address, revisions made of
|
|
2
|
-
// bases and deltas, a history rule per record (R1); its writes inside the commit step, checked by the writes
|
|
3
|
-
// themselves (the partial unique index on the live address, the counted conditional `UPDATE` on the record's
|
|
4
|
-
// revision), and its reads, of the current state or at a point.
|
|
5
|
-
import { apply } from "../../delta/index.js";
|
|
6
|
-
import { TABLES } from "./schema.js";
|
|
7
|
-
/**
|
|
8
|
-
* Stages the creation of a Chord document at `address` with `base`; its id is taken from the allocator when it
|
|
9
|
-
* applies (a saturated allocator refuses the commit) and handed to `created` (its owner adopts it after `COMMIT`).
|
|
10
|
-
* `text` is the base's value serialized before the queue (rule 8).
|
|
11
|
-
*/
|
|
12
|
-
export function createDocument(address, base, text, created) {
|
|
13
|
-
return {
|
|
14
|
-
order: "create",
|
|
15
|
-
apply: async (step) => {
|
|
16
|
-
const id = step.ids.mint();
|
|
17
|
-
step.created.push(id);
|
|
18
|
-
created?.(id);
|
|
19
|
-
const { version, fingerprint } = base;
|
|
20
|
-
const record = {
|
|
21
|
-
id,
|
|
22
|
-
...address,
|
|
23
|
-
history: "none",
|
|
24
|
-
createdAt: step.seq,
|
|
25
|
-
revision: 1,
|
|
26
|
-
version,
|
|
27
|
-
fingerprint,
|
|
28
|
-
};
|
|
29
|
-
await insertDocument(step, record, text);
|
|
30
|
-
return [{ kind: "document.create", record, base }];
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Inserts `record` as it is (id, seqs and revision kept: a creation, an import, a batch), with its base at `createdAt`
|
|
36
|
-
* when `text` (the base's value serialized) is given; a record created retired (an empty lifetime) keeps what its
|
|
37
|
-
* history keeps.
|
|
38
|
-
*/
|
|
39
|
-
export async function insertDocument(step, record, text) {
|
|
40
|
-
const { id, namespace, owner, kind, key, history, createdAt, retiredAt, meta, revision, version, fingerprint } = record;
|
|
41
|
-
await step.run(`INSERT INTO ${TABLES.documents}
|
|
42
|
-
(id, owner, namespace, kind, key, history, created_at, retired_at, meta, revision, version, fingerprint)
|
|
43
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`, id, owner, namespace, kind, key ?? "", history, createdAt, retiredAt ?? null, meta ?? null, revision, version, fingerprint);
|
|
44
|
-
if (text !== undefined)
|
|
45
|
-
await insertRevision(step, id, createdAt, "base", version, text);
|
|
46
|
-
if (retiredAt !== undefined)
|
|
47
|
-
await dropRetired(step, id, history);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Stages a change of Chord document `id` prepared on `revision`: a delta on the current base's version, or a new base.
|
|
51
|
-
* `text` is the content serialized before the queue.
|
|
52
|
-
*/
|
|
53
|
-
export function changeDocument(id, revision, content, text) {
|
|
54
|
-
const write = { kind: "document.change", id, revision, content };
|
|
55
|
-
return {
|
|
56
|
-
order: "write",
|
|
57
|
-
apply: async (step) => {
|
|
58
|
-
await writeContent(step, id, "none", revision, content, text);
|
|
59
|
-
return [write];
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Writes `content` to document `id` (of `history`) prepared on `revision`, in the step's seq: its revision, the
|
|
65
|
-
* counted conditional `UPDATE` (a delta only on the base's version), and at a new base the older revisions a
|
|
66
|
-
* `none` or `latest` record drops. A record that is not live at `revision` throws (memory and disk disagree).
|
|
67
|
-
*/
|
|
68
|
-
export async function writeContent(step, id, history, revision, content, text) {
|
|
69
|
-
// As ids: a revision past the safe range would stop counting exactly.
|
|
70
|
-
if (revision >= Number.MAX_SAFE_INTEGER)
|
|
71
|
-
throw new Error(`document ${id}: no revision past the safe range`);
|
|
72
|
-
await insertRevision(step, id, step.seq, content.kind, content.version, text);
|
|
73
|
-
const changed = content.kind === "delta"
|
|
74
|
-
? await step.runCounted(`UPDATE ${TABLES.documents} SET revision = revision + 1
|
|
75
|
-
WHERE id = ? AND revision = ? AND version = ? AND retired_at IS NULL`, id, revision, content.version)
|
|
76
|
-
: await step.runCounted(`UPDATE ${TABLES.documents} SET revision = revision + 1, version = ?, fingerprint = ?
|
|
77
|
-
WHERE id = ? AND revision = ? AND retired_at IS NULL`, content.version, content.fingerprint, id, revision);
|
|
78
|
-
if (changed !== 1)
|
|
79
|
-
throw new Error(`document ${id}: not live at revision ${revision}`);
|
|
80
|
-
if (content.kind === "base" && history !== "rewindable") {
|
|
81
|
-
await step.run(`DELETE FROM ${TABLES.revisions} WHERE document_id = ? AND seq < ?`, id, step.seq);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/** Stages the retirement of Chord document `id` (history `none`) at `revision`: its row and its revisions go. */
|
|
85
|
-
export function retireDocument(id, revision) {
|
|
86
|
-
const write = { kind: "document.retire", id, revision };
|
|
87
|
-
return {
|
|
88
|
-
order: "retire",
|
|
89
|
-
apply: async (step) => {
|
|
90
|
-
// A Chord document keeps no history (`none`): its row goes with a conditional, counted DELETE (6a's).
|
|
91
|
-
const deleted = await step.runCounted(`DELETE FROM ${TABLES.documents} WHERE id = ? AND revision = ? AND retired_at IS NULL`, id, revision);
|
|
92
|
-
if (deleted !== 1)
|
|
93
|
-
throw new Error(`document ${id}: not live at revision ${revision}`);
|
|
94
|
-
await step.run(`DELETE FROM ${TABLES.revisions} WHERE document_id = ?`, id);
|
|
95
|
-
return [write];
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Retires live `record` in the step's seq by its history (R1): a `none` record's row and revisions go, a `latest` one
|
|
101
|
-
* keeps its row with `retired_at` and drops its revisions, a `rewindable` one keeps everything.
|
|
102
|
-
*/
|
|
103
|
-
export async function retireRecord(step, record) {
|
|
104
|
-
const { id, history } = record;
|
|
105
|
-
if (history !== "none")
|
|
106
|
-
await step.run(`UPDATE ${TABLES.documents} SET retired_at = ? WHERE id = ?`, step.seq, id);
|
|
107
|
-
await dropRetired(step, id, history);
|
|
108
|
-
}
|
|
109
|
-
/** What a retired record of `history` drops: a `none` row too, every revision unless `rewindable`. */
|
|
110
|
-
async function dropRetired(step, id, history) {
|
|
111
|
-
if (history === "rewindable")
|
|
112
|
-
return;
|
|
113
|
-
if (history === "none")
|
|
114
|
-
await step.run(`DELETE FROM ${TABLES.documents} WHERE id = ?`, id);
|
|
115
|
-
await step.run(`DELETE FROM ${TABLES.revisions} WHERE document_id = ?`, id);
|
|
116
|
-
}
|
|
117
|
-
/** Inserts one revision of document `id` at `seq`, `text` its serialized content. */
|
|
118
|
-
export function insertRevision(step, id, seq, kind, version, text) {
|
|
119
|
-
return step.run(`INSERT INTO ${TABLES.revisions} (document_id, seq, kind, version, content) VALUES (?, ?, ?, ?, ?)`, id, seq, kind, version, text);
|
|
120
|
-
}
|
|
121
|
-
const RECORD_COLUMNS = "id, owner, namespace, kind, key, history, created_at, retired_at, meta, revision, version, fingerprint";
|
|
122
|
-
const READ = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents} WHERE id = ?`;
|
|
123
|
-
/** The record with `id`, live or retired, if there is one. */
|
|
124
|
-
export async function readDocument(executor, id) {
|
|
125
|
-
const row = await executor.get(READ, id);
|
|
126
|
-
return row === undefined ? undefined : recordOf(row);
|
|
127
|
-
}
|
|
128
|
-
const FIND_CURRENT = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents}
|
|
129
|
-
WHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND retired_at IS NULL`;
|
|
130
|
-
const FIND_AT = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents}
|
|
131
|
-
WHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?)
|
|
132
|
-
ORDER BY created_at DESC LIMIT 1`;
|
|
133
|
-
/** The record at `address` live at `at` (the half-open lifetime `createdAt <= at < retiredAt`), if any. */
|
|
134
|
-
export async function findDocument(executor, address, at = "current") {
|
|
135
|
-
const { owner, namespace, kind } = address;
|
|
136
|
-
const key = address.key ?? "";
|
|
137
|
-
const row = at === "current"
|
|
138
|
-
? await executor.get(FIND_CURRENT, owner, namespace, kind, key)
|
|
139
|
-
: await executor.get(FIND_AT, owner, namespace, kind, key, at, at);
|
|
140
|
-
return row === undefined ? undefined : recordOf(row);
|
|
141
|
-
}
|
|
142
|
-
const READ_ENTRY = `SELECT meta, retired_at, owner, namespace, history FROM ${TABLES.documents} WHERE id = ?`;
|
|
143
|
-
/** The entry of the record with `id`, live or retired, with its owner, namespace and history; `undefined` if none. */
|
|
144
|
-
export function readDocumentEntry(executor, id) {
|
|
145
|
-
return executor.get(READ_ENTRY, id);
|
|
146
|
-
}
|
|
147
|
-
const FIND_ENTRY_CURRENT = `SELECT meta FROM ${TABLES.documents}
|
|
148
|
-
WHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND retired_at IS NULL`;
|
|
149
|
-
const FIND_ENTRY_AT = `SELECT meta, retired_at FROM ${TABLES.documents}
|
|
150
|
-
WHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?)
|
|
151
|
-
ORDER BY created_at DESC LIMIT 1`;
|
|
152
|
-
/** `findDocument` reading only what an adapter keeping its fields in `meta` needs (fewer columns, no record built). */
|
|
153
|
-
export function findDocumentEntry(executor, address, at) {
|
|
154
|
-
const { owner, namespace, kind } = address;
|
|
155
|
-
const key = address.key ?? "";
|
|
156
|
-
return at === "current"
|
|
157
|
-
? executor.get(FIND_ENTRY_CURRENT, owner, namespace, kind, key)
|
|
158
|
-
: executor.get(FIND_ENTRY_AT, owner, namespace, kind, key, at, at);
|
|
159
|
-
}
|
|
160
|
-
const LOAD = `SELECT seq, kind, version, content FROM ${TABLES.revisions} WHERE document_id = ? AND seq <= ? AND seq >= (
|
|
161
|
-
SELECT max(seq) FROM ${TABLES.revisions} WHERE document_id = ? AND kind = 'base' AND seq <= ?) ORDER BY seq`;
|
|
162
|
-
/**
|
|
163
|
-
* Loads `record` at `at`: its newest base at or below it and the deltas after that base up to it, applied once; the
|
|
164
|
-
* version is the base's. A record without such a base (one that keeps no history from there) throws.
|
|
165
|
-
*/
|
|
166
|
-
export async function loadDocument(executor, record, at = "current") {
|
|
167
|
-
return { record, ...(await loadContent(executor, record.id, at)) };
|
|
168
|
-
}
|
|
169
|
-
/** `loadDocument`'s content of document `id` at `at`, without its record (an adapter reads the fields it keeps). */
|
|
170
|
-
export async function loadContent(executor, id, at) {
|
|
171
|
-
const upper = at === "current" ? Number.MAX_SAFE_INTEGER : at;
|
|
172
|
-
const revisions = await executor.all(LOAD, id, upper, id, upper);
|
|
173
|
-
const [base, ...deltas] = revisions;
|
|
174
|
-
if (base === undefined || base.kind !== "base")
|
|
175
|
-
throw new Error(`document ${id}: no base`);
|
|
176
|
-
let value = JSON.parse(base.content);
|
|
177
|
-
for (const delta of deltas) {
|
|
178
|
-
if (delta.version !== base.version)
|
|
179
|
-
throw new Error(`document ${id}: a delta crosses a version`);
|
|
180
|
-
value = apply(value, JSON.parse(delta.content));
|
|
181
|
-
}
|
|
182
|
-
return { value, version: base.version, deltasSinceBase: deltas.length };
|
|
183
|
-
}
|
|
184
|
-
/** Up to `limit` keys of live documents of `kind` under `owner` after `after` (from the first), in code point order. */
|
|
185
|
-
export async function listDocumentKeys(executor, address, after, limit) {
|
|
186
|
-
// The first page has no lower bound: `""` is a key too.
|
|
187
|
-
const from = after === undefined ? "" : " AND key > ?";
|
|
188
|
-
const rows = await executor.all(`SELECT key FROM ${TABLES.documents} WHERE owner = ? AND namespace = ? AND kind = ?${from}
|
|
189
|
-
AND retired_at IS NULL ORDER BY key LIMIT ?`, address.owner, address.namespace, address.kind, ...(after === undefined ? [] : [after]), limit);
|
|
190
|
-
return rows.map(({ key }) => key);
|
|
191
|
-
}
|
|
192
|
-
/** The statements of `listDocuments`, by its shape: with a kind or not, current or at a point. */
|
|
193
|
-
const LIST = (() => {
|
|
194
|
-
const from = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents} WHERE owner = ? AND namespace = ? AND id > ?`;
|
|
195
|
-
const current = " AND retired_at IS NULL ORDER BY id LIMIT ?";
|
|
196
|
-
const at = " AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?) ORDER BY id LIMIT ?";
|
|
197
|
-
return {
|
|
198
|
-
current: `${from}${current}`,
|
|
199
|
-
at: `${from}${at}`,
|
|
200
|
-
kindCurrent: `${from} AND kind = ?${current}`,
|
|
201
|
-
kindAt: `${from} AND kind = ?${at}`,
|
|
202
|
-
};
|
|
203
|
-
})();
|
|
204
|
-
/** Up to `limit` records of `scope` live at `at` with ids above `after`, by id. */
|
|
205
|
-
export async function listDocuments(executor, scope, at, after, limit) {
|
|
206
|
-
const { owner, namespace, kind } = scope;
|
|
207
|
-
let rows;
|
|
208
|
-
if (kind === undefined) {
|
|
209
|
-
rows =
|
|
210
|
-
at === "current"
|
|
211
|
-
? await executor.all(LIST.current, owner, namespace, after, limit)
|
|
212
|
-
: await executor.all(LIST.at, owner, namespace, after, at, at, limit);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
rows =
|
|
216
|
-
at === "current"
|
|
217
|
-
? await executor.all(LIST.kindCurrent, owner, namespace, after, kind, limit)
|
|
218
|
-
: await executor.all(LIST.kindAt, owner, namespace, after, kind, at, at, limit);
|
|
219
|
-
}
|
|
220
|
-
return rows.map(recordOf);
|
|
221
|
-
}
|
|
222
|
-
/** The statements of `listDocumentEntries`, by shape, as `LIST`'s. */
|
|
223
|
-
const LIST_ENTRIES = (() => {
|
|
224
|
-
const from = (columns) => `SELECT ${columns} FROM ${TABLES.documents} WHERE owner = ? AND namespace = ? AND id > ?`;
|
|
225
|
-
const current = " AND retired_at IS NULL ORDER BY id LIMIT ?";
|
|
226
|
-
const at = " AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?) ORDER BY id LIMIT ?";
|
|
227
|
-
return {
|
|
228
|
-
current: `${from("meta")}${current}`,
|
|
229
|
-
at: `${from("meta, retired_at")}${at}`,
|
|
230
|
-
kindCurrent: `${from("meta")} AND kind = ?${current}`,
|
|
231
|
-
kindAt: `${from("meta, retired_at")} AND kind = ?${at}`,
|
|
232
|
-
};
|
|
233
|
-
})();
|
|
234
|
-
/** `listDocuments` reading only what an adapter keeping its fields in `meta` needs. */
|
|
235
|
-
export function listDocumentEntries(executor, scope, at, after, limit) {
|
|
236
|
-
const { owner, namespace, kind } = scope;
|
|
237
|
-
if (kind === undefined) {
|
|
238
|
-
return at === "current"
|
|
239
|
-
? executor.all(LIST_ENTRIES.current, owner, namespace, after, limit)
|
|
240
|
-
: executor.all(LIST_ENTRIES.at, owner, namespace, after, at, at, limit);
|
|
241
|
-
}
|
|
242
|
-
return at === "current"
|
|
243
|
-
? executor.all(LIST_ENTRIES.kindCurrent, owner, namespace, after, kind, limit)
|
|
244
|
-
: executor.all(LIST_ENTRIES.kindAt, owner, namespace, after, kind, at, at, limit);
|
|
245
|
-
}
|
|
246
|
-
/** Up to `limit` stored records, live and retired, with ids above `after`, by id (an export's pages). */
|
|
247
|
-
export async function listRecords(executor, after, limit) {
|
|
248
|
-
const rows = await executor.all(`SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents} WHERE id > ? ORDER BY id LIMIT ?`, after, limit);
|
|
249
|
-
return rows.map(recordOf);
|
|
250
|
-
}
|
|
251
|
-
/** Up to `limit` stored revisions of document `id` after seq `after`, in seq order (an export's page). */
|
|
252
|
-
export async function listRevisions(executor, id, after, limit) {
|
|
253
|
-
const rows = await executor.all(`SELECT seq, kind, version, content FROM ${TABLES.revisions} WHERE document_id = ? AND seq > ? ORDER BY seq LIMIT ?`, id, after, limit);
|
|
254
|
-
return rows.map(({ seq, kind, version, content }) => {
|
|
255
|
-
// Written by `insertRevision`: a base's value or a delta's ops, as JSON.
|
|
256
|
-
const parsed = JSON.parse(content);
|
|
257
|
-
return {
|
|
258
|
-
id,
|
|
259
|
-
seq,
|
|
260
|
-
content: kind === "base"
|
|
261
|
-
? { kind, version, value: parsed }
|
|
262
|
-
: { kind, version, ops: parsed },
|
|
263
|
-
};
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
function recordOf(row) {
|
|
267
|
-
const { id, namespace, owner, kind, key, history, created_at, retired_at, meta, revision, version, fingerprint } = row;
|
|
268
|
-
return {
|
|
269
|
-
id,
|
|
270
|
-
owner,
|
|
271
|
-
namespace,
|
|
272
|
-
kind,
|
|
273
|
-
...(key === "" ? {} : { key }),
|
|
274
|
-
history,
|
|
275
|
-
createdAt: created_at,
|
|
276
|
-
...(retired_at === null ? {} : { retiredAt: retired_at }),
|
|
277
|
-
...(meta === null ? {} : { meta }),
|
|
278
|
-
revision,
|
|
279
|
-
version,
|
|
280
|
-
fingerprint,
|
|
281
|
-
};
|
|
282
|
-
}
|
|
283
|
-
//# sourceMappingURL=engine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"engine.js","sourceRoot":"","sources":["../../../src/next/store/engine.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,6GAA6G;AAC7G,6GAA6G;AAC7G,gEAAgE;AAEhE,OAAO,EAAE,KAAK,EAAW,MAAM,sBAAsB,CAAC;AAGtD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAmFrC;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC7B,OAAwB,EACxB,IAAkB,EAClB,IAAY,EACZ,OAA8B;IAE9B,OAAO;QACN,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YACrB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACtB,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;YACd,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;YACtC,MAAM,MAAM,GAAmB;gBAC9B,EAAE;gBACF,GAAG,OAAO;gBACV,OAAO,EAAE,MAAM;gBACf,SAAS,EAAE,IAAI,CAAC,GAAG;gBACnB,QAAQ,EAAE,CAAC;gBACX,OAAO;gBACP,WAAW;aACX,CAAC;YACF,MAAM,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AAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;QACzD,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;QAClC,QAAQ;QACR,OAAO;QACP,WAAW;KACX,CAAC;AACH,CAAC","sourcesContent":["// The documents engine (S13, slice 6a §8, slice 6b §1.5): one record per incarnation of an address, revisions made of\n// bases and deltas, a history rule per record (R1); its writes inside the commit step, checked by the writes\n// themselves (the partial unique index on the live address, the counted conditional `UPDATE` on the record's\n// revision), and its reads, of the current state or at a point.\n\nimport { apply, type Op } from \"../../delta/index.ts\";\nimport type { JsonValue } from \"../../json.ts\";\nimport type { SqliteExecutor } from \"../../sqlite/index.ts\";\nimport { TABLES } from \"./schema.ts\";\nimport type { StagedWrite, Step } from \"./step.ts\";\n\n/**\n * A document's address: the owner name, the adapter's namespace (claimed with the owner: Chord's `chord`, `chord.jobs`,\n * `chord.job-states`; Durable's scopes), the kind and, for a keyed document, its key; a singleton has none. The column\n * keeps `\"\"` for it, which a keyed document's empty key shares (its definition says which it is).\n */\nexport type DocumentAddress = {\n\treadonly owner: string;\n\treadonly namespace: string;\n\treadonly kind: string;\n\treadonly key?: string;\n};\n\n/**\n * What a record keeps (R1), applied at a new base and at retirement: `none` (Chord) drops older revisions at a new base\n * and the row and its revisions at retirement; `latest` drops older revisions at a new base and its revisions at\n * retirement, keeping the row; `rewindable` keeps everything.\n */\nexport type DocumentHistory = \"none\" | \"latest\" | \"rewindable\";\n\n/** A stored record: one incarnation of an address, live from `createdAt` until `retiredAt` (half-open). */\nexport type DocumentRecord = DocumentAddress & {\n\treadonly id: number;\n\treadonly history: DocumentHistory;\n\t/** The seq that created it. */\n\treadonly createdAt: number;\n\t/** The seq that retired it, once retired. */\n\treadonly retiredAt?: number;\n\t/** The adapter's details (Durable: its fork policy and history). */\n\treadonly meta?: string;\n\t/** Counts its changes: a change names the revision it was prepared on. */\n\treadonly revision: number;\n\t/** The version and schema fingerprint of its current base. */\n\treadonly version: number;\n\treadonly fingerprint: string;\n};\n\n/** A base: a whole value at a version. */\nexport type DocumentBase = { readonly version: number; readonly fingerprint: string; readonly value: JsonValue };\n\n/** A change's content: a new base, or a delta on the current base's version. */\nexport type DocumentContent =\n\t| ({ readonly kind: \"base\" } & DocumentBase)\n\t| { readonly kind: \"delta\"; readonly version: number; readonly ops: readonly Op[] };\n\n/** A stored revision's content: a base's value or a delta's ops, at a version (a revision keeps no fingerprint). */\nexport type RevisionContent =\n\t| { readonly kind: \"base\"; readonly version: number; readonly value: JsonValue }\n\t| { readonly kind: \"delta\"; readonly version: number; readonly ops: readonly Op[] };\n\n/** One stored revision as archives carry it: its document, its seq, its content. */\nexport type DocumentRevision = { readonly id: number; readonly seq: number; readonly content: RevisionContent };\n\n/**\n * The engine's writes as the outbox and archives record them. A creation carries its base in a commit (stored at\n * `createdAt`); in an archive it has none and its `document.revision`s follow it.\n */\nexport type DocumentWrite =\n\t| { readonly kind: \"document.create\"; readonly record: DocumentRecord; readonly base?: DocumentBase }\n\t| {\n\t\t\treadonly kind: \"document.change\";\n\t\t\treadonly id: number;\n\t\t\treadonly revision: number;\n\t\t\treadonly content: DocumentContent;\n\t }\n\t| { readonly kind: \"document.retire\"; readonly id: number; readonly revision: number }\n\t| ({ readonly kind: \"document.revision\" } & DocumentRevision);\n\n/** A loaded document: its record and its value (a base plus deltas applied once) at a point. */\nexport type StoredDocument = {\n\treadonly record: DocumentRecord;\n\treadonly value: JsonValue;\n\t/** The version of the base the value was built from. */\n\treadonly version: number;\n\t/** The deltas applied after its base (what `checkpointWhen` sees). */\n\treadonly deltasSinceBase: number;\n};\n\n/** Where a read looks: the current state, or the state after a seq. */\nexport type DocumentPoint = number | \"current\";\n\n/**\n * Stages the creation of a Chord document at `address` with `base`; its id is taken from the allocator when it\n * applies (a saturated allocator refuses the commit) and handed to `created` (its owner adopts it after `COMMIT`).\n * `text` is the base's value serialized before the queue (rule 8).\n */\nexport function createDocument(\n\taddress: DocumentAddress,\n\tbase: DocumentBase,\n\ttext: string,\n\tcreated?: (id: number) => void,\n): StagedWrite {\n\treturn {\n\t\torder: \"create\",\n\t\tapply: async (step) => {\n\t\t\tconst id = step.ids.mint();\n\t\t\tstep.created.push(id);\n\t\t\tcreated?.(id);\n\t\t\tconst { version, fingerprint } = base;\n\t\t\tconst record: DocumentRecord = {\n\t\t\t\tid,\n\t\t\t\t...address,\n\t\t\t\thistory: \"none\",\n\t\t\t\tcreatedAt: step.seq,\n\t\t\t\trevision: 1,\n\t\t\t\tversion,\n\t\t\t\tfingerprint,\n\t\t\t};\n\t\t\tawait insertDocument(step, record, text);\n\t\t\treturn [{ kind: \"document.create\", record, base }];\n\t\t},\n\t};\n}\n\n/**\n * Inserts `record` as it is (id, seqs and revision kept: a creation, an import, a batch), with its base at `createdAt`\n * when `text` (the base's value serialized) is given; a record created retired (an empty lifetime) keeps what its\n * history keeps.\n */\nexport async function insertDocument(step: Step, record: DocumentRecord, text: string | undefined): Promise<void> {\n\tconst { id, namespace, owner, kind, key, history, createdAt, retiredAt, meta, revision, version, fingerprint } =\n\t\trecord;\n\tawait step.run(\n\t\t`INSERT INTO ${TABLES.documents}\n\t\t\t(id, owner, namespace, kind, key, history, created_at, retired_at, meta, revision, version, fingerprint)\n\t\t\tVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,\n\t\tid,\n\t\towner,\n\t\tnamespace,\n\t\tkind,\n\t\tkey ?? \"\",\n\t\thistory,\n\t\tcreatedAt,\n\t\tretiredAt ?? null,\n\t\tmeta ?? null,\n\t\trevision,\n\t\tversion,\n\t\tfingerprint,\n\t);\n\tif (text !== undefined) await insertRevision(step, id, createdAt, \"base\", version, text);\n\tif (retiredAt !== undefined) await dropRetired(step, id, history);\n}\n\n/**\n * Stages a change of Chord document `id` prepared on `revision`: a delta on the current base's version, or a new base.\n * `text` is the content serialized before the queue.\n */\nexport function changeDocument(id: number, revision: number, content: DocumentContent, text: string): StagedWrite {\n\tconst write: DocumentWrite = { kind: \"document.change\", id, revision, content };\n\treturn {\n\t\torder: \"write\",\n\t\tapply: async (step) => {\n\t\t\tawait writeContent(step, id, \"none\", revision, content, text);\n\t\t\treturn [write];\n\t\t},\n\t};\n}\n\n/**\n * Writes `content` to document `id` (of `history`) prepared on `revision`, in the step's seq: its revision, the\n * counted conditional `UPDATE` (a delta only on the base's version), and at a new base the older revisions a\n * `none` or `latest` record drops. A record that is not live at `revision` throws (memory and disk disagree).\n */\nexport async function writeContent(\n\tstep: Step,\n\tid: number,\n\thistory: DocumentHistory,\n\trevision: number,\n\tcontent: DocumentContent,\n\ttext: string,\n): Promise<void> {\n\t// As ids: a revision past the safe range would stop counting exactly.\n\tif (revision >= Number.MAX_SAFE_INTEGER) throw new Error(`document ${id}: no revision past the safe range`);\n\tawait insertRevision(step, id, step.seq, content.kind, content.version, text);\n\tconst changed =\n\t\tcontent.kind === \"delta\"\n\t\t\t? await step.runCounted(\n\t\t\t\t\t`UPDATE ${TABLES.documents} SET revision = revision + 1\n\t\t\t\t\t\tWHERE id = ? AND revision = ? AND version = ? AND retired_at IS NULL`,\n\t\t\t\t\tid,\n\t\t\t\t\trevision,\n\t\t\t\t\tcontent.version,\n\t\t\t\t)\n\t\t\t: await step.runCounted(\n\t\t\t\t\t`UPDATE ${TABLES.documents} SET revision = revision + 1, version = ?, fingerprint = ?\n\t\t\t\t\t\tWHERE id = ? AND revision = ? AND retired_at IS NULL`,\n\t\t\t\t\tcontent.version,\n\t\t\t\t\tcontent.fingerprint,\n\t\t\t\t\tid,\n\t\t\t\t\trevision,\n\t\t\t\t);\n\tif (changed !== 1) throw new Error(`document ${id}: not live at revision ${revision}`);\n\tif (content.kind === \"base\" && history !== \"rewindable\") {\n\t\tawait step.run(`DELETE FROM ${TABLES.revisions} WHERE document_id = ? AND seq < ?`, id, step.seq);\n\t}\n}\n\n/** Stages the retirement of Chord document `id` (history `none`) at `revision`: its row and its revisions go. */\nexport function retireDocument(id: number, revision: number): StagedWrite {\n\tconst write: DocumentWrite = { kind: \"document.retire\", id, revision };\n\treturn {\n\t\torder: \"retire\",\n\t\tapply: async (step) => {\n\t\t\t// A Chord document keeps no history (`none`): its row goes with a conditional, counted DELETE (6a's).\n\t\t\tconst deleted = await step.runCounted(\n\t\t\t\t`DELETE FROM ${TABLES.documents} WHERE id = ? AND revision = ? AND retired_at IS NULL`,\n\t\t\t\tid,\n\t\t\t\trevision,\n\t\t\t);\n\t\t\tif (deleted !== 1) throw new Error(`document ${id}: not live at revision ${revision}`);\n\t\t\tawait step.run(`DELETE FROM ${TABLES.revisions} WHERE document_id = ?`, id);\n\t\t\treturn [write];\n\t\t},\n\t};\n}\n\n/**\n * Retires live `record` in the step's seq by its history (R1): a `none` record's row and revisions go, a `latest` one\n * keeps its row with `retired_at` and drops its revisions, a `rewindable` one keeps everything.\n */\nexport async function retireRecord(step: Step, record: DocumentRecord): Promise<void> {\n\tconst { id, history } = record;\n\tif (history !== \"none\") await step.run(`UPDATE ${TABLES.documents} SET retired_at = ? WHERE id = ?`, step.seq, id);\n\tawait dropRetired(step, id, history);\n}\n\n/** What a retired record of `history` drops: a `none` row too, every revision unless `rewindable`. */\nasync function dropRetired(step: Step, id: number, history: DocumentHistory): Promise<void> {\n\tif (history === \"rewindable\") return;\n\tif (history === \"none\") await step.run(`DELETE FROM ${TABLES.documents} WHERE id = ?`, id);\n\tawait step.run(`DELETE FROM ${TABLES.revisions} WHERE document_id = ?`, id);\n}\n\n/** Inserts one revision of document `id` at `seq`, `text` its serialized content. */\nexport function insertRevision(\n\tstep: Step,\n\tid: number,\n\tseq: number,\n\tkind: \"base\" | \"delta\",\n\tversion: number,\n\ttext: string,\n): Promise<void> {\n\treturn step.run(\n\t\t`INSERT INTO ${TABLES.revisions} (document_id, seq, kind, version, content) VALUES (?, ?, ?, ?, ?)`,\n\t\tid,\n\t\tseq,\n\t\tkind,\n\t\tversion,\n\t\ttext,\n\t);\n}\n\ntype RecordRow = {\n\treadonly id: number;\n\treadonly owner: string;\n\treadonly namespace: string;\n\treadonly kind: string;\n\treadonly key: string;\n\treadonly history: DocumentHistory;\n\treadonly created_at: number;\n\treadonly retired_at: number | null;\n\treadonly meta: string | null;\n\treadonly revision: number;\n\treadonly version: number;\n\treadonly fingerprint: string;\n};\n\nconst RECORD_COLUMNS =\n\t\"id, owner, namespace, kind, key, history, created_at, retired_at, meta, revision, version, fingerprint\";\n\nconst READ = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents} WHERE id = ?`;\n\n/** The record with `id`, live or retired, if there is one. */\nexport async function readDocument(\n\texecutor: Pick<SqliteExecutor, \"get\">,\n\tid: number,\n): Promise<DocumentRecord | undefined> {\n\tconst row = await executor.get<RecordRow>(READ, id);\n\treturn row === undefined ? undefined : recordOf(row);\n}\n\nconst FIND_CURRENT = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents}\n\tWHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND retired_at IS NULL`;\n\nconst FIND_AT = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents}\n\tWHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?)\n\tORDER BY created_at DESC LIMIT 1`;\n\n/** The record at `address` live at `at` (the half-open lifetime `createdAt <= at < retiredAt`), if any. */\nexport async function findDocument(\n\texecutor: Pick<SqliteExecutor, \"get\">,\n\taddress: DocumentAddress,\n\tat: DocumentPoint = \"current\",\n): Promise<DocumentRecord | undefined> {\n\tconst { owner, namespace, kind } = address;\n\tconst key = address.key ?? \"\";\n\tconst row =\n\t\tat === \"current\"\n\t\t\t? await executor.get<RecordRow>(FIND_CURRENT, owner, namespace, kind, key)\n\t\t\t: await executor.get<RecordRow>(FIND_AT, owner, namespace, kind, key, at, at);\n\treturn row === undefined ? undefined : recordOf(row);\n}\n\n/**\n * A record as an adapter that keeps its own fields in `meta` reads it: the meta, and, where a read can find retired\n * records (at a point, by id), when it was retired. One or two columns: each column a read returns costs.\n */\nexport type DocumentEntry = { readonly meta: string | null; readonly retired_at?: number | null };\n\n/** A document entry with what tells whose it is and what it keeps, as a read by id needs. */\nexport type OwnedDocumentEntry = DocumentEntry & {\n\treadonly owner: string;\n\treadonly namespace: string;\n\treadonly history: DocumentHistory;\n};\n\nconst READ_ENTRY = `SELECT meta, retired_at, owner, namespace, history FROM ${TABLES.documents} WHERE id = ?`;\n\n/** The entry of the record with `id`, live or retired, with its owner, namespace and history; `undefined` if none. */\nexport function readDocumentEntry(\n\texecutor: Pick<SqliteExecutor, \"get\">,\n\tid: number,\n): Promise<OwnedDocumentEntry | undefined> {\n\treturn executor.get<OwnedDocumentEntry>(READ_ENTRY, id);\n}\n\nconst FIND_ENTRY_CURRENT = `SELECT meta FROM ${TABLES.documents}\n\tWHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND retired_at IS NULL`;\n\nconst FIND_ENTRY_AT = `SELECT meta, retired_at FROM ${TABLES.documents}\n\tWHERE owner = ? AND namespace = ? AND kind = ? AND key = ? AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?)\n\tORDER BY created_at DESC LIMIT 1`;\n\n/** `findDocument` reading only what an adapter keeping its fields in `meta` needs (fewer columns, no record built). */\nexport function findDocumentEntry(\n\texecutor: Pick<SqliteExecutor, \"get\">,\n\taddress: DocumentAddress,\n\tat: DocumentPoint,\n): Promise<DocumentEntry | undefined> {\n\tconst { owner, namespace, kind } = address;\n\tconst key = address.key ?? \"\";\n\treturn at === \"current\"\n\t\t? executor.get<DocumentEntry>(FIND_ENTRY_CURRENT, owner, namespace, kind, key)\n\t\t: executor.get<DocumentEntry>(FIND_ENTRY_AT, owner, namespace, kind, key, at, at);\n}\n\ntype RevisionRow = {\n\treadonly seq: number;\n\treadonly kind: \"base\" | \"delta\";\n\treadonly version: number;\n\treadonly content: string;\n};\n\nconst LOAD = `SELECT seq, kind, version, content FROM ${TABLES.revisions} WHERE document_id = ? AND seq <= ? AND seq >= (\n\tSELECT max(seq) FROM ${TABLES.revisions} WHERE document_id = ? AND kind = 'base' AND seq <= ?) ORDER BY seq`;\n\n/**\n * Loads `record` at `at`: its newest base at or below it and the deltas after that base up to it, applied once; the\n * version is the base's. A record without such a base (one that keeps no history from there) throws.\n */\nexport async function loadDocument(\n\texecutor: Pick<SqliteExecutor, \"all\">,\n\trecord: DocumentRecord,\n\tat: DocumentPoint = \"current\",\n): Promise<StoredDocument> {\n\treturn { record, ...(await loadContent(executor, record.id, at)) };\n}\n\n/** `loadDocument`'s content of document `id` at `at`, without its record (an adapter reads the fields it keeps). */\nexport async function loadContent(\n\texecutor: Pick<SqliteExecutor, \"all\">,\n\tid: number,\n\tat: DocumentPoint,\n): Promise<Omit<StoredDocument, \"record\">> {\n\tconst upper = at === \"current\" ? Number.MAX_SAFE_INTEGER : at;\n\tconst revisions = await executor.all<RevisionRow>(LOAD, id, upper, id, upper);\n\tconst [base, ...deltas] = revisions;\n\tif (base === undefined || base.kind !== \"base\") throw new Error(`document ${id}: no base`);\n\tlet value = JSON.parse(base.content) as JsonValue;\n\tfor (const delta of deltas) {\n\t\tif (delta.version !== base.version) throw new Error(`document ${id}: a delta crosses a version`);\n\t\tvalue = apply(value, JSON.parse(delta.content) as Op[]);\n\t}\n\treturn { value, version: base.version, deltasSinceBase: deltas.length };\n}\n\n/** Up to `limit` keys of live documents of `kind` under `owner` after `after` (from the first), in code point order. */\nexport async function listDocumentKeys(\n\texecutor: SqliteExecutor,\n\taddress: Omit<DocumentAddress, \"key\">,\n\tafter: string | undefined,\n\tlimit: number,\n): Promise<string[]> {\n\t// The first page has no lower bound: `\"\"` is a key too.\n\tconst from = after === undefined ? \"\" : \" AND key > ?\";\n\tconst rows = await executor.all<{ readonly key: string }>(\n\t\t`SELECT key FROM ${TABLES.documents} WHERE owner = ? AND namespace = ? AND kind = ?${from}\n\t\t\tAND retired_at IS NULL ORDER BY key LIMIT ?`,\n\t\taddress.owner,\n\t\taddress.namespace,\n\t\taddress.kind,\n\t\t...(after === undefined ? [] : [after]),\n\t\tlimit,\n\t);\n\treturn rows.map(({ key }) => key);\n}\n\n/** What `listDocuments` scans: one owner's namespace, optionally one kind. */\nexport type DocumentScope = { readonly owner: string; readonly namespace: string; readonly kind?: string };\n\n/** The statements of `listDocuments`, by its shape: with a kind or not, current or at a point. */\nconst LIST = (() => {\n\tconst from = `SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents} WHERE owner = ? AND namespace = ? AND id > ?`;\n\tconst current = \" AND retired_at IS NULL ORDER BY id LIMIT ?\";\n\tconst at = \" AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?) ORDER BY id LIMIT ?\";\n\treturn {\n\t\tcurrent: `${from}${current}`,\n\t\tat: `${from}${at}`,\n\t\tkindCurrent: `${from} AND kind = ?${current}`,\n\t\tkindAt: `${from} AND kind = ?${at}`,\n\t};\n})();\n\n/** Up to `limit` records of `scope` live at `at` with ids above `after`, by id. */\nexport async function listDocuments(\n\texecutor: Pick<SqliteExecutor, \"all\">,\n\tscope: DocumentScope,\n\tat: DocumentPoint,\n\tafter: number,\n\tlimit: number,\n): Promise<DocumentRecord[]> {\n\tconst { owner, namespace, kind } = scope;\n\tlet rows: RecordRow[];\n\tif (kind === undefined) {\n\t\trows =\n\t\t\tat === \"current\"\n\t\t\t\t? await executor.all<RecordRow>(LIST.current, owner, namespace, after, limit)\n\t\t\t\t: await executor.all<RecordRow>(LIST.at, owner, namespace, after, at, at, limit);\n\t} else {\n\t\trows =\n\t\t\tat === \"current\"\n\t\t\t\t? await executor.all<RecordRow>(LIST.kindCurrent, owner, namespace, after, kind, limit)\n\t\t\t\t: await executor.all<RecordRow>(LIST.kindAt, owner, namespace, after, kind, at, at, limit);\n\t}\n\treturn rows.map(recordOf);\n}\n\n/** The statements of `listDocumentEntries`, by shape, as `LIST`'s. */\nconst LIST_ENTRIES = (() => {\n\tconst from = (columns: string) =>\n\t\t`SELECT ${columns} FROM ${TABLES.documents} WHERE owner = ? AND namespace = ? AND id > ?`;\n\tconst current = \" AND retired_at IS NULL ORDER BY id LIMIT ?\";\n\tconst at = \" AND created_at <= ? AND (retired_at IS NULL OR retired_at > ?) ORDER BY id LIMIT ?\";\n\treturn {\n\t\tcurrent: `${from(\"meta\")}${current}`,\n\t\tat: `${from(\"meta, retired_at\")}${at}`,\n\t\tkindCurrent: `${from(\"meta\")} AND kind = ?${current}`,\n\t\tkindAt: `${from(\"meta, retired_at\")} AND kind = ?${at}`,\n\t};\n})();\n\n/** `listDocuments` reading only what an adapter keeping its fields in `meta` needs. */\nexport function listDocumentEntries(\n\texecutor: Pick<SqliteExecutor, \"all\">,\n\tscope: DocumentScope,\n\tat: DocumentPoint,\n\tafter: number,\n\tlimit: number,\n): Promise<DocumentEntry[]> {\n\tconst { owner, namespace, kind } = scope;\n\tif (kind === undefined) {\n\t\treturn at === \"current\"\n\t\t\t? executor.all<DocumentEntry>(LIST_ENTRIES.current, owner, namespace, after, limit)\n\t\t\t: executor.all<DocumentEntry>(LIST_ENTRIES.at, owner, namespace, after, at, at, limit);\n\t}\n\treturn at === \"current\"\n\t\t? executor.all<DocumentEntry>(LIST_ENTRIES.kindCurrent, owner, namespace, after, kind, limit)\n\t\t: executor.all<DocumentEntry>(LIST_ENTRIES.kindAt, owner, namespace, after, kind, at, at, limit);\n}\n\n/** Up to `limit` stored records, live and retired, with ids above `after`, by id (an export's pages). */\nexport async function listRecords(executor: SqliteExecutor, after: number, limit: number): Promise<DocumentRecord[]> {\n\tconst rows = await executor.all<RecordRow>(\n\t\t`SELECT ${RECORD_COLUMNS} FROM ${TABLES.documents} WHERE id > ? ORDER BY id LIMIT ?`,\n\t\tafter,\n\t\tlimit,\n\t);\n\treturn rows.map(recordOf);\n}\n\n/** Up to `limit` stored revisions of document `id` after seq `after`, in seq order (an export's page). */\nexport async function listRevisions(\n\texecutor: SqliteExecutor,\n\tid: number,\n\tafter: number,\n\tlimit: number,\n): Promise<DocumentRevision[]> {\n\tconst rows = await executor.all<RevisionRow>(\n\t\t`SELECT seq, kind, version, content FROM ${TABLES.revisions} WHERE document_id = ? AND seq > ? ORDER BY seq LIMIT ?`,\n\t\tid,\n\t\tafter,\n\t\tlimit,\n\t);\n\treturn rows.map(({ seq, kind, version, content }) => {\n\t\t// Written by `insertRevision`: a base's value or a delta's ops, as JSON.\n\t\tconst parsed = JSON.parse(content) as unknown;\n\t\treturn {\n\t\t\tid,\n\t\t\tseq,\n\t\t\tcontent:\n\t\t\t\tkind === \"base\"\n\t\t\t\t\t? { kind, version, value: parsed as JsonValue }\n\t\t\t\t\t: { kind, version, ops: parsed as readonly Op[] },\n\t\t};\n\t});\n}\n\nfunction recordOf(row: RecordRow): DocumentRecord {\n\tconst { id, namespace, owner, kind, key, history, created_at, retired_at, meta, revision, version, fingerprint } =\n\t\trow;\n\treturn {\n\t\tid,\n\t\towner,\n\t\tnamespace,\n\t\tkind,\n\t\t...(key === \"\" ? {} : { key }),\n\t\thistory,\n\t\tcreatedAt: created_at,\n\t\t...(retired_at === null ? {} : { retiredAt: retired_at }),\n\t\t...(meta === null ? {} : { meta }),\n\t\trevision,\n\t\tversion,\n\t\tfingerprint,\n\t};\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { JsonValue } from "../../json.ts";
|
|
2
|
-
import type { SetNode, WhereNode } from "./expression.ts";
|
|
3
|
-
import type { Scalar } from "./rows.ts";
|
|
4
|
-
/** A row as the evaluator reads it: stored cells, an absent column being `NULL`. */
|
|
5
|
-
export type EvaluatedRow = {
|
|
6
|
-
readonly [column: string]: Scalar | JsonValue | undefined;
|
|
7
|
-
};
|
|
8
|
-
/** Whether `row` matches `node` under SQL's rules: unknown (`NULL`) does not match. */
|
|
9
|
-
export declare function matches(node: WhereNode, row: EvaluatedRow): boolean;
|
|
10
|
-
/** Orders two cells of one column as SQLite does: text by code point, booleans as 0 and 1, numbers numerically. */
|
|
11
|
-
export declare function compareScalar(a: Scalar, b: Scalar): number;
|
|
12
|
-
/**
|
|
13
|
-
* `row` after `set`, every right side evaluated against `row` (simultaneous: `{ a: b, b: a }` swaps); an integer
|
|
14
|
-
* result outside ±(2^53 - 1) throws `invalid/args` (rule 10), as the column's `CHECK` fails the step.
|
|
15
|
-
*/
|
|
16
|
-
export declare function applySet(set: SetNode, row: EvaluatedRow, table: string): EvaluatedRow;
|
|
17
|
-
//# sourceMappingURL=evaluate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.d.ts","sourceRoot":"","sources":["../../../src/next/store/evaluate.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAmC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxC,oFAAoF;AACpF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;CAAE,CAAC;AAKzF,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAEnE;AAuDD,mHAAmH;AACnH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAG1D;AAID;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAQrF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate.js","sourceRoot":"","sources":["../../../src/next/store/evaluate.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,mHAAmH;AACnH,4DAA4D;AAG5D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;A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aScript evaluator of the compiled table vocabulary (slice 6a §6; rule 10): the `tx.get` overlay matches\n// `where` nodes and applies `set` nodes with SQL's three-valued `NULL` rules and code point text order, as the SQL\n// that `sql.ts` renders from the same nodes does in SQLite.\n\nimport type { JsonValue } from \"../../json.ts\";\nimport { invalid } from \"../data/internal.ts\";\nimport type { Comparison, ExprNode, Operation, SetNode, WhereNode } from \"./expression.ts\";\nimport type { Scalar } from \"./rows.ts\";\nimport { compareText } from \"./text.ts\";\n\n/** A row as the evaluator reads it: stored cells, an absent column being `NULL`. */\nexport type EvaluatedRow = { readonly [column: string]: Scalar | JsonValue | undefined };\n\n/** SQL's three-valued truth: `null` is unknown (a comparison with `NULL`). */\ntype Truth = boolean | null;\n\n/** Whether `row` matches `node` under SQL's rules: unknown (`NULL`) does not match. */\nexport function matches(node: WhereNode, row: EvaluatedRow): boolean {\n\treturn truth(node, row) === true;\n}\n\nfunction truth(node: WhereNode, row: EvaluatedRow): Truth {\n\tif (\"and\" in node)\n\t\treturn node.and.reduce<Truth>((all, each) => (all === false ? false : both(all, truth(each, row))), true);\n\tif (\"or\" in node)\n\t\treturn node.or.reduce<Truth>((any, each) => (any === true ? true : either(any, truth(each, row))), false);\n\tif (\"not\" in node) {\n\t\tconst inner = truth(node.not, row);\n\t\treturn inner === null ? null : !inner;\n\t}\n\tif (\"isNull\" in node) return row[node.isNull] === undefined;\n\t// The row is checked against the table the condition was compiled for: its columns hold scalars.\n\tif (\"inArray\" in node) {\n\t\tconst [column, values] = node.inArray;\n\t\t// SQL: `x IN ()` is false, for a `NULL` x too.\n\t\tif (values.length === 0) return false;\n\t\tconst value = row[column] as Scalar | undefined;\n\t\treturn value === undefined ? null : values.some((each) => compareScalar(value, each) === 0);\n\t}\n\tif (\"prefix\" in node) {\n\t\tconst value = row[node.prefix[0]] as string | undefined;\n\t\treturn value === undefined ? null : value.startsWith(node.prefix[1]);\n\t}\n\t// The remaining nodes are the comparisons, one entry each; `Object.entries` loses that.\n\tconst [op, [column, operand]] = Object.entries(node)[0] as [Comparison, readonly [string, Scalar]];\n\tconst value = row[column] as Scalar | undefined;\n\tif (value === undefined) return null;\n\tconst order = compareScalar(value, operand);\n\tswitch (op) {\n\t\tcase \"eq\":\n\t\t\treturn order === 0;\n\t\tcase \"ne\":\n\t\t\treturn order !== 0;\n\t\tcase \"lt\":\n\t\t\treturn order < 0;\n\t\tcase \"lte\":\n\t\t\treturn order <= 0;\n\t\tcase \"gt\":\n\t\t\treturn order > 0;\n\t\tcase \"gte\":\n\t\t\treturn order >= 0;\n\t}\n}\n\nfunction both(a: Truth, b: Truth): Truth {\n\tif (a === false || b === false) return false;\n\treturn a === null || b === null ? null : true;\n}\n\nfunction either(a: Truth, b: Truth): Truth {\n\tif (a === true || b === true) return true;\n\treturn a === null || b === null ? null : false;\n}\n\n/** Orders two cells of one column as SQLite does: text by code point, booleans as 0 and 1, numbers numerically. */\nexport function compareScalar(a: Scalar, b: Scalar): number {\n\tif (typeof a === \"string\") return compareText(a, b as string);\n\treturn Number(a) - Number(b);\n}\n\nconst SAFE = Number.MAX_SAFE_INTEGER;\n\n/**\n * `row` after `set`, every right side evaluated against `row` (simultaneous: `{ a: b, b: a }` swaps); an integer\n * result outside ±(2^53 - 1) throws `invalid/args` (rule 10), as the column's `CHECK` fails the step.\n */\nexport function applySet(set: SetNode, row: EvaluatedRow, table: string): EvaluatedRow {\n\tconst next: { [column: string]: Scalar | JsonValue | undefined } = { ...row };\n\tfor (const [column, node] of Object.entries(set)) {\n\t\tconst value = evaluate(node, row, table);\n\t\tif (value === undefined) delete next[column];\n\t\telse next[column] = value;\n\t}\n\treturn next;\n}\n\nfunction evaluate(node: ExprNode, row: EvaluatedRow, table: string): Scalar | JsonValue | undefined {\n\tif (node === null) return undefined;\n\tif (typeof node !== \"object\") return node;\n\tif (\"col\" in node) return row[node.col];\n\tif (\"json\" in node) return node.json;\n\tif (\"when\" in node) {\n\t\tconst [condition, a, b] = node.when;\n\t\treturn evaluate(matches(condition, row) ? a : b, row, table);\n\t}\n\tif (\"coalesce\" in node) return evaluate(node.coalesce[0], row, table) ?? evaluate(node.coalesce[1], row, table);\n\tif (\"replacePrefix\" in node) {\n\t\tconst [subject, from, to] = node.replacePrefix;\n\t\tconst value = evaluate(subject, row, table) as string | undefined;\n\t\treturn value === undefined || !value.startsWith(from) ? value : to + value.slice(from.length);\n\t}\n\t// The remaining nodes are the arithmetic and text operations, one entry each, over scalar operands (compiled so).\n\tconst [op, [x, y]] = Object.entries(node)[0] as [Operation, readonly [ExprNode, ExprNode]];\n\tconst a = evaluate(x, row, table) as Scalar | undefined;\n\tconst b = evaluate(y, row, table) as Scalar | undefined;\n\tif (a === undefined || b === undefined) return undefined;\n\tswitch (op) {\n\t\tcase \"concat\":\n\t\t\treturn (a as string) + (b as string);\n\t\tcase \"max\":\n\t\t\treturn compareScalar(a, b) >= 0 ? a : b;\n\t\tcase \"min\":\n\t\t\treturn compareScalar(a, b) <= 0 ? a : b;\n\t\tdefault: {\n\t\t\tconst result = op === \"add\" ? (a as number) + (b as number) : (a as number) - (b as number);\n\t\t\tif (result > SAFE || result < -SAFE)\n\t\t\t\tthrow invalid(\"args\", `${table}: ${op} gives ${result}, outside ±(2^53 - 1)`);\n\t\t\treturn result;\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type Context } from "../../context/index.ts";
|
|
2
|
-
import { type ArchivePart } from "./archive.ts";
|
|
3
|
-
import type { ChordStore } from "./store.ts";
|
|
4
|
-
/** The rows and documents an export reads per page. */
|
|
5
|
-
export declare const EXPORT_PAGE = 100;
|
|
6
|
-
/**
|
|
7
|
-
* An export of `store` under `context`: an async iterator of its parts. One pass; after an abort `next()` rejects
|
|
8
|
-
* `aborted`, after the store closed `released`.
|
|
9
|
-
*/
|
|
10
|
-
export declare class StoreExport implements AsyncIterableIterator<ArchivePart> {
|
|
11
|
-
#private;
|
|
12
|
-
constructor(store: ChordStore, context: Context);
|
|
13
|
-
[Symbol.asyncIterator](): this;
|
|
14
|
-
next(): Promise<IteratorResult<ArchivePart>>;
|
|
15
|
-
return(): Promise<IteratorResult<ArchivePart>>;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=export.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../../src/next/store/export.ts"],"names":[],"mappings":"AAMA,OAAO,EAAoB,KAAK,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAIxE,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAMhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,uDAAuD;AACvD,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B;;;GAGG;AACH,qBAAa,WAAY,YAAW,qBAAqB,CAAC,WAAW,CAAC;;IASrE,YAAY,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAI9C;IAED,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,IAAI,CAE7B;IAEK,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAmBjD;IAEK,MAAM,IAAI,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAGnD;CA6BD"}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
// `store.export(ctx)` (slice 6a §13, rule 26): the store's state after its `lastSeq` as archive parts, read page by
|
|
2
|
-
// page with plain reads while the export holds the commit queue (no commit can interleave, no long read transaction).
|
|
3
|
-
// The queue is taken at the first `next()` and given back when the iteration ends, throws, is closed or `ctx` aborts;
|
|
4
|
-
// an abort while the consumer is suspended gives it back at once and drops the pages and records the export held, and
|
|
5
|
-
// an abort while it waits for the queue ends the wait. Closing the store ends it too (`released`).
|
|
6
|
-
import { awaitWithContext } from "../../context/index.js";
|
|
7
|
-
import { ChordError } from "../data/index.js";
|
|
8
|
-
import { ARCHIVE_FORMAT } from "./archive.js";
|
|
9
|
-
import { listRecords, listRevisions } from "./engine.js";
|
|
10
|
-
import { ROW_VERSION, versionColumn } from "./rows.js";
|
|
11
|
-
import { STORE_SCHEMA } from "./schema.js";
|
|
12
|
-
import { quote, recordedPut } from "./sql.js";
|
|
13
|
-
/** The rows and documents an export reads per page. */
|
|
14
|
-
export const EXPORT_PAGE = 100;
|
|
15
|
-
/**
|
|
16
|
-
* An export of `store` under `context`: an async iterator of its parts. One pass; after an abort `next()` rejects
|
|
17
|
-
* `aborted`, after the store closed `released`.
|
|
18
|
-
*/
|
|
19
|
-
export class StoreExport {
|
|
20
|
-
#context;
|
|
21
|
-
/** The parts, until the export ends; dropped then, with the pages they hold. */
|
|
22
|
-
#parts;
|
|
23
|
-
#state = "open";
|
|
24
|
-
/** Gives the commit queue back while the export holds it. */
|
|
25
|
-
#release;
|
|
26
|
-
#abort = () => this.#end("aborted");
|
|
27
|
-
constructor(store, context) {
|
|
28
|
-
this.#context = context;
|
|
29
|
-
const hold = (release) => this.#hold(release);
|
|
30
|
-
this.#parts = parts(store, context, hold, () => this.#end("closed"));
|
|
31
|
-
}
|
|
32
|
-
[Symbol.asyncIterator]() {
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
async next() {
|
|
36
|
-
if (this.#context.abortSignal?.aborted)
|
|
37
|
-
this.#end("aborted");
|
|
38
|
-
this.#assertOpen();
|
|
39
|
-
if (this.#parts === undefined)
|
|
40
|
-
return { done: true, value: undefined };
|
|
41
|
-
const pending = this.#parts.next();
|
|
42
|
-
let result;
|
|
43
|
-
try {
|
|
44
|
-
// Until the export holds the queue only `context` ends the wait; from then on its abort listener does.
|
|
45
|
-
result = await (this.#release === undefined ? awaitWithContext(pending, this.#context) : pending);
|
|
46
|
-
}
|
|
47
|
-
catch (error) {
|
|
48
|
-
if (this.#context.abortSignal?.aborted)
|
|
49
|
-
this.#end("aborted");
|
|
50
|
-
this.#assertOpen();
|
|
51
|
-
this.#end("ended");
|
|
52
|
-
throw error;
|
|
53
|
-
}
|
|
54
|
-
// Ended meanwhile (an abort, the store's close): no part after that, even one that needed no read.
|
|
55
|
-
this.#assertOpen();
|
|
56
|
-
if (result.done)
|
|
57
|
-
this.#end("ended");
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
|
-
async return() {
|
|
61
|
-
this.#end("ended");
|
|
62
|
-
return { done: true, value: undefined };
|
|
63
|
-
}
|
|
64
|
-
/** The parts took the queue: the export holds it until it ends, and an abort ends it; ended already, it gives it back. */
|
|
65
|
-
#hold(release) {
|
|
66
|
-
if (this.#state !== "open") {
|
|
67
|
-
release();
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
this.#release = release;
|
|
71
|
-
this.#context.abortSignal?.addEventListener("abort", this.#abort, { once: true });
|
|
72
|
-
}
|
|
73
|
-
/** Ends the export once: the queue given back, the parts closed (once they reach a `yield`) and dropped. */
|
|
74
|
-
#end(state) {
|
|
75
|
-
if (this.#state !== "open")
|
|
76
|
-
return;
|
|
77
|
-
this.#state = state;
|
|
78
|
-
this.#release?.();
|
|
79
|
-
this.#release = undefined;
|
|
80
|
-
this.#context.abortSignal?.removeEventListener("abort", this.#abort);
|
|
81
|
-
void this.#parts?.return(undefined).catch(() => { });
|
|
82
|
-
this.#parts = undefined;
|
|
83
|
-
}
|
|
84
|
-
/** Throws `aborted` after an abort, `released` after the store closed. */
|
|
85
|
-
#assertOpen() {
|
|
86
|
-
if (this.#state === "aborted")
|
|
87
|
-
throw aborted(this.#context);
|
|
88
|
-
if (this.#state === "closed")
|
|
89
|
-
throw new ChordError({ code: "released", reason: "closed", message: "store: closed" });
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
/** The error of a use of an aborted export: `aborted`, the signal's reason as the cause. */
|
|
93
|
-
function aborted(context) {
|
|
94
|
-
return new ChordError({ code: "aborted", message: "store: export aborted" }, { cause: context.abortSignal?.reason });
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* The parts in archive order, after taking the queue (handed to `hold`; the store's close calls `end`); the queue is
|
|
98
|
-
* given back when they end.
|
|
99
|
-
*/
|
|
100
|
-
async function* parts(store, context, hold, end) {
|
|
101
|
-
const release = await store.take(end);
|
|
102
|
-
hold(release);
|
|
103
|
-
try {
|
|
104
|
-
if (context.abortSignal?.aborted)
|
|
105
|
-
throw aborted(context);
|
|
106
|
-
const { lastSeq, nextId } = store;
|
|
107
|
-
yield { kind: "manifest", format: ARCHIVE_FORMAT, schema: STORE_SCHEMA, lastSeq, nextId };
|
|
108
|
-
let writes = 0;
|
|
109
|
-
const tables = [...store.tables.values()].sort((a, b) => (a.table < b.table ? -1 : 1));
|
|
110
|
-
for (const record of tables) {
|
|
111
|
-
const { table, version, state, columns, key, fingerprint } = record;
|
|
112
|
-
yield { kind: "table", table, version, state, columns, key, fingerprint };
|
|
113
|
-
writes++;
|
|
114
|
-
for await (const put of puts(store, record, context)) {
|
|
115
|
-
yield put;
|
|
116
|
-
writes++;
|
|
117
|
-
}
|
|
118
|
-
for (const [name, on] of Object.entries(record.indexes)) {
|
|
119
|
-
yield { kind: "index", table, name, columns: on };
|
|
120
|
-
writes++;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
for await (const part of documents(store, context)) {
|
|
124
|
-
yield part;
|
|
125
|
-
writes++;
|
|
126
|
-
}
|
|
127
|
-
yield { kind: "end", writes };
|
|
128
|
-
}
|
|
129
|
-
finally {
|
|
130
|
-
release();
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
/** The `put`s of a recorded table in key order, a page per read: the stored values and their versions. */
|
|
134
|
-
async function* puts(store, record, context) {
|
|
135
|
-
const { table, columns, key } = record;
|
|
136
|
-
const select = recordedPut(table, columns)
|
|
137
|
-
.physical.map((name) => quote(name))
|
|
138
|
-
.join(", ");
|
|
139
|
-
const order = key.map(quote).join(", ");
|
|
140
|
-
let after;
|
|
141
|
-
do {
|
|
142
|
-
const page = after;
|
|
143
|
-
const from = page === undefined ? "" : ` WHERE (${order}) > (${page.map(() => "?").join(", ")})`;
|
|
144
|
-
const sql = `SELECT ${select} FROM ${quote(table)}${from} ORDER BY ${order} LIMIT ?`;
|
|
145
|
-
const rows = await store.read((executor) => executor.all(sql, ...(page ?? []), EXPORT_PAGE), context);
|
|
146
|
-
for (const stored of rows)
|
|
147
|
-
yield putOf(record, stored);
|
|
148
|
-
after = rows.length < EXPORT_PAGE ? undefined : key.map((name) => rows.at(-1)[name]);
|
|
149
|
-
} while (after !== undefined);
|
|
150
|
-
}
|
|
151
|
-
/** A stored row as its `put`: `NULL` cells absent, booleans from 0 and 1, `json(...)` cells parsed with versions. */
|
|
152
|
-
function putOf(record, stored) {
|
|
153
|
-
const row = {};
|
|
154
|
-
const versions = {};
|
|
155
|
-
for (const [name, column] of Object.entries(record.columns)) {
|
|
156
|
-
const value = stored[name];
|
|
157
|
-
if (value === null || value === undefined)
|
|
158
|
-
continue;
|
|
159
|
-
// The recorded columns' types say what SQLite stored (STRICT tables): text for `json(...)` with its version.
|
|
160
|
-
if (column.type === "bool")
|
|
161
|
-
row[name] = value === 1;
|
|
162
|
-
else if (column.type === "json") {
|
|
163
|
-
row[name] = JSON.parse(value);
|
|
164
|
-
versions[name] = stored[versionColumn(name)];
|
|
165
|
-
}
|
|
166
|
-
else
|
|
167
|
-
row[name] = value;
|
|
168
|
-
}
|
|
169
|
-
return { kind: "put", table: record.table, row, version: stored[ROW_VERSION], columns: versions };
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Every stored record by id, live and retired, as its creation without a base, then its kept revisions in seq order:
|
|
173
|
-
* a `none` or `latest` record's current base and its deltas, a retired `latest` one none, a `rewindable` one all.
|
|
174
|
-
*/
|
|
175
|
-
async function* documents(store, context) {
|
|
176
|
-
let after = 0;
|
|
177
|
-
for (;;) {
|
|
178
|
-
const records = await store.read((executor) => listRecords(executor, after, EXPORT_PAGE), context);
|
|
179
|
-
for (const record of records) {
|
|
180
|
-
yield { kind: "document.create", record };
|
|
181
|
-
yield* revisions(store, record.id, context);
|
|
182
|
-
}
|
|
183
|
-
if (records.length < EXPORT_PAGE)
|
|
184
|
-
return;
|
|
185
|
-
after = records.at(-1).id;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
/** Document `id`'s kept revisions in seq order, read page by page (a long history is never one array). */
|
|
189
|
-
async function* revisions(store, id, context) {
|
|
190
|
-
let after = 0;
|
|
191
|
-
for (;;) {
|
|
192
|
-
const page = await store.read((executor) => listRevisions(executor, id, after, EXPORT_PAGE), context);
|
|
193
|
-
for (const revision of page)
|
|
194
|
-
yield { kind: "document.revision", ...revision };
|
|
195
|
-
if (page.length < EXPORT_PAGE)
|
|
196
|
-
return;
|
|
197
|
-
after = page.at(-1).seq;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=export.js.map
|