@diffra-ai/chord 0.0.0-stage → 0.2.3
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 +237 -0
- package/README.md +227 -2
- package/dist/context/index.d.ts +43 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +112 -0
- package/dist/context/index.js.map +1 -0
- package/dist/contracts/accepts.d.ts +91 -0
- package/dist/contracts/accepts.d.ts.map +1 -0
- package/dist/contracts/accepts.js +145 -0
- package/dist/contracts/accepts.js.map +1 -0
- package/dist/contracts/contract.d.ts +238 -0
- package/dist/contracts/contract.d.ts.map +1 -0
- package/dist/contracts/contract.js +69 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/declare.d.ts +144 -0
- package/dist/contracts/declare.d.ts.map +1 -0
- package/dist/contracts/declare.js +207 -0
- package/dist/contracts/declare.js.map +1 -0
- package/dist/contracts/evolve.d.ts +142 -0
- package/dist/contracts/evolve.d.ts.map +1 -0
- package/dist/contracts/evolve.js +216 -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 +61 -0
- package/dist/contracts/fingerprint.js.map +1 -0
- package/dist/contracts/history.d.ts +79 -0
- package/dist/contracts/history.d.ts.map +1 -0
- package/dist/contracts/history.js +3 -0
- package/dist/contracts/history.js.map +1 -0
- package/dist/contracts/host-kind.d.ts +58 -0
- package/dist/contracts/host-kind.d.ts.map +1 -0
- package/dist/contracts/host-kind.js +122 -0
- package/dist/contracts/host-kind.js.map +1 -0
- package/dist/contracts/index.d.ts +8 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +7 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/internal.d.ts +12 -0
- package/dist/contracts/internal.d.ts.map +1 -0
- package/dist/contracts/internal.js +11 -0
- package/dist/contracts/internal.js.map +1 -0
- package/dist/contracts/names.d.ts +3 -0
- package/dist/contracts/names.d.ts.map +1 -0
- package/dist/contracts/names.js +13 -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 +55 -0
- package/dist/contracts/params.js.map +1 -0
- package/dist/contracts/schema.d.ts +144 -0
- package/dist/contracts/schema.d.ts.map +1 -0
- package/dist/contracts/schema.js +144 -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 +83 -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 +31 -0
- package/dist/data/failure.d.ts.map +1 -0
- package/dist/data/failure.js +78 -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 +31 -0
- package/dist/data/params.js.map +1 -0
- package/dist/data/principal.d.ts +28 -0
- package/dist/data/principal.d.ts.map +1 -0
- package/dist/data/principal.js +64 -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/delta/apply-immutable-trusted.d.ts +4 -0
- package/dist/delta/apply-immutable-trusted.d.ts.map +1 -0
- package/dist/delta/apply-immutable-trusted.js +126 -0
- package/dist/delta/apply-immutable-trusted.js.map +1 -0
- package/dist/delta/diff.d.ts +5 -0
- package/dist/delta/diff.d.ts.map +1 -0
- package/dist/delta/diff.js +435 -0
- package/dist/delta/diff.js.map +1 -0
- package/dist/delta/draft.d.ts +5 -0
- package/dist/delta/draft.d.ts.map +1 -0
- package/dist/delta/draft.js +2 -0
- package/dist/delta/draft.js.map +1 -0
- package/dist/delta/index.d.ts +120 -0
- package/dist/delta/index.d.ts.map +1 -0
- package/dist/delta/index.js +697 -0
- package/dist/delta/index.js.map +1 -0
- package/dist/delta/pending.d.ts +36 -0
- package/dist/delta/pending.d.ts.map +1 -0
- package/dist/delta/pending.js +143 -0
- package/dist/delta/pending.js.map +1 -0
- package/dist/delta/revision-validator.d.ts +7 -0
- package/dist/delta/revision-validator.d.ts.map +1 -0
- package/dist/delta/revision-validator.js +71 -0
- package/dist/delta/revision-validator.js.map +1 -0
- package/dist/delta/tracker.d.ts +38 -0
- package/dist/delta/tracker.d.ts.map +1 -0
- package/dist/delta/tracker.js +2175 -0
- package/dist/delta/tracker.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 +44 -0
- package/dist/documents/address-source.js.map +1 -0
- package/dist/documents/definition.d.ts +92 -0
- package/dist/documents/definition.d.ts.map +1 -0
- package/dist/documents/definition.js +81 -0
- package/dist/documents/definition.js.map +1 -0
- package/dist/documents/documents.d.ts +129 -0
- package/dist/documents/documents.d.ts.map +1 -0
- package/dist/documents/documents.js +258 -0
- package/dist/documents/documents.js.map +1 -0
- package/dist/documents/fence.d.ts +9 -0
- package/dist/documents/fence.d.ts.map +1 -0
- package/dist/documents/fence.js +15 -0
- package/dist/documents/fence.js.map +1 -0
- package/dist/documents/handles.d.ts +81 -0
- package/dist/documents/handles.d.ts.map +1 -0
- package/dist/documents/handles.js +74 -0
- package/dist/documents/handles.js.map +1 -0
- package/dist/documents/index.d.ts +4 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +3 -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 +9 -0
- package/dist/documents/internal.js.map +1 -0
- package/dist/documents/keyed-slot.d.ts +139 -0
- package/dist/documents/keyed-slot.d.ts.map +1 -0
- package/dist/documents/keyed-slot.js +478 -0
- package/dist/documents/keyed-slot.js.map +1 -0
- package/dist/documents/line.d.ts +7 -0
- package/dist/documents/line.d.ts.map +1 -0
- package/dist/documents/line.js +14 -0
- package/dist/documents/line.js.map +1 -0
- package/dist/documents/persistence.d.ts +120 -0
- package/dist/documents/persistence.d.ts.map +1 -0
- package/dist/documents/persistence.js +156 -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 +93 -0
- package/dist/documents/residency.js.map +1 -0
- package/dist/documents/slot.d.ts +112 -0
- package/dist/documents/slot.d.ts.map +1 -0
- package/dist/documents/slot.js +190 -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 +445 -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 +63 -0
- package/dist/host/adapted.d.ts.map +1 -0
- package/dist/host/adapted.js +298 -0
- package/dist/host/adapted.js.map +1 -0
- package/dist/host/admission.d.ts +137 -0
- package/dist/host/admission.d.ts.map +1 -0
- package/dist/host/admission.js +290 -0
- package/dist/host/admission.js.map +1 -0
- package/dist/host/attempt.d.ts +417 -0
- package/dist/host/attempt.d.ts.map +1 -0
- package/dist/host/attempt.js +1490 -0
- package/dist/host/attempt.js.map +1 -0
- package/dist/host/backoff.d.ts +29 -0
- package/dist/host/backoff.d.ts.map +1 -0
- package/dist/host/backoff.js +69 -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 +12 -0
- package/dist/host/deadline.d.ts.map +1 -0
- package/dist/host/deadline.js +40 -0
- package/dist/host/deadline.js.map +1 -0
- package/dist/host/dependencies.d.ts +97 -0
- package/dist/host/dependencies.d.ts.map +1 -0
- package/dist/host/dependencies.js +148 -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 +101 -0
- package/dist/host/destination.js.map +1 -0
- package/dist/host/events.d.ts +114 -0
- package/dist/host/events.d.ts.map +1 -0
- package/dist/host/events.js +191 -0
- package/dist/host/events.js.map +1 -0
- package/dist/host/facet.d.ts +106 -0
- package/dist/host/facet.d.ts.map +1 -0
- package/dist/host/facet.js +55 -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 +207 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/host-data.d.ts +62 -0
- package/dist/host/host-data.d.ts.map +1 -0
- package/dist/host/host-data.js +229 -0
- package/dist/host/host-data.js.map +1 -0
- package/dist/host/host.d.ts +641 -0
- package/dist/host/host.d.ts.map +1 -0
- package/dist/host/host.js +1449 -0
- package/dist/host/host.js.map +1 -0
- package/dist/host/index.d.ts +20 -0
- package/dist/host/index.d.ts.map +1 -0
- package/dist/host/index.js +7 -0
- package/dist/host/index.js.map +1 -0
- package/dist/host/internal.d.ts +13 -0
- package/dist/host/internal.d.ts.map +1 -0
- package/dist/host/internal.js +11 -0
- package/dist/host/internal.js.map +1 -0
- package/dist/host/list.d.ts +52 -0
- package/dist/host/list.d.ts.map +1 -0
- package/dist/host/list.js +149 -0
- package/dist/host/list.js.map +1 -0
- package/dist/host/members.d.ts +58 -0
- package/dist/host/members.d.ts.map +1 -0
- package/dist/host/members.js +178 -0
- package/dist/host/members.js.map +1 -0
- package/dist/host/named-query.d.ts +67 -0
- package/dist/host/named-query.d.ts.map +1 -0
- package/dist/host/named-query.js +166 -0
- package/dist/host/named-query.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 +388 -0
- package/dist/host/object.d.ts.map +1 -0
- package/dist/host/object.js +1527 -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 +79 -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 +117 -0
- package/dist/host/presence.js.map +1 -0
- package/dist/host/query-reader.d.ts +80 -0
- package/dist/host/query-reader.d.ts.map +1 -0
- package/dist/host/query-reader.js +182 -0
- package/dist/host/query-reader.js.map +1 -0
- package/dist/host/read-declarations.d.ts +75 -0
- package/dist/host/read-declarations.d.ts.map +1 -0
- package/dist/host/read-declarations.js +152 -0
- package/dist/host/read-declarations.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-events.d.ts +51 -0
- package/dist/host/reference-events.d.ts.map +1 -0
- package/dist/host/reference-events.js +133 -0
- package/dist/host/reference-events.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 +77 -0
- package/dist/host/reference-source.d.ts.map +1 -0
- package/dist/host/reference-source.js +326 -0
- package/dist/host/reference-source.js.map +1 -0
- package/dist/host/reference.d.ts +377 -0
- package/dist/host/reference.d.ts.map +1 -0
- package/dist/host/reference.js +986 -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 +28 -0
- package/dist/host/retry-on.d.ts.map +1 -0
- package/dist/host/retry-on.js +52 -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 +27 -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-admission.d.ts +24 -0
- package/dist/host/route-admission.d.ts.map +1 -0
- package/dist/host/route-admission.js +238 -0
- package/dist/host/route-admission.js.map +1 -0
- package/dist/host/route.d.ts +88 -0
- package/dist/host/route.d.ts.map +1 -0
- package/dist/host/route.js +247 -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 +40 -0
- package/dist/host/sleep.js.map +1 -0
- package/dist/host/staging.d.ts +100 -0
- package/dist/host/staging.d.ts.map +1 -0
- package/dist/host/staging.js +413 -0
- package/dist/host/staging.js.map +1 -0
- package/dist/host/tiling.d.ts +57 -0
- package/dist/host/tiling.d.ts.map +1 -0
- package/dist/host/tiling.js +269 -0
- package/dist/host/tiling.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 +3 -0
- package/dist/host/uuid.d.ts.map +1 -0
- package/dist/host/uuid.js +38 -0
- package/dist/host/uuid.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/jobs/definition.d.ts +96 -0
- package/dist/jobs/definition.d.ts.map +1 -0
- package/dist/jobs/definition.js +83 -0
- package/dist/jobs/definition.js.map +1 -0
- package/dist/jobs/index.d.ts +5 -0
- package/dist/jobs/index.d.ts.map +1 -0
- package/dist/jobs/index.js +3 -0
- package/dist/jobs/index.js.map +1 -0
- package/dist/jobs/internal.d.ts +3 -0
- package/dist/jobs/internal.d.ts.map +1 -0
- package/dist/jobs/internal.js +4 -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 +95 -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 +117 -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 +55 -0
- package/dist/jobs/stored.js.map +1 -0
- package/dist/json.d.ts +18 -0
- package/dist/json.d.ts.map +1 -0
- package/dist/json.js +124 -0
- package/dist/json.js.map +1 -0
- package/dist/link/binary.d.ts +4 -0
- package/dist/link/binary.d.ts.map +1 -0
- package/dist/link/binary.js +574 -0
- package/dist/link/binary.js.map +1 -0
- package/dist/link/channel.d.ts +78 -0
- package/dist/link/channel.d.ts.map +1 -0
- package/dist/link/channel.js +252 -0
- package/dist/link/channel.js.map +1 -0
- package/dist/link/errors.d.ts +7 -0
- package/dist/link/errors.d.ts.map +1 -0
- package/dist/link/errors.js +21 -0
- package/dist/link/errors.js.map +1 -0
- package/dist/link/index.d.ts +8 -0
- package/dist/link/index.d.ts.map +1 -0
- package/dist/link/index.js +8 -0
- package/dist/link/index.js.map +1 -0
- package/dist/link/internal.d.ts +9 -0
- package/dist/link/internal.d.ts.map +1 -0
- package/dist/link/internal.js +10 -0
- package/dist/link/internal.js.map +1 -0
- package/dist/link/ipc.d.ts +22 -0
- package/dist/link/ipc.d.ts.map +1 -0
- package/dist/link/ipc.js +64 -0
- package/dist/link/ipc.js.map +1 -0
- package/dist/link/link.d.ts +34 -0
- package/dist/link/link.d.ts.map +1 -0
- package/dist/link/link.js +87 -0
- package/dist/link/link.js.map +1 -0
- package/dist/link/message.d.ts +278 -0
- package/dist/link/message.d.ts.map +1 -0
- package/dist/link/message.js +179 -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 +6 -0
- package/dist/link/text.d.ts.map +1 -0
- package/dist/link/text.js +383 -0
- package/dist/link/text.js.map +1 -0
- package/dist/link/values.d.ts +40 -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 +26 -0
- package/dist/link/websocket.d.ts.map +1 -0
- package/dist/link/websocket.js +91 -0
- package/dist/link/websocket.js.map +1 -0
- package/dist/node/app/app.d.ts +283 -0
- package/dist/node/app/app.d.ts.map +1 -0
- package/dist/node/app/app.js +598 -0
- package/dist/node/app/app.js.map +1 -0
- package/dist/node/app/archive.d.ts +44 -0
- package/dist/node/app/archive.d.ts.map +1 -0
- package/dist/node/app/archive.js +212 -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 +40 -0
- package/dist/node/app/data.d.ts.map +1 -0
- package/dist/node/app/data.js +47 -0
- package/dist/node/app/data.js.map +1 -0
- package/dist/node/app/ephemeral-sign-ins.d.ts +20 -0
- package/dist/node/app/ephemeral-sign-ins.d.ts.map +1 -0
- package/dist/node/app/ephemeral-sign-ins.js +69 -0
- package/dist/node/app/ephemeral-sign-ins.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 +388 -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 +70 -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/sign-ins.d.ts +74 -0
- package/dist/node/app/sign-ins.d.ts.map +1 -0
- package/dist/node/app/sign-ins.js +222 -0
- package/dist/node/app/sign-ins.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 +39 -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 +64 -0
- package/dist/node/http/admission.d.ts.map +1 -0
- package/dist/node/http/admission.js +137 -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 +23 -0
- package/dist/node/http/file.d.ts.map +1 -0
- package/dist/node/http/file.js +94 -0
- package/dist/node/http/file.js.map +1 -0
- package/dist/node/http/headers.d.ts +37 -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 +114 -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 +19 -0
- package/dist/node/http/incoming.d.ts.map +1 -0
- package/dist/node/http/incoming.js +31 -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 +78 -0
- package/dist/node/http/node.d.ts.map +1 -0
- package/dist/node/http/node.js +291 -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 +202 -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 +62 -0
- package/dist/node/http/upgrades.d.ts.map +1 -0
- package/dist/node/http/upgrades.js +194 -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 +577 -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 +40 -0
- package/dist/node/plugins/install.d.ts.map +1 -0
- package/dist/node/plugins/install.js +215 -0
- package/dist/node/plugins/install.js.map +1 -0
- package/dist/node/plugins/plugins.d.ts +165 -0
- package/dist/node/plugins/plugins.d.ts.map +1 -0
- package/dist/node/plugins/plugins.js +268 -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 +16 -0
- package/dist/node/plugins/stack.d.ts.map +1 -0
- package/dist/node/plugins/stack.js +70 -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 +40 -0
- package/dist/node/surfaces/bundle.d.ts.map +1 -0
- package/dist/node/surfaces/bundle.js +121 -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 +17 -0
- package/dist/node/surfaces/served.d.ts.map +1 -0
- package/dist/node/surfaces/served.js +44 -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 +42 -0
- package/dist/node/surfaces/tui.d.ts.map +1 -0
- package/dist/node/surfaces/tui.js +59 -0
- package/dist/node/surfaces/tui.js.map +1 -0
- package/dist/node/surfaces/web.d.ts +82 -0
- package/dist/node/surfaces/web.d.ts.map +1 -0
- package/dist/node/surfaces/web.js +122 -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 +260 -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 +43 -0
- package/dist/node/workers/process.d.ts.map +1 -0
- package/dist/node/workers/process.js +137 -0
- package/dist/node/workers/process.js.map +1 -0
- package/dist/node/workers/workers.d.ts +144 -0
- package/dist/node/workers/workers.d.ts.map +1 -0
- package/dist/node/workers/workers.js +723 -0
- package/dist/node/workers/workers.js.map +1 -0
- package/dist/output.d.ts +91 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +362 -0
- package/dist/output.js.map +1 -0
- package/dist/react/hooks.d.ts +61 -0
- package/dist/react/hooks.d.ts.map +1 -0
- package/dist/react/hooks.js +119 -0
- package/dist/react/hooks.js.map +1 -0
- package/dist/react/index.d.ts +4 -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 +50 -0
- package/dist/registries/contribution.d.ts.map +1 -0
- package/dist/registries/contribution.js +129 -0
- package/dist/registries/contribution.js.map +1 -0
- package/dist/registries/entries.d.ts +18 -0
- package/dist/registries/entries.d.ts.map +1 -0
- package/dist/registries/entries.js +42 -0
- package/dist/registries/entries.js.map +1 -0
- package/dist/registries/index.d.ts +3 -0
- package/dist/registries/index.d.ts.map +1 -0
- package/dist/registries/index.js +5 -0
- package/dist/registries/index.js.map +1 -0
- package/dist/registries/internal.d.ts +4 -0
- package/dist/registries/internal.d.ts.map +1 -0
- package/dist/registries/internal.js +5 -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 +14 -0
- package/dist/registries/registry.js.map +1 -0
- package/dist/registries/value.d.ts +48 -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 +34 -0
- package/dist/remote/calls.d.ts.map +1 -0
- package/dist/remote/calls.js +75 -0
- package/dist/remote/calls.js.map +1 -0
- package/dist/remote/consumer.d.ts +59 -0
- package/dist/remote/consumer.d.ts.map +1 -0
- package/dist/remote/consumer.js +468 -0
- package/dist/remote/consumer.js.map +1 -0
- package/dist/remote/hold.d.ts +147 -0
- package/dist/remote/hold.d.ts.map +1 -0
- package/dist/remote/hold.js +653 -0
- package/dist/remote/hold.js.map +1 -0
- package/dist/remote/host-link.d.ts +81 -0
- package/dist/remote/host-link.d.ts.map +1 -0
- package/dist/remote/host-link.js +198 -0
- package/dist/remote/host-link.js.map +1 -0
- package/dist/remote/internal.d.ts +6 -0
- package/dist/remote/internal.d.ts.map +1 -0
- package/dist/remote/internal.js +6 -0
- package/dist/remote/internal.js.map +1 -0
- package/dist/remote/path.d.ts +105 -0
- package/dist/remote/path.d.ts.map +1 -0
- package/dist/remote/path.js +197 -0
- package/dist/remote/path.js.map +1 -0
- package/dist/remote/provider.d.ts +113 -0
- package/dist/remote/provider.d.ts.map +1 -0
- package/dist/remote/provider.js +787 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/relay.d.ts +126 -0
- package/dist/remote/relay.d.ts.map +1 -0
- package/dist/remote/relay.js +334 -0
- package/dist/remote/relay.js.map +1 -0
- package/dist/remote/remote-object.d.ts +181 -0
- package/dist/remote/remote-object.d.ts.map +1 -0
- package/dist/remote/remote-object.js +683 -0
- package/dist/remote/remote-object.js.map +1 -0
- package/dist/remote/replica.d.ts +66 -0
- package/dist/remote/replica.d.ts.map +1 -0
- package/dist/remote/replica.js +148 -0
- package/dist/remote/replica.js.map +1 -0
- package/dist/sqlite/cloudflare.d.ts +54 -0
- package/dist/sqlite/cloudflare.d.ts.map +1 -0
- package/dist/sqlite/cloudflare.js +144 -0
- package/dist/sqlite/cloudflare.js.map +1 -0
- package/dist/sqlite/database.d.ts +40 -0
- package/dist/sqlite/database.d.ts.map +1 -0
- package/dist/sqlite/database.js +2 -0
- package/dist/sqlite/database.js.map +1 -0
- package/dist/sqlite/index.d.ts +4 -0
- package/dist/sqlite/index.d.ts.map +1 -0
- package/dist/sqlite/index.js +3 -0
- package/dist/sqlite/index.js.map +1 -0
- package/dist/sqlite/migrations.d.ts +10 -0
- package/dist/sqlite/migrations.d.ts.map +1 -0
- package/dist/sqlite/migrations.js +33 -0
- package/dist/sqlite/migrations.js.map +1 -0
- package/dist/sqlite/node.d.ts +49 -0
- package/dist/sqlite/node.d.ts.map +1 -0
- package/dist/sqlite/node.js +197 -0
- package/dist/sqlite/node.js.map +1 -0
- package/dist/sqlite/schema.d.ts +3 -0
- package/dist/sqlite/schema.d.ts.map +1 -0
- package/dist/sqlite/schema.js +10 -0
- package/dist/sqlite/schema.js.map +1 -0
- 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 +56 -0
- package/dist/state/derive.d.ts.map +1 -0
- package/dist/state/derive.js +192 -0
- package/dist/state/derive.js.map +1 -0
- package/dist/state/framed.d.ts +43 -0
- package/dist/state/framed.d.ts.map +1 -0
- package/dist/state/framed.js +121 -0
- package/dist/state/framed.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 +4 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/internal.d.ts +7 -0
- package/dist/state/internal.d.ts.map +1 -0
- package/dist/state/internal.js +9 -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 +49 -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 +118 -0
- package/dist/store/adapter.js.map +1 -0
- package/dist/store/allocator.d.ts +17 -0
- package/dist/store/allocator.d.ts.map +1 -0
- package/dist/store/allocator.js +30 -0
- package/dist/store/allocator.js.map +1 -0
- package/dist/store/applier.d.ts +8 -0
- package/dist/store/applier.d.ts.map +1 -0
- package/dist/store/applier.js +390 -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 +83 -0
- package/dist/store/apply-batch.js.map +1 -0
- package/dist/store/archive.d.ts +36 -0
- package/dist/store/archive.d.ts.map +1 -0
- package/dist/store/archive.js +140 -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 +15 -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 +17 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/claims.d.ts +23 -0
- package/dist/store/claims.d.ts.map +1 -0
- package/dist/store/claims.js +65 -0
- package/dist/store/claims.js.map +1 -0
- package/dist/store/column-set.d.ts +64 -0
- package/dist/store/column-set.d.ts.map +1 -0
- package/dist/store/column-set.js +96 -0
- package/dist/store/column-set.js.map +1 -0
- package/dist/store/columns.d.ts +93 -0
- package/dist/store/columns.d.ts.map +1 -0
- package/dist/store/columns.js +87 -0
- package/dist/store/columns.js.map +1 -0
- package/dist/store/engine.d.ts +182 -0
- package/dist/store/engine.d.ts.map +1 -0
- package/dist/store/engine.js +290 -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 +131 -0
- package/dist/store/evaluate.js.map +1 -0
- package/dist/store/export.d.ts +30 -0
- package/dist/store/export.d.ts.map +1 -0
- package/dist/store/export.js +221 -0
- package/dist/store/export.js.map +1 -0
- package/dist/store/expression.d.ts +254 -0
- package/dist/store/expression.d.ts.map +1 -0
- package/dist/store/expression.js +577 -0
- package/dist/store/expression.js.map +1 -0
- package/dist/store/host-column.d.ts +22 -0
- package/dist/store/host-column.d.ts.map +1 -0
- package/dist/store/host-column.js +36 -0
- package/dist/store/host-column.js.map +1 -0
- package/dist/store/host-data.d.ts +100 -0
- package/dist/store/host-data.d.ts.map +1 -0
- package/dist/store/host-data.js +397 -0
- package/dist/store/host-data.js.map +1 -0
- package/dist/store/import-migration.d.ts +19 -0
- package/dist/store/import-migration.d.ts.map +1 -0
- package/dist/store/import-migration.js +124 -0
- package/dist/store/import-migration.js.map +1 -0
- package/dist/store/import.d.ts +12 -0
- package/dist/store/import.d.ts.map +1 -0
- package/dist/store/import.js +279 -0
- package/dist/store/import.js.map +1 -0
- package/dist/store/index.d.ts +19 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +16 -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 +9 -0
- package/dist/store/jsonl.d.ts.map +1 -0
- package/dist/store/jsonl.js +61 -0
- package/dist/store/jsonl.js.map +1 -0
- package/dist/store/live-query.d.ts +72 -0
- package/dist/store/live-query.d.ts.map +1 -0
- package/dist/store/live-query.js +162 -0
- package/dist/store/live-query.js.map +1 -0
- package/dist/store/open-query.d.ts +90 -0
- package/dist/store/open-query.d.ts.map +1 -0
- package/dist/store/open-query.js +201 -0
- package/dist/store/open-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 +80 -0
- package/dist/store/outbox.js.map +1 -0
- package/dist/store/page.d.ts +14 -0
- package/dist/store/page.d.ts.map +1 -0
- package/dist/store/page.js +26 -0
- package/dist/store/page.js.map +1 -0
- package/dist/store/query.d.ts +65 -0
- package/dist/store/query.d.ts.map +1 -0
- package/dist/store/query.js +193 -0
- package/dist/store/query.js.map +1 -0
- package/dist/store/read-plan.d.ts +74 -0
- package/dist/store/read-plan.d.ts.map +1 -0
- package/dist/store/read-plan.js +324 -0
- package/dist/store/read-plan.js.map +1 -0
- package/dist/store/read.d.ts +81 -0
- package/dist/store/read.d.ts.map +1 -0
- package/dist/store/read.js +113 -0
- package/dist/store/read.js.map +1 -0
- package/dist/store/reads.d.ts +79 -0
- package/dist/store/reads.d.ts.map +1 -0
- package/dist/store/reads.js +255 -0
- package/dist/store/reads.js.map +1 -0
- package/dist/store/refusal.d.ts +15 -0
- package/dist/store/refusal.d.ts.map +1 -0
- package/dist/store/refusal.js +36 -0
- package/dist/store/refusal.js.map +1 -0
- package/dist/store/rows.d.ts +96 -0
- package/dist/store/rows.d.ts.map +1 -0
- package/dist/store/rows.js +222 -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 +123 -0
- package/dist/store/schema.js.map +1 -0
- package/dist/store/skip.d.ts +26 -0
- package/dist/store/skip.d.ts.map +1 -0
- package/dist/store/skip.js +66 -0
- package/dist/store/skip.js.map +1 -0
- package/dist/store/sql.d.ts +78 -0
- package/dist/store/sql.d.ts.map +1 -0
- package/dist/store/sql.js +244 -0
- package/dist/store/sql.js.map +1 -0
- package/dist/store/step.d.ts +52 -0
- package/dist/store/step.d.ts.map +1 -0
- package/dist/store/step.js +59 -0
- package/dist/store/step.js.map +1 -0
- package/dist/store/store.d.ts +192 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +863 -0
- package/dist/store/store.js.map +1 -0
- package/dist/store/table-changes.d.ts +35 -0
- package/dist/store/table-changes.d.ts.map +1 -0
- package/dist/store/table-changes.js +127 -0
- package/dist/store/table-changes.js.map +1 -0
- package/dist/store/table-evolve.d.ts +82 -0
- package/dist/store/table-evolve.d.ts.map +1 -0
- package/dist/store/table-evolve.js +208 -0
- package/dist/store/table-evolve.js.map +1 -0
- package/dist/store/table-handle.d.ts +69 -0
- package/dist/store/table-handle.d.ts.map +1 -0
- package/dist/store/table-handle.js +92 -0
- package/dist/store/table-handle.js.map +1 -0
- package/dist/store/table-history.d.ts +78 -0
- package/dist/store/table-history.d.ts.map +1 -0
- package/dist/store/table-history.js +43 -0
- package/dist/store/table-history.js.map +1 -0
- package/dist/store/table-migration.d.ts +28 -0
- package/dist/store/table-migration.d.ts.map +1 -0
- package/dist/store/table-migration.js +212 -0
- package/dist/store/table-migration.js.map +1 -0
- package/dist/store/table-writes.d.ts +125 -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 +91 -0
- package/dist/store/table.d.ts.map +1 -0
- package/dist/store/table.js +133 -0
- package/dist/store/table.js.map +1 -0
- package/dist/store/text.d.ts +14 -0
- package/dist/store/text.d.ts.map +1 -0
- package/dist/store/text.js +51 -0
- package/dist/store/text.js.map +1 -0
- package/dist/store/writes.d.ts +5 -0
- package/dist/store/writes.d.ts.map +1 -0
- package/dist/store/writes.js +4 -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 +106 -0
- package/dist/surfaces/client.d.ts.map +1 -0
- package/dist/surfaces/client.js +280 -0
- package/dist/surfaces/client.js.map +1 -0
- package/dist/surfaces/connection.d.ts +53 -0
- package/dist/surfaces/connection.d.ts.map +1 -0
- package/dist/surfaces/connection.js +161 -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 +26 -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 +33 -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 +86 -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 +32 -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/surfaces/variant.d.ts +23 -0
- package/dist/surfaces/variant.d.ts.map +1 -0
- package/dist/surfaces/variant.js +18 -0
- package/dist/surfaces/variant.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 +169 -0
- package/dist/sync/client.d.ts.map +1 -0
- package/dist/sync/client.js +459 -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 +205 -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 +145 -0
- package/dist/sync/remote.d.ts.map +1 -0
- package/dist/sync/remote.js +59 -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 +73 -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 +26 -0
- package/dist/telemetry-ingest/facet.d.ts.map +1 -0
- package/dist/telemetry-ingest/facet.js +100 -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 +33 -0
- package/dist/telemetry-sqlite/index.d.ts.map +1 -0
- package/dist/telemetry-sqlite/index.js +113 -0
- package/dist/telemetry-sqlite/index.js.map +1 -0
- 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 +12 -0
- package/dist/telemetry-sqlite/store.d.ts.map +1 -0
- package/dist/telemetry-sqlite/store.js +121 -0
- package/dist/telemetry-sqlite/store.js.map +1 -0
- package/dist/telemetry.d.ts +1013 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +518 -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 +8 -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 +62 -0
- package/dist/tui/scope.d.ts.map +1 -0
- package/dist/tui/scope.js +173 -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/watch.d.ts +194 -0
- package/dist/watch.d.ts.map +1 -0
- package/dist/watch.js +383 -0
- package/dist/watch.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 +42 -0
- package/dist/web/page.d.ts.map +1 -0
- package/dist/web/page.js +96 -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/admission/design.md +178 -0
- package/docs/benchmarks.md +1182 -0
- package/docs/decisions.md +3760 -0
- package/docs/dependencies/book.md +1671 -0
- package/docs/dependencies/index.html +2641 -0
- package/docs/dependencies/model.md +330 -0
- package/docs/design.md +3691 -0
- package/docs/durable-observers/book.md +432 -0
- package/docs/durable-observers/index.html +517 -0
- package/docs/events/spec.md +438 -0
- package/docs/flow-control/book.md +333 -0
- package/docs/flow-control/fold/index.html +265 -0
- package/docs/flow-control/index.html +548 -0
- package/docs/flow-control/window/index.html +228 -0
- package/docs/guide-plugins-hosts/book.md +958 -0
- package/docs/guide-plugins-hosts/index.html +952 -0
- package/docs/host-keyed/spec.md +343 -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 +389 -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/shared-holds/design.md +339 -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-14-design.md +213 -0
- package/docs/slice-14.md +861 -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-4.md +146 -0
- package/docs/slice-4a.md +418 -0
- package/docs/slice-4b.md +208 -0
- package/docs/slice-5.md +281 -0
- package/docs/slice-6a.md +676 -0
- package/docs/slice-6b.md +332 -0
- package/docs/slice-7a.md +130 -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-8.md +194 -0
- package/docs/slice-9.md +110 -0
- package/docs/slices.md +380 -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 +2170 -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 +200 -5
- package/src/delta/README.md +262 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Host kinds and addresses (§3): a kind of addressable host with params like a contract's, and the address of one
|
|
2
|
+
// host of a kind, which a remote contract's `hostAddress` computes from its params.
|
|
3
|
+
import { checkName } from "./names.js";
|
|
4
|
+
import { joinKey, readParams } from "./params.js";
|
|
5
|
+
/**
|
|
6
|
+
* Declares a host kind; `params` follow the params policy of contracts (a flat record of required `str()`, `int()`,
|
|
7
|
+
* `bool()` and `oneOf(...)`). Making an address computes its key only: its params are checked where it is routed.
|
|
8
|
+
*/
|
|
9
|
+
export function hostKind(name, params) {
|
|
10
|
+
checkName(name, "A host kind's name");
|
|
11
|
+
// `client` is the host kind of a host without an address in store names (owner strings, table names).
|
|
12
|
+
if (name === "client")
|
|
13
|
+
throw new Error('A host kind\'s name "client" is reserved for hosts without an address');
|
|
14
|
+
const data = readParams(Object.entries(params ?? {}), `${name}.params`);
|
|
15
|
+
const make = (values = {}) => ({
|
|
16
|
+
kind: name,
|
|
17
|
+
params: values,
|
|
18
|
+
key: addressKey(name, data, values),
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(make, "kind", { value: name, enumerable: true });
|
|
21
|
+
kinds.set(make, { data, fields: fieldsOf(data) });
|
|
22
|
+
// The function and its `kind` are the declared shape; the params type is type-level only.
|
|
23
|
+
return make;
|
|
24
|
+
}
|
|
25
|
+
const kinds = new WeakMap();
|
|
26
|
+
/** The params of a declared host kind. */
|
|
27
|
+
export function kindParams(kind) {
|
|
28
|
+
return kindData(kind).data;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The key of `value` when it is an address of `kind` (a trust boundary for values a plugin hands in: a host-keyed
|
|
32
|
+
* document's key, a `host(...)` cell): an object of that kind whose `params` hold exactly the kind's fields, each of
|
|
33
|
+
* its type (a `oneOf(...)` one among its literals; other constraints are checked where the address is routed). The key
|
|
34
|
+
* is computed from the params, never taken from `value.key`. `undefined` when it does not fit.
|
|
35
|
+
*/
|
|
36
|
+
export function keyOfAddress(kind, value) {
|
|
37
|
+
if (typeof value !== "object" || value === null)
|
|
38
|
+
return undefined;
|
|
39
|
+
const { kind: name, params } = value;
|
|
40
|
+
if (name !== kind.kind || typeof params !== "object" || params === null)
|
|
41
|
+
return undefined;
|
|
42
|
+
const { data, fields } = kindData(kind);
|
|
43
|
+
const values = params;
|
|
44
|
+
if (Object.keys(values).length !== fields.length)
|
|
45
|
+
return undefined;
|
|
46
|
+
for (const { name: field, type, literals } of fields) {
|
|
47
|
+
const each = values[field];
|
|
48
|
+
const fits = type === "integer"
|
|
49
|
+
? Number.isSafeInteger(each)
|
|
50
|
+
: type === "boolean"
|
|
51
|
+
? typeof each === "boolean"
|
|
52
|
+
: typeof each === "string" && (literals === undefined || literals.has(each));
|
|
53
|
+
if (!fits)
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
return addressKey(kind.kind, data, values);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The address of `kind` whose key is `key` (a key `keyOfAddress` made: stored data): the escaped parts split, `int()`
|
|
60
|
+
* fields as numbers, `bool()` fields as booleans. A key of another kind or number of parts throws.
|
|
61
|
+
*/
|
|
62
|
+
export function addressOfKey(kind, key) {
|
|
63
|
+
const { fields } = kindData(kind);
|
|
64
|
+
const [name, ...parts] = splitKey(key);
|
|
65
|
+
if (name !== kind.kind || parts.length !== fields.length) {
|
|
66
|
+
throw new Error(`${JSON.stringify(key)}: not an address key of ${kind.kind}`);
|
|
67
|
+
}
|
|
68
|
+
const params = {};
|
|
69
|
+
for (const [index, { name: field, type }] of fields.entries()) {
|
|
70
|
+
const part = parts[index];
|
|
71
|
+
params[field] = type === "integer" ? Number(part) : type === "boolean" ? part === "true" : part;
|
|
72
|
+
}
|
|
73
|
+
// The params were read by the kind's fields: its params object.
|
|
74
|
+
return { kind: kind.kind, params: params, key };
|
|
75
|
+
}
|
|
76
|
+
/** The kind's name of an address key: its first part (kind names never hold `|` or a backslash). */
|
|
77
|
+
export function kindOfKey(key) {
|
|
78
|
+
const end = key.indexOf("|");
|
|
79
|
+
return end === -1 ? key : key.slice(0, end);
|
|
80
|
+
}
|
|
81
|
+
function kindData(kind) {
|
|
82
|
+
const data = kinds.get(kind);
|
|
83
|
+
if (data === undefined)
|
|
84
|
+
throw new Error(`${kind.kind}: not a declared host kind`);
|
|
85
|
+
return data;
|
|
86
|
+
}
|
|
87
|
+
/** The fields of declared params as keys hold them (`readParams` admitted only these normal forms). */
|
|
88
|
+
function fieldsOf(data) {
|
|
89
|
+
// `normal` is `[field, normal form]` pairs in identity order.
|
|
90
|
+
const normal = data.normal;
|
|
91
|
+
return normal.map(([name, node]) => {
|
|
92
|
+
if (node.anyOf === undefined) {
|
|
93
|
+
return { name, type: node.type, literals: undefined };
|
|
94
|
+
}
|
|
95
|
+
// `oneOf(...)` of string literals: `{ type: "string", const }` branches.
|
|
96
|
+
const branches = node.anyOf;
|
|
97
|
+
return { name, type: "string", literals: new Set(branches.map((branch) => branch.const)) };
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/** The parts of a key `joinKey` made, unescaped. */
|
|
101
|
+
function splitKey(key) {
|
|
102
|
+
const parts = [];
|
|
103
|
+
let part = "";
|
|
104
|
+
for (let index = 0; index < key.length; index++) {
|
|
105
|
+
const char = key[index];
|
|
106
|
+
if (char === "\\")
|
|
107
|
+
part += key[++index] ?? "";
|
|
108
|
+
else if (char === "|") {
|
|
109
|
+
parts.push(part);
|
|
110
|
+
part = "";
|
|
111
|
+
}
|
|
112
|
+
else
|
|
113
|
+
part += char;
|
|
114
|
+
}
|
|
115
|
+
parts.push(part);
|
|
116
|
+
return parts;
|
|
117
|
+
}
|
|
118
|
+
/** An address's key: the kind's name and each field value in declared order, joined (`joinKey`). */
|
|
119
|
+
export function addressKey(kind, params, values) {
|
|
120
|
+
return joinKey([kind, ...params.fields.map((field) => String(values[field]))]);
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=host-kind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-kind.js","sourceRoot":"","sources":["../../src/contracts/host-kind.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAClH,oFAAoF;AAEpF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,OAAO,EAAqD,UAAU,EAAE,MAAM,aAAa,CAAC;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,OAAO,KAAK,CAAC;AACd,CAAC;AAED,oGAAoG;AACpG,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,MAAkB,EAAE,MAA6C;IACzG,OAAO,OAAO,CAAC,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC","sourcesContent":["// Host kinds and addresses (§3): a kind of addressable host with params like a contract's, and the address of one\n// host of a kind, which a remote contract's `hostAddress` computes from its params.\n\nimport { checkName } from \"./names.ts\";\nimport { joinKey, type Params, type ParamsData, type RequiredFields, readParams } from \"./params.ts\";\nimport type { Static } from \"./schema.ts\";\n\n/** What an address's type needs of its kind: the name and the params, type only. */\nexport type KindShape = { readonly kind: string; readonly \"~params\"?: Params };\n\n/** One host of a kind: the kind's name, its params and its key (`session|S1`); two addresses are equal by key. */\nexport type Address<K extends KindShape = KindShape> = {\n\treadonly kind: K[\"kind\"];\n\treadonly params: ParamsOfKind<K>;\n\treadonly key: string;\n};\n\n/** A kind of addressable host: called with its params, it makes an address. */\nexport interface HostKind<N extends string = string, P extends Params = Params> {\n\t(\n\t\t...params: keyof P extends never ? [params?: Record<never, never>] : [params: { [F in keyof P]: Static<P[F]> }]\n\t): Address<HostKind<N, P>>;\n\treadonly kind: N;\n\t/** Type only: absent at runtime. */\n\treadonly \"~params\"?: P;\n}\n\n/** The params object of a host kind. */\nexport type ParamsOfKind<K extends KindShape> = {\n\t[F in keyof NonNullable<K[\"~params\"]>]: Static<NonNullable<K[\"~params\"]>[F]>;\n};\n\n/**\n * Declares a host kind; `params` follow the params policy of contracts (a flat record of required `str()`, `int()`,\n * `bool()` and `oneOf(...)`). Making an address computes its key only: its params are checked where it is routed.\n */\nexport function hostKind<const N extends string, const P extends Params = Record<never, never>>(\n\tname: N,\n\tparams?: P & NoInfer<RequiredFields<P>>,\n): HostKind<N, P> {\n\tcheckName(name, \"A host kind's name\");\n\t// `client` is the host kind of a host without an address in store names (owner strings, table names).\n\tif (name === \"client\") throw new Error('A host kind\\'s name \"client\" is reserved for hosts without an address');\n\tconst data = readParams(Object.entries(params ?? {}), `${name}.params`);\n\tconst make = (values: { readonly [field: string]: unknown } = {}) => ({\n\t\tkind: name,\n\t\tparams: values,\n\t\tkey: addressKey(name, data, values),\n\t});\n\tObject.defineProperty(make, \"kind\", { value: name, enumerable: true });\n\tkinds.set(make, { data, fields: fieldsOf(data) });\n\t// The function and its `kind` are the declared shape; the params type is type-level only.\n\treturn make as unknown as HostKind<N, P>;\n}\n\n/** One params field as an address key holds it: its name, its type and, for `oneOf(...)`, its literals. */\ntype KeyField = {\n\treadonly name: string;\n\treadonly type: \"string\" | \"integer\" | \"boolean\";\n\treadonly literals: ReadonlySet<string> | undefined;\n};\n\n/** A declared kind's params and its fields as keys hold them (read once, at declaration). */\ntype KindData = { readonly data: ParamsData; readonly fields: readonly KeyField[] };\n\nconst kinds = new WeakMap<object, KindData>();\n\n/** The params of a declared host kind. */\nexport function kindParams(kind: { readonly kind: string }): ParamsData {\n\treturn kindData(kind).data;\n}\n\n/**\n * The key of `value` when it is an address of `kind` (a trust boundary for values a plugin hands in: a host-keyed\n * document's key, a `host(...)` cell): an object of that kind whose `params` hold exactly the kind's fields, each of\n * its type (a `oneOf(...)` one among its literals; other constraints are checked where the address is routed). The key\n * is computed from the params, never taken from `value.key`. `undefined` when it does not fit.\n */\nexport function keyOfAddress(kind: { readonly kind: string }, value: unknown): string | undefined {\n\tif (typeof value !== \"object\" || value === null) return undefined;\n\tconst { kind: name, params } = value as { readonly kind?: unknown; readonly params?: unknown };\n\tif (name !== kind.kind || typeof params !== \"object\" || params === null) return undefined;\n\tconst { data, fields } = kindData(kind);\n\tconst values = params as { readonly [field: string]: unknown };\n\tif (Object.keys(values).length !== fields.length) return undefined;\n\tfor (const { name: field, type, literals } of fields) {\n\t\tconst each = values[field];\n\t\tconst fits =\n\t\t\ttype === \"integer\"\n\t\t\t\t? Number.isSafeInteger(each)\n\t\t\t\t: type === \"boolean\"\n\t\t\t\t\t? typeof each === \"boolean\"\n\t\t\t\t\t: typeof each === \"string\" && (literals === undefined || literals.has(each));\n\t\tif (!fits) return undefined;\n\t}\n\treturn addressKey(kind.kind, data, values);\n}\n\n/**\n * The address of `kind` whose key is `key` (a key `keyOfAddress` made: stored data): the escaped parts split, `int()`\n * fields as numbers, `bool()` fields as booleans. A key of another kind or number of parts throws.\n */\nexport function addressOfKey<K extends KindShape>(kind: K & { readonly kind: string }, key: string): Address<K> {\n\tconst { fields } = kindData(kind);\n\tconst [name, ...parts] = splitKey(key);\n\tif (name !== kind.kind || parts.length !== fields.length) {\n\t\tthrow new Error(`${JSON.stringify(key)}: not an address key of ${kind.kind}`);\n\t}\n\tconst params: { [field: string]: string | number | boolean } = {};\n\tfor (const [index, { name: field, type }] of fields.entries()) {\n\t\tconst part = parts[index]!;\n\t\tparams[field] = type === \"integer\" ? Number(part) : type === \"boolean\" ? part === \"true\" : part;\n\t}\n\t// The params were read by the kind's fields: its params object.\n\treturn { kind: kind.kind, params: params as ParamsOfKind<K>, key };\n}\n\n/** The kind's name of an address key: its first part (kind names never hold `|` or a backslash). */\nexport function kindOfKey(key: string): string {\n\tconst end = key.indexOf(\"|\");\n\treturn end === -1 ? key : key.slice(0, end);\n}\n\nfunction kindData(kind: { readonly kind: string }): KindData {\n\tconst data = kinds.get(kind);\n\tif (data === undefined) throw new Error(`${kind.kind}: not a declared host kind`);\n\treturn data;\n}\n\n/** The fields of declared params as keys hold them (`readParams` admitted only these normal forms). */\nfunction fieldsOf(data: ParamsData): KeyField[] {\n\t// `normal` is `[field, normal form]` pairs in identity order.\n\tconst normal = data.normal as unknown as readonly (readonly [\n\t\tstring,\n\t\t{ readonly type?: string; readonly anyOf?: unknown },\n\t])[];\n\treturn normal.map(([name, node]) => {\n\t\tif (node.anyOf === undefined) {\n\t\t\treturn { name, type: node.type as KeyField[\"type\"], literals: undefined };\n\t\t}\n\t\t// `oneOf(...)` of string literals: `{ type: \"string\", const }` branches.\n\t\tconst branches = node.anyOf as readonly { readonly const: string }[];\n\t\treturn { name, type: \"string\", literals: new Set(branches.map((branch) => branch.const)) };\n\t});\n}\n\n/** The parts of a key `joinKey` made, unescaped. */\nfunction splitKey(key: string): string[] {\n\tconst parts: string[] = [];\n\tlet part = \"\";\n\tfor (let index = 0; index < key.length; index++) {\n\t\tconst char = key[index]!;\n\t\tif (char === \"\\\\\") part += key[++index] ?? \"\";\n\t\telse if (char === \"|\") {\n\t\t\tparts.push(part);\n\t\t\tpart = \"\";\n\t\t} else part += char;\n\t}\n\tparts.push(part);\n\treturn parts;\n}\n\n/** An address's key: the kind's name and each field value in declared order, joined (`joinKey`). */\nexport function addressKey(kind: string, params: ParamsData, values: { readonly [field: string]: unknown }): string {\n\treturn joinKey([kind, ...params.fields.map((field) => String(values[field]))]);\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { AcceptsTable } from "./accepts.ts";
|
|
2
|
+
export type { AdmittedOf, Contract, EventMember, EventSource, EventSubscription, HostKeyed, Implementation, KeyedWatchable, MemberNames, NamedQuery, ParamsOf, QueryPage, } from "./contract.ts";
|
|
3
|
+
export { memberNames } from "./contract.ts";
|
|
4
|
+
export { local, remote } from "./declare.ts";
|
|
5
|
+
export { evolve } from "./evolve.ts";
|
|
6
|
+
export { type Address, type HostKind, hostKind, type KindShape, type ParamsOfKind } from "./host-kind.ts";
|
|
7
|
+
export { arr, type BooleanSchema, type Bounds, bool, bytes, type Defaulted, type EventDeclaration, event, type IntegerSchema, int, type KeyedMember, keyed, type LiteralsSchema, lit, type Method, map, method, type NullSchema, type NumberSchema, nul, num, type Optional, obj, oneOf, opt, type QueriesMember, queries, type Schema, type Static, type StringSchema, str, union, unknown, } from "./schema.ts";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,YAAY,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EACN,GAAG,EACH,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,IAAI,EACJ,KAAK,EACL,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,EACL,KAAK,aAAa,EAClB,GAAG,EACH,KAAK,WAAW,EAChB,KAAK,EACL,KAAK,cAAc,EACnB,GAAG,EACH,KAAK,MAAM,EACX,GAAG,EACH,MAAM,EACN,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,GAAG,EACH,GAAG,EACH,KAAK,QAAQ,EACb,GAAG,EACH,KAAK,EACL,GAAG,EACH,KAAK,aAAa,EAClB,OAAO,EACP,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,GAAG,EACH,KAAK,EACL,OAAO,GACP,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// Contracts for apps: declaring, evolving and implementing Chord object types.
|
|
2
|
+
export { memberNames } from "./contract.js";
|
|
3
|
+
export { local, remote } from "./declare.js";
|
|
4
|
+
export { evolve } from "./evolve.js";
|
|
5
|
+
export { hostKind } from "./host-kind.js";
|
|
6
|
+
export { arr, bool, bytes, event, int, keyed, lit, map, method, nul, num, obj, oneOf, opt, queries, str, union, unknown, } from "./schema.js";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contracts/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAiB/E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAA+B,QAAQ,EAAqC,MAAM,gBAAgB,CAAC;AAC1G,OAAO,EACN,GAAG,EAGH,IAAI,EACJ,KAAK,EAGL,KAAK,EAEL,GAAG,EAEH,KAAK,EAEL,GAAG,EAEH,GAAG,EACH,MAAM,EAGN,GAAG,EACH,GAAG,EAEH,GAAG,EACH,KAAK,EACL,GAAG,EAEH,OAAO,EAIP,GAAG,EACH,KAAK,EACL,OAAO,GACP,MAAM,aAAa,CAAC","sourcesContent":["// Contracts for apps: declaring, evolving and implementing Chord object types.\n\nexport type { AcceptsTable } from \"./accepts.ts\";\nexport type {\n\tAdmittedOf,\n\tContract,\n\tEventMember,\n\tEventSource,\n\tEventSubscription,\n\tHostKeyed,\n\tImplementation,\n\tKeyedWatchable,\n\tMemberNames,\n\tNamedQuery,\n\tParamsOf,\n\tQueryPage,\n} from \"./contract.ts\";\nexport { memberNames } from \"./contract.ts\";\nexport { local, remote } from \"./declare.ts\";\nexport { evolve } from \"./evolve.ts\";\nexport { type Address, type HostKind, hostKind, type KindShape, type ParamsOfKind } from \"./host-kind.ts\";\nexport {\n\tarr,\n\ttype BooleanSchema,\n\ttype Bounds,\n\tbool,\n\tbytes,\n\ttype Defaulted,\n\ttype EventDeclaration,\n\tevent,\n\ttype IntegerSchema,\n\tint,\n\ttype KeyedMember,\n\tkeyed,\n\ttype LiteralsSchema,\n\tlit,\n\ttype Method,\n\tmap,\n\tmethod,\n\ttype NullSchema,\n\ttype NumberSchema,\n\tnul,\n\tnum,\n\ttype Optional,\n\tobj,\n\toneOf,\n\topt,\n\ttype QueriesMember,\n\tqueries,\n\ttype Schema,\n\ttype Static,\n\ttype StringSchema,\n\tstr,\n\tunion,\n\tunknown,\n} from \"./schema.ts\";\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { checkAccepts } from "./accepts.ts";
|
|
2
|
+
export { type ContractShape, type CurrentVariants, contractData, currentVariants, LOCAL, type MethodData, type ShapeOf, takesNoArgs, type VariantData, type VariantImplementation, type VariantNames, variantNames, variantOrder, variantsAt, } from "./contract.ts";
|
|
3
|
+
export { editWith } from "./evolve.ts";
|
|
4
|
+
export { fingerprintOf, hash64, NORMAL_FORM_VERSION } from "./fingerprint.ts";
|
|
5
|
+
export type { Increment } from "./history.ts";
|
|
6
|
+
export { addressOfKey, keyOfAddress, kindOfKey, kindParams } from "./host-kind.ts";
|
|
7
|
+
export { checkName } from "./names.ts";
|
|
8
|
+
export type { Params, ParamsData } from "./params.ts";
|
|
9
|
+
export { joinKey } from "./params.ts";
|
|
10
|
+
export { Method } from "./schema.ts";
|
|
11
|
+
export { type Snapshot, snapshotArguments } from "./snapshot.ts";
|
|
12
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/contracts/internal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,YAAY,EACZ,eAAe,EACf,KAAK,EACL,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,EACjB,YAAY,EACZ,YAAY,EACZ,UAAU,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Contracts for Chord's layers: accepted versions, the data behind a contract handle, and the types L4 dispatches on.
|
|
2
|
+
export { checkAccepts } from "./accepts.js";
|
|
3
|
+
export { contractData, currentVariants, LOCAL, takesNoArgs, variantNames, variantOrder, variantsAt, } from "./contract.js";
|
|
4
|
+
export { editWith } from "./evolve.js";
|
|
5
|
+
export { fingerprintOf, hash64, NORMAL_FORM_VERSION } from "./fingerprint.js";
|
|
6
|
+
export { addressOfKey, keyOfAddress, kindOfKey, kindParams } from "./host-kind.js";
|
|
7
|
+
export { checkName } from "./names.js";
|
|
8
|
+
export { joinKey } from "./params.js";
|
|
9
|
+
export { Method } from "./schema.js";
|
|
10
|
+
export { snapshotArguments } from "./snapshot.js";
|
|
11
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../src/contracts/internal.ts"],"names":[],"mappings":"AAAA,sHAAsH;AAEtH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAGN,YAAY,EACZ,eAAe,EACf,KAAK,EAGL,WAAW,EAIX,YAAY,EACZ,YAAY,EACZ,UAAU,GACV,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAiB,iBAAiB,EAAE,MAAM,eAAe,CAAC","sourcesContent":["// Contracts for Chord's layers: accepted versions, the data behind a contract handle, and the types L4 dispatches on.\n\nexport { checkAccepts } from \"./accepts.ts\";\nexport {\n\ttype ContractShape,\n\ttype CurrentVariants,\n\tcontractData,\n\tcurrentVariants,\n\tLOCAL,\n\ttype MethodData,\n\ttype ShapeOf,\n\ttakesNoArgs,\n\ttype VariantData,\n\ttype VariantImplementation,\n\ttype VariantNames,\n\tvariantNames,\n\tvariantOrder,\n\tvariantsAt,\n} from \"./contract.ts\";\nexport { editWith } from \"./evolve.ts\";\nexport { fingerprintOf, hash64, NORMAL_FORM_VERSION } from \"./fingerprint.ts\";\nexport type { Increment } from \"./history.ts\";\nexport { addressOfKey, keyOfAddress, kindOfKey, kindParams } from \"./host-kind.ts\";\nexport { checkName } from \"./names.ts\";\nexport type { Params, ParamsData } from \"./params.ts\";\nexport { joinKey } from \"./params.ts\";\nexport { Method } from \"./schema.ts\";\nexport { type Snapshot, snapshotArguments } from \"./snapshot.ts\";\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../src/contracts/names.ts"],"names":[],"mappings":"AAOA,4GAA4G;AAC5G,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAK1D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Names that become SQL names or stored identities in the store (decision "Restricted names"): object types, host
|
|
2
|
+
// kinds, tables, state definitions and jobs use npm package-name characters, lowercase, so `<host kind>:<object
|
|
3
|
+
// type>:<table>` is injective and readable, and a document's or a job record's name is stored as declared.
|
|
4
|
+
/** Lowercase npm package-name characters: `:` cannot occur, so names joined with it stay apart. */
|
|
5
|
+
const NAME = /^[a-z0-9@/._~-]+$/;
|
|
6
|
+
/** Throws unless `name` is a nonempty lowercase name of `[a-z0-9@/._~-]` (`what` names it in the error). */
|
|
7
|
+
export function checkName(name, what) {
|
|
8
|
+
// Declaration policy: JavaScript callers reach this check.
|
|
9
|
+
if (typeof name !== "string" || !NAME.test(name)) {
|
|
10
|
+
throw new Error(`${what} ${JSON.stringify(name)}: expected lowercase [a-z0-9@/._~-]`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/contracts/names.ts"],"names":[],"mappings":"AAAA,kHAAkH;AAClH,gHAAgH;AAChH,2GAA2G;AAE3G,mGAAmG;AACnG,MAAM,IAAI,GAAG,mBAAmB,CAAC;AAEjC,4GAA4G;AAC5G,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,IAAY;IACnD,2DAA2D;IAC3D,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IACvF,CAAC;AACF,CAAC","sourcesContent":["// Names that become SQL names or stored identities in the store (decision \"Restricted names\"): object types, host\n// kinds, tables, state definitions and jobs use npm package-name characters, lowercase, so `<host kind>:<object\n// type>:<table>` is injective and readable, and a document's or a job record's name is stored as declared.\n\n/** Lowercase npm package-name characters: `:` cannot occur, so names joined with it stay apart. */\nconst NAME = /^[a-z0-9@/._~-]+$/;\n\n/** Throws unless `name` is a nonempty lowercase name of `[a-z0-9@/._~-]` (`what` names it in the error). */\nexport function checkName(name: string, what: string): void {\n\t// Declaration policy: JavaScript callers reach this check.\n\tif (typeof name !== \"string\" || !NAME.test(name)) {\n\t\tthrow new Error(`${what} ${JSON.stringify(name)}: expected lowercase [a-z0-9@/._~-]`);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { JsonValue } from "../json.ts";
|
|
2
|
+
import { type BooleanSchema, type IntegerSchema, type LiteralsSchema, type Optional, type Schema, type StringSchema } from "./schema.ts";
|
|
3
|
+
/** A params field: a string, an integer, a boolean or a union of string literals; constraints allowed, no default. */
|
|
4
|
+
type ParamSchema = (StringSchema | IntegerSchema | BooleanSchema | LiteralsSchema<string>) & {
|
|
5
|
+
readonly default?: never;
|
|
6
|
+
};
|
|
7
|
+
/** Params: a flat record of required fields, in identity order. */
|
|
8
|
+
export type Params = {
|
|
9
|
+
readonly [field: string]: ParamSchema;
|
|
10
|
+
};
|
|
11
|
+
/** Refuses optional params fields, which the field types alone admit. */
|
|
12
|
+
export type RequiredFields<P extends Params> = {
|
|
13
|
+
[F in keyof P]: P[F] extends Optional ? never : P[F];
|
|
14
|
+
};
|
|
15
|
+
export type ParamsData = {
|
|
16
|
+
/** Field names in identity order. */
|
|
17
|
+
readonly fields: readonly string[];
|
|
18
|
+
/** The closed object schema of all fields. */
|
|
19
|
+
readonly schema: Schema;
|
|
20
|
+
/** `[field, normal form]` pairs in identity order. */
|
|
21
|
+
readonly normal: JsonValue;
|
|
22
|
+
};
|
|
23
|
+
/** Reads declared params fields: each a required str(), int(), bool() or oneOf(...) of strings, constraints allowed. */
|
|
24
|
+
export declare function readParams(declared: readonly [string, unknown][], path: string): ParamsData;
|
|
25
|
+
/** Joins key parts with `|`, each escaped (`\\` and `|`), so two different part lists never join to one key. */
|
|
26
|
+
export declare function joinKey(parts: readonly string[]): string;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../src/contracts/params.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,aAAa,EAElB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,MAAM,aAAa,CAAC;AAGrB,sHAAsH;AACtH,KAAK,WAAW,GAAG,CAAC,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG;IAC5F,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC;CACzB,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,MAAM,GAAG;IAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAA;CAAE,CAAC;AAE/D,yEAAyE;AACzE,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI;KAC7C,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACxB,qCAAqC;IACrC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,8CAA8C;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF,wHAAwH;AACxH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAoB3F;AAKD,gHAAgH;AAChH,wBAAgB,OAAO,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAKxD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Params declarations: the policy for params fields and the closed object schema checked on every get.
|
|
2
|
+
import { isOptional, } from "./schema.js";
|
|
3
|
+
import { snapshotSchema } from "./snapshot.js";
|
|
4
|
+
/** Reads declared params fields: each a required str(), int(), bool() or oneOf(...) of strings, constraints allowed. */
|
|
5
|
+
export function readParams(declared, path) {
|
|
6
|
+
const fields = declared.map(([field, schema]) => {
|
|
7
|
+
const fieldPath = `${path}.${field}`;
|
|
8
|
+
const refused = new Error(`${fieldPath}: a param is a required str(), int(), bool() or oneOf(...) of strings`);
|
|
9
|
+
if (isOptional(schema))
|
|
10
|
+
throw refused;
|
|
11
|
+
const snapshot = snapshotSchema(schema, fieldPath);
|
|
12
|
+
if (!isParamSchema(snapshot.normal))
|
|
13
|
+
throw refused;
|
|
14
|
+
return [field, snapshot];
|
|
15
|
+
});
|
|
16
|
+
const schema = {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: Object.fromEntries(fields.map(([field, snapshot]) => [field, snapshot.schema])),
|
|
19
|
+
required: fields.map(([field]) => field),
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
fields: fields.map(([field]) => field),
|
|
24
|
+
schema,
|
|
25
|
+
normal: fields.map(([field, snapshot]) => [field, snapshot.normal]),
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/** What `joinKey` escapes in a part: its separator and the escape itself. */
|
|
29
|
+
const SPECIAL = /[\\|]/;
|
|
30
|
+
/** Joins key parts with `|`, each escaped (`\\` and `|`), so two different part lists never join to one key. */
|
|
31
|
+
export function joinKey(parts) {
|
|
32
|
+
// Most parts have nothing to escape: no copy for them.
|
|
33
|
+
return parts
|
|
34
|
+
.map((part) => (SPECIAL.test(part) ? part.replaceAll("\\", "\\\\").replaceAll("|", "\\|") : part))
|
|
35
|
+
.join("|");
|
|
36
|
+
}
|
|
37
|
+
function isParamSchema(normal) {
|
|
38
|
+
const node = normal;
|
|
39
|
+
if (node.anyOf !== undefined) {
|
|
40
|
+
return Object.keys(node).length === 1 && Array.isArray(node.anyOf) && node.anyOf.every(isStringLiteral);
|
|
41
|
+
}
|
|
42
|
+
const allowed = PARAM_KEYWORDS.get(node.type);
|
|
43
|
+
return allowed !== undefined && Object.keys(node).every((key) => allowed.has(key));
|
|
44
|
+
}
|
|
45
|
+
/** Keywords a params field may use, by type. */
|
|
46
|
+
const PARAM_KEYWORDS = new Map([
|
|
47
|
+
["string", new Set(["type", "minLength", "maxLength", "pattern", "format"])],
|
|
48
|
+
["integer", new Set(["type", "minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum", "multipleOf"])],
|
|
49
|
+
["boolean", new Set(["type"])],
|
|
50
|
+
]);
|
|
51
|
+
function isStringLiteral(branch) {
|
|
52
|
+
const node = branch;
|
|
53
|
+
return node.type === "string" && typeof node.const === "string" && Object.keys(node).length === 2;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=params.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../src/contracts/params.ts"],"names":[],"mappings":"AAAA,uGAAuG;AAGvG,OAAO,EAGN,UAAU,GAKV,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAwB/C,wHAAwH;AACxH,MAAM,UAAU,UAAU,CAAC,QAAsC,EAAE,IAAY;IAC9E,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,C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CAAC,MAAM,CAAC,CAAC,CAAC;CAC9B,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,MAAiB;IACzC,MAAM,IAAI,GAAG,MAAoB,CAAC;IAClC,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACnG,CAAC","sourcesContent":["// Params declarations: the policy for params fields and the closed object schema checked on every get.\n\nimport type { JsonValue } from \"../json.ts\";\nimport {\n\ttype BooleanSchema,\n\ttype IntegerSchema,\n\tisOptional,\n\ttype LiteralsSchema,\n\ttype Optional,\n\ttype Schema,\n\ttype StringSchema,\n} from \"./schema.ts\";\nimport { snapshotSchema } from \"./snapshot.ts\";\n\n/** A params field: a string, an integer, a boolean or a union of string literals; constraints allowed, no default. */\ntype ParamSchema = (StringSchema | IntegerSchema | BooleanSchema | LiteralsSchema<string>) & {\n\treadonly default?: never;\n};\n\n/** Params: a flat record of required fields, in identity order. */\nexport type Params = { readonly [field: string]: ParamSchema };\n\n/** Refuses optional params fields, which the field types alone admit. */\nexport type RequiredFields<P extends Params> = {\n\t[F in keyof P]: P[F] extends Optional ? never : P[F];\n};\n\nexport type ParamsData = {\n\t/** Field names in identity order. */\n\treadonly fields: readonly string[];\n\t/** The closed object schema of all fields. */\n\treadonly schema: Schema;\n\t/** `[field, normal form]` pairs in identity order. */\n\treadonly normal: JsonValue;\n};\n\n/** Reads declared params fields: each a required str(), int(), bool() or oneOf(...) of strings, constraints allowed. */\nexport function readParams(declared: readonly [string, unknown][], path: string): ParamsData {\n\tconst fields = declared.map(([field, schema]) => {\n\t\tconst fieldPath = `${path}.${field}`;\n\t\tconst refused = new Error(`${fieldPath}: a param is a required str(), int(), bool() or oneOf(...) of strings`);\n\t\tif (isOptional(schema)) throw refused;\n\t\tconst snapshot = snapshotSchema(schema, fieldPath);\n\t\tif (!isParamSchema(snapshot.normal)) throw refused;\n\t\treturn [field, snapshot] as const;\n\t});\n\tconst schema = {\n\t\ttype: \"object\",\n\t\tproperties: Object.fromEntries(fields.map(([field, snapshot]) => [field, snapshot.schema])),\n\t\trequired: fields.map(([field]) => field),\n\t\tadditionalProperties: false,\n\t};\n\treturn {\n\t\tfields: fields.map(([field]) => field),\n\t\tschema,\n\t\tnormal: fields.map(([field, snapshot]) => [field, snapshot.normal]),\n\t};\n}\n\n/** What `joinKey` escapes in a part: its separator and the escape itself. */\nconst SPECIAL = /[\\\\|]/;\n\n/** Joins key parts with `|`, each escaped (`\\\\` and `|`), so two different part lists never join to one key. */\nexport function joinKey(parts: readonly string[]): string {\n\t// Most parts have nothing to escape: no copy for them.\n\treturn parts\n\t\t.map((part) => (SPECIAL.test(part) ? part.replaceAll(\"\\\\\", \"\\\\\\\\\").replaceAll(\"|\", \"\\\\|\") : part))\n\t\t.join(\"|\");\n}\n\ntype SchemaNode = { readonly [keyword: string]: JsonValue };\n\nfunction isParamSchema(normal: JsonValue): boolean {\n\tconst node = normal as SchemaNode;\n\tif (node.anyOf !== undefined) {\n\t\treturn Object.keys(node).length === 1 && Array.isArray(node.anyOf) && node.anyOf.every(isStringLiteral);\n\t}\n\tconst allowed = PARAM_KEYWORDS.get(node.type);\n\treturn allowed !== undefined && Object.keys(node).every((key) => allowed.has(key));\n}\n\n/** Keywords a params field may use, by type. */\nconst PARAM_KEYWORDS = new Map<unknown, ReadonlySet<string>>([\n\t[\"string\", new Set([\"type\", \"minLength\", \"maxLength\", \"pattern\", \"format\"])],\n\t[\"integer\", new Set([\"type\", \"minimum\", \"maximum\", \"exclusiveMinimum\", \"exclusiveMaximum\", \"multipleOf\"])],\n\t[\"boolean\", new Set([\"type\"])],\n]);\n\nfunction isStringLiteral(branch: JsonValue): boolean {\n\tconst node = branch as SchemaNode;\n\treturn node.type === \"string\" && typeof node.const === \"string\" && Object.keys(node).length === 2;\n}\n"]}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Optional, type Properties, type Schema, type Static, type StaticObject } from "@diffra-ai/schema";
|
|
2
|
+
export { Optional, opt, type Schema, type Static } from "@diffra-ai/schema";
|
|
3
|
+
import type { HostKind, KindShape } from "./host-kind.ts";
|
|
4
|
+
import type { Params } from "./params.ts";
|
|
5
|
+
/** Bounds of a string length, a number or an array length. */
|
|
6
|
+
export type Bounds = {
|
|
7
|
+
readonly min?: number;
|
|
8
|
+
readonly max?: number;
|
|
9
|
+
};
|
|
10
|
+
/** A declared default value: a table column with one may be left out of a `put` (slice 6a §5). */
|
|
11
|
+
export type Defaulted<T> = {
|
|
12
|
+
readonly default: T;
|
|
13
|
+
};
|
|
14
|
+
/** A string schema (`str()`), told apart from the other scalars by its `type`. */
|
|
15
|
+
export interface StringSchema extends Schema<string> {
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
}
|
|
18
|
+
/** A number schema (`num()`). */
|
|
19
|
+
export interface NumberSchema extends Schema<number> {
|
|
20
|
+
readonly type: "number";
|
|
21
|
+
}
|
|
22
|
+
/** An integer schema (`int()`). */
|
|
23
|
+
export interface IntegerSchema extends Schema<number> {
|
|
24
|
+
readonly type: "integer";
|
|
25
|
+
}
|
|
26
|
+
/** A boolean schema (`bool()`). */
|
|
27
|
+
export interface BooleanSchema extends Schema<boolean> {
|
|
28
|
+
readonly type: "boolean";
|
|
29
|
+
}
|
|
30
|
+
/** The `null` schema (`nul()`): also the omitted side of a method. */
|
|
31
|
+
export interface NullSchema extends Schema<null> {
|
|
32
|
+
readonly type: "null";
|
|
33
|
+
}
|
|
34
|
+
/** A union of literals (`oneOf(...)`). */
|
|
35
|
+
export interface LiteralsSchema<V extends Literal> extends Schema<V> {
|
|
36
|
+
readonly anyOf: readonly Schema<V>[];
|
|
37
|
+
}
|
|
38
|
+
/** A string, with optional length bounds, pattern and default. */
|
|
39
|
+
export declare function str(options: Bounds & {
|
|
40
|
+
readonly pattern?: string;
|
|
41
|
+
readonly default: string;
|
|
42
|
+
}): StringSchema & Defaulted<string>;
|
|
43
|
+
export declare function str(options?: Bounds & {
|
|
44
|
+
readonly pattern?: string;
|
|
45
|
+
}): StringSchema;
|
|
46
|
+
/** A finite number within optional bounds, with an optional default. */
|
|
47
|
+
export declare function num(options: Bounds & {
|
|
48
|
+
readonly default: number;
|
|
49
|
+
}): NumberSchema & Defaulted<number>;
|
|
50
|
+
export declare function num(options?: Bounds): NumberSchema;
|
|
51
|
+
/** An integer within optional bounds, with an optional default. */
|
|
52
|
+
export declare function int(options: Bounds & {
|
|
53
|
+
readonly default: number;
|
|
54
|
+
}): IntegerSchema & Defaulted<number>;
|
|
55
|
+
export declare function int(options?: Bounds): IntegerSchema;
|
|
56
|
+
/** A boolean, with an optional default. */
|
|
57
|
+
export declare function bool(options: {
|
|
58
|
+
readonly default: boolean;
|
|
59
|
+
}): BooleanSchema & Defaulted<boolean>;
|
|
60
|
+
export declare function bool(options?: Record<never, never>): BooleanSchema;
|
|
61
|
+
/** `null`; also the omitted side of a method. */
|
|
62
|
+
export declare function nul(): NullSchema;
|
|
63
|
+
/** Exactly the given value, with its JSON type (`{ type: "string", const: "a" }`). */
|
|
64
|
+
export declare function lit<const V extends Literal>(value: V): Schema<V>;
|
|
65
|
+
/** A value `lit(...)` and `oneOf(...)` take. */
|
|
66
|
+
export type Literal = string | number | boolean;
|
|
67
|
+
/** One of the given literals: a union of `lit(...)` schemas, in order. */
|
|
68
|
+
export declare function oneOf<const V extends Literal[]>(...values: V): LiteralsSchema<V[number]>;
|
|
69
|
+
/** Any of the given schemas. */
|
|
70
|
+
export declare function union<const S extends readonly Schema[]>(schemas: S): Schema<Static<S[number]>>;
|
|
71
|
+
/** A closed object: unknown fields are refused; `opt(...)` marks an optional field. */
|
|
72
|
+
export declare function obj<const P extends Properties>(properties: P): Schema<StaticObject<P>>;
|
|
73
|
+
/** An array, with optional length bounds. */
|
|
74
|
+
export declare function arr<T>(items: Schema<T>, options?: Bounds): Schema<T[]>;
|
|
75
|
+
/** A string-keyed record: one pattern property matching every key. */
|
|
76
|
+
export declare function map<T>(value: Schema<T>): Schema<Record<string, T>>;
|
|
77
|
+
/** Any value. */
|
|
78
|
+
export declare function unknown(): Schema<unknown>;
|
|
79
|
+
/**
|
|
80
|
+
* A `Uint8Array` leaf, checked by `instanceof` and length, never enumerated: `{ type: "bytes", minLength?, maxLength? }`
|
|
81
|
+
* (diffra-schema's extension of JSON Schema for values that never pass through JSON).
|
|
82
|
+
*/
|
|
83
|
+
export declare function bytes(options?: Bounds): Schema<Uint8Array>;
|
|
84
|
+
/** Whether a declared object field is `opt(...)`. */
|
|
85
|
+
export declare function isOptional(value: unknown): value is Optional;
|
|
86
|
+
/** A method declaration: its argument and result schemas; an omitted side is `null` on the wire. */
|
|
87
|
+
export declare class Method<A extends Schema = Schema, R extends Schema = Schema> {
|
|
88
|
+
readonly args: A;
|
|
89
|
+
readonly result: R;
|
|
90
|
+
constructor(args: A, result: R);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A keyed state member's declaration (slice 6a §12): documents of `schema` by string key, or by address of host kind
|
|
94
|
+
* `key` (decision "Documents and table rows can belong to a host"); only in `local` contracts.
|
|
95
|
+
*/
|
|
96
|
+
export declare class KeyedMember<S extends Schema = Schema, K extends KindShape | undefined = KindShape | undefined> {
|
|
97
|
+
readonly schema: S;
|
|
98
|
+
readonly key: K;
|
|
99
|
+
constructor(schema: S, key: K);
|
|
100
|
+
}
|
|
101
|
+
/** The argument schemas of a `queries` member's named queries, by query name. */
|
|
102
|
+
export type QueryArguments = {
|
|
103
|
+
readonly [query: string]: Schema;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* A `queries` member's declaration (slice 14 §3.1): named queries over one of the object's tables, each with the
|
|
107
|
+
* schema of its arguments, whose rows are values of `item`; only in `local` contracts.
|
|
108
|
+
*/
|
|
109
|
+
export declare class QueriesMember<I extends Schema = Schema, A extends QueryArguments = QueryArguments> {
|
|
110
|
+
readonly item: I;
|
|
111
|
+
readonly args: A;
|
|
112
|
+
constructor(item: I, args: A);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Declares a `queries` member of a `local` contract: the named queries other objects on the host may read, each
|
|
116
|
+
* with its argument schema (part of the fingerprint). The handle of `self.queries(...)` implements it.
|
|
117
|
+
*/
|
|
118
|
+
export declare function queries<I extends Schema, const A extends QueryArguments>(item: I, args: A): QueriesMember<I, A>;
|
|
119
|
+
/**
|
|
120
|
+
* Declares a keyed state member of a `local` contract: documents of `schema` by string key, or with `key` (a host kind)
|
|
121
|
+
* by address of that kind (a host-keyed document handle implements it), each watchable.
|
|
122
|
+
*/
|
|
123
|
+
export declare function keyed<S extends Schema>(schema: S): KeyedMember<S, undefined>;
|
|
124
|
+
export declare function keyed<S extends Schema, N extends string, P extends Params>(schema: S, key: HostKind<N, P>): KeyedMember<S, HostKind<N, P>>;
|
|
125
|
+
/**
|
|
126
|
+
* An event member's declaration in a `local` contract's flat members (decision "Events: fire-and-forget members"): the
|
|
127
|
+
* schema of the JSON values its object emits.
|
|
128
|
+
*/
|
|
129
|
+
export declare class EventDeclaration<S extends Schema = Schema> {
|
|
130
|
+
readonly schema: S;
|
|
131
|
+
constructor(schema: S);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Declares an event member of a `local` contract, as `keyed(schema)` marks a keyed member: JSON values of `schema` the
|
|
135
|
+
* object emits, delivered once to the references bound to it, never kept (a remote contract lists them under a
|
|
136
|
+
* variant's `events`).
|
|
137
|
+
*/
|
|
138
|
+
export declare function event<S extends Schema>(schema: S): EventDeclaration<S>;
|
|
139
|
+
/** Declares a method: `method()`, `method(args)`, `method(args, result)` or `method(undefined, result)`. */
|
|
140
|
+
export declare function method(): Method<NullSchema, NullSchema>;
|
|
141
|
+
export declare function method<A extends Schema>(args: A): Method<A, NullSchema>;
|
|
142
|
+
export declare function method<R extends Schema>(args: undefined, result: R): Method<NullSchema, R>;
|
|
143
|
+
export declare function method<A extends Schema, R extends Schema>(args: A, result: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