@superbee/core 0.2.0-pre.9 → 0.4.10-pre.11
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/LICENSE +202 -0
- package/README.md +1339 -6
- package/dist/backend.d.ts +50 -2
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +311 -33
- package/dist/backend.js.map +1 -1
- package/dist/blob-contract.d.ts +82 -0
- package/dist/blob-contract.d.ts.map +1 -0
- package/dist/blob-contract.js +134 -0
- package/dist/blob-contract.js.map +1 -0
- package/dist/blob-journal.d.ts +303 -0
- package/dist/blob-journal.d.ts.map +1 -0
- package/dist/blob-journal.js +541 -0
- package/dist/blob-journal.js.map +1 -0
- package/dist/body-pages.d.ts +20 -0
- package/dist/body-pages.d.ts.map +1 -0
- package/dist/body-pages.js +56 -0
- package/dist/body-pages.js.map +1 -0
- package/dist/body-replace-guards.d.ts +81 -0
- package/dist/body-replace-guards.d.ts.map +1 -0
- package/dist/body-replace-guards.js +271 -0
- package/dist/body-replace-guards.js.map +1 -0
- package/dist/bounded-yaml.d.ts +28 -0
- package/dist/bounded-yaml.d.ts.map +1 -0
- package/dist/bounded-yaml.js +182 -0
- package/dist/bounded-yaml.js.map +1 -0
- package/dist/builtin-recipes/content.d.ts +93 -0
- package/dist/builtin-recipes/content.d.ts.map +1 -0
- package/dist/builtin-recipes/content.js +288 -0
- package/dist/builtin-recipes/content.js.map +1 -0
- package/dist/builtin-recipes/site.d.ts +5 -0
- package/dist/builtin-recipes/site.d.ts.map +1 -0
- package/dist/builtin-recipes/site.js +83 -0
- package/dist/builtin-recipes/site.js.map +1 -0
- package/dist/builtin-recipes.d.ts +13 -0
- package/dist/builtin-recipes.d.ts.map +1 -0
- package/dist/builtin-recipes.js +123 -0
- package/dist/builtin-recipes.js.map +1 -0
- package/dist/bundle-health/index.d.ts +14 -0
- package/dist/bundle-health/index.d.ts.map +1 -0
- package/dist/bundle-health/index.js +12 -0
- package/dist/bundle-health/index.js.map +1 -0
- package/dist/bundle-health/kind-findings.d.ts +45 -0
- package/dist/bundle-health/kind-findings.d.ts.map +1 -0
- package/dist/bundle-health/kind-findings.js +67 -0
- package/dist/bundle-health/kind-findings.js.map +1 -0
- package/dist/bundle-health/legacy-page.d.ts +21 -0
- package/dist/bundle-health/legacy-page.d.ts.map +1 -0
- package/dist/bundle-health/legacy-page.js +25 -0
- package/dist/bundle-health/legacy-page.js.map +1 -0
- package/dist/bundle-health/report.d.ts +191 -0
- package/dist/bundle-health/report.d.ts.map +1 -0
- package/dist/bundle-health/report.js +419 -0
- package/dist/bundle-health/report.js.map +1 -0
- package/dist/bundle-ops.d.ts +10 -4
- package/dist/bundle-ops.d.ts.map +1 -1
- package/dist/bundle-ops.js +15 -8
- package/dist/bundle-ops.js.map +1 -1
- package/dist/bundle.d.ts +2 -4
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +3 -12
- package/dist/bundle.js.map +1 -1
- package/dist/code-point-order.d.ts +8 -0
- package/dist/code-point-order.d.ts.map +1 -0
- package/dist/code-point-order.js +20 -0
- package/dist/code-point-order.js.map +1 -0
- package/dist/code-unit-order.d.ts +15 -0
- package/dist/code-unit-order.d.ts.map +1 -0
- package/dist/code-unit-order.js +17 -0
- package/dist/code-unit-order.js.map +1 -0
- package/dist/connector-request.d.ts +112 -0
- package/dist/connector-request.d.ts.map +1 -0
- package/dist/connector-request.js +495 -0
- package/dist/connector-request.js.map +1 -0
- package/dist/connectors.d.ts +297 -0
- package/dist/connectors.d.ts.map +1 -0
- package/dist/connectors.js +1233 -0
- package/dist/connectors.js.map +1 -0
- package/dist/convention-record.d.ts +9 -0
- package/dist/convention-record.d.ts.map +1 -0
- package/dist/convention-record.js +13 -0
- package/dist/convention-record.js.map +1 -0
- package/dist/cross-bundle.d.ts +135 -0
- package/dist/cross-bundle.d.ts.map +1 -0
- package/dist/cross-bundle.js +191 -0
- package/dist/cross-bundle.js.map +1 -0
- package/dist/dependencies.d.ts +208 -0
- package/dist/dependencies.d.ts.map +1 -0
- package/dist/dependencies.js +367 -0
- package/dist/dependencies.js.map +1 -0
- package/dist/document-codec.d.ts +4 -1
- package/dist/document-codec.d.ts.map +1 -1
- package/dist/document-codec.js +3 -1
- package/dist/document-codec.js.map +1 -1
- package/dist/document-field-actions.d.ts +21 -3
- package/dist/document-field-actions.d.ts.map +1 -1
- package/dist/document-field-actions.js +105 -40
- package/dist/document-field-actions.js.map +1 -1
- package/dist/document-mutation.d.ts +44 -18
- package/dist/document-mutation.d.ts.map +1 -1
- package/dist/document-mutation.js +192 -86
- package/dist/document-mutation.js.map +1 -1
- package/dist/document-persistence.d.ts +12 -0
- package/dist/document-persistence.d.ts.map +1 -0
- package/dist/document-persistence.js +44 -0
- package/dist/document-persistence.js.map +1 -0
- package/dist/document-replace-rules.d.ts +44 -0
- package/dist/document-replace-rules.d.ts.map +1 -0
- package/dist/document-replace-rules.js +41 -0
- package/dist/document-replace-rules.js.map +1 -0
- package/dist/document-scan.d.ts +26 -0
- package/dist/document-scan.d.ts.map +1 -0
- package/dist/document-scan.js +70 -0
- package/dist/document-scan.js.map +1 -0
- package/dist/document-transfer.d.ts +312 -0
- package/dist/document-transfer.d.ts.map +1 -0
- package/dist/document-transfer.js +1400 -0
- package/dist/document-transfer.js.map +1 -0
- package/dist/document-write-policy.d.ts +15 -4
- package/dist/document-write-policy.d.ts.map +1 -1
- package/dist/document-write-policy.js +41 -27
- package/dist/document-write-policy.js.map +1 -1
- package/dist/domain-model.d.ts +73 -0
- package/dist/domain-model.d.ts.map +1 -0
- package/dist/domain-model.js +169 -0
- package/dist/domain-model.js.map +1 -0
- package/dist/edge-harness/corpus.d.ts +9 -0
- package/dist/edge-harness/corpus.d.ts.map +1 -0
- package/dist/edge-harness/corpus.js +57 -0
- package/dist/edge-harness/corpus.js.map +1 -0
- package/dist/edge-harness/index.d.ts +21 -0
- package/dist/edge-harness/index.d.ts.map +1 -0
- package/dist/edge-harness/index.js +537 -0
- package/dist/edge-harness/index.js.map +1 -0
- package/dist/edges/find.d.ts +14 -0
- package/dist/edges/find.d.ts.map +1 -0
- package/dist/edges/find.js +46 -0
- package/dist/edges/find.js.map +1 -0
- package/dist/edges/index.d.ts +13 -0
- package/dist/edges/index.d.ts.map +1 -0
- package/dist/edges/index.js +5 -0
- package/dist/edges/index.js.map +1 -0
- package/dist/edges/memory-source.d.ts +8 -0
- package/dist/edges/memory-source.d.ts.map +1 -0
- package/dist/edges/memory-source.js +164 -0
- package/dist/edges/memory-source.js.map +1 -0
- package/dist/edges/read-bounds.d.ts +6 -0
- package/dist/edges/read-bounds.d.ts.map +1 -0
- package/dist/edges/read-bounds.js +13 -0
- package/dist/edges/read-bounds.js.map +1 -0
- package/dist/edges/source.d.ts +123 -0
- package/dist/edges/source.d.ts.map +1 -0
- package/dist/edges/source.js +2 -0
- package/dist/edges/source.js.map +1 -0
- package/dist/edges/walk.d.ts +7 -0
- package/dist/edges/walk.d.ts.map +1 -0
- package/dist/edges/walk.js +14 -0
- package/dist/edges/walk.js.map +1 -0
- package/dist/engine.d.ts +54 -18
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +137 -108
- package/dist/engine.js.map +1 -1
- package/dist/errors.d.ts +37 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +75 -3
- package/dist/errors.js.map +1 -1
- package/dist/file-journaled-backend-internal.d.ts +2 -0
- package/dist/file-journaled-backend-internal.d.ts.map +1 -1
- package/dist/file-journaled-backend-internal.js +2 -0
- package/dist/file-journaled-backend-internal.js.map +1 -1
- package/dist/file-journaled-backend.d.ts +38 -40
- package/dist/file-journaled-backend.d.ts.map +1 -1
- package/dist/file-journaled-backend.js +284 -52
- package/dist/file-journaled-backend.js.map +1 -1
- package/dist/filesystem-identity.d.ts +116 -17
- package/dist/filesystem-identity.d.ts.map +1 -1
- package/dist/filesystem-identity.js +532 -51
- package/dist/filesystem-identity.js.map +1 -1
- package/dist/filesystem-lock.d.ts +9 -2
- package/dist/filesystem-lock.d.ts.map +1 -1
- package/dist/filesystem-lock.js +134 -17
- package/dist/filesystem-lock.js.map +1 -1
- package/dist/filesystem-temp-name.d.ts +9 -0
- package/dist/filesystem-temp-name.d.ts.map +1 -0
- package/dist/filesystem-temp-name.js +20 -0
- package/dist/filesystem-temp-name.js.map +1 -0
- package/dist/filesystem.d.ts +6 -0
- package/dist/filesystem.d.ts.map +1 -1
- package/dist/filesystem.js +2 -1
- package/dist/filesystem.js.map +1 -1
- package/dist/freshness.d.ts +16 -1
- package/dist/freshness.d.ts.map +1 -1
- package/dist/freshness.js +47 -17
- package/dist/freshness.js.map +1 -1
- package/dist/frontmatter-contract.d.ts +14 -0
- package/dist/frontmatter-contract.d.ts.map +1 -1
- package/dist/frontmatter-contract.js +22 -0
- package/dist/frontmatter-contract.js.map +1 -1
- package/dist/frontmatter-splitter.d.ts +6 -0
- package/dist/frontmatter-splitter.d.ts.map +1 -1
- package/dist/frontmatter-splitter.js +8 -0
- package/dist/frontmatter-splitter.js.map +1 -1
- package/dist/frontmatter.d.ts +17 -7
- package/dist/frontmatter.d.ts.map +1 -1
- package/dist/frontmatter.js +52 -11
- package/dist/frontmatter.js.map +1 -1
- package/dist/governed-body-write.d.ts.map +1 -1
- package/dist/governed-body-write.js +13 -6
- package/dist/governed-body-write.js.map +1 -1
- package/dist/heads-digest.d.ts.map +1 -1
- package/dist/heads-digest.js +2 -1
- package/dist/heads-digest.js.map +1 -1
- package/dist/hosted-client/binding.d.ts +7 -0
- package/dist/hosted-client/binding.d.ts.map +1 -0
- package/dist/hosted-client/binding.js +10 -0
- package/dist/hosted-client/binding.js.map +1 -0
- package/dist/hosted-client/blob-delivery.d.ts +68 -0
- package/dist/hosted-client/blob-delivery.d.ts.map +1 -0
- package/dist/hosted-client/blob-delivery.js +170 -0
- package/dist/hosted-client/blob-delivery.js.map +1 -0
- package/dist/hosted-client/blob-write.d.ts +387 -0
- package/dist/hosted-client/blob-write.d.ts.map +1 -0
- package/dist/hosted-client/blob-write.js +770 -0
- package/dist/hosted-client/blob-write.js.map +1 -0
- package/dist/hosted-client/bundle-listing.d.ts +46 -0
- package/dist/hosted-client/bundle-listing.d.ts.map +1 -0
- package/dist/hosted-client/bundle-listing.js +36 -0
- package/dist/hosted-client/bundle-listing.js.map +1 -0
- package/dist/hosted-client/client.d.ts +249 -0
- package/dist/hosted-client/client.d.ts.map +1 -0
- package/dist/hosted-client/client.js +381 -0
- package/dist/hosted-client/client.js.map +1 -0
- package/dist/hosted-client/directory.d.ts +46 -0
- package/dist/hosted-client/directory.d.ts.map +1 -0
- package/dist/hosted-client/directory.js +74 -0
- package/dist/hosted-client/directory.js.map +1 -0
- package/dist/hosted-client/errors.d.ts +26 -0
- package/dist/hosted-client/errors.d.ts.map +1 -0
- package/dist/hosted-client/errors.js +35 -0
- package/dist/hosted-client/errors.js.map +1 -0
- package/dist/hosted-client/inbox.d.ts +320 -0
- package/dist/hosted-client/inbox.d.ts.map +1 -0
- package/dist/hosted-client/inbox.js +379 -0
- package/dist/hosted-client/inbox.js.map +1 -0
- package/dist/hosted-client/index.d.ts +31 -0
- package/dist/hosted-client/index.d.ts.map +1 -0
- package/dist/hosted-client/index.js +33 -0
- package/dist/hosted-client/index.js.map +1 -0
- package/dist/hosted-client/journal.d.ts +103 -0
- package/dist/hosted-client/journal.d.ts.map +1 -0
- package/dist/hosted-client/journal.js +464 -0
- package/dist/hosted-client/journal.js.map +1 -0
- package/dist/hosted-client/node.d.ts +74 -0
- package/dist/hosted-client/node.d.ts.map +1 -0
- package/dist/hosted-client/node.js +219 -0
- package/dist/hosted-client/node.js.map +1 -0
- package/dist/hosted-client/reference.d.ts +12 -0
- package/dist/hosted-client/reference.d.ts.map +1 -0
- package/dist/hosted-client/reference.js +29 -0
- package/dist/hosted-client/reference.js.map +1 -0
- package/dist/hosted-client/view-content.d.ts +184 -0
- package/dist/hosted-client/view-content.d.ts.map +1 -0
- package/dist/hosted-client/view-content.js +268 -0
- package/dist/hosted-client/view-content.js.map +1 -0
- package/dist/hosted-client/write.d.ts +219 -0
- package/dist/hosted-client/write.d.ts.map +1 -0
- package/dist/hosted-client/write.js +419 -0
- package/dist/hosted-client/write.js.map +1 -0
- package/dist/hosted-transport/answer-rows.d.ts +132 -4
- package/dist/hosted-transport/answer-rows.d.ts.map +1 -1
- package/dist/hosted-transport/answer-rows.js +211 -11
- package/dist/hosted-transport/answer-rows.js.map +1 -1
- package/dist/hosted-transport/attribution.d.ts +32 -0
- package/dist/hosted-transport/attribution.d.ts.map +1 -0
- package/dist/hosted-transport/attribution.js +38 -0
- package/dist/hosted-transport/attribution.js.map +1 -0
- package/dist/hosted-transport/blob-reads.d.ts +35 -0
- package/dist/hosted-transport/blob-reads.d.ts.map +1 -0
- package/dist/hosted-transport/blob-reads.js +179 -0
- package/dist/hosted-transport/blob-reads.js.map +1 -0
- package/dist/hosted-transport/blob-write.d.ts +34 -0
- package/dist/hosted-transport/blob-write.d.ts.map +1 -0
- package/dist/hosted-transport/blob-write.js +115 -0
- package/dist/hosted-transport/blob-write.js.map +1 -0
- package/dist/hosted-transport/carrier.d.ts +35 -11
- package/dist/hosted-transport/carrier.d.ts.map +1 -1
- package/dist/hosted-transport/carrier.js +101 -57
- package/dist/hosted-transport/carrier.js.map +1 -1
- package/dist/hosted-transport/document-backend.d.ts +74 -0
- package/dist/hosted-transport/document-backend.d.ts.map +1 -0
- package/dist/hosted-transport/document-backend.js +160 -0
- package/dist/hosted-transport/document-backend.js.map +1 -0
- package/dist/hosted-transport/index.d.ts +7 -4
- package/dist/hosted-transport/index.d.ts.map +1 -1
- package/dist/hosted-transport/index.js +7 -4
- package/dist/hosted-transport/index.js.map +1 -1
- package/dist/hosted-transport/operations.d.ts +6 -0
- package/dist/hosted-transport/operations.d.ts.map +1 -1
- package/dist/hosted-transport/operations.js +2 -1
- package/dist/hosted-transport/operations.js.map +1 -1
- package/dist/hosted-transport/port-run.d.ts +41 -0
- package/dist/hosted-transport/port-run.d.ts.map +1 -0
- package/dist/hosted-transport/port-run.js +92 -0
- package/dist/hosted-transport/port-run.js.map +1 -0
- package/dist/hosted-transport/read-adapter.d.ts +19 -3
- package/dist/hosted-transport/read-adapter.d.ts.map +1 -1
- package/dist/hosted-transport/read-adapter.js +18 -5
- package/dist/hosted-transport/read-adapter.js.map +1 -1
- package/dist/hosted-transport/root-write.d.ts.map +1 -1
- package/dist/hosted-transport/root-write.js +5 -2
- package/dist/hosted-transport/root-write.js.map +1 -1
- package/dist/hosted-transport/whole-document-transport.d.ts +56 -7
- package/dist/hosted-transport/whole-document-transport.d.ts.map +1 -1
- package/dist/hosted-transport/whole-document-transport.js +120 -31
- package/dist/hosted-transport/whole-document-transport.js.map +1 -1
- package/dist/identity-fold.d.ts +16 -0
- package/dist/identity-fold.d.ts.map +1 -0
- package/dist/identity-fold.js +24 -0
- package/dist/identity-fold.js.map +1 -0
- package/dist/index-projection.d.ts +2 -1
- package/dist/index-projection.d.ts.map +1 -1
- package/dist/index-projection.js +38 -28
- package/dist/index-projection.js.map +1 -1
- package/dist/index.d.ts +59 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -20
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-backend.d.ts +0 -31
- package/dist/indexeddb-backend.d.ts.map +1 -1
- package/dist/indexeddb-backend.js +5 -2
- package/dist/indexeddb-backend.js.map +1 -1
- package/dist/inventory-guard.d.ts +58 -0
- package/dist/inventory-guard.d.ts.map +1 -0
- package/dist/inventory-guard.js +169 -0
- package/dist/inventory-guard.js.map +1 -0
- package/dist/journaled-backend.d.ts +14 -4
- package/dist/journaled-backend.d.ts.map +1 -1
- package/dist/journaled-backend.js +19 -78
- package/dist/journaled-backend.js.map +1 -1
- package/dist/json-data.d.ts +3 -0
- package/dist/json-data.d.ts.map +1 -0
- package/dist/json-data.js +19 -0
- package/dist/json-data.js.map +1 -0
- package/dist/kind-authoring.d.ts +188 -0
- package/dist/kind-authoring.d.ts.map +1 -0
- package/dist/kind-authoring.js +520 -0
- package/dist/kind-authoring.js.map +1 -0
- package/dist/kind-changes.d.ts +45 -0
- package/dist/kind-changes.d.ts.map +1 -0
- package/dist/kind-changes.js +96 -0
- package/dist/kind-changes.js.map +1 -0
- package/dist/kind-conformance-error.d.ts +16 -0
- package/dist/kind-conformance-error.d.ts.map +1 -0
- package/dist/kind-conformance-error.js +20 -0
- package/dist/kind-conformance-error.js.map +1 -0
- package/dist/kind-coverage.d.ts +100 -0
- package/dist/kind-coverage.d.ts.map +1 -0
- package/dist/kind-coverage.js +185 -0
- package/dist/kind-coverage.js.map +1 -0
- package/dist/kind-deprecation.d.ts +32 -0
- package/dist/kind-deprecation.d.ts.map +1 -0
- package/dist/kind-deprecation.js +141 -0
- package/dist/kind-deprecation.js.map +1 -0
- package/dist/kind-field-mutation.d.ts +7 -2
- package/dist/kind-field-mutation.d.ts.map +1 -1
- package/dist/kind-field-mutation.js +28 -3
- package/dist/kind-field-mutation.js.map +1 -1
- package/dist/kind-undeclared-fields.d.ts +72 -0
- package/dist/kind-undeclared-fields.d.ts.map +1 -0
- package/dist/kind-undeclared-fields.js +124 -0
- package/dist/kind-undeclared-fields.js.map +1 -0
- package/dist/kinds-load.d.ts.map +1 -1
- package/dist/kinds-load.js +8 -5
- package/dist/kinds-load.js.map +1 -1
- package/dist/kinds.d.ts +105 -13
- package/dist/kinds.d.ts.map +1 -1
- package/dist/kinds.js +369 -30
- package/dist/kinds.js.map +1 -1
- package/dist/link-add.d.ts +81 -0
- package/dist/link-add.d.ts.map +1 -0
- package/dist/link-add.js +94 -0
- package/dist/link-add.js.map +1 -0
- package/dist/link-emit.d.ts +29 -0
- package/dist/link-emit.d.ts.map +1 -0
- package/dist/link-emit.js +39 -0
- package/dist/link-emit.js.map +1 -0
- package/dist/link-findings.d.ts +132 -0
- package/dist/link-findings.d.ts.map +1 -0
- package/dist/link-findings.js +263 -0
- package/dist/link-findings.js.map +1 -0
- package/dist/link-types.d.ts +34 -0
- package/dist/link-types.d.ts.map +1 -0
- package/dist/link-types.js +79 -0
- package/dist/link-types.js.map +1 -0
- package/dist/links.d.ts +68 -9
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +370 -57
- package/dist/links.js.map +1 -1
- package/dist/local-search-index.d.ts +86 -0
- package/dist/local-search-index.d.ts.map +1 -0
- package/dist/local-search-index.js +1055 -0
- package/dist/local-search-index.js.map +1 -0
- package/dist/managed-document-metadata.d.ts +5 -0
- package/dist/managed-document-metadata.d.ts.map +1 -0
- package/dist/managed-document-metadata.js +10 -0
- package/dist/managed-document-metadata.js.map +1 -0
- package/dist/markdown-syntax.d.ts +39 -0
- package/dist/markdown-syntax.d.ts.map +1 -0
- package/dist/markdown-syntax.js +10170 -0
- package/dist/markdown-syntax.js.map +1 -0
- package/dist/memory-backend.d.ts +3 -0
- package/dist/memory-backend.d.ts.map +1 -1
- package/dist/memory-backend.js +40 -2
- package/dist/memory-backend.js.map +1 -1
- package/dist/mutation-attribution.d.ts +2 -1
- package/dist/mutation-attribution.d.ts.map +1 -1
- package/dist/mutation-attribution.js.map +1 -1
- package/dist/okf-actor.d.ts +14 -3
- package/dist/okf-actor.d.ts.map +1 -1
- package/dist/okf-actor.js +25 -4
- package/dist/okf-actor.js.map +1 -1
- package/dist/okf-authored-values.d.ts +2 -0
- package/dist/okf-authored-values.d.ts.map +1 -1
- package/dist/okf-authored-values.js +4 -0
- package/dist/okf-authored-values.js.map +1 -1
- package/dist/okf-authoring.d.ts +7 -0
- package/dist/okf-authoring.d.ts.map +1 -0
- package/dist/okf-authoring.js +30 -0
- package/dist/okf-authoring.js.map +1 -0
- package/dist/okf-standard-fields.d.ts +4 -0
- package/dist/okf-standard-fields.d.ts.map +1 -1
- package/dist/okf-standard-fields.js +24 -14
- package/dist/okf-standard-fields.js.map +1 -1
- package/dist/okf-timestamps.d.ts +2 -2
- package/dist/okf-timestamps.d.ts.map +1 -1
- package/dist/okf-timestamps.js +25 -15
- package/dist/okf-timestamps.js.map +1 -1
- package/dist/page.d.ts +3 -7
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +3 -7
- package/dist/page.js.map +1 -1
- package/dist/path-fold.d.ts +67 -0
- package/dist/path-fold.d.ts.map +1 -0
- package/dist/path-fold.js +107 -0
- package/dist/path-fold.js.map +1 -0
- package/dist/paths.d.ts +46 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +114 -1
- package/dist/paths.js.map +1 -1
- package/dist/platform.d.ts +13 -0
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +16 -0
- package/dist/platform.js.map +1 -1
- package/dist/portable-export-contract.d.ts +17 -0
- package/dist/portable-export-contract.d.ts.map +1 -0
- package/dist/portable-export-contract.js +59 -0
- package/dist/portable-export-contract.js.map +1 -0
- package/dist/portable-export.d.ts +115 -0
- package/dist/portable-export.d.ts.map +1 -0
- package/dist/portable-export.js +452 -0
- package/dist/portable-export.js.map +1 -0
- package/dist/portable-frontmatter.d.ts +17 -0
- package/dist/portable-frontmatter.d.ts.map +1 -1
- package/dist/portable-frontmatter.js +42 -5
- package/dist/portable-frontmatter.js.map +1 -1
- package/dist/publication-filesystem.d.ts +1 -1
- package/dist/publication-filesystem.d.ts.map +1 -1
- package/dist/publication-filesystem.js +1 -1
- package/dist/publication-filesystem.js.map +1 -1
- package/dist/qualified-links.d.ts +67 -0
- package/dist/qualified-links.d.ts.map +1 -0
- package/dist/qualified-links.js +121 -0
- package/dist/qualified-links.js.map +1 -0
- package/dist/query-filter.d.ts +11 -4
- package/dist/query-filter.d.ts.map +1 -1
- package/dist/query-filter.js +25 -6
- package/dist/query-filter.js.map +1 -1
- package/dist/query-order.d.ts.map +1 -1
- package/dist/query-order.js +2 -1
- package/dist/query-order.js.map +1 -1
- package/dist/recipe-lifecycle/errors.d.ts +96 -0
- package/dist/recipe-lifecycle/errors.d.ts.map +1 -0
- package/dist/recipe-lifecycle/errors.js +122 -0
- package/dist/recipe-lifecycle/errors.js.map +1 -0
- package/dist/recipe-lifecycle/evolution.d.ts +134 -0
- package/dist/recipe-lifecycle/evolution.d.ts.map +1 -0
- package/dist/recipe-lifecycle/evolution.js +1047 -0
- package/dist/recipe-lifecycle/evolution.js.map +1 -0
- package/dist/recipe-lifecycle/index.d.ts +38 -0
- package/dist/recipe-lifecycle/index.d.ts.map +1 -0
- package/dist/recipe-lifecycle/index.js +31 -0
- package/dist/recipe-lifecycle/index.js.map +1 -0
- package/dist/recipe-lifecycle/install.d.ts +172 -0
- package/dist/recipe-lifecycle/install.d.ts.map +1 -0
- package/dist/recipe-lifecycle/install.js +652 -0
- package/dist/recipe-lifecycle/install.js.map +1 -0
- package/dist/recipe-lifecycle/legacy-aliases.d.ts +4 -0
- package/dist/recipe-lifecycle/legacy-aliases.d.ts.map +1 -0
- package/dist/recipe-lifecycle/legacy-aliases.js +22 -0
- package/dist/recipe-lifecycle/legacy-aliases.js.map +1 -0
- package/dist/recipe-lifecycle/retirement-apply.d.ts +59 -0
- package/dist/recipe-lifecycle/retirement-apply.d.ts.map +1 -0
- package/dist/recipe-lifecycle/retirement-apply.js +165 -0
- package/dist/recipe-lifecycle/retirement-apply.js.map +1 -0
- package/dist/recipe-lifecycle/retirement.d.ts +89 -0
- package/dist/recipe-lifecycle/retirement.d.ts.map +1 -0
- package/dist/recipe-lifecycle/retirement.js +347 -0
- package/dist/recipe-lifecycle/retirement.js.map +1 -0
- package/dist/recipe-lifecycle/set-commit.d.ts +31 -0
- package/dist/recipe-lifecycle/set-commit.d.ts.map +1 -0
- package/dist/recipe-lifecycle/set-commit.js +37 -0
- package/dist/recipe-lifecycle/set-commit.js.map +1 -0
- package/dist/recipe-lifecycle/stamp.d.ts +146 -0
- package/dist/recipe-lifecycle/stamp.d.ts.map +1 -0
- package/dist/recipe-lifecycle/stamp.js +361 -0
- package/dist/recipe-lifecycle/stamp.js.map +1 -0
- package/dist/recipe-qualify.d.ts +80 -0
- package/dist/recipe-qualify.d.ts.map +1 -0
- package/dist/recipe-qualify.js +352 -0
- package/dist/recipe-qualify.js.map +1 -0
- package/dist/recipe-set-preflight.d.ts +139 -0
- package/dist/recipe-set-preflight.d.ts.map +1 -0
- package/dist/recipe-set-preflight.js +536 -0
- package/dist/recipe-set-preflight.js.map +1 -0
- package/dist/recipe-sources.d.ts +209 -0
- package/dist/recipe-sources.d.ts.map +1 -0
- package/dist/recipe-sources.js +607 -0
- package/dist/recipe-sources.js.map +1 -0
- package/dist/recipes.d.ts +45 -1
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +138 -1
- package/dist/recipes.js.map +1 -1
- package/dist/record-overlay/apply.d.ts +43 -0
- package/dist/record-overlay/apply.d.ts.map +1 -0
- package/dist/record-overlay/apply.js +523 -0
- package/dist/record-overlay/apply.js.map +1 -0
- package/dist/record-overlay/canonical.d.ts +22 -0
- package/dist/record-overlay/canonical.d.ts.map +1 -0
- package/dist/record-overlay/canonical.js +47 -0
- package/dist/record-overlay/canonical.js.map +1 -0
- package/dist/record-overlay/digest.d.ts +4 -0
- package/dist/record-overlay/digest.d.ts.map +1 -0
- package/dist/record-overlay/digest.js +11 -0
- package/dist/record-overlay/digest.js.map +1 -0
- package/dist/record-overlay/errors.d.ts +44 -0
- package/dist/record-overlay/errors.d.ts.map +1 -0
- package/dist/record-overlay/errors.js +55 -0
- package/dist/record-overlay/errors.js.map +1 -0
- package/dist/record-overlay/findings.d.ts +5 -0
- package/dist/record-overlay/findings.d.ts.map +1 -0
- package/dist/record-overlay/findings.js +86 -0
- package/dist/record-overlay/findings.js.map +1 -0
- package/dist/record-overlay/index.d.ts +23 -0
- package/dist/record-overlay/index.d.ts.map +1 -0
- package/dist/record-overlay/index.js +21 -0
- package/dist/record-overlay/index.js.map +1 -0
- package/dist/record-overlay/plan.d.ts +12 -0
- package/dist/record-overlay/plan.d.ts.map +1 -0
- package/dist/record-overlay/plan.js +285 -0
- package/dist/record-overlay/plan.js.map +1 -0
- package/dist/record-overlay/policy.d.ts +74 -0
- package/dist/record-overlay/policy.d.ts.map +1 -0
- package/dist/record-overlay/policy.js +235 -0
- package/dist/record-overlay/policy.js.map +1 -0
- package/dist/record-overlay/redact.d.ts +3 -0
- package/dist/record-overlay/redact.d.ts.map +1 -0
- package/dist/record-overlay/redact.js +27 -0
- package/dist/record-overlay/redact.js.map +1 -0
- package/dist/record-overlay/signal-kind.d.ts +30 -0
- package/dist/record-overlay/signal-kind.d.ts.map +1 -0
- package/dist/record-overlay/signal-kind.js +38 -0
- package/dist/record-overlay/signal-kind.js.map +1 -0
- package/dist/record-overlay/signal-text.d.ts +52 -0
- package/dist/record-overlay/signal-text.d.ts.map +1 -0
- package/dist/record-overlay/signal-text.js +126 -0
- package/dist/record-overlay/signal-text.js.map +1 -0
- package/dist/record-overlay/source-index.d.ts +19 -0
- package/dist/record-overlay/source-index.d.ts.map +1 -0
- package/dist/record-overlay/source-index.js +102 -0
- package/dist/record-overlay/source-index.js.map +1 -0
- package/dist/record-overlay/types.d.ts +291 -0
- package/dist/record-overlay/types.d.ts.map +1 -0
- package/dist/record-overlay/types.js +2 -0
- package/dist/record-overlay/types.js.map +1 -0
- package/dist/relationships.d.ts +71 -0
- package/dist/relationships.d.ts.map +1 -0
- package/dist/relationships.js +87 -0
- package/dist/relationships.js.map +1 -0
- package/dist/remote-backend.d.ts +11 -21
- package/dist/remote-backend.d.ts.map +1 -1
- package/dist/remote-backend.js +20 -15
- package/dist/remote-backend.js.map +1 -1
- package/dist/remote-document-codec.d.ts +2 -1
- package/dist/remote-document-codec.d.ts.map +1 -1
- package/dist/remote-document-codec.js +3 -2
- package/dist/remote-document-codec.js.map +1 -1
- package/dist/remote-operations.d.ts +0 -41
- package/dist/remote-operations.d.ts.map +1 -1
- package/dist/remote-operations.js +14 -2
- package/dist/remote-operations.js.map +1 -1
- package/dist/remote-parsers.d.ts +19 -0
- package/dist/remote-parsers.d.ts.map +1 -1
- package/dist/remote-parsers.js.map +1 -1
- package/dist/remote.d.ts +2 -4
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +2 -3
- package/dist/remote.js.map +1 -1
- package/dist/reserved-write.d.ts +9 -0
- package/dist/reserved-write.d.ts.map +1 -0
- package/dist/reserved-write.js +15 -0
- package/dist/reserved-write.js.map +1 -0
- package/dist/search/backend-source.d.ts +6 -0
- package/dist/search/backend-source.d.ts.map +1 -0
- package/dist/search/backend-source.js +57 -0
- package/dist/search/backend-source.js.map +1 -0
- package/dist/search/contract.d.ts +162 -0
- package/dist/search/contract.d.ts.map +1 -0
- package/dist/search/contract.js +82 -0
- package/dist/search/contract.js.map +1 -0
- package/dist/search/errors.d.ts +30 -0
- package/dist/search/errors.d.ts.map +1 -0
- package/dist/search/errors.js +50 -0
- package/dist/search/errors.js.map +1 -0
- package/dist/search/identity.d.ts +12 -0
- package/dist/search/identity.d.ts.map +1 -0
- package/dist/search/identity.js +90 -0
- package/dist/search/identity.js.map +1 -0
- package/dist/search/index.d.ts +16 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +15 -0
- package/dist/search/index.js.map +1 -0
- package/dist/search/memory-source.d.ts +36 -0
- package/dist/search/memory-source.d.ts.map +1 -0
- package/dist/search/memory-source.js +238 -0
- package/dist/search/memory-source.js.map +1 -0
- package/dist/search/rank.d.ts +29 -0
- package/dist/search/rank.d.ts.map +1 -0
- package/dist/search/rank.js +132 -0
- package/dist/search/rank.js.map +1 -0
- package/dist/search/row-text.d.ts +38 -0
- package/dist/search/row-text.d.ts.map +1 -0
- package/dist/search/row-text.js +88 -0
- package/dist/search/row-text.js.map +1 -0
- package/dist/search/search.d.ts +28 -0
- package/dist/search/search.d.ts.map +1 -0
- package/dist/search/search.js +265 -0
- package/dist/search/search.js.map +1 -0
- package/dist/search/source.d.ts +70 -0
- package/dist/search/source.d.ts.map +1 -0
- package/dist/search/source.js +2 -0
- package/dist/search/source.js.map +1 -0
- package/dist/search/text.d.ts +49 -0
- package/dist/search/text.d.ts.map +1 -0
- package/dist/search/text.js +165 -0
- package/dist/search/text.js.map +1 -0
- package/dist/search-index.d.ts +9 -0
- package/dist/search-index.d.ts.map +1 -0
- package/dist/search-index.js +9 -0
- package/dist/search-index.js.map +1 -0
- package/dist/sha256.d.ts.map +1 -1
- package/dist/sha256.js +3 -2
- package/dist/sha256.js.map +1 -1
- package/dist/site-capabilities.d.ts +345 -0
- package/dist/site-capabilities.d.ts.map +1 -0
- package/dist/site-capabilities.js +724 -0
- package/dist/site-capabilities.js.map +1 -0
- package/dist/site-manifest.d.ts +51 -0
- package/dist/site-manifest.d.ts.map +1 -0
- package/dist/site-manifest.js +115 -0
- package/dist/site-manifest.js.map +1 -0
- package/dist/skip-reasons.d.ts +12 -0
- package/dist/skip-reasons.d.ts.map +1 -0
- package/dist/skip-reasons.js +15 -0
- package/dist/skip-reasons.js.map +1 -0
- package/dist/source-engine/driver.d.ts +40 -0
- package/dist/source-engine/driver.d.ts.map +1 -0
- package/dist/source-engine/driver.js +513 -0
- package/dist/source-engine/driver.js.map +1 -0
- package/dist/source-engine/evidence.d.ts +39 -0
- package/dist/source-engine/evidence.d.ts.map +1 -0
- package/dist/source-engine/evidence.js +54 -0
- package/dist/source-engine/evidence.js.map +1 -0
- package/dist/source-engine/guard.d.ts +87 -0
- package/dist/source-engine/guard.d.ts.map +1 -0
- package/dist/source-engine/guard.js +427 -0
- package/dist/source-engine/guard.js.map +1 -0
- package/dist/source-engine/index.d.ts +35 -0
- package/dist/source-engine/index.d.ts.map +1 -0
- package/dist/source-engine/index.js +27 -0
- package/dist/source-engine/index.js.map +1 -0
- package/dist/source-engine/machine-state.d.ts +87 -0
- package/dist/source-engine/machine-state.d.ts.map +1 -0
- package/dist/source-engine/machine-state.js +94 -0
- package/dist/source-engine/machine-state.js.map +1 -0
- package/dist/source-engine/observe.d.ts +10 -0
- package/dist/source-engine/observe.d.ts.map +1 -0
- package/dist/source-engine/observe.js +276 -0
- package/dist/source-engine/observe.js.map +1 -0
- package/dist/source-engine/overlay.d.ts +50 -0
- package/dist/source-engine/overlay.d.ts.map +1 -0
- package/dist/source-engine/overlay.js +114 -0
- package/dist/source-engine/overlay.js.map +1 -0
- package/dist/source-engine/robots.d.ts +53 -0
- package/dist/source-engine/robots.d.ts.map +1 -0
- package/dist/source-engine/robots.js +158 -0
- package/dist/source-engine/robots.js.map +1 -0
- package/dist/source-engine/snapshot.d.ts +104 -0
- package/dist/source-engine/snapshot.d.ts.map +1 -0
- package/dist/source-engine/snapshot.js +240 -0
- package/dist/source-engine/snapshot.js.map +1 -0
- package/dist/source-engine/target-consumer.d.ts +12 -0
- package/dist/source-engine/target-consumer.d.ts.map +1 -0
- package/dist/source-engine/target-consumer.js +15 -0
- package/dist/source-engine/target-consumer.js.map +1 -0
- package/dist/source-engine/target-descriptor.d.ts +3 -0
- package/dist/source-engine/target-descriptor.d.ts.map +1 -0
- package/dist/source-engine/target-descriptor.js +26 -0
- package/dist/source-engine/target-descriptor.js.map +1 -0
- package/dist/source-engine/target.d.ts +82 -0
- package/dist/source-engine/target.d.ts.map +1 -0
- package/dist/source-engine/target.js +213 -0
- package/dist/source-engine/target.js.map +1 -0
- package/dist/source-engine/types.d.ts +296 -0
- package/dist/source-engine/types.d.ts.map +1 -0
- package/dist/source-engine/types.js +2 -0
- package/dist/source-engine/types.js.map +1 -0
- package/dist/source-harness/conformance.d.ts +16 -0
- package/dist/source-harness/conformance.d.ts.map +1 -0
- package/dist/source-harness/conformance.js +266 -0
- package/dist/source-harness/conformance.js.map +1 -0
- package/dist/source-harness/fixture.d.ts +97 -0
- package/dist/source-harness/fixture.d.ts.map +1 -0
- package/dist/source-harness/fixture.js +276 -0
- package/dist/source-harness/fixture.js.map +1 -0
- package/dist/source-harness/index.d.ts +22 -0
- package/dist/source-harness/index.d.ts.map +1 -0
- package/dist/source-harness/index.js +19 -0
- package/dist/source-harness/index.js.map +1 -0
- package/dist/source-harness/peer.d.ts +74 -0
- package/dist/source-harness/peer.d.ts.map +1 -0
- package/dist/source-harness/peer.js +106 -0
- package/dist/source-harness/peer.js.map +1 -0
- package/dist/source-profiles/index.d.ts +31 -0
- package/dist/source-profiles/index.d.ts.map +1 -0
- package/dist/source-profiles/index.js +206 -0
- package/dist/source-profiles/index.js.map +1 -0
- package/dist/source-profiles/link-header.d.ts +6 -0
- package/dist/source-profiles/link-header.d.ts.map +1 -0
- package/dist/source-profiles/link-header.js +131 -0
- package/dist/source-profiles/link-header.js.map +1 -0
- package/dist/storage-harness/contract.d.ts +109 -0
- package/dist/storage-harness/contract.d.ts.map +1 -0
- package/dist/storage-harness/contract.js +853 -0
- package/dist/storage-harness/contract.js.map +1 -0
- package/dist/storage-harness/index.d.ts +39 -0
- package/dist/storage-harness/index.d.ts.map +1 -0
- package/dist/storage-harness/index.js +55 -0
- package/dist/storage-harness/index.js.map +1 -0
- package/dist/storage.d.ts +10 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +10 -2
- package/dist/storage.js.map +1 -1
- package/dist/string-identity-agreement.d.ts +35 -0
- package/dist/string-identity-agreement.d.ts.map +1 -0
- package/dist/string-identity-agreement.js +78 -0
- package/dist/string-identity-agreement.js.map +1 -0
- package/dist/system-documents.d.ts +82 -0
- package/dist/system-documents.d.ts.map +1 -0
- package/dist/system-documents.js +127 -0
- package/dist/system-documents.js.map +1 -0
- package/dist/types.d.ts +28 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -10
- package/dist/types.js.map +1 -1
- package/dist/uncertain-write.d.ts +119 -6
- package/dist/uncertain-write.d.ts.map +1 -1
- package/dist/uncertain-write.js +67 -32
- package/dist/uncertain-write.js.map +1 -1
- package/dist/validation.d.ts +5 -0
- package/dist/validation.d.ts.map +1 -1
- package/dist/verification.d.ts +22 -10
- package/dist/verification.d.ts.map +1 -1
- package/dist/verification.js +87 -39
- package/dist/verification.js.map +1 -1
- package/dist/view-launch-contract.d.ts +14 -0
- package/dist/view-launch-contract.d.ts.map +1 -0
- package/dist/view-launch-contract.js +23 -0
- package/dist/view-launch-contract.js.map +1 -0
- package/dist/write-identity.d.ts +5 -0
- package/dist/write-identity.d.ts.map +1 -0
- package/dist/write-identity.js +9 -0
- package/dist/write-identity.js.map +1 -0
- package/package.json +184 -10
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@superbee/core/hosted-client/node`: the hosted client's Node-only half, a supported public API
|
|
3
|
+
* under core's normal versioning. It holds the durable intent store (`openHostedClientJournal`,
|
|
4
|
+
* in `journal.ts`), and it downloads a hosted bundle's portable export
|
|
5
|
+
* (`<prefix>/export`) and verifies it with `@superbee/core/portable-export`, whose digests and
|
|
6
|
+
* file placement need Node, so it is kept off the browser-safe `@superbee/core/hosted-client`.
|
|
7
|
+
*
|
|
8
|
+
* The result is a verified export or a typed failure, never files: a stopped, tampered or
|
|
9
|
+
* oversized export is refused before anything is returned, and placing the verified entries is
|
|
10
|
+
* the caller's (`materializeExport`, or its own staging).
|
|
11
|
+
*/
|
|
12
|
+
import { ExportArchiveError, ExportPageChain, MAX_EXPORT_BYTES, verifyExport, } from "../portable-export.js";
|
|
13
|
+
import { RemoteError } from "../remote-error.js";
|
|
14
|
+
import { HostedRouteNotServed } from "./errors.js";
|
|
15
|
+
export { ExportArchiveError, MAX_EXPORT_BYTES } from "../portable-export.js";
|
|
16
|
+
export { HOSTED_CLIENT_JOURNAL_COMPACT_FLOOR_BYTES, HOSTED_CLIENT_JOURNAL_SCHEMA_VERSION, HostedClientJournalError, isHostedClientJournalError, openHostedClientJournal, } from "./journal.js";
|
|
17
|
+
// The journal's other typed failures, re-exported (same identities) so a caller can tell them apart.
|
|
18
|
+
export { FileJournalCorruptError, FileJournalFormatError, FileJournalUnavailableError } from "../file-journaled-backend.js";
|
|
19
|
+
export { FilesystemMutationLockError } from "../filesystem-lock.js";
|
|
20
|
+
/**
|
|
21
|
+
* The host's export window: an export (or one page of a paged one) is answered within 60 s. A
|
|
22
|
+
* client that downloads exports should be created with at least this `deadlineMs`; the default
|
|
23
|
+
* 15 s read deadline would cut a large bundle.
|
|
24
|
+
*/
|
|
25
|
+
export const EXPORT_WINDOW_MS = 60_000;
|
|
26
|
+
/** How many times a paged export starts again from its first page when the bundle moves under it. */
|
|
27
|
+
const PAGED_EXPORT_ATTEMPTS = 3;
|
|
28
|
+
/** The pause before each restart, so a burst of writes can settle (with jitter). */
|
|
29
|
+
const PAGED_EXPORT_RESTART_MS = [500, 1500];
|
|
30
|
+
/** The pause before asking for a page again after a busy host or a page it stopped part way. */
|
|
31
|
+
const PAGE_RETRY_MS = 1000;
|
|
32
|
+
export class HostedExportError extends Error {
|
|
33
|
+
name = "HostedExportError";
|
|
34
|
+
problem;
|
|
35
|
+
bundleId;
|
|
36
|
+
/** With `too_large`: the bound the answer ran past, in bytes. */
|
|
37
|
+
maximum;
|
|
38
|
+
constructor(problem, bundleId, message, options = {}) {
|
|
39
|
+
super(message, options.cause === undefined ? undefined : { cause: options.cause });
|
|
40
|
+
this.problem = problem;
|
|
41
|
+
this.bundleId = bundleId;
|
|
42
|
+
if (options.maximum !== undefined)
|
|
43
|
+
this.maximum = options.maximum;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** True when `error` is a {@link HostedExportError}, with `problem` when one is named. */
|
|
47
|
+
export function isHostedExportError(error, problem) {
|
|
48
|
+
return error instanceof HostedExportError && (problem === undefined || error.problem === problem);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The verified portable export of `bundleId` at its latest confirmed revision: every document,
|
|
52
|
+
* reserved file and blob, byte for byte, read whole and checked against the host's digest
|
|
53
|
+
* manifests before it is returned.
|
|
54
|
+
*
|
|
55
|
+
* A host that pages the export answers it a page at a time; each page is verified as it arrives,
|
|
56
|
+
* checked against the pages before it, and the pages are joined (`ExportPageChain`). A host from
|
|
57
|
+
* before paging refuses the paged request as `invalid_input`, and the whole bundle is then read as
|
|
58
|
+
* one archive. A bundle that changes between pages (`concurrent_change`) is read again from its
|
|
59
|
+
* first page, up to three attempts. A page the host was too busy for (`backend_unavailable`, its
|
|
60
|
+
* one export slot) or stopped part way is asked for once more.
|
|
61
|
+
*
|
|
62
|
+
* Failures are typed:
|
|
63
|
+
* - `HostedCarrierError` — transport (the request may not have been answered);
|
|
64
|
+
* - `HostedRouteNotServed` — a host from before the export route;
|
|
65
|
+
* - `RemoteError` — the host's refusal, with its code and status (`bundle_not_found`,
|
|
66
|
+
* `result_too_large`, `validation_failed`, `unauthenticated` and so on);
|
|
67
|
+
* - `ExportArchiveError` — the verifier refused the archive (`incomplete` when the host stopped it);
|
|
68
|
+
* - {@link HostedExportError} — the answer stopped part way, ran past {@link MAX_EXPORT_BYTES}, or
|
|
69
|
+
* the bundle kept changing;
|
|
70
|
+
* - the signal's reason, once `options.signal` or the client's signal aborts.
|
|
71
|
+
*/
|
|
72
|
+
export async function downloadExport(client, bundleId, options = {}) {
|
|
73
|
+
if (typeof bundleId !== "string" || bundleId === "")
|
|
74
|
+
throw new TypeError("an export names its bundle");
|
|
75
|
+
const signal = options.signal ? AbortSignal.any([client.signal, options.signal]) : client.signal;
|
|
76
|
+
const download = { client, bundleId, signal, route: `${client.prefix}/export` };
|
|
77
|
+
signal.throwIfAborted();
|
|
78
|
+
for (let attempt = 1;; attempt += 1) {
|
|
79
|
+
const chain = new ExportPageChain();
|
|
80
|
+
let bytes = 0;
|
|
81
|
+
let cursor;
|
|
82
|
+
let moved = false;
|
|
83
|
+
for (;;) {
|
|
84
|
+
let page;
|
|
85
|
+
for (let tries = 1; page === undefined; tries += 1) {
|
|
86
|
+
const answer = await exportAnswer(download, { bundleId, paged: true, ...(cursor !== undefined ? { cursor } : {}) });
|
|
87
|
+
// Only the very first request can meet a host from before paging.
|
|
88
|
+
if (answer.refused === "invalid_input" && cursor === undefined && attempt === 1)
|
|
89
|
+
return await wholeExport(download);
|
|
90
|
+
if (answer.refused === "concurrent_change") {
|
|
91
|
+
moved = true;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
try {
|
|
95
|
+
if (answer.refused !== undefined)
|
|
96
|
+
throw refusal(download, answer);
|
|
97
|
+
page = verifyExport(await readArchive(download, answer.ok, MAX_EXPORT_BYTES - bytes), bundleId, { paged: true });
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
signal.throwIfAborted();
|
|
101
|
+
const again = isHostedExportError(error, "stopped") ||
|
|
102
|
+
(error instanceof ExportArchiveError && error.problem === "incomplete") ||
|
|
103
|
+
(answer.refused === "backend_unavailable" && answer.status >= 500);
|
|
104
|
+
if (!again || tries >= 2)
|
|
105
|
+
throw error;
|
|
106
|
+
await pause(PAGE_RETRY_MS, signal);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (moved)
|
|
110
|
+
break;
|
|
111
|
+
bytes += page.bytes;
|
|
112
|
+
cursor = chain.add(page);
|
|
113
|
+
if (cursor === undefined)
|
|
114
|
+
return chain.joined();
|
|
115
|
+
}
|
|
116
|
+
if (attempt >= PAGED_EXPORT_ATTEMPTS) {
|
|
117
|
+
throw new HostedExportError("source_changed", bundleId, `'${bundleId}' kept changing while it was exported (${attempt} attempts)`);
|
|
118
|
+
}
|
|
119
|
+
const base = PAGED_EXPORT_RESTART_MS[attempt - 1];
|
|
120
|
+
await pause(Math.round(base / 2 + (Math.random() * base) / 2), signal);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/** One export request's answer: the archive's body, or the refusal code the host answered. */
|
|
124
|
+
async function exportAnswer({ client, signal, route }, input) {
|
|
125
|
+
signal.throwIfAborted();
|
|
126
|
+
let answer;
|
|
127
|
+
try {
|
|
128
|
+
answer = await client.carrier.stream(route, input, signal);
|
|
129
|
+
}
|
|
130
|
+
catch (error) {
|
|
131
|
+
signal.throwIfAborted();
|
|
132
|
+
throw error;
|
|
133
|
+
}
|
|
134
|
+
if (!answer.ok)
|
|
135
|
+
return { refused: refusalCode(answer.body) ?? "RUNTIME", status: answer.status, body: answer.body };
|
|
136
|
+
return { ok: answer.body };
|
|
137
|
+
}
|
|
138
|
+
/** The whole bundle as one archive (a host from before paged export). */
|
|
139
|
+
async function wholeExport(download) {
|
|
140
|
+
const answer = await exportAnswer(download, { bundleId: download.bundleId });
|
|
141
|
+
if (answer.refused !== undefined)
|
|
142
|
+
throw refusal(download, answer);
|
|
143
|
+
return verifyExport(await readArchive(download, answer.ok, MAX_EXPORT_BYTES), download.bundleId);
|
|
144
|
+
}
|
|
145
|
+
function refusalCode(body) {
|
|
146
|
+
const error = body?.error;
|
|
147
|
+
if (typeof error === "string")
|
|
148
|
+
return error;
|
|
149
|
+
const code = error?.code;
|
|
150
|
+
return typeof code === "string" ? code : undefined;
|
|
151
|
+
}
|
|
152
|
+
/** The typed error a refused export is: the family's unknown-route answer, or the host's refusal. */
|
|
153
|
+
function refusal({ route }, answer) {
|
|
154
|
+
if (answer.status === 404 && isUnknownRoute(answer.body))
|
|
155
|
+
return new HostedRouteNotServed(route);
|
|
156
|
+
return new RemoteError(`hosted export answered ${answer.status}`, answer.refused, answer.status);
|
|
157
|
+
}
|
|
158
|
+
/** The sync family's answer to a route it does not have: `404 {"error":"not_found"}`, nothing else. */
|
|
159
|
+
function isUnknownRoute(body) {
|
|
160
|
+
return typeof body === "object" && body !== null && !Array.isArray(body) && Object.keys(body).length === 1 && body.error === "not_found";
|
|
161
|
+
}
|
|
162
|
+
/** One archive's body, read whole and bounded by `budget` (what the export may still hold). */
|
|
163
|
+
async function readArchive({ bundleId, signal }, body, budget) {
|
|
164
|
+
const reader = body.getReader();
|
|
165
|
+
const chunks = [];
|
|
166
|
+
let size = 0;
|
|
167
|
+
const onAbort = () => void reader.cancel(signal.reason).catch(() => { });
|
|
168
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
169
|
+
try {
|
|
170
|
+
for (;;) {
|
|
171
|
+
let part;
|
|
172
|
+
try {
|
|
173
|
+
part = await reader.read();
|
|
174
|
+
}
|
|
175
|
+
catch (cause) {
|
|
176
|
+
signal.throwIfAborted();
|
|
177
|
+
throw new HostedExportError("stopped", bundleId, `the export of '${bundleId}' stopped part way`, { cause });
|
|
178
|
+
}
|
|
179
|
+
signal.throwIfAborted();
|
|
180
|
+
if (part.done)
|
|
181
|
+
break;
|
|
182
|
+
size += part.value.byteLength;
|
|
183
|
+
if (size > budget) {
|
|
184
|
+
throw new HostedExportError("too_large", bundleId, `the export of '${bundleId}' is larger than ${MAX_EXPORT_BYTES} bytes`, { maximum: MAX_EXPORT_BYTES });
|
|
185
|
+
}
|
|
186
|
+
chunks.push(part.value);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
finally {
|
|
190
|
+
signal.removeEventListener("abort", onAbort);
|
|
191
|
+
void reader.cancel().catch(() => { });
|
|
192
|
+
}
|
|
193
|
+
const archive = new Uint8Array(size);
|
|
194
|
+
let offset = 0;
|
|
195
|
+
for (const chunk of chunks) {
|
|
196
|
+
archive.set(chunk, offset);
|
|
197
|
+
offset += chunk.byteLength;
|
|
198
|
+
}
|
|
199
|
+
return archive;
|
|
200
|
+
}
|
|
201
|
+
/** A pause the signal cuts short (its reason thrown), leaving no timer behind either way. */
|
|
202
|
+
function pause(ms, signal) {
|
|
203
|
+
return new Promise((resolve, reject) => {
|
|
204
|
+
if (signal.aborted) {
|
|
205
|
+
reject(signal.reason);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const onAbort = () => {
|
|
209
|
+
clearTimeout(timer);
|
|
210
|
+
reject(signal.reason);
|
|
211
|
+
};
|
|
212
|
+
const timer = setTimeout(() => {
|
|
213
|
+
signal.removeEventListener("abort", onAbort);
|
|
214
|
+
resolve();
|
|
215
|
+
}, ms);
|
|
216
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/hosted-client/node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,YAAY,GAEb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAA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@@
|
|
|
1
|
+
/** True for a workspace slug as the host reports it. */
|
|
2
|
+
export declare function isWorkspaceSlug(value: unknown): value is string;
|
|
3
|
+
export interface HostedBundleReference {
|
|
4
|
+
/** The workspace the reference names, or null for a bare id. */
|
|
5
|
+
readonly slug: string | null;
|
|
6
|
+
readonly bundleId: string;
|
|
7
|
+
}
|
|
8
|
+
/** The reference a string names, or null when it is neither a hosted bundle id nor `<slug>/<id>`. */
|
|
9
|
+
export declare function parseHostedBundleReference(value: string): HostedBundleReference | null;
|
|
10
|
+
/** The reference's spelling: the bare id, or `<slug>/<bundle-id>`. */
|
|
11
|
+
export declare function hostedBundleReferenceText(reference: HostedBundleReference): string;
|
|
12
|
+
//# sourceMappingURL=reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../src/hosted-client/reference.ts"],"names":[],"mappings":"AAYA,wDAAwD;AACxD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE/D;AAED,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,qGAAqG;AACrG,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAOtF;AAED,sEAAsE;AACtE,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,qBAAqB,GAAG,MAAM,CAElF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// A hosted bundle reference: how a person, a command and the host's bundle list name one hosted
|
|
2
|
+
// bundle. `<bundle-id>` names it when one of the person's workspaces holds that id;
|
|
3
|
+
// `<workspace-slug>/<bundle-id>` names the workspace too, for an id more than one of them holds.
|
|
4
|
+
// The slug is the workspace's own (the first label of its host, as `whoami` reports it), resolved
|
|
5
|
+
// by the host among the person's own workspaces. The bundle id part is held to the one rule
|
|
6
|
+
// `isHostedBundleId` states, so a reference never carries an id a bare one could not.
|
|
7
|
+
import { isHostedBundleId } from "../dependencies.js";
|
|
8
|
+
/** One lowercase DNS label: the host's workspace slug grammar. */
|
|
9
|
+
const SLUG = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
10
|
+
/** True for a workspace slug as the host reports it. */
|
|
11
|
+
export function isWorkspaceSlug(value) {
|
|
12
|
+
return typeof value === "string" && SLUG.test(value);
|
|
13
|
+
}
|
|
14
|
+
/** The reference a string names, or null when it is neither a hosted bundle id nor `<slug>/<id>`. */
|
|
15
|
+
export function parseHostedBundleReference(value) {
|
|
16
|
+
const at = value.indexOf("/");
|
|
17
|
+
const slug = at < 0 ? null : value.slice(0, at);
|
|
18
|
+
const bundleId = at < 0 ? value : value.slice(at + 1);
|
|
19
|
+
if (slug !== null && !SLUG.test(slug))
|
|
20
|
+
return null;
|
|
21
|
+
if (!isHostedBundleId(bundleId))
|
|
22
|
+
return null;
|
|
23
|
+
return { slug, bundleId };
|
|
24
|
+
}
|
|
25
|
+
/** The reference's spelling: the bare id, or `<slug>/<bundle-id>`. */
|
|
26
|
+
export function hostedBundleReferenceText(reference) {
|
|
27
|
+
return reference.slug === null ? reference.bundleId : `${reference.slug}/${reference.bundleId}`;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=reference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reference.js","sourceRoot":"","sources":["../../src/hosted-client/reference.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,oFAAoF;AACpF,iGAAiG;AACjG,kGAAkG;AAClG,4FAA4F;AAC5F,sFAAsF;AAEtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,kEAAkE;AAClE,MAAM,IAAI,GAAG,wCAAwC,CAAC;AAEtD,wDAAwD;AACxD,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACvD,CAAC;AAQD,qGAAqG;AACrG,MAAM,UAAU,0BAA0B,CAAC,KAAa;IACtD,MAAM,EAAE,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,IAAI,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChD,MAAM,QAAQ,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IACtD,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAC5B,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,yBAAyB,CAAC,SAAgC;IACxE,OAAO,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,IAAI,SAAS,CAAC,QAAQ,EAAE,CAAC;AAClG,CAAC"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export declare const VIEW_CONTENT_READ_OPERATION = "views.content.read.v1";
|
|
2
|
+
export declare const VIEW_CONTENT_UPDATE_OPERATION = "views.content.update.v1";
|
|
3
|
+
export declare const VIEW_CREATE_OPERATION = "views.create.v1";
|
|
4
|
+
/** The largest page an update sends: 512 KiB of UTF-8, the host's bound. */
|
|
5
|
+
export declare const VIEW_CONTENT_MAX_BYTES: number;
|
|
6
|
+
/** A read's answer: the page and its envelope, at most the page's bound as JSON (escapes included) plus slack. */
|
|
7
|
+
export declare const VIEW_CONTENT_READ_ANSWER_BYTES: number;
|
|
8
|
+
/** An update's answer carries no html; neither does a create's. */
|
|
9
|
+
export declare const VIEW_CONTENT_UPDATE_ANSWER_BYTES: number;
|
|
10
|
+
/**
|
|
11
|
+
* A created View's name, as the host's View listing admits it: the registration is
|
|
12
|
+
* `views-registry/<name>` and its page `views/<name>.html`. Narrower than the registry-id grammar
|
|
13
|
+
* ({@link isViewRegistryId}), which every derived id must still pass.
|
|
14
|
+
*/
|
|
15
|
+
export declare const VIEW_CREATE_NAME: RegExp;
|
|
16
|
+
/** A created View's title and description bounds (trimmed), as the host's listing shows them. */
|
|
17
|
+
export declare const VIEW_TITLE_MAX_CHARS = 120;
|
|
18
|
+
export declare const VIEW_DESCRIPTION_MAX_CHARS = 320;
|
|
19
|
+
/** The access a created View may declare; `bundle-read` unless the caller says otherwise. */
|
|
20
|
+
export declare const VIEW_CREATE_ACCESS: readonly ["bundle-read", "none"];
|
|
21
|
+
export type HostedViewCreateAccess = (typeof VIEW_CREATE_ACCESS)[number];
|
|
22
|
+
/** True for a version token in the content-version grammar (`sha256:` and 64 lowercase hex digits). */
|
|
23
|
+
export declare function isViewContentVersion(value: unknown): value is string;
|
|
24
|
+
/** The version of a page's exact UTF-8 bytes. */
|
|
25
|
+
export declare function viewContentVersion(bytes: Uint8Array): string;
|
|
26
|
+
export interface HostedViewContentReadRequest {
|
|
27
|
+
/** The View registration's id (`views-registry/...`). */
|
|
28
|
+
readonly registryId: string;
|
|
29
|
+
/** The registration's version the caller read; the host refuses any other (`version_conflict`, target `registry`). */
|
|
30
|
+
readonly expectedRegistryVersion: string;
|
|
31
|
+
}
|
|
32
|
+
export interface HostedViewContentUpdateRequest extends HostedViewContentReadRequest {
|
|
33
|
+
/** The page's version the update replaces; the host refuses any other (`version_conflict`, target `content`). */
|
|
34
|
+
readonly expectedContentVersion: string;
|
|
35
|
+
/** The whole page, at most {@link VIEW_CONTENT_MAX_BYTES} of UTF-8. A leading U+FEFF is part of it. */
|
|
36
|
+
readonly html: string;
|
|
37
|
+
}
|
|
38
|
+
export interface HostedViewContent {
|
|
39
|
+
readonly bundleId: string;
|
|
40
|
+
readonly registryId: string;
|
|
41
|
+
readonly registryVersion: string;
|
|
42
|
+
/** The page's key, the registration's `entry`. */
|
|
43
|
+
readonly key: string;
|
|
44
|
+
readonly version: string;
|
|
45
|
+
readonly contentType: string;
|
|
46
|
+
readonly byteCount: number;
|
|
47
|
+
/** The page's exact decoded text; a leading BOM is kept as U+FEFF. */
|
|
48
|
+
readonly html: string;
|
|
49
|
+
}
|
|
50
|
+
export interface HostedViewContentUpdate {
|
|
51
|
+
readonly bundleId: string;
|
|
52
|
+
readonly registryId: string;
|
|
53
|
+
readonly registryVersion: string;
|
|
54
|
+
readonly key: string;
|
|
55
|
+
/** False when the page already held exactly these bytes. */
|
|
56
|
+
readonly changed: boolean;
|
|
57
|
+
readonly version: string;
|
|
58
|
+
readonly previousVersion: string;
|
|
59
|
+
readonly byteCount: number;
|
|
60
|
+
readonly contentType: string;
|
|
61
|
+
readonly requestId: string;
|
|
62
|
+
}
|
|
63
|
+
export interface HostedViewCreateRequest {
|
|
64
|
+
/** The View's name ({@link VIEW_CREATE_NAME}); the host derives the registration id and the page key from it. */
|
|
65
|
+
readonly name: string;
|
|
66
|
+
/** 1 to {@link VIEW_TITLE_MAX_CHARS} characters once trimmed; sent trimmed. */
|
|
67
|
+
readonly title: string;
|
|
68
|
+
/** 1 to {@link VIEW_DESCRIPTION_MAX_CHARS} characters once trimmed; sent trimmed. */
|
|
69
|
+
readonly description?: string;
|
|
70
|
+
/** Default `bundle-read`. */
|
|
71
|
+
readonly access?: HostedViewCreateAccess;
|
|
72
|
+
/** The whole page, at most {@link VIEW_CONTENT_MAX_BYTES} of UTF-8. A leading U+FEFF is part of it. */
|
|
73
|
+
readonly html: string;
|
|
74
|
+
}
|
|
75
|
+
export interface HostedViewCreate {
|
|
76
|
+
readonly bundleId: string;
|
|
77
|
+
readonly registryId: string;
|
|
78
|
+
/** The version of the registration the host built. */
|
|
79
|
+
readonly registryVersion: string;
|
|
80
|
+
/** The page's key, the registration's `entry`. */
|
|
81
|
+
readonly key: string;
|
|
82
|
+
readonly version: string;
|
|
83
|
+
readonly byteCount: number;
|
|
84
|
+
readonly contentType: string;
|
|
85
|
+
/** False when the View already held exactly this registration and page: an earlier attempt landed. */
|
|
86
|
+
readonly created: boolean;
|
|
87
|
+
readonly requestId: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The host's refusal, as its envelope says. `writeState` is `not_applied` when the host says
|
|
91
|
+
* nothing changed, and `unknown` when it cannot say (or did not say, for an update). `status` is
|
|
92
|
+
* the HTTP status, or 0 when no answer was read at all (the request may have left).
|
|
93
|
+
*/
|
|
94
|
+
export interface HostedViewContentRefusal {
|
|
95
|
+
readonly code: string;
|
|
96
|
+
readonly status: number;
|
|
97
|
+
readonly message: string;
|
|
98
|
+
readonly writeState: "not_applied" | "unknown";
|
|
99
|
+
readonly retryable: boolean;
|
|
100
|
+
/** For `version_conflict`: which pin did not hold. */
|
|
101
|
+
readonly target?: "registry" | "content";
|
|
102
|
+
readonly expected?: string | null;
|
|
103
|
+
readonly actual?: string | null;
|
|
104
|
+
}
|
|
105
|
+
export type HostedViewContentReadResult = {
|
|
106
|
+
readonly ok: true;
|
|
107
|
+
readonly content: HostedViewContent;
|
|
108
|
+
} | {
|
|
109
|
+
readonly ok: false;
|
|
110
|
+
readonly refusal: HostedViewContentRefusal;
|
|
111
|
+
};
|
|
112
|
+
export type HostedViewContentUpdateResult = {
|
|
113
|
+
readonly ok: true;
|
|
114
|
+
readonly update: HostedViewContentUpdate;
|
|
115
|
+
} | {
|
|
116
|
+
readonly ok: false;
|
|
117
|
+
readonly refusal: HostedViewContentRefusal;
|
|
118
|
+
};
|
|
119
|
+
export type HostedViewCreateResult = {
|
|
120
|
+
readonly ok: true;
|
|
121
|
+
readonly create: HostedViewCreate;
|
|
122
|
+
} | {
|
|
123
|
+
readonly ok: false;
|
|
124
|
+
readonly refusal: HostedViewContentRefusal;
|
|
125
|
+
};
|
|
126
|
+
/** The refusal an update reports when it sent its request and read no answer it could trust. */
|
|
127
|
+
export declare const WRITE_OUTCOME_UNKNOWN = "write_outcome_unknown";
|
|
128
|
+
/** An update whose outcome is not known: the request may have left and been applied. */
|
|
129
|
+
export declare function unknownOutcome(status: number, message: string): HostedViewContentRefusal;
|
|
130
|
+
/** A request's fields, refused before sending when they are not what the host admits. */
|
|
131
|
+
export declare function viewContentReadBody(bundleId: string, request: HostedViewContentReadRequest): Record<string, unknown>;
|
|
132
|
+
/** An update's fields and the exact bytes it sends, refused before sending as the read's are, and when the page is over its bound. */
|
|
133
|
+
export declare function viewContentUpdateBody(bundleId: string, request: HostedViewContentUpdateRequest): {
|
|
134
|
+
body: Record<string, unknown>;
|
|
135
|
+
bytes: Uint8Array;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* The registration id and page key a create names, or null for a name outside
|
|
139
|
+
* {@link VIEW_CREATE_NAME}. Both also pass the View registration grammar ({@link parseRegistration}),
|
|
140
|
+
* so a View this creates is one every local surface reads as registered.
|
|
141
|
+
*/
|
|
142
|
+
export declare function viewCreateTarget(name: unknown): {
|
|
143
|
+
readonly registryId: string;
|
|
144
|
+
readonly key: string;
|
|
145
|
+
} | null;
|
|
146
|
+
/** Why a title or description is not one a created View may carry, or null when it is. */
|
|
147
|
+
export declare function viewCreateTextProblem(field: "title" | "description", value: string): string | null;
|
|
148
|
+
/**
|
|
149
|
+
* A create's fields and the exact page bytes it sends, refused before sending when the host would
|
|
150
|
+
* refuse them: a name outside the grammar, an empty or long title or description, an access value
|
|
151
|
+
* other than {@link VIEW_CREATE_ACCESS}, or a page that is not UTF-8 text within the bound. The
|
|
152
|
+
* title and description are sent trimmed; `access` is always sent.
|
|
153
|
+
*/
|
|
154
|
+
export declare function viewCreateBody(bundleId: string, request: HostedViewCreateRequest): {
|
|
155
|
+
body: Record<string, unknown>;
|
|
156
|
+
bytes: Uint8Array;
|
|
157
|
+
registryId: string;
|
|
158
|
+
key: string;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* The refusal an answer carries (`ok: false` naming `operationId`), or undefined for an answer
|
|
162
|
+
* that is not one. An `ok: false` envelope naming another operation, or a code outside the
|
|
163
|
+
* refusal grammar, is malformed. `defaultWriteState` is what a refusal that states none means.
|
|
164
|
+
*/
|
|
165
|
+
export declare function viewContentRefusal(status: number, body: unknown, operationId: string, defaultWriteState: "not_applied" | "unknown", route?: string): HostedViewContentRefusal | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* A read's `200` answer, for the View asked for: its html must have exactly the stated byte count
|
|
168
|
+
* and version, or the answer is malformed.
|
|
169
|
+
*/
|
|
170
|
+
export declare function decodeViewContentRead(bundleId: string, request: HostedViewContentReadRequest, body: unknown, route?: string): HostedViewContent;
|
|
171
|
+
/**
|
|
172
|
+
* An update's `200` answer, for the update sent: its version must be the digest of the bytes sent
|
|
173
|
+
* (an unchanged page's previous version is the same), or the answer is malformed.
|
|
174
|
+
*/
|
|
175
|
+
export declare function decodeViewContentUpdate(bundleId: string, request: HostedViewContentUpdateRequest, sent: Uint8Array, body: unknown, route?: string): HostedViewContentUpdate;
|
|
176
|
+
/**
|
|
177
|
+
* A create's `200` answer, for the create sent: the View named, its derived page key, and the
|
|
178
|
+
* version and size of the bytes sent, or the answer is malformed.
|
|
179
|
+
*/
|
|
180
|
+
export declare function decodeViewCreate(bundleId: string, target: {
|
|
181
|
+
readonly registryId: string;
|
|
182
|
+
readonly key: string;
|
|
183
|
+
}, sent: Uint8Array, body: unknown, route?: string): HostedViewCreate;
|
|
184
|
+
//# sourceMappingURL=view-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-content.d.ts","sourceRoot":"","sources":["../../src/hosted-client/view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