@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,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle identity and the `docs/dependencies` declaration.
|
|
3
|
+
*
|
|
4
|
+
* A bundle names the other bundles it links into in ONE committed document, `docs/dependencies`
|
|
5
|
+
* (type `Bundle Dependencies`). Each entry maps a local alias (the `<alias>` in
|
|
6
|
+
* `okf://<alias>/<path>.md`) to the target's portable `bundle_id`, plus optional `source`, `pin`
|
|
7
|
+
* and `path`. A target confirms its own identity with `bundle_id` in its `docs/bundle` document.
|
|
8
|
+
*
|
|
9
|
+
* Pure and browser-safe: no `node:*` import, no I/O. Consumers read the documents through their
|
|
10
|
+
* own backend and hand them here.
|
|
11
|
+
*/
|
|
12
|
+
import { InvalidInputError } from "./errors.js";
|
|
13
|
+
import type { Frontmatter, OkfDocument } from "./types.js";
|
|
14
|
+
import type { ValidationWarning } from "./validation.js";
|
|
15
|
+
/** True when `id` is a portable bundle id (the hosted bundle-id grammar). */
|
|
16
|
+
export declare function isHostedBundleId(id: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The well-known concept id carrying a bundle's explicit display name and portable id. NOT the
|
|
19
|
+
* bundle-root `index.md` — OKF §3.1 reserves that file's frontmatter solely for `okf_version`, so
|
|
20
|
+
* the name needs its own small doc.
|
|
21
|
+
*/
|
|
22
|
+
export declare const BUNDLE_NAME_DOC_ID = "docs/bundle";
|
|
23
|
+
/**
|
|
24
|
+
* The ownership marker: `docs/bundle` speaks for the bundle ONLY when it carries exactly this
|
|
25
|
+
* `type`. A `docs/bundle` doc of any other type is an ordinary document and is ignored, so an
|
|
26
|
+
* unrelated pre-existing doc is never appropriated as the bundle's name or id.
|
|
27
|
+
*/
|
|
28
|
+
export declare const BUNDLE_NAME_DOC_TYPE = "Bundle Name";
|
|
29
|
+
/**
|
|
30
|
+
* The bundle's self-declared portable id: `bundle_id` in `docs/bundle` under the marker type, when
|
|
31
|
+
* it satisfies {@link isHostedBundleId}. Anything else (absent doc, other type, missing or
|
|
32
|
+
* malformed id) is `undefined`; the caller decides what a bundle without a declared id means.
|
|
33
|
+
*/
|
|
34
|
+
export declare function declaredBundleId(doc: OkfDocument | null | undefined): string | undefined;
|
|
35
|
+
export type BundleIdRefusal =
|
|
36
|
+
/** `docs/bundle` exists with another type, so it does not name this bundle. */
|
|
37
|
+
{
|
|
38
|
+
reason: "not_bundle_name_doc";
|
|
39
|
+
type: unknown;
|
|
40
|
+
}
|
|
41
|
+
/** The bundle already declares a different `bundle_id`, and replacing it was not asked for. */
|
|
42
|
+
| {
|
|
43
|
+
reason: "bundle_id_differs";
|
|
44
|
+
current: unknown;
|
|
45
|
+
requested: string;
|
|
46
|
+
};
|
|
47
|
+
/** A `bundle_id` declaration the engine refuses. `refusal` carries the reason and its facts. */
|
|
48
|
+
export declare class BundleIdRefusedError extends InvalidInputError {
|
|
49
|
+
readonly reason: BundleIdRefusal["reason"];
|
|
50
|
+
readonly refusal: BundleIdRefusal;
|
|
51
|
+
constructor(refusal: BundleIdRefusal);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The `docs/bundle` document that declares `bundleId`, from the stored one (`undefined` when it is
|
|
55
|
+
* absent). Every other field and the body are kept. Refuses a `docs/bundle` of another type, and a
|
|
56
|
+
* different declared id: a declared id never changes. The caller checks `bundleId` with
|
|
57
|
+
* {@link isHostedBundleId} first.
|
|
58
|
+
*/
|
|
59
|
+
export declare function bundleIdDeclaration(existing: OkfDocument | undefined, bundleId: string): {
|
|
60
|
+
frontmatter: Frontmatter;
|
|
61
|
+
body: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const DEPENDENCIES_DOC_ID = "docs/dependencies";
|
|
64
|
+
export declare const DEPENDENCIES_DOC_TYPE = "Bundle Dependencies";
|
|
65
|
+
/** The alias grammar shared by `okf://<alias>/…` hrefs, dependency keys and qualified Kind targets. */
|
|
66
|
+
export declare const BUNDLE_ALIAS: RegExp;
|
|
67
|
+
export declare function isBundleAlias(alias: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* A dependency pin. Hex is lower-case only; an upper-case pin is rejected (`DEP_PIN`) rather than
|
|
70
|
+
* folded, so the declaration is the exact string git and a host compare. A `commit` pin (7-40 hex) is checked by an injected `PinCheck` against the
|
|
71
|
+
* bound copy's subtree. A `digest` pin (`sha256:<64 hex>`) parses, but only a hosted resolver can
|
|
72
|
+
* verify it; a local resolver fails it closed.
|
|
73
|
+
*/
|
|
74
|
+
export type DependencyPin = {
|
|
75
|
+
kind: "commit";
|
|
76
|
+
value: string;
|
|
77
|
+
} | {
|
|
78
|
+
kind: "digest";
|
|
79
|
+
value: string;
|
|
80
|
+
};
|
|
81
|
+
export interface DependencyEntry {
|
|
82
|
+
alias: string;
|
|
83
|
+
bundle_id: string;
|
|
84
|
+
/** Where to get the bundle (git URL or `hosted:<host>/<bundle_id>`). Informational only. */
|
|
85
|
+
source?: string;
|
|
86
|
+
pin?: DependencyPin;
|
|
87
|
+
/** Relative to the declaring bundle's root; used only by an explicit `--with-deps`. */
|
|
88
|
+
path?: string;
|
|
89
|
+
}
|
|
90
|
+
/** Alias -> entry. A Map, so an alias such as `constructor` can never hit an inherited property. */
|
|
91
|
+
export type DependencyMap = ReadonlyMap<string, DependencyEntry>;
|
|
92
|
+
export type DependencyProblemCode = "DEP_TYPE" | "DEP_SHAPE" | "DEP_ALIAS" | "DEP_BUNDLE_ID" | "DEP_PIN" | "DEP_PATH_ABSOLUTE" | "DEP_DUPLICATE_BUNDLE" | "DEP_SELF" | "DEP_UNKNOWN_KEY" | "DEP_RESERVED_KEY";
|
|
93
|
+
export interface DependencyProblem {
|
|
94
|
+
code: DependencyProblemCode;
|
|
95
|
+
alias?: string;
|
|
96
|
+
detail: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ParsedDependencies {
|
|
99
|
+
dependencies: DependencyMap;
|
|
100
|
+
problems: DependencyProblem[];
|
|
101
|
+
/**
|
|
102
|
+
* Aliases that are declared but whose entry was dropped, with the code that dropped it, so a
|
|
103
|
+
* link under one can say "declared but rejected" instead of "not declared".
|
|
104
|
+
*/
|
|
105
|
+
rejected: ReadonlyMap<string, DependencyProblemCode>;
|
|
106
|
+
}
|
|
107
|
+
export interface ParseDependenciesOptions {
|
|
108
|
+
/** The declaring bundle's own id; an entry naming it is `DEP_SELF`. */
|
|
109
|
+
selfBundleId?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Absolute under POSIX or win32 rules, or carrying a backslash. Pure string checks (no
|
|
113
|
+
* `node:path`) so the verdict is the same on every host: `/x`, `\x`, `\\server\share`, `C:\x`,
|
|
114
|
+
* `C:/x` and the drive-relative `C:x` are all refused.
|
|
115
|
+
*/
|
|
116
|
+
export declare function isNonPortableDependencyPath(value: string): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Parse `docs/dependencies`. Never throws: every defect is a problem, and an entry whose alias,
|
|
119
|
+
* `bundle_id` or `pin` is unusable is dropped (fail closed: a link under it reads as
|
|
120
|
+
* `unknown_alias`, never as resolved against the wrong copy). An unusable `source` or `path` drops
|
|
121
|
+
* only that field. Unknown and reserved keys are reported and the entry is kept.
|
|
122
|
+
*/
|
|
123
|
+
export declare function parseDependencies(doc: OkfDocument | null | undefined, options?: ParseDependenciesOptions): ParsedDependencies;
|
|
124
|
+
export type DependencyDeclarationRefusal =
|
|
125
|
+
/** The entry as given is unusable on its own; `code` and `detail` are the parser's. */
|
|
126
|
+
{
|
|
127
|
+
reason: "entry_invalid";
|
|
128
|
+
alias: string;
|
|
129
|
+
code: DependencyProblemCode;
|
|
130
|
+
detail: string;
|
|
131
|
+
}
|
|
132
|
+
/** `docs/dependencies` exists with another type. */
|
|
133
|
+
| {
|
|
134
|
+
reason: "document_type";
|
|
135
|
+
type: unknown;
|
|
136
|
+
}
|
|
137
|
+
/** `docs/dependencies`'s `dependencies` field is not a mapping. */
|
|
138
|
+
| {
|
|
139
|
+
reason: "document_shape";
|
|
140
|
+
}
|
|
141
|
+
/** The alias is declared with a different entry, and replacing it was not asked for. */
|
|
142
|
+
| {
|
|
143
|
+
reason: "alias_exists";
|
|
144
|
+
alias: string;
|
|
145
|
+
current: unknown;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The write would introduce a problem the parser drops. `alias` is the one being declared;
|
|
149
|
+
* `problemAlias` is the entry the problem names, which may be another one (a duplicate bundle).
|
|
150
|
+
*/
|
|
151
|
+
| {
|
|
152
|
+
reason: "problem_introduced";
|
|
153
|
+
alias: string;
|
|
154
|
+
problemAlias: string;
|
|
155
|
+
code: DependencyProblemCode;
|
|
156
|
+
detail: string;
|
|
157
|
+
};
|
|
158
|
+
/** A `docs/dependencies` write the engine refuses. `refusal` carries the reason and its facts. */
|
|
159
|
+
export declare class DependencyDeclarationRefusedError extends InvalidInputError {
|
|
160
|
+
readonly reason: DependencyDeclarationRefusal["reason"];
|
|
161
|
+
readonly refusal: DependencyDeclarationRefusal;
|
|
162
|
+
constructor(refusal: DependencyDeclarationRefusal);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Check one entry on its own, before any bundle is read: the entry `given` under `alias` must parse
|
|
166
|
+
* without being dropped. Refuses with reason `entry_invalid`.
|
|
167
|
+
*/
|
|
168
|
+
export declare function assertDependencyEntry(alias: string, given: Record<string, unknown>): void;
|
|
169
|
+
export interface DependencyDeclarationResult {
|
|
170
|
+
frontmatter: Frontmatter;
|
|
171
|
+
body: string;
|
|
172
|
+
/** `unchanged` when the stored entry already equals the one given. */
|
|
173
|
+
outcome: "unchanged" | "added" | "replaced";
|
|
174
|
+
/** Problems this write introduces for `alias` that do not drop anything. */
|
|
175
|
+
warnings: ValidationWarning[];
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* The `docs/dependencies` document with `alias` declared as `given` (its `bundle_id`, `source`,
|
|
179
|
+
* `pin` and `path`), from the stored one (`undefined` when absent). Every other entry, field and
|
|
180
|
+
* key is kept. Judged by {@link parseDependencies} against what the stored document already
|
|
181
|
+
* reported, so only a problem this write introduces is refused and a defect elsewhere never blocks
|
|
182
|
+
* an unrelated declaration. Refuses a declared alias with a different entry unless `replace`.
|
|
183
|
+
*/
|
|
184
|
+
export declare function addDependencyDeclaration(existing: OkfDocument | undefined, alias: string, given: Record<string, unknown>, options?: {
|
|
185
|
+
replace?: boolean;
|
|
186
|
+
selfBundleId?: string;
|
|
187
|
+
}): DependencyDeclarationResult;
|
|
188
|
+
/**
|
|
189
|
+
* Refuse a whole `docs/dependencies` document a write would save (`candidate`) over the stored one
|
|
190
|
+
* (`existing`, `undefined` for a create), as a declaration write refuses one: a declaration over a
|
|
191
|
+
* stored document of another type, a `dependencies` field that is not a mapping, and a problem the
|
|
192
|
+
* parser drops that the stored document did not already have. A candidate of another type
|
|
193
|
+
* declares nothing and passes, so the document can still be retyped or emptied.
|
|
194
|
+
*/
|
|
195
|
+
export declare function assertDependencyDocument(existing: OkfDocument | undefined, candidate: OkfDocument, options?: {
|
|
196
|
+
selfBundleId?: string;
|
|
197
|
+
}): void;
|
|
198
|
+
/**
|
|
199
|
+
* The stored `docs/dependencies` document without `alias`; `removed` is false (and the document
|
|
200
|
+
* unchanged) when the alias is not declared. Refuses the same document defects as
|
|
201
|
+
* {@link addDependencyDeclaration}.
|
|
202
|
+
*/
|
|
203
|
+
export declare function removeDependencyDeclaration(existing: OkfDocument, alias: string): {
|
|
204
|
+
frontmatter: Frontmatter;
|
|
205
|
+
body: string;
|
|
206
|
+
removed: boolean;
|
|
207
|
+
};
|
|
208
|
+
//# sourceMappingURL=dependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../src/dependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE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EAAE,MAAM,EACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GACzD,2BAA2B,CAuC7B;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,WAAW,GAAG,SAAS,EACjC,SAAS,EAAE,WAAW,EACtB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAO,GACtC,IAAI,CAkBN;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,WAAW,EACrB,KAAK,EAAE,MAAM,GACZ;IAAE,WAAW,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAK9D"}
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bundle identity and the `docs/dependencies` declaration.
|
|
3
|
+
*
|
|
4
|
+
* A bundle names the other bundles it links into in ONE committed document, `docs/dependencies`
|
|
5
|
+
* (type `Bundle Dependencies`). Each entry maps a local alias (the `<alias>` in
|
|
6
|
+
* `okf://<alias>/<path>.md`) to the target's portable `bundle_id`, plus optional `source`, `pin`
|
|
7
|
+
* and `path`. A target confirms its own identity with `bundle_id` in its `docs/bundle` document.
|
|
8
|
+
*
|
|
9
|
+
* Pure and browser-safe: no `node:*` import, no I/O. Consumers read the documents through their
|
|
10
|
+
* own backend and hand them here.
|
|
11
|
+
*/
|
|
12
|
+
import { InvalidInputError } from "./errors.js";
|
|
13
|
+
import { okfValuesEqual } from "./okf-authored-values.js";
|
|
14
|
+
// ── Bundle identity ─────────────────────────────────────────────────────────
|
|
15
|
+
// A portable bundle id: lower-case letters and digits joined by `.`, `_` or `-`, starting with a
|
|
16
|
+
// letter, at most 128 characters. The one rule hosted `checkout`, `export` and `publish` accept an
|
|
17
|
+
// id by, and the one a printed `checkout <id>` command is emitted for: an id it rejects (one
|
|
18
|
+
// starting with `-` would read as an option) never appears in a command.
|
|
19
|
+
const BUNDLE_ID = /^[a-z][a-z0-9]*(?:[._-][a-z0-9]+)*$/;
|
|
20
|
+
const BUNDLE_ID_MAX_LENGTH = 128;
|
|
21
|
+
/** True when `id` is a portable bundle id (the hosted bundle-id grammar). */
|
|
22
|
+
export function isHostedBundleId(id) {
|
|
23
|
+
return id.length <= BUNDLE_ID_MAX_LENGTH && BUNDLE_ID.test(id);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The well-known concept id carrying a bundle's explicit display name and portable id. NOT the
|
|
27
|
+
* bundle-root `index.md` — OKF §3.1 reserves that file's frontmatter solely for `okf_version`, so
|
|
28
|
+
* the name needs its own small doc.
|
|
29
|
+
*/
|
|
30
|
+
export const BUNDLE_NAME_DOC_ID = "docs/bundle";
|
|
31
|
+
/**
|
|
32
|
+
* The ownership marker: `docs/bundle` speaks for the bundle ONLY when it carries exactly this
|
|
33
|
+
* `type`. A `docs/bundle` doc of any other type is an ordinary document and is ignored, so an
|
|
34
|
+
* unrelated pre-existing doc is never appropriated as the bundle's name or id.
|
|
35
|
+
*/
|
|
36
|
+
export const BUNDLE_NAME_DOC_TYPE = "Bundle Name";
|
|
37
|
+
/**
|
|
38
|
+
* The bundle's self-declared portable id: `bundle_id` in `docs/bundle` under the marker type, when
|
|
39
|
+
* it satisfies {@link isHostedBundleId}. Anything else (absent doc, other type, missing or
|
|
40
|
+
* malformed id) is `undefined`; the caller decides what a bundle without a declared id means.
|
|
41
|
+
*/
|
|
42
|
+
export function declaredBundleId(doc) {
|
|
43
|
+
if (!doc || doc.id !== BUNDLE_NAME_DOC_ID)
|
|
44
|
+
return undefined;
|
|
45
|
+
const type = doc.frontmatter.type;
|
|
46
|
+
if (typeof type !== "string" || type.trim() !== BUNDLE_NAME_DOC_TYPE)
|
|
47
|
+
return undefined;
|
|
48
|
+
const id = doc.frontmatter.bundle_id;
|
|
49
|
+
return typeof id === "string" && isHostedBundleId(id) ? id : undefined;
|
|
50
|
+
}
|
|
51
|
+
/** A `bundle_id` declaration the engine refuses. `refusal` carries the reason and its facts. */
|
|
52
|
+
export class BundleIdRefusedError extends InvalidInputError {
|
|
53
|
+
reason;
|
|
54
|
+
refusal;
|
|
55
|
+
constructor(refusal) {
|
|
56
|
+
super(refusal.reason === "not_bundle_name_doc"
|
|
57
|
+
? `${BUNDLE_NAME_DOC_ID} exists with type ${JSON.stringify(refusal.type ?? null)}, so it does not name this bundle.`
|
|
58
|
+
: `This bundle already declares bundle_id ${JSON.stringify(refusal.current)}; links other bundles resolve against it stop resolving if it changes.`);
|
|
59
|
+
this.name = "BundleIdRefusedError";
|
|
60
|
+
this.reason = refusal.reason;
|
|
61
|
+
this.refusal = refusal;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The `docs/bundle` document that declares `bundleId`, from the stored one (`undefined` when it is
|
|
66
|
+
* absent). Every other field and the body are kept. Refuses a `docs/bundle` of another type, and a
|
|
67
|
+
* different declared id: a declared id never changes. The caller checks `bundleId` with
|
|
68
|
+
* {@link isHostedBundleId} first.
|
|
69
|
+
*/
|
|
70
|
+
export function bundleIdDeclaration(existing, bundleId) {
|
|
71
|
+
if (!existing)
|
|
72
|
+
return { frontmatter: { type: BUNDLE_NAME_DOC_TYPE, bundle_id: bundleId }, body: "" };
|
|
73
|
+
const type = existing.frontmatter.type;
|
|
74
|
+
if (typeof type !== "string" || type.trim() !== BUNDLE_NAME_DOC_TYPE) {
|
|
75
|
+
throw new BundleIdRefusedError({ reason: "not_bundle_name_doc", type });
|
|
76
|
+
}
|
|
77
|
+
const current = existing.frontmatter.bundle_id ?? null;
|
|
78
|
+
if (current !== null && current !== bundleId) {
|
|
79
|
+
throw new BundleIdRefusedError({ reason: "bundle_id_differs", current, requested: bundleId });
|
|
80
|
+
}
|
|
81
|
+
return { frontmatter: { ...existing.frontmatter, bundle_id: bundleId }, body: existing.body };
|
|
82
|
+
}
|
|
83
|
+
// ── docs/dependencies ───────────────────────────────────────────────────────
|
|
84
|
+
export const DEPENDENCIES_DOC_ID = "docs/dependencies";
|
|
85
|
+
export const DEPENDENCIES_DOC_TYPE = "Bundle Dependencies";
|
|
86
|
+
/** The alias grammar shared by `okf://<alias>/…` hrefs, dependency keys and qualified Kind targets. */
|
|
87
|
+
export const BUNDLE_ALIAS = /^[a-z][a-z0-9-]{0,62}$/;
|
|
88
|
+
export function isBundleAlias(alias) {
|
|
89
|
+
return BUNDLE_ALIAS.test(alias);
|
|
90
|
+
}
|
|
91
|
+
const KNOWN_KEYS = new Set(["bundle_id", "source", "pin", "path"]);
|
|
92
|
+
/** Reserved for recipe dependencies, which will reuse this declaration. */
|
|
93
|
+
const RESERVED_KEYS = new Set(["use", "version", "channel"]);
|
|
94
|
+
const COMMIT_PIN = /^[0-9a-f]{7,40}$/;
|
|
95
|
+
const DIGEST_PIN = /^sha256:[0-9a-f]{64}$/;
|
|
96
|
+
function isRecord(value) {
|
|
97
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && !(value instanceof Date);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Absolute under POSIX or win32 rules, or carrying a backslash. Pure string checks (no
|
|
101
|
+
* `node:path`) so the verdict is the same on every host: `/x`, `\x`, `\\server\share`, `C:\x`,
|
|
102
|
+
* `C:/x` and the drive-relative `C:x` are all refused.
|
|
103
|
+
*/
|
|
104
|
+
export function isNonPortableDependencyPath(value) {
|
|
105
|
+
return value.startsWith("/") || value.includes("\\") || /^[A-Za-z]:/.test(value);
|
|
106
|
+
}
|
|
107
|
+
function parsePin(value) {
|
|
108
|
+
if (typeof value !== "string")
|
|
109
|
+
return null;
|
|
110
|
+
if (COMMIT_PIN.test(value))
|
|
111
|
+
return { kind: "commit", value };
|
|
112
|
+
if (DIGEST_PIN.test(value))
|
|
113
|
+
return { kind: "digest", value };
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Parse `docs/dependencies`. Never throws: every defect is a problem, and an entry whose alias,
|
|
118
|
+
* `bundle_id` or `pin` is unusable is dropped (fail closed: a link under it reads as
|
|
119
|
+
* `unknown_alias`, never as resolved against the wrong copy). An unusable `source` or `path` drops
|
|
120
|
+
* only that field. Unknown and reserved keys are reported and the entry is kept.
|
|
121
|
+
*/
|
|
122
|
+
export function parseDependencies(doc, options = {}) {
|
|
123
|
+
const dependencies = new Map();
|
|
124
|
+
const problems = [];
|
|
125
|
+
const rejected = new Map();
|
|
126
|
+
const result = () => ({ dependencies, problems, rejected });
|
|
127
|
+
const reject = (alias, code, detail) => {
|
|
128
|
+
problems.push({ code, alias, detail });
|
|
129
|
+
rejected.set(alias, code);
|
|
130
|
+
};
|
|
131
|
+
if (!doc)
|
|
132
|
+
return result();
|
|
133
|
+
const type = doc.frontmatter.type;
|
|
134
|
+
if (typeof type !== "string" || type.trim() !== DEPENDENCIES_DOC_TYPE) {
|
|
135
|
+
problems.push({ code: "DEP_TYPE", detail: `type must be '${DEPENDENCIES_DOC_TYPE}'` });
|
|
136
|
+
return result();
|
|
137
|
+
}
|
|
138
|
+
const declared = doc.frontmatter.dependencies;
|
|
139
|
+
if (declared === undefined || declared === null)
|
|
140
|
+
return result();
|
|
141
|
+
if (!isRecord(declared)) {
|
|
142
|
+
problems.push({ code: "DEP_SHAPE", detail: "dependencies must be a mapping of alias to entry" });
|
|
143
|
+
return result();
|
|
144
|
+
}
|
|
145
|
+
const aliasByBundle = new Map();
|
|
146
|
+
for (const [alias, raw] of Object.entries(declared)) {
|
|
147
|
+
if (!isBundleAlias(alias)) {
|
|
148
|
+
problems.push({ code: "DEP_ALIAS", alias, detail: "alias must match ^[a-z][a-z0-9-]{0,62}$" });
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (!isRecord(raw)) {
|
|
152
|
+
reject(alias, "DEP_SHAPE", "entry must be a mapping");
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const bundleId = raw.bundle_id;
|
|
156
|
+
if (typeof bundleId !== "string" || !isHostedBundleId(bundleId)) {
|
|
157
|
+
reject(alias, "DEP_BUNDLE_ID", "bundle_id is required and must be a portable bundle id");
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
160
|
+
let pin;
|
|
161
|
+
if (raw.pin !== undefined) {
|
|
162
|
+
const parsed = parsePin(raw.pin);
|
|
163
|
+
if (parsed === null) {
|
|
164
|
+
// A YAML scalar such as 1234567 or 3e45678 arrives as a number, so the hint says to quote.
|
|
165
|
+
reject(alias, "DEP_PIN", "pin must be a quoted commit (7-40 lower-case hex) or sha256:<64 lower-case hex>");
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
pin = parsed;
|
|
169
|
+
}
|
|
170
|
+
if (options.selfBundleId !== undefined && bundleId === options.selfBundleId) {
|
|
171
|
+
reject(alias, "DEP_SELF", `bundle_id '${bundleId}' is this bundle`);
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
const earlier = aliasByBundle.get(bundleId);
|
|
175
|
+
if (earlier !== undefined) {
|
|
176
|
+
reject(alias, "DEP_DUPLICATE_BUNDLE", `bundle_id '${bundleId}' is already declared as '${earlier}'`);
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
const entry = { alias, bundle_id: bundleId };
|
|
180
|
+
if (raw.source !== undefined) {
|
|
181
|
+
if (typeof raw.source === "string" && raw.source.trim() !== "")
|
|
182
|
+
entry.source = raw.source;
|
|
183
|
+
else
|
|
184
|
+
problems.push({ code: "DEP_SHAPE", alias, detail: "source must be a non-empty string" });
|
|
185
|
+
}
|
|
186
|
+
if (pin)
|
|
187
|
+
entry.pin = pin;
|
|
188
|
+
if (raw.path !== undefined) {
|
|
189
|
+
if (typeof raw.path !== "string" || raw.path.trim() === "") {
|
|
190
|
+
problems.push({ code: "DEP_SHAPE", alias, detail: "path must be a non-empty string" });
|
|
191
|
+
}
|
|
192
|
+
else if (isNonPortableDependencyPath(raw.path)) {
|
|
193
|
+
problems.push({ code: "DEP_PATH_ABSOLUTE", alias, detail: "path must be relative to this bundle's root, with '/' separators" });
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
entry.path = raw.path;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
for (const key of Object.keys(raw)) {
|
|
200
|
+
if (KNOWN_KEYS.has(key))
|
|
201
|
+
continue;
|
|
202
|
+
if (RESERVED_KEYS.has(key)) {
|
|
203
|
+
problems.push({ code: "DEP_RESERVED_KEY", alias, detail: `'${key}' is reserved for recipe dependencies` });
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
problems.push({ code: "DEP_UNKNOWN_KEY", alias, detail: `unknown key '${key}'` });
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
aliasByBundle.set(bundleId, alias);
|
|
210
|
+
dependencies.set(alias, entry);
|
|
211
|
+
}
|
|
212
|
+
return result();
|
|
213
|
+
}
|
|
214
|
+
// ── Declaring a dependency ──────────────────────────────────────────────────
|
|
215
|
+
/** Problems a declaration write refuses rather than stores: each one drops the entry or a field. */
|
|
216
|
+
const DROPPING = new Set([
|
|
217
|
+
"DEP_ALIAS",
|
|
218
|
+
"DEP_SHAPE",
|
|
219
|
+
"DEP_BUNDLE_ID",
|
|
220
|
+
"DEP_PIN",
|
|
221
|
+
"DEP_PATH_ABSOLUTE",
|
|
222
|
+
"DEP_SELF",
|
|
223
|
+
"DEP_DUPLICATE_BUNDLE",
|
|
224
|
+
"DEP_RESERVED_KEY",
|
|
225
|
+
]);
|
|
226
|
+
/** The keys a declaration sets; every other key in a stored entry is carried as it is. */
|
|
227
|
+
const ENTRY_FIELDS = ["bundle_id", "source", "pin", "path"];
|
|
228
|
+
/** A `docs/dependencies` write the engine refuses. `refusal` carries the reason and its facts. */
|
|
229
|
+
export class DependencyDeclarationRefusedError extends InvalidInputError {
|
|
230
|
+
reason;
|
|
231
|
+
refusal;
|
|
232
|
+
constructor(refusal) {
|
|
233
|
+
super(dependencyRefusalMessage(refusal));
|
|
234
|
+
this.name = "DependencyDeclarationRefusedError";
|
|
235
|
+
this.reason = refusal.reason;
|
|
236
|
+
this.refusal = refusal;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function dependencyRefusalMessage(refusal) {
|
|
240
|
+
switch (refusal.reason) {
|
|
241
|
+
case "entry_invalid":
|
|
242
|
+
case "problem_introduced":
|
|
243
|
+
return `Cannot declare '${refusal.alias}': ${refusal.detail}`;
|
|
244
|
+
case "document_type":
|
|
245
|
+
return `${DEPENDENCIES_DOC_ID} exists with type ${JSON.stringify(refusal.type ?? null)}; it must be '${DEPENDENCIES_DOC_TYPE}'.`;
|
|
246
|
+
case "document_shape":
|
|
247
|
+
return `${DEPENDENCIES_DOC_ID}'s dependencies field is not a mapping of alias to entry.`;
|
|
248
|
+
case "alias_exists":
|
|
249
|
+
return `'${refusal.alias}' is already declared with a different entry.`;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function declarationDoc(frontmatter) {
|
|
253
|
+
return { id: DEPENDENCIES_DOC_ID, frontmatter, body: "" };
|
|
254
|
+
}
|
|
255
|
+
function problemKey(p) {
|
|
256
|
+
return `${p.code}\u0000${p.alias ?? ""}\u0000${p.detail}`;
|
|
257
|
+
}
|
|
258
|
+
/** The stored alias map, refusing a document a declaration write must not appropriate or flatten. */
|
|
259
|
+
function declaredDependencyMap(existing) {
|
|
260
|
+
if (!existing)
|
|
261
|
+
return {};
|
|
262
|
+
const type = existing.frontmatter.type;
|
|
263
|
+
if (typeof type !== "string" || type.trim() !== DEPENDENCIES_DOC_TYPE) {
|
|
264
|
+
throw new DependencyDeclarationRefusedError({ reason: "document_type", type });
|
|
265
|
+
}
|
|
266
|
+
const declared = existing.frontmatter.dependencies;
|
|
267
|
+
if (declared === undefined || declared === null)
|
|
268
|
+
return {};
|
|
269
|
+
if (!isRecord(declared))
|
|
270
|
+
throw new DependencyDeclarationRefusedError({ reason: "document_shape" });
|
|
271
|
+
return declared;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Check one entry on its own, before any bundle is read: the entry `given` under `alias` must parse
|
|
275
|
+
* without being dropped. Refuses with reason `entry_invalid`.
|
|
276
|
+
*/
|
|
277
|
+
export function assertDependencyEntry(alias, given) {
|
|
278
|
+
const alone = parseDependencies(declarationDoc({ type: DEPENDENCIES_DOC_TYPE, dependencies: { [alias]: given } }));
|
|
279
|
+
const defect = alone.problems.find((p) => DROPPING.has(p.code));
|
|
280
|
+
if (defect)
|
|
281
|
+
throw new DependencyDeclarationRefusedError({ reason: "entry_invalid", alias, code: defect.code, detail: defect.detail });
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* The `docs/dependencies` document with `alias` declared as `given` (its `bundle_id`, `source`,
|
|
285
|
+
* `pin` and `path`), from the stored one (`undefined` when absent). Every other entry, field and
|
|
286
|
+
* key is kept. Judged by {@link parseDependencies} against what the stored document already
|
|
287
|
+
* reported, so only a problem this write introduces is refused and a defect elsewhere never blocks
|
|
288
|
+
* an unrelated declaration. Refuses a declared alias with a different entry unless `replace`.
|
|
289
|
+
*/
|
|
290
|
+
export function addDependencyDeclaration(existing, alias, given, options = {}) {
|
|
291
|
+
const map = declaredDependencyMap(existing);
|
|
292
|
+
const previous = Object.hasOwn(map, alias) ? map[alias] : undefined;
|
|
293
|
+
const kept = {};
|
|
294
|
+
if (isRecord(previous)) {
|
|
295
|
+
for (const [key, value] of Object.entries(previous)) {
|
|
296
|
+
if (!ENTRY_FIELDS.includes(key))
|
|
297
|
+
kept[key] = value;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
const entry = { ...given, ...kept };
|
|
301
|
+
if (previous !== undefined && okfValuesEqual(previous, entry)) {
|
|
302
|
+
return { frontmatter: existing.frontmatter, body: existing.body, outcome: "unchanged", warnings: [] };
|
|
303
|
+
}
|
|
304
|
+
if (previous !== undefined && !options.replace) {
|
|
305
|
+
throw new DependencyDeclarationRefusedError({ reason: "alias_exists", alias, current: previous });
|
|
306
|
+
}
|
|
307
|
+
const frontmatter = existing
|
|
308
|
+
? { ...existing.frontmatter, dependencies: { ...map, [alias]: entry } }
|
|
309
|
+
: { type: DEPENDENCIES_DOC_TYPE, title: "Dependencies", dependencies: { [alias]: entry } };
|
|
310
|
+
const parseOptions = options.selfBundleId === undefined ? {} : { selfBundleId: options.selfBundleId };
|
|
311
|
+
const before = new Set(parseDependencies(existing ?? null, parseOptions).problems.map(problemKey));
|
|
312
|
+
const introduced = parseDependencies(declarationDoc(frontmatter), parseOptions).problems.filter((p) => !before.has(problemKey(p)) || p.alias === alias);
|
|
313
|
+
const refusal = introduced.find((p) => DROPPING.has(p.code));
|
|
314
|
+
if (refusal) {
|
|
315
|
+
throw new DependencyDeclarationRefusedError({
|
|
316
|
+
reason: "problem_introduced",
|
|
317
|
+
alias,
|
|
318
|
+
problemAlias: refusal.alias ?? alias,
|
|
319
|
+
code: refusal.code,
|
|
320
|
+
detail: refusal.detail,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const warnings = introduced
|
|
324
|
+
.filter((p) => p.alias === alias && !before.has(problemKey(p)))
|
|
325
|
+
.map((p) => ({ code: p.code, message: p.detail, field: "dependencies", severity: "warning" }));
|
|
326
|
+
return { frontmatter, body: existing?.body ?? "", outcome: previous === undefined ? "added" : "replaced", warnings };
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Refuse a whole `docs/dependencies` document a write would save (`candidate`) over the stored one
|
|
330
|
+
* (`existing`, `undefined` for a create), as a declaration write refuses one: a declaration over a
|
|
331
|
+
* stored document of another type, a `dependencies` field that is not a mapping, and a problem the
|
|
332
|
+
* parser drops that the stored document did not already have. A candidate of another type
|
|
333
|
+
* declares nothing and passes, so the document can still be retyped or emptied.
|
|
334
|
+
*/
|
|
335
|
+
export function assertDependencyDocument(existing, candidate, options = {}) {
|
|
336
|
+
const type = candidate.frontmatter.type;
|
|
337
|
+
if (typeof type !== "string" || type.trim() !== DEPENDENCIES_DOC_TYPE)
|
|
338
|
+
return;
|
|
339
|
+
const stored = existing?.frontmatter.type;
|
|
340
|
+
if (existing && (typeof stored !== "string" || stored.trim() !== DEPENDENCIES_DOC_TYPE)) {
|
|
341
|
+
throw new DependencyDeclarationRefusedError({ reason: "document_type", type: stored });
|
|
342
|
+
}
|
|
343
|
+
const declared = candidate.frontmatter.dependencies;
|
|
344
|
+
if (declared !== undefined && declared !== null && !isRecord(declared)) {
|
|
345
|
+
throw new DependencyDeclarationRefusedError({ reason: "document_shape" });
|
|
346
|
+
}
|
|
347
|
+
const parseOptions = options.selfBundleId === undefined ? {} : { selfBundleId: options.selfBundleId };
|
|
348
|
+
const before = new Set(parseDependencies(existing ?? null, parseOptions).problems.map(problemKey));
|
|
349
|
+
const refusal = parseDependencies(candidate, parseOptions).problems.find((p) => DROPPING.has(p.code) && !before.has(problemKey(p)));
|
|
350
|
+
if (refusal) {
|
|
351
|
+
const alias = refusal.alias ?? DEPENDENCIES_DOC_ID;
|
|
352
|
+
throw new DependencyDeclarationRefusedError({ reason: "problem_introduced", alias, problemAlias: alias, code: refusal.code, detail: refusal.detail });
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* The stored `docs/dependencies` document without `alias`; `removed` is false (and the document
|
|
357
|
+
* unchanged) when the alias is not declared. Refuses the same document defects as
|
|
358
|
+
* {@link addDependencyDeclaration}.
|
|
359
|
+
*/
|
|
360
|
+
export function removeDependencyDeclaration(existing, alias) {
|
|
361
|
+
const map = declaredDependencyMap(existing);
|
|
362
|
+
if (!Object.hasOwn(map, alias))
|
|
363
|
+
return { frontmatter: existing.frontmatter, body: existing.body, removed: false };
|
|
364
|
+
const { [alias]: _gone, ...remaining } = map;
|
|
365
|
+
return { frontmatter: { ...existing.frontmatter, dependencies: remaining }, body: existing.body, removed: true };
|
|
366
|
+
}
|
|
367
|
+
//# sourceMappingURL=dependencies.js.map
|
|
@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G,CAAC;IAC7C,OAAO,EAAE,WAAW,EAAE,EAAE,GAAG,QAAQ,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AACnH,CAAC"}
|
package/dist/document-codec.d.ts
CHANGED
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
* Uses the same parser and serializer as the Node adapters; no filesystem, default actor,
|
|
4
4
|
* bundle selection, or mutation policy is implied by encoding or decoding a document.
|
|
5
5
|
*/
|
|
6
|
-
export { parseMarkdown, stringifyDoc, stringifyWithData, normalizeDocumentBodyForStorage, MalformedDocumentError, } from "./frontmatter.js";
|
|
6
|
+
export { parseMarkdown, parseFrontmatter, stringifyDoc, stringifyWithData, normalizeDocumentBodyForStorage, MalformedDocumentError, isStackExhaustion, } from "./frontmatter.js";
|
|
7
|
+
export type { ParseDocumentOptions } from "./frontmatter.js";
|
|
7
8
|
export { resolveContentType } from "./content-type.js";
|
|
9
|
+
export { FrontmatterRefusedError } from "./errors.js";
|
|
10
|
+
export { assertStorableFrontmatter } from "./portable-frontmatter.js";
|
|
8
11
|
export { captureRemoteFrontmatter, RemoteDocumentValueError } from "./remote-document-codec.js";
|
|
9
12
|
export type { Frontmatter, OkfDocument, Version } from "./types.js";
|
|
10
13
|
import type { Version } from "./types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-codec.d.ts","sourceRoot":"","sources":["../src/document-codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"document-codec.d.ts","sourceRoot":"","sources":["../src/document-codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAChG,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAGpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAE1C;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAE1E"}
|
package/dist/document-codec.js
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Uses the same parser and serializer as the Node adapters; no filesystem, default actor,
|
|
4
4
|
* bundle selection, or mutation policy is implied by encoding or decoding a document.
|
|
5
5
|
*/
|
|
6
|
-
export { parseMarkdown, stringifyDoc, stringifyWithData, normalizeDocumentBodyForStorage, MalformedDocumentError, } from "./frontmatter.js";
|
|
6
|
+
export { parseMarkdown, parseFrontmatter, stringifyDoc, stringifyWithData, normalizeDocumentBodyForStorage, MalformedDocumentError, isStackExhaustion, } from "./frontmatter.js";
|
|
7
7
|
export { resolveContentType } from "./content-type.js";
|
|
8
|
+
export { FrontmatterRefusedError } from "./errors.js";
|
|
9
|
+
export { assertStorableFrontmatter } from "./portable-frontmatter.js";
|
|
8
10
|
export { captureRemoteFrontmatter, RemoteDocumentValueError } from "./remote-document-codec.js";
|
|
9
11
|
import { sha256HexOfBytes } from "./sha256.js";
|
|
10
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document-codec.js","sourceRoot":"","sources":["../src/document-codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"document-codec.js","sourceRoot":"","sources":["../src/document-codec.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,+BAA+B,EAC/B,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAGhG,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,KAAiB;IACtD,OAAO,UAAU,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;AAC7C,CAAC"}
|