@aigne/afs-did-space 1.12.0-beta.5
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.md +26 -0
- package/README.md +129 -0
- package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.cjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.108.0/helpers/decorate.mjs +10 -0
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/afs-metadata-context.cjs +20 -0
- package/dist/afs-metadata-context.d.cts +21 -0
- package/dist/afs-metadata-context.d.cts.map +1 -0
- package/dist/afs-metadata-context.d.mts +21 -0
- package/dist/afs-metadata-context.d.mts.map +1 -0
- package/dist/afs-metadata-context.mjs +18 -0
- package/dist/afs-metadata-context.mjs.map +1 -0
- package/dist/blocklet-hook.cjs +180 -0
- package/dist/blocklet-hook.d.cts +29 -0
- package/dist/blocklet-hook.d.cts.map +1 -0
- package/dist/blocklet-hook.d.mts +29 -0
- package/dist/blocklet-hook.d.mts.map +1 -0
- package/dist/blocklet-hook.mjs +178 -0
- package/dist/blocklet-hook.mjs.map +1 -0
- package/dist/changelog-schema.cjs +603 -0
- package/dist/changelog-schema.d.cts +395 -0
- package/dist/changelog-schema.d.cts.map +1 -0
- package/dist/changelog-schema.d.mts +395 -0
- package/dist/changelog-schema.d.mts.map +1 -0
- package/dist/changelog-schema.mjs +570 -0
- package/dist/changelog-schema.mjs.map +1 -0
- package/dist/changelog-write.cjs +80 -0
- package/dist/changelog-write.d.cts +70 -0
- package/dist/changelog-write.d.cts.map +1 -0
- package/dist/changelog-write.d.mts +70 -0
- package/dist/changelog-write.d.mts.map +1 -0
- package/dist/changelog-write.mjs +77 -0
- package/dist/changelog-write.mjs.map +1 -0
- package/dist/cid-byte-cache.cjs +126 -0
- package/dist/cid-byte-cache.d.cts +46 -0
- package/dist/cid-byte-cache.d.cts.map +1 -0
- package/dist/cid-byte-cache.d.mts +47 -0
- package/dist/cid-byte-cache.d.mts.map +1 -0
- package/dist/cid-byte-cache.mjs +125 -0
- package/dist/cid-byte-cache.mjs.map +1 -0
- package/dist/cid.cjs +68 -0
- package/dist/cid.d.cts +22 -0
- package/dist/cid.d.cts.map +1 -0
- package/dist/cid.d.mts +22 -0
- package/dist/cid.d.mts.map +1 -0
- package/dist/cid.mjs +65 -0
- package/dist/cid.mjs.map +1 -0
- package/dist/client.cjs +221 -0
- package/dist/client.d.cts +72 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +72 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +220 -0
- package/dist/client.mjs.map +1 -0
- package/dist/cloudflare.cjs +510 -0
- package/dist/cloudflare.d.cts +307 -0
- package/dist/cloudflare.d.cts.map +1 -0
- package/dist/cloudflare.d.mts +308 -0
- package/dist/cloudflare.d.mts.map +1 -0
- package/dist/cloudflare.mjs +507 -0
- package/dist/cloudflare.mjs.map +1 -0
- package/dist/ctime-backfill.cjs +272 -0
- package/dist/ctime-backfill.d.cts +169 -0
- package/dist/ctime-backfill.d.cts.map +1 -0
- package/dist/ctime-backfill.d.mts +169 -0
- package/dist/ctime-backfill.d.mts.map +1 -0
- package/dist/ctime-backfill.mjs +267 -0
- package/dist/ctime-backfill.mjs.map +1 -0
- package/dist/d1-gc-queue.cjs +80 -0
- package/dist/d1-gc-queue.d.cts +59 -0
- package/dist/d1-gc-queue.d.cts.map +1 -0
- package/dist/d1-gc-queue.d.mts +59 -0
- package/dist/d1-gc-queue.d.mts.map +1 -0
- package/dist/d1-gc-queue.mjs +81 -0
- package/dist/d1-gc-queue.mjs.map +1 -0
- package/dist/d1-resolve-store.cjs +189 -0
- package/dist/d1-resolve-store.d.cts +93 -0
- package/dist/d1-resolve-store.d.cts.map +1 -0
- package/dist/d1-resolve-store.d.mts +93 -0
- package/dist/d1-resolve-store.d.mts.map +1 -0
- package/dist/d1-resolve-store.mjs +190 -0
- package/dist/d1-resolve-store.mjs.map +1 -0
- package/dist/d1-schema.cjs +361 -0
- package/dist/d1-schema.d.cts +237 -0
- package/dist/d1-schema.d.cts.map +1 -0
- package/dist/d1-schema.d.mts +237 -0
- package/dist/d1-schema.d.mts.map +1 -0
- package/dist/d1-schema.mjs +341 -0
- package/dist/d1-schema.mjs.map +1 -0
- package/dist/d1-share-store.cjs +0 -0
- package/dist/d1-share-store.d.cts +53 -0
- package/dist/d1-share-store.d.cts.map +1 -0
- package/dist/d1-share-store.d.mts +53 -0
- package/dist/d1-share-store.d.mts.map +1 -0
- package/dist/d1-share-store.mjs +0 -0
- package/dist/d1-share-store.mjs.map +1 -0
- package/dist/d1-tree-index.cjs +1098 -0
- package/dist/d1-tree-index.d.cts +203 -0
- package/dist/d1-tree-index.d.cts.map +1 -0
- package/dist/d1-tree-index.d.mts +203 -0
- package/dist/d1-tree-index.d.mts.map +1 -0
- package/dist/d1-tree-index.mjs +1094 -0
- package/dist/d1-tree-index.mjs.map +1 -0
- package/dist/data-backend.cjs +147 -0
- package/dist/data-backend.d.cts +30 -0
- package/dist/data-backend.d.cts.map +1 -0
- package/dist/data-backend.d.mts +30 -0
- package/dist/data-backend.d.mts.map +1 -0
- package/dist/data-backend.mjs +148 -0
- package/dist/data-backend.mjs.map +1 -0
- package/dist/dedup-backfill.cjs +278 -0
- package/dist/dedup-backfill.d.cts +165 -0
- package/dist/dedup-backfill.d.cts.map +1 -0
- package/dist/dedup-backfill.d.mts +165 -0
- package/dist/dedup-backfill.d.mts.map +1 -0
- package/dist/dedup-backfill.mjs +273 -0
- package/dist/dedup-backfill.mjs.map +1 -0
- package/dist/did-space-like.d.cts +2 -0
- package/dist/did-space-like.d.mts +2 -0
- package/dist/did-utils.cjs +44 -0
- package/dist/did-utils.d.cts +25 -0
- package/dist/did-utils.d.cts.map +1 -0
- package/dist/did-utils.d.mts +25 -0
- package/dist/did-utils.d.mts.map +1 -0
- package/dist/did-utils.mjs +43 -0
- package/dist/did-utils.mjs.map +1 -0
- package/dist/dirty-path-queue.cjs +31 -0
- package/dist/dirty-path-queue.d.cts +104 -0
- package/dist/dirty-path-queue.d.cts.map +1 -0
- package/dist/dirty-path-queue.d.mts +104 -0
- package/dist/dirty-path-queue.d.mts.map +1 -0
- package/dist/dirty-path-queue.mjs +31 -0
- package/dist/dirty-path-queue.mjs.map +1 -0
- package/dist/dirty-path-schema.cjs +142 -0
- package/dist/dirty-path-schema.d.cts +90 -0
- package/dist/dirty-path-schema.d.cts.map +1 -0
- package/dist/dirty-path-schema.d.mts +90 -0
- package/dist/dirty-path-schema.d.mts.map +1 -0
- package/dist/dirty-path-schema.mjs +136 -0
- package/dist/dirty-path-schema.mjs.map +1 -0
- package/dist/download-actions.cjs +43 -0
- package/dist/download-actions.mjs +40 -0
- package/dist/download-actions.mjs.map +1 -0
- package/dist/fs-object-store.cjs +153 -0
- package/dist/fs-object-store.d.cts +21 -0
- package/dist/fs-object-store.d.cts.map +1 -0
- package/dist/fs-object-store.d.mts +22 -0
- package/dist/fs-object-store.d.mts.map +1 -0
- package/dist/fs-object-store.mjs +153 -0
- package/dist/fs-object-store.mjs.map +1 -0
- package/dist/gc-queue.d.cts +43 -0
- package/dist/gc-queue.d.cts.map +1 -0
- package/dist/gc-queue.d.mts +43 -0
- package/dist/gc-queue.d.mts.map +1 -0
- package/dist/index.cjs +2712 -0
- package/dist/index.d.cts +504 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +505 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2537 -0
- package/dist/index.mjs.map +1 -0
- package/dist/inline-content-migration.cjs +212 -0
- package/dist/inline-content-migration.d.cts +110 -0
- package/dist/inline-content-migration.d.cts.map +1 -0
- package/dist/inline-content-migration.d.mts +111 -0
- package/dist/inline-content-migration.d.mts.map +1 -0
- package/dist/inline-content-migration.mjs +207 -0
- package/dist/inline-content-migration.mjs.map +1 -0
- package/dist/inline-content.cjs +145 -0
- package/dist/inline-content.d.cts +98 -0
- package/dist/inline-content.d.cts.map +1 -0
- package/dist/inline-content.d.mts +98 -0
- package/dist/inline-content.d.mts.map +1 -0
- package/dist/inline-content.mjs +137 -0
- package/dist/inline-content.mjs.map +1 -0
- package/dist/local-changelog.cjs +241 -0
- package/dist/local-changelog.d.cts +119 -0
- package/dist/local-changelog.d.cts.map +1 -0
- package/dist/local-changelog.d.mts +119 -0
- package/dist/local-changelog.d.mts.map +1 -0
- package/dist/local-changelog.mjs +240 -0
- package/dist/local-changelog.mjs.map +1 -0
- package/dist/local.cjs +435 -0
- package/dist/local.d.cts +254 -0
- package/dist/local.d.cts.map +1 -0
- package/dist/local.d.mts +254 -0
- package/dist/local.d.mts.map +1 -0
- package/dist/local.mjs +427 -0
- package/dist/local.mjs.map +1 -0
- package/dist/memory-gc-queue.cjs +36 -0
- package/dist/memory-gc-queue.d.cts +22 -0
- package/dist/memory-gc-queue.d.cts.map +1 -0
- package/dist/memory-gc-queue.d.mts +22 -0
- package/dist/memory-gc-queue.d.mts.map +1 -0
- package/dist/memory-gc-queue.mjs +36 -0
- package/dist/memory-gc-queue.mjs.map +1 -0
- package/dist/memory-tree-index.cjs +734 -0
- package/dist/memory-tree-index.d.cts +159 -0
- package/dist/memory-tree-index.d.cts.map +1 -0
- package/dist/memory-tree-index.d.mts +159 -0
- package/dist/memory-tree-index.d.mts.map +1 -0
- package/dist/memory-tree-index.mjs +735 -0
- package/dist/memory-tree-index.mjs.map +1 -0
- package/dist/metadata-db.cjs +562 -0
- package/dist/metadata-db.d.cts +102 -0
- package/dist/metadata-db.d.cts.map +1 -0
- package/dist/metadata-db.d.mts +102 -0
- package/dist/metadata-db.d.mts.map +1 -0
- package/dist/metadata-db.mjs +562 -0
- package/dist/metadata-db.mjs.map +1 -0
- package/dist/mime-utils.cjs +2 -0
- package/dist/mime-utils.d.cts +2 -0
- package/dist/mime-utils.d.mts +2 -0
- package/dist/mime-utils.mjs +3 -0
- package/dist/object-key.cjs +41 -0
- package/dist/object-key.d.cts +25 -0
- package/dist/object-key.d.cts.map +1 -0
- package/dist/object-key.d.mts +25 -0
- package/dist/object-key.d.mts.map +1 -0
- package/dist/object-key.mjs +40 -0
- package/dist/object-key.mjs.map +1 -0
- package/dist/packages/session/dist/index.cjs +788 -0
- package/dist/packages/session/dist/index.mjs +782 -0
- package/dist/packages/session/dist/index.mjs.map +1 -0
- package/dist/platform/r2/dist/types.d.cts +49 -0
- package/dist/platform/r2/dist/types.d.cts.map +1 -0
- package/dist/prefix-range.cjs +33 -0
- package/dist/prefix-range.d.cts +29 -0
- package/dist/prefix-range.d.cts.map +1 -0
- package/dist/prefix-range.d.mts +29 -0
- package/dist/prefix-range.d.mts.map +1 -0
- package/dist/prefix-range.mjs +33 -0
- package/dist/prefix-range.mjs.map +1 -0
- package/dist/prefixed-tree-index.cjs +238 -0
- package/dist/prefixed-tree-index.d.cts +85 -0
- package/dist/prefixed-tree-index.d.cts.map +1 -0
- package/dist/prefixed-tree-index.d.mts +85 -0
- package/dist/prefixed-tree-index.d.mts.map +1 -0
- package/dist/prefixed-tree-index.mjs +239 -0
- package/dist/prefixed-tree-index.mjs.map +1 -0
- package/dist/presign-signer.cjs +7 -0
- package/dist/presign-signer.d.cts +99 -0
- package/dist/presign-signer.d.cts.map +1 -0
- package/dist/presign-signer.d.mts +99 -0
- package/dist/presign-signer.d.mts.map +1 -0
- package/dist/presign-signer.mjs +7 -0
- package/dist/presign-signer.mjs.map +1 -0
- package/dist/providers/platform/r2/dist/index.d.mts +3 -0
- package/dist/providers/platform/r2/dist/types.d.mts +49 -0
- package/dist/providers/platform/r2/dist/types.d.mts.map +1 -0
- package/dist/reconcile.cjs +184 -0
- package/dist/reconcile.d.cts +26 -0
- package/dist/reconcile.d.cts.map +1 -0
- package/dist/reconcile.d.mts +26 -0
- package/dist/reconcile.d.mts.map +1 -0
- package/dist/reconcile.mjs +184 -0
- package/dist/reconcile.mjs.map +1 -0
- package/dist/reference-check.cjs +49 -0
- package/dist/reference-check.d.cts +10 -0
- package/dist/reference-check.d.cts.map +1 -0
- package/dist/reference-check.d.mts +10 -0
- package/dist/reference-check.d.mts.map +1 -0
- package/dist/reference-check.mjs +48 -0
- package/dist/reference-check.mjs.map +1 -0
- package/dist/remote-afs.cjs +681 -0
- package/dist/remote-afs.d.cts +236 -0
- package/dist/remote-afs.d.cts.map +1 -0
- package/dist/remote-afs.d.mts +236 -0
- package/dist/remote-afs.d.mts.map +1 -0
- package/dist/remote-afs.mjs +676 -0
- package/dist/remote-afs.mjs.map +1 -0
- package/dist/rename-guard.cjs +18 -0
- package/dist/rename-guard.mjs +18 -0
- package/dist/rename-guard.mjs.map +1 -0
- package/dist/resolve.cjs +260 -0
- package/dist/resolve.d.cts +113 -0
- package/dist/resolve.d.cts.map +1 -0
- package/dist/resolve.d.mts +113 -0
- package/dist/resolve.d.mts.map +1 -0
- package/dist/resolve.mjs +260 -0
- package/dist/resolve.mjs.map +1 -0
- package/dist/rsync-content.cjs +33 -0
- package/dist/rsync-content.mjs +33 -0
- package/dist/rsync-content.mjs.map +1 -0
- package/dist/rsync.cjs +400 -0
- package/dist/rsync.d.cts +157 -0
- package/dist/rsync.d.cts.map +1 -0
- package/dist/rsync.d.mts +157 -0
- package/dist/rsync.d.mts.map +1 -0
- package/dist/rsync.mjs +397 -0
- package/dist/rsync.mjs.map +1 -0
- package/dist/run-gc.cjs +57 -0
- package/dist/run-gc.d.cts +40 -0
- package/dist/run-gc.d.cts.map +1 -0
- package/dist/run-gc.d.mts +41 -0
- package/dist/run-gc.d.mts.map +1 -0
- package/dist/run-gc.mjs +57 -0
- package/dist/run-gc.mjs.map +1 -0
- package/dist/scope-id.cjs +70 -0
- package/dist/scope-id.d.cts +35 -0
- package/dist/scope-id.d.cts.map +1 -0
- package/dist/scope-id.d.mts +35 -0
- package/dist/scope-id.d.mts.map +1 -0
- package/dist/scope-id.mjs +68 -0
- package/dist/scope-id.mjs.map +1 -0
- package/dist/scope-migration-node.cjs +172 -0
- package/dist/scope-migration-node.d.cts +44 -0
- package/dist/scope-migration-node.d.cts.map +1 -0
- package/dist/scope-migration-node.d.mts +44 -0
- package/dist/scope-migration-node.d.mts.map +1 -0
- package/dist/scope-migration-node.mjs +171 -0
- package/dist/scope-migration-node.mjs.map +1 -0
- package/dist/scope-migration.cjs +155 -0
- package/dist/scope-migration.d.cts +65 -0
- package/dist/scope-migration.d.cts.map +1 -0
- package/dist/scope-migration.d.mts +65 -0
- package/dist/scope-migration.d.mts.map +1 -0
- package/dist/scope-migration.mjs +154 -0
- package/dist/scope-migration.mjs.map +1 -0
- package/dist/share-declaration.cjs +225 -0
- package/dist/share-declaration.d.cts +30 -0
- package/dist/share-declaration.d.cts.map +1 -0
- package/dist/share-declaration.d.mts +32 -0
- package/dist/share-declaration.d.mts.map +1 -0
- package/dist/share-declaration.mjs +221 -0
- package/dist/share-declaration.mjs.map +1 -0
- package/dist/share-hook.cjs +63 -0
- package/dist/share-hook.mjs +62 -0
- package/dist/share-hook.mjs.map +1 -0
- package/dist/share-resolve.cjs +176 -0
- package/dist/share-resolve.d.cts +36 -0
- package/dist/share-resolve.d.cts.map +1 -0
- package/dist/share-resolve.d.mts +36 -0
- package/dist/share-resolve.d.mts.map +1 -0
- package/dist/share-resolve.mjs +177 -0
- package/dist/share-resolve.mjs.map +1 -0
- package/dist/share-serve.cjs +145 -0
- package/dist/share-serve.d.cts +30 -0
- package/dist/share-serve.d.cts.map +1 -0
- package/dist/share-serve.d.mts +30 -0
- package/dist/share-serve.d.mts.map +1 -0
- package/dist/share-serve.mjs +144 -0
- package/dist/share-serve.mjs.map +1 -0
- package/dist/share-store.cjs +25 -0
- package/dist/share-store.d.cts +65 -0
- package/dist/share-store.d.cts.map +1 -0
- package/dist/share-store.d.mts +65 -0
- package/dist/share-store.d.mts.map +1 -0
- package/dist/share-store.mjs +25 -0
- package/dist/share-store.mjs.map +1 -0
- package/dist/share-virtual-path.cjs +102 -0
- package/dist/share-virtual-path.mjs +101 -0
- package/dist/share-virtual-path.mjs.map +1 -0
- package/dist/space-resolver.cjs +54 -0
- package/dist/space-resolver.d.cts +34 -0
- package/dist/space-resolver.d.cts.map +1 -0
- package/dist/space-resolver.d.mts +34 -0
- package/dist/space-resolver.d.mts.map +1 -0
- package/dist/space-resolver.mjs +55 -0
- package/dist/space-resolver.mjs.map +1 -0
- package/dist/sqlite-gc-queue.cjs +51 -0
- package/dist/sqlite-gc-queue.d.cts +22 -0
- package/dist/sqlite-gc-queue.d.cts.map +1 -0
- package/dist/sqlite-gc-queue.d.mts +22 -0
- package/dist/sqlite-gc-queue.d.mts.map +1 -0
- package/dist/sqlite-gc-queue.mjs +52 -0
- package/dist/sqlite-gc-queue.mjs.map +1 -0
- package/dist/sqlite-resolve-store.cjs +163 -0
- package/dist/sqlite-resolve-store.d.cts +50 -0
- package/dist/sqlite-resolve-store.d.cts.map +1 -0
- package/dist/sqlite-resolve-store.d.mts +50 -0
- package/dist/sqlite-resolve-store.d.mts.map +1 -0
- package/dist/sqlite-resolve-store.mjs +164 -0
- package/dist/sqlite-resolve-store.mjs.map +1 -0
- package/dist/sqlite-share-store.cjs +157 -0
- package/dist/sqlite-share-store.d.cts +31 -0
- package/dist/sqlite-share-store.d.cts.map +1 -0
- package/dist/sqlite-share-store.d.mts +31 -0
- package/dist/sqlite-share-store.d.mts.map +1 -0
- package/dist/sqlite-share-store.mjs +157 -0
- package/dist/sqlite-share-store.mjs.map +1 -0
- package/dist/sqlite-tree-index.cjs +901 -0
- package/dist/sqlite-tree-index.d.cts +107 -0
- package/dist/sqlite-tree-index.d.cts.map +1 -0
- package/dist/sqlite-tree-index.d.mts +107 -0
- package/dist/sqlite-tree-index.d.mts.map +1 -0
- package/dist/sqlite-tree-index.mjs +902 -0
- package/dist/sqlite-tree-index.mjs.map +1 -0
- package/dist/sync-engine.cjs +1324 -0
- package/dist/sync-engine.d.cts +473 -0
- package/dist/sync-engine.d.cts.map +1 -0
- package/dist/sync-engine.d.mts +473 -0
- package/dist/sync-engine.d.mts.map +1 -0
- package/dist/sync-engine.mjs +1315 -0
- package/dist/sync-engine.mjs.map +1 -0
- package/dist/sync-state.cjs +303 -0
- package/dist/sync-state.d.cts +224 -0
- package/dist/sync-state.d.cts.map +1 -0
- package/dist/sync-state.d.mts +224 -0
- package/dist/sync-state.d.mts.map +1 -0
- package/dist/sync-state.mjs +297 -0
- package/dist/sync-state.mjs.map +1 -0
- package/dist/timestamp.cjs +92 -0
- package/dist/timestamp.mjs +91 -0
- package/dist/timestamp.mjs.map +1 -0
- package/dist/transports/http.cjs +54 -0
- package/dist/transports/http.d.cts +26 -0
- package/dist/transports/http.d.cts.map +1 -0
- package/dist/transports/http.d.mts +26 -0
- package/dist/transports/http.d.mts.map +1 -0
- package/dist/transports/http.mjs +54 -0
- package/dist/transports/http.mjs.map +1 -0
- package/dist/transports/static.cjs +55 -0
- package/dist/transports/static.d.cts +28 -0
- package/dist/transports/static.d.cts.map +1 -0
- package/dist/transports/static.d.mts +28 -0
- package/dist/transports/static.d.mts.map +1 -0
- package/dist/transports/static.mjs +55 -0
- package/dist/transports/static.mjs.map +1 -0
- package/dist/transports/types.cjs +13 -0
- package/dist/transports/types.d.cts +72 -0
- package/dist/transports/types.d.cts.map +1 -0
- package/dist/transports/types.d.mts +72 -0
- package/dist/transports/types.d.mts.map +1 -0
- package/dist/transports/types.mjs +13 -0
- package/dist/transports/types.mjs.map +1 -0
- package/dist/transports/ws.cjs +207 -0
- package/dist/transports/ws.d.cts +47 -0
- package/dist/transports/ws.d.cts.map +1 -0
- package/dist/transports/ws.d.mts +47 -0
- package/dist/transports/ws.d.mts.map +1 -0
- package/dist/transports/ws.mjs +206 -0
- package/dist/transports/ws.mjs.map +1 -0
- package/dist/tree-index.cjs +333 -0
- package/dist/tree-index.d.cts +524 -0
- package/dist/tree-index.d.cts.map +1 -0
- package/dist/tree-index.d.mts +524 -0
- package/dist/tree-index.d.mts.map +1 -0
- package/dist/tree-index.mjs +322 -0
- package/dist/tree-index.mjs.map +1 -0
- package/dist/tree-query.cjs +655 -0
- package/dist/tree-query.d.cts +70 -0
- package/dist/tree-query.d.cts.map +1 -0
- package/dist/tree-query.d.mts +70 -0
- package/dist/tree-query.d.mts.map +1 -0
- package/dist/tree-query.mjs +648 -0
- package/dist/tree-query.mjs.map +1 -0
- package/dist/upload-actions.cjs +97 -0
- package/dist/upload-actions.d.cts +19 -0
- package/dist/upload-actions.d.cts.map +1 -0
- package/dist/upload-actions.d.mts +21 -0
- package/dist/upload-actions.d.mts.map +1 -0
- package/dist/upload-actions.mjs +90 -0
- package/dist/upload-actions.mjs.map +1 -0
- package/dist/upload-session-store.cjs +185 -0
- package/dist/upload-session-store.d.cts +99 -0
- package/dist/upload-session-store.d.cts.map +1 -0
- package/dist/upload-session-store.d.mts +99 -0
- package/dist/upload-session-store.d.mts.map +1 -0
- package/dist/upload-session-store.mjs +184 -0
- package/dist/upload-session-store.mjs.map +1 -0
- package/dist/url-normalize.cjs +61 -0
- package/dist/url-normalize.d.cts +33 -0
- package/dist/url-normalize.d.cts.map +1 -0
- package/dist/url-normalize.d.mts +33 -0
- package/dist/url-normalize.d.mts.map +1 -0
- package/dist/url-normalize.mjs +61 -0
- package/dist/url-normalize.mjs.map +1 -0
- package/dist/versioned-content-backends.cjs +155 -0
- package/dist/versioned-content-backends.d.cts +49 -0
- package/dist/versioned-content-backends.d.cts.map +1 -0
- package/dist/versioned-content-backends.d.mts +49 -0
- package/dist/versioned-content-backends.d.mts.map +1 -0
- package/dist/versioned-content-backends.mjs +154 -0
- package/dist/versioned-content-backends.mjs.map +1 -0
- package/dist/versioned-content-index.cjs +102 -0
- package/dist/versioned-content-index.d.cts +46 -0
- package/dist/versioned-content-index.d.cts.map +1 -0
- package/dist/versioned-content-index.d.mts +46 -0
- package/dist/versioned-content-index.d.mts.map +1 -0
- package/dist/versioned-content-index.mjs +103 -0
- package/dist/versioned-content-index.mjs.map +1 -0
- package/dist/versioned-content-store.cjs +121 -0
- package/dist/versioned-content-store.d.cts +90 -0
- package/dist/versioned-content-store.d.cts.map +1 -0
- package/dist/versioned-content-store.d.mts +90 -0
- package/dist/versioned-content-store.d.mts.map +1 -0
- package/dist/versioned-content-store.mjs +122 -0
- package/dist/versioned-content-store.mjs.map +1 -0
- package/dist/versioned-scope.cjs +39 -0
- package/dist/versioned-scope.d.cts +57 -0
- package/dist/versioned-scope.d.cts.map +1 -0
- package/dist/versioned-scope.d.mts +57 -0
- package/dist/versioned-scope.d.mts.map +1 -0
- package/dist/versioned-scope.mjs +37 -0
- package/dist/versioned-scope.mjs.map +1 -0
- package/migrations/0001_tree_entries.sql +17 -0
- package/migrations/0002_resolve_entries.sql +7 -0
- package/migrations/0003_entries_v2.sql +38 -0
- package/migrations/0004_gc_queue.sql +5 -0
- package/migrations/0006_resolve_enhance.sql +14 -0
- package/migrations/0007_resolve_created_at.sql +10 -0
- package/migrations/0008_changelog.sql +34 -0
- package/migrations/0009_device_sync_state.sql +29 -0
- package/migrations/0010_scope_meta.sql +33 -0
- package/migrations/0011_shares.sql +25 -0
- package/migrations/0012_scope_meta_file_count.sql +41 -0
- package/migrations/0013_scope_meta_total_bytes.sql +47 -0
- package/migrations/0014_rename_tables.sql +62 -0
- package/package.json +102 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
import { ObjectStore } from "./providers/platform/r2/dist/types.mjs";
|
|
2
|
+
import "./providers/platform/r2/dist/index.mjs";
|
|
3
|
+
import { GcQueue } from "./gc-queue.mjs";
|
|
4
|
+
import { D1GCQueue } from "./d1-gc-queue.mjs";
|
|
5
|
+
import { PRESIGN_MAX_EXPIRES_SEC, PresignGetInput, PresignPutInput, PresignSigner, PresignedGet, PresignedPut } from "./presign-signer.mjs";
|
|
6
|
+
import { DIDSpaceResolver, DomainResolveEntry, ResolveEntry } from "./resolve.mjs";
|
|
7
|
+
import { isShareDeclarationPath } from "./share-declaration.mjs";
|
|
8
|
+
import { ShareEntry, ShareRow, ShareStore, rowToEntry } from "./share-store.mjs";
|
|
9
|
+
import { DirtyPathFollowerSource, DirtyPathOp, DirtyPathQueue, DirtyPathRow, DirtyPathStoredRow, ListDirtyPathOptions, applyDirtyUpsert } from "./dirty-path-queue.mjs";
|
|
10
|
+
import { ChangelogEntry, OrderedQueryParts, ParsedTreeCursor, PutOpts, TreeEntry, TreeIndex, TreeIndexListEntriesResult, TreeIndexListOptions, TreeIndexListResult, TreeKeysetCursor, buildKeysetCursor, buildOrderedQueryParts, compareTreeSortValues, keysetAfter, parseTreeCursor } from "./tree-index.mjs";
|
|
11
|
+
import { ShareResolver } from "./share-resolve.mjs";
|
|
12
|
+
import { normalizeId, validateId } from "./did-utils.mjs";
|
|
13
|
+
import { DIDSpaceBlockletDataBackend, DIDSpaceBlockletDataBackendOptions } from "./data-backend.mjs";
|
|
14
|
+
import { detectMimeType, isTextMime } from "./mime-utils.mjs";
|
|
15
|
+
import { D1UploadSessionStore, NewUploadSession, SqliteUploadSessionStore, UPLOAD_SESSION_TTL_MS, UploadSession, UploadSessionEntry, UploadSessionEntryInput, UploadSessionEntryStatus, UploadSessionStatus, UploadSessionStore } from "./upload-session-store.mjs";
|
|
16
|
+
import { AFSMetadataContext, attachMetadataContext, detachMetadataContext, getMetadataContext } from "./afs-metadata-context.mjs";
|
|
17
|
+
import { BLOCKLET_PUBLISH_MARKER, BlockletPublishMarker } from "./blocklet-hook.mjs";
|
|
18
|
+
import { CHANGELOG_DDL, CHANGELOG_INDEX_SQL, CHANGELOG_ROW_KIND, CHANGELOG_SCOPE_CID_MIGRATION_SQL, CHANGELOG_TABLE_SQL, CHANGELOG_WIRE_EXTRA_FIELDS, ChangelogRowInput, ChangelogWireExtra, DEVICE_SYNC_STATE_INDEX_SQL, DEVICE_SYNC_STATE_TABLE_SQL, MANIFEST_FILE_KIND, MANIFEST_WIRE_EXTRA_FIELDS, ManifestRowInput, ManifestWireMeta, PREFIX_WATERMARK_TABLE_SQL, SCOPE_META_FILE_COUNT_BACKFILL_SQL, SCOPE_META_FILE_COUNT_DELETE_ONE_SQL, SCOPE_META_FILE_COUNT_DELETE_RANGE_SQL, SCOPE_META_FILE_COUNT_TRIGGER_SQL, SCOPE_META_INDEX_SQL, SCOPE_META_TABLE_SQL, SCOPE_META_TOTAL_BYTES_BACKFILL_SQL, SCOPE_META_TOTAL_BYTES_COLUMN_SQL, SCOPE_META_TOTAL_BYTES_TRIGGER_SQL, SYNC_STATE_DDL, SYNC_STATE_INDEX_SQL, SYNC_STATE_TABLE_SQL, normalizeDdl, parseChangelogEntry, parseManifestEntry, serializeChangelogEntry, serializeManifestEntry } from "./changelog-schema.mjs";
|
|
19
|
+
import { CHANGELOG_INSERT_SQL, MAX_DEVICE_ID_BYTES, buildChangelogBinds, validateDeviceId } from "./changelog-write.mjs";
|
|
20
|
+
import { cidToChecksumSha256, computeCID } from "./cid.mjs";
|
|
21
|
+
import { CachingObjectStore, CidByteCache, CidByteCacheOptions } from "./cid-byte-cache.mjs";
|
|
22
|
+
import { HttpTransportConfig, StaticReadonlyTransportConfig, Transport, TransportConfig, TransportKind, Unsubscribe, WsTransportConfig } from "./transports/types.mjs";
|
|
23
|
+
import { ConnectDIDSpaceOptions, DIDSpaceClient, DIDSpaceClientOptions, connectDIDSpace } from "./client.mjs";
|
|
24
|
+
import { D1ResolveStore } from "./d1-resolve-store.mjs";
|
|
25
|
+
import { D1_DID_SPACE_SCHEMA_SQL, ENTRIES_CONTENT_TYPE_COLUMN_SQL, ENTRIES_CONTENT_TYPE_INDEX_DROP_SQL, ENTRIES_CONTENT_TYPE_INDEX_SQL, ENTRIES_DEDUP_INDEX_SQL, ENTRIES_DEDUP_KEY_COLUMN_SQL, ENTRIES_DEDUP_SCOPE_COLUMN_SQL, ENTRIES_INDEX_SQL, ENTRIES_INLINE_CONTENT_COLUMN_SQL, ENTRIES_METADATA_COLUMN_SQL, ENTRIES_TABLE_SQL, GC_QUEUE_INDEX_SQL, GC_QUEUE_TABLE_SQL, RESOLVE_ENTRIES_INDEX_SQL, RESOLVE_ENTRIES_TABLE_SQL, SHARES_INDEX_SQL, SHARES_TABLE_SQL, UPLOAD_SESSIONS_INDEX_SQL, UPLOAD_SESSIONS_TABLE_SQL, UPLOAD_SESSION_ENTRIES_TABLE_SQL, VERSIONED_SCOPES_INDEX_SQL, VERSIONED_SCOPES_TABLE_SQL } from "./d1-schema.mjs";
|
|
26
|
+
import { D1ShareReconciler, D1ShareStore, ReconcileReport } from "./d1-share-store.mjs";
|
|
27
|
+
import { DEFAULT_INLINE_THRESHOLD, INGEST_DEVICE_ID, INLINE_CONTENT_HARD_CAP, InlineCacheMode, InlineContentOptions, assertInlineThreshold, decodeInlineText } from "./inline-content.mjs";
|
|
28
|
+
import { prefixRange } from "./prefix-range.mjs";
|
|
29
|
+
import { D1TreeIndex, MAX_ENTRIES_PER_SCOPE, ancestorDirs, nameOf, parentOf } from "./d1-tree-index.mjs";
|
|
30
|
+
import { DIRTY_PATH_DDL, DIRTY_PATH_INDEX_SQL, DIRTY_PATH_TABLE_SQL, DIRTY_PATH_TRIGGER_SQL } from "./dirty-path-schema.mjs";
|
|
31
|
+
import { LOCAL_CHANGELOG_DEFAULT_LIMIT, LOCAL_CHANGELOG_MAX_LIMIT, LocalChangelog, LocalChangelogOptions } from "./local-changelog.mjs";
|
|
32
|
+
import { MemoryGcQueue } from "./memory-gc-queue.mjs";
|
|
33
|
+
import { MemoryTreeIndex } from "./memory-tree-index.mjs";
|
|
34
|
+
import { assertValidCid, objectKeyForCid } from "./object-key.mjs";
|
|
35
|
+
import { PrefixedTreeIndex } from "./prefixed-tree-index.mjs";
|
|
36
|
+
import { referencedAnywhereD1, referencedAnywhereLibsql } from "./reference-check.mjs";
|
|
37
|
+
import { BatchOverBudgetError, BatchUnsupportedError, RpcBatchEntryResult, RpcBatchResult, RpcUserSpaceAFS, RpcUserSpaceAFSOptions } from "./remote-afs.mjs";
|
|
38
|
+
import { BuildManifestOptions, FileFingerprint, SyncDiff, SyncDiffEntry, SyncManifest, SyncOptions, SyncProgress, SyncResult as SyncResult$1, buildManifest, computeDiff, fetchRemoteManifest, runWithConcurrency, syncDIDSpace } from "./rsync.mjs";
|
|
39
|
+
import { DEFAULT_GC_GRACE_MS, GcStats, RunGcOptions, runGc } from "./run-gc.mjs";
|
|
40
|
+
import { decodeScopeHmacSecret, deriveScope, isPlainDidScope } from "./scope-id.mjs";
|
|
41
|
+
import { BuildD1MigrationSqlOptions, D1MigrationSql, ScopeMigrationOptions, ScopeMigrationReport, buildD1MigrationSql, classifyScopes, migrateD1Scopes } from "./scope-migration.mjs";
|
|
42
|
+
import { BuildScopedAFS, ServeShareOptions, ShareLookup, serveShare } from "./share-serve.mjs";
|
|
43
|
+
import { SqliteGcQueue } from "./sqlite-gc-queue.mjs";
|
|
44
|
+
import { SqliteResolveStore } from "./sqlite-resolve-store.mjs";
|
|
45
|
+
import { SqliteShareStore, openDaemonShareStore } from "./sqlite-share-store.mjs";
|
|
46
|
+
import { AppState, DEVICE_ID_FORMAT_RE, SYNC_STATE_KEYS, SyncStateStore, SyncStateStoreOptions, SyncStatus, defaultAppState, generateDesktopDeviceId, isValidDeviceId, parseSyncStatus, serializeSyncStatus } from "./sync-state.mjs";
|
|
47
|
+
import { ConflictResolutionError, ConflictResponse, CurrentObjectMissingError, CurrentObjectSource, PULL_BATCH_LIMIT, PULL_FETCH_CONCURRENCY, PUSH_BATCH_LIMIT, PUSH_PROGRESS_FLUSH_INTERVAL, SYNC_WALL_CLOCK_BUDGET_MS, SyncCloudAFS, SyncEngine, SyncEngineOptions, SyncEngineProviderHandle, SyncResult, classifyMissingObject } from "./sync-engine.mjs";
|
|
48
|
+
import { HttpTransport, HttpTransportOptions } from "./transports/http.mjs";
|
|
49
|
+
import { StaticReadonlyTransport, StaticReadonlyTransportOptions } from "./transports/static.mjs";
|
|
50
|
+
import { WsTransport, WsTransportOptions, createWsTransport } from "./transports/ws.mjs";
|
|
51
|
+
import { AFS_IFMATCH_ABSENT } from "./upload-actions.mjs";
|
|
52
|
+
import { normalizeItemUrl } from "./url-normalize.mjs";
|
|
53
|
+
import { VersionedContentFile, VersionedContentIndex, VersionedContentIndexOptions } from "./versioned-content-index.mjs";
|
|
54
|
+
import { EnsureScopeOptions, EnsureScopeResult, LoadedScopeContent, VersionedContentStore, VersionedContentStoreOptions, VersionedScopeBackend, VersionedScopeMeta } from "./versioned-content-store.mjs";
|
|
55
|
+
import { D1VersionedScopeBackend, LibsqlVersionedScopeBackend, MemoryVersionedScopeBackend } from "./versioned-content-backends.mjs";
|
|
56
|
+
import { VersionedPackageIdentity, resolveVersionToken, versionedScope, versionedScopeGroup } from "./versioned-scope.mjs";
|
|
57
|
+
import { AFSAccessMode, AFSBatchDeleteEntry, AFSBatchDeleteResult, AFSBatchReadEntry, AFSBatchReadResult, AFSBatchWriteEntry, AFSBatchWriteResult, AFSCollectionQueryResult, AFSCollectionQuerySpec, AFSEntry, AFSExecResult, AFSExplainResult, AFSListOptions, AFSListResult, AFSOperationOptions, AFSQueryOptions, AFSSearchOptions, AFSStatResult, AFSWriteEntryPayload, AFSWriteOptions, AFSWriteResult, CapabilitiesManifest, OperationsDeclaration, ProviderManifest, ProviderTreeSchema } from "@aigne/afs";
|
|
58
|
+
import { AFSBaseProvider, RouteContext } from "@aigne/afs/provider";
|
|
59
|
+
|
|
60
|
+
//#region src/index.d.ts
|
|
61
|
+
interface DIDSpaceProviderOptions {
|
|
62
|
+
did: string;
|
|
63
|
+
objectStore: ObjectStore;
|
|
64
|
+
treeIndex: TreeIndex;
|
|
65
|
+
name?: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
accessMode?: AFSAccessMode;
|
|
68
|
+
/** Optional: gc queue for deferred R2 object cleanup (any `GcQueue` impl —
|
|
69
|
+
* `D1GCQueue` on CF, `SqliteGcQueue` on Node, `MemoryGcQueue` in tests). */
|
|
70
|
+
gcQueue?: GcQueue;
|
|
71
|
+
/**
|
|
72
|
+
* Task 2.4a: deviceId written into every `changelog` row for mutations
|
|
73
|
+
* routed through the generic AFS write/delete handler. Production Worker
|
|
74
|
+
* paths bypass this provider via `CloudflareDIDSpace.internalWrite` (Task
|
|
75
|
+
* 2.4b) with a per-request deviceId from the `X-Device-Id` header; this
|
|
76
|
+
* constructor default (`"server:default"`) is used only for tests,
|
|
77
|
+
* conformance fixtures, and CLI flows that mount DIDSpaceProvider directly.
|
|
78
|
+
*/
|
|
79
|
+
deviceId?: string;
|
|
80
|
+
/** Optional: ShareResolver for .share reconcile hook (Phase 0.4) */
|
|
81
|
+
shareResolver?: ShareResolver;
|
|
82
|
+
/**
|
|
83
|
+
* Owner DID recorded by the .share reconcile hook. Defaults to `did`. An
|
|
84
|
+
* instance fragment provider (treeIndex prefixed to `blocklets/<i>/user/`)
|
|
85
|
+
* has `did = instanceId`, but a share's owner is the WHOLE-SPACE user — pass
|
|
86
|
+
* the user's DID here so reconcile keys `owner_did` to the space (matching
|
|
87
|
+
* the serving scope), not the blocklet instance.
|
|
88
|
+
*/
|
|
89
|
+
shareOwnerDid?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Tree prefix prepended to the hook's `treePath` so the reconciled
|
|
92
|
+
* `decl_path`/`source_path` are WHOLE-TREE paths (`blocklets/<i>/user/...`),
|
|
93
|
+
* matching `shareResolver`'s whole-tree index and the serving scope. Set ONLY
|
|
94
|
+
* on prefixed instance-fragment providers; whole-space providers leave it
|
|
95
|
+
* unset (treePath is already whole-tree). Its presence also marks a provider
|
|
96
|
+
* as an instance fragment, which suppresses the `.shares/` virtual read view.
|
|
97
|
+
*/
|
|
98
|
+
shareTreePrefix?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Optional: global resolve table for the blocklet publish/resolve hook
|
|
101
|
+
* (#674). Writing a `blocklet.yaml` registers `resolve/blocklet/<id>` →
|
|
102
|
+
* {owner, path} so the CF serve path can read the published files back.
|
|
103
|
+
* Backed by the SAME D1 (CF) / in-memory (Node) store as the share/domain
|
|
104
|
+
* resolve entries — see blocklet-hook.ts. Absent → blocklet registration off.
|
|
105
|
+
*/
|
|
106
|
+
blockletResolver?: DIDSpaceResolver;
|
|
107
|
+
/**
|
|
108
|
+
* PLAINTEXT space-owner DID recorded by the blocklet hook as the resolve
|
|
109
|
+
* entry's `owner` (so the serve path can reconstruct the space via
|
|
110
|
+
* `getUserSpace(owner)`). Unlike `shareOwnerDid` (the de-id storage scope),
|
|
111
|
+
* this MUST be the plaintext DID — the serve path re-derives the scope from
|
|
112
|
+
* it. Defaults to `did`, which is correct for whole-space providers; instance
|
|
113
|
+
* fragments (`did = instanceId`) MUST pass the user's plaintext DID here.
|
|
114
|
+
*/
|
|
115
|
+
blockletOwnerDid?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Upload plane (design §7 / §15). Injected by the runtime on the user-facing
|
|
118
|
+
* space so the `prepare/commit/abort-upload` actions can mint grants + persist
|
|
119
|
+
* sessions. All optional: when `sessionStore` is absent the actions report
|
|
120
|
+
* unavailable; when `signer` is absent (Node, fallback-only) prepare returns
|
|
121
|
+
* `grant: null` and the client falls back to batchWrite.
|
|
122
|
+
*/
|
|
123
|
+
signer?: PresignSigner;
|
|
124
|
+
uploadSessionStore?: UploadSessionStore;
|
|
125
|
+
/**
|
|
126
|
+
* The de-identified storage scope (= the owning DIDSpace's `this._scope`)
|
|
127
|
+
* written into `upload_sessions.scope` and re-checked on commit for session
|
|
128
|
+
* ownership isolation (§9 / §10). NEVER a plaintext user DID.
|
|
129
|
+
*/
|
|
130
|
+
uploadScope?: string;
|
|
131
|
+
}
|
|
132
|
+
declare class DIDSpaceProvider extends AFSBaseProvider {
|
|
133
|
+
static manifest(): ProviderManifest;
|
|
134
|
+
static treeSchema(): ProviderTreeSchema;
|
|
135
|
+
readonly name: string;
|
|
136
|
+
readonly description?: string;
|
|
137
|
+
readonly accessMode: AFSAccessMode;
|
|
138
|
+
readonly did: string;
|
|
139
|
+
private objectStore;
|
|
140
|
+
private treeIndex;
|
|
141
|
+
readonly gcQueue?: GcQueue;
|
|
142
|
+
/** See `DIDSpaceProviderOptions.deviceId`. Read by writeHandler/deleteHandler. */
|
|
143
|
+
readonly deviceId: string;
|
|
144
|
+
/** Optional ShareResolver for .share reconcile hook (Phase 0.4) */
|
|
145
|
+
private readonly shareResolver?;
|
|
146
|
+
/** See `DIDSpaceProviderOptions.shareOwnerDid` / `shareTreePrefix`. */
|
|
147
|
+
private readonly shareOwnerDid?;
|
|
148
|
+
private readonly shareTreePrefix?;
|
|
149
|
+
/** See `DIDSpaceProviderOptions.blockletResolver` / `blockletOwnerDid` (#674). */
|
|
150
|
+
private readonly blockletResolver?;
|
|
151
|
+
private readonly blockletOwnerDid?;
|
|
152
|
+
/** Upload plane deps (design §7). See `DIDSpaceProviderOptions`. */
|
|
153
|
+
private readonly signer?;
|
|
154
|
+
private readonly uploadSessionStore?;
|
|
155
|
+
private readonly uploadScope?;
|
|
156
|
+
constructor(options: DIDSpaceProviderOptions);
|
|
157
|
+
/** Convert AFS path to tree-index path (strip leading /) */
|
|
158
|
+
private treePath;
|
|
159
|
+
/** Convert AFS path to tree-index prefix for directory listing */
|
|
160
|
+
private treeListPrefix;
|
|
161
|
+
/**
|
|
162
|
+
* Remap a write/delete into the arguments the .share reconcile hook expects.
|
|
163
|
+
* On a whole-space provider this is identity. On a prefixed instance-fragment
|
|
164
|
+
* provider (`shareTreePrefix` set) it restores the WHOLE-TREE decl path and
|
|
165
|
+
* keys the share to the space owner (`shareOwnerDid`), so reconcile stores the
|
|
166
|
+
* same `owner_did` + full `decl_path` the public serving path resolves by.
|
|
167
|
+
*/
|
|
168
|
+
private shareHookArgs;
|
|
169
|
+
/**
|
|
170
|
+
* Remap a write/delete into the arguments the blocklet hook expects. Same
|
|
171
|
+
* whole-tree path restoration as {@link shareHookArgs}, but the recorded
|
|
172
|
+
* `ownerDid` is the PLAINTEXT space owner (`blockletOwnerDid`), not the de-id
|
|
173
|
+
* scope — the serve path re-derives the storage scope from the plaintext DID.
|
|
174
|
+
*/
|
|
175
|
+
private blockletHookArgs;
|
|
176
|
+
private objectKey;
|
|
177
|
+
private isDirectory;
|
|
178
|
+
/** Collect all CIDs under a prefix for GC queuing before bulk delete. */
|
|
179
|
+
private collectCIDsByPrefix;
|
|
180
|
+
readMeta(ctx: RouteContext<{
|
|
181
|
+
path?: string;
|
|
182
|
+
}>): Promise<AFSEntry | undefined>;
|
|
183
|
+
/**
|
|
184
|
+
* Override to implement the `maxDepth: -1` snapshot contract.
|
|
185
|
+
*
|
|
186
|
+
* When called with `maxDepth: -1`, collects ALL file entries under `path`
|
|
187
|
+
* using cursor-based pagination through the treeIndex and returns them in
|
|
188
|
+
* a single `AFSListResult` with `meta.cursor = String(manifestSeq)` so
|
|
189
|
+
* `SyncEngine.fullResync()` can advance `cloudSeq` correctly.
|
|
190
|
+
*
|
|
191
|
+
* > 10_000 entries → sets `meta.truncated: true` (HTTP 200, SyncEngine
|
|
192
|
+
* throws `ManifestTooLargeError`).
|
|
193
|
+
*
|
|
194
|
+
* All other options fall through to `super.list()` → `listHandler`.
|
|
195
|
+
*/
|
|
196
|
+
list(path: string, options?: AFSListOptions): Promise<AFSListResult>;
|
|
197
|
+
listHandler(ctx: RouteContext<{
|
|
198
|
+
path?: string;
|
|
199
|
+
}>): Promise<AFSListResult>;
|
|
200
|
+
/**
|
|
201
|
+
* True direct-children total for a shallow listing.
|
|
202
|
+
*
|
|
203
|
+
* AFSListResult contract (`packages/core/src/type.ts`): absent `total`
|
|
204
|
+
* means "data IS the complete result" — so a handler that truncates its
|
|
205
|
+
* collection MUST report `total`, or every consumer downstream (base.ts
|
|
206
|
+
* pagination, afs-list pager) mistakes the page for the whole set.
|
|
207
|
+
*
|
|
208
|
+
* Cost model (D1: per-query round-trips dominate): `listShallow` scans
|
|
209
|
+
* the index in LIST_MAX_LIMIT batches and keeps counting rows past the
|
|
210
|
+
* build cap, so when the cursor drained (directories ≤ LIST_MAX_LIMIT
|
|
211
|
+
* children — the common case) the scan itself yields the exact total:
|
|
212
|
+
* ZERO extra queries. Only a directory truncated mid-cursor (> 1000
|
|
213
|
+
* children) pays ONE COUNT round-trip (same `countChildren(prefix)`
|
|
214
|
+
* call and parent-key format `readMeta` already relies on).
|
|
215
|
+
*/
|
|
216
|
+
private shallowTotal;
|
|
217
|
+
/**
|
|
218
|
+
* Attach the per-prefix watermark `version` as the result's top-level
|
|
219
|
+
* `liveSeq` (Live Update Resilience §4 / 0a'). Read ONE row via the
|
|
220
|
+
* TreeIndex — O(1), independent of changelog history/global write volume.
|
|
221
|
+
*
|
|
222
|
+
* - Skipped for `.changelog` listings (sync-internal, no live-update scope).
|
|
223
|
+
* - Skipped when the index has no `getPrefixWatermark` (rollout) or reports
|
|
224
|
+
* no watermark key for the path (`null` — no collection root): the
|
|
225
|
+
* consumer then falls back to full re-list on the next edge/poll, still
|
|
226
|
+
* correct.
|
|
227
|
+
* - A valid-but-never-written collection root reports `"0"` so consumers
|
|
228
|
+
* baseline at 0 instead of conservatively refetching every poll tick on a
|
|
229
|
+
* read-only collection (the first write bumps to 1 > 0 and is detected).
|
|
230
|
+
* - The value is prefix-LOCAL (only this collection root's write count), so
|
|
231
|
+
* it never leaks another blocklet's timing (invariant I3).
|
|
232
|
+
*/
|
|
233
|
+
private withLiveSeq;
|
|
234
|
+
/**
|
|
235
|
+
* Shallow listing with a VALID orderBy (did-space-sorting Phase 3).
|
|
236
|
+
*
|
|
237
|
+
* - Single tuple → forwarded to the TreeIndex (`listChildren` orders
|
|
238
|
+
* natively over the (scope,parent,col,name) indexes; keyset cursor
|
|
239
|
+
* pages stay globally ordered, so collecting offset+limit entries is
|
|
240
|
+
* the correct order-before-pagination slice).
|
|
241
|
+
* - 2-3 tuples → the index can order by one column only, so collect the
|
|
242
|
+
* FULL child set and apply the canonical core sort before truncation
|
|
243
|
+
* (order → offset → limit still holds).
|
|
244
|
+
*/
|
|
245
|
+
private listShallowOrdered;
|
|
246
|
+
private listShallow;
|
|
247
|
+
/**
|
|
248
|
+
* Patch EXACT `meta.childrenCount` onto the directory entries of a
|
|
249
|
+
* collected shallow page — the opt-in half of the two-tier childrenCount
|
|
250
|
+
* contract (`AFSListOptions.includeChildrenCounts`; default tier is the
|
|
251
|
+
* `-1` sentinel stamped by listShallow). Page-bounded by construction:
|
|
252
|
+
* only the dirs actually collected are counted, ONE `countChildrenMany`
|
|
253
|
+
* round-trip (per-dir `countChildren` fallback for indexes without it),
|
|
254
|
+
* so the cost is Σ direct children of the page's dirs — never the
|
|
255
|
+
* whole-subtree scan the retired `countChildrenGrouped` performed.
|
|
256
|
+
*/
|
|
257
|
+
private fillChildrenCounts;
|
|
258
|
+
private listDeep;
|
|
259
|
+
/**
|
|
260
|
+
* Task 1.9: list changelog rows starting after `cursor` (seq number).
|
|
261
|
+
* Returns rows as AFSEntry objects + meta.cursor pointing to the last row's seq.
|
|
262
|
+
*/
|
|
263
|
+
private listChangelog;
|
|
264
|
+
/**
|
|
265
|
+
* Promote write + delete to the object form so callers can discover the
|
|
266
|
+
* `ifMatch` sub-capability (CLAUDE.md "Sub-capability schema"). The base impl
|
|
267
|
+
* (base.ts) returns plain booleans; without this override the if-match
|
|
268
|
+
* conformance suite's `getCapabilityFeature("write","ifMatch")` reads nothing
|
|
269
|
+
* and the suite skips. Mirrors AFSFS's override (fs/src/index.ts).
|
|
270
|
+
*/
|
|
271
|
+
protected getOperationsDeclaration(): OperationsDeclaration;
|
|
272
|
+
readCapabilities(_ctx: RouteContext): Promise<AFSEntry | undefined>;
|
|
273
|
+
/**
|
|
274
|
+
* Typed collection query over a directory of records (design §3.5).
|
|
275
|
+
*
|
|
276
|
+
* - dir-per-record (`spec.doc`): direct child dirs joined with their
|
|
277
|
+
* `<dir>/<doc>` document; file-per-record (no doc): direct child files'
|
|
278
|
+
* inline content is the record.
|
|
279
|
+
* - where/orderBy/pagination/total/groupBy execute inside the TreeIndex
|
|
280
|
+
* engine (SQL or in-memory — lockstep-tested). select + annotate.memberOf
|
|
281
|
+
* are page-level post-processing here, identical across backends.
|
|
282
|
+
* - Strict contract: spec arrives core-validated; provider constraints
|
|
283
|
+
* (single orderBy key, no text) throw AFSValidationError. An index
|
|
284
|
+
* without the engine (e.g. not-yet-migrated backends) throws
|
|
285
|
+
* AFSUnsupportedError — and is never declared in capabilities.
|
|
286
|
+
*/
|
|
287
|
+
query(path: string, spec: AFSCollectionQuerySpec, _options?: AFSQueryOptions): Promise<AFSCollectionQueryResult>;
|
|
288
|
+
/** Map an engine row to an AFSEntry (mirrors the list handlers' shapes). */
|
|
289
|
+
private queryRowToEntry;
|
|
290
|
+
readHandler(ctx: RouteContext<{
|
|
291
|
+
path?: string;
|
|
292
|
+
}>): Promise<AFSEntry>;
|
|
293
|
+
/**
|
|
294
|
+
* presignRead — path-keyed read-grant capability (preview-r2-direct §3).
|
|
295
|
+
*
|
|
296
|
+
* Resolves `path` in THIS provider's (prefix-isolated) view exactly like
|
|
297
|
+
* `read`/`stat` (`treeIndex.get(treePath(path))`, incl. the same null-byte /
|
|
298
|
+
* `..`-segment guards). iff the resolved entry has a cid AND a signer with
|
|
299
|
+
* `presignGet` is present → mint a short-TTL presigned GET with the
|
|
300
|
+
* Content-Type baked in, and return `{ url, expiresAt }`.
|
|
301
|
+
*
|
|
302
|
+
* The path resolution IS the authorization: a caller can only presign what
|
|
303
|
+
* `read` would already return. Prefix isolation is inherited from the view's
|
|
304
|
+
* `PrefixedTreeIndex` — no separate object-level `isReferenced(cid)` is needed
|
|
305
|
+
* (that primitive is for the cid-keyed `.objects/{cid}` path, which has no
|
|
306
|
+
* tree path). NEVER throws to the caller: no signer (Node) / non-CAS / no cid /
|
|
307
|
+
* unresolved / any internal error → `null`, and the raw handler then falls back
|
|
308
|
+
* to the worker serve path. TTL = `DOWNLOAD_GRANT_TTL_SEC` (2h) — never the 7d
|
|
309
|
+
* signer cap (§8.3).
|
|
310
|
+
*/
|
|
311
|
+
presignRead(path: string, opts?: {
|
|
312
|
+
responseContentType?: string;
|
|
313
|
+
}): Promise<{
|
|
314
|
+
url: string;
|
|
315
|
+
expiresAt: string;
|
|
316
|
+
} | null>;
|
|
317
|
+
/**
|
|
318
|
+
* Re-verify an entry's inline copy against its cid (§2.I list contract).
|
|
319
|
+
* Returns the content when verified, null otherwise (best-effort miss).
|
|
320
|
+
*/
|
|
321
|
+
private verifiedInline;
|
|
322
|
+
/**
|
|
323
|
+
* Returns true if the given AFS path is a virtual D4-protected path
|
|
324
|
+
* (.objects/* or .changelog/*).
|
|
325
|
+
*/
|
|
326
|
+
private isVirtualPath;
|
|
327
|
+
writeHandler(ctx: RouteContext<{
|
|
328
|
+
path?: string;
|
|
329
|
+
}>, payload: AFSWriteEntryPayload): Promise<{
|
|
330
|
+
data: AFSEntry;
|
|
331
|
+
}>;
|
|
332
|
+
deleteHandler(ctx: RouteContext<{
|
|
333
|
+
path?: string;
|
|
334
|
+
}>): Promise<{
|
|
335
|
+
path: string;
|
|
336
|
+
deleted: boolean;
|
|
337
|
+
}>;
|
|
338
|
+
/** Conflict failure shaped exactly like the single-op AFSConflictError surface. */
|
|
339
|
+
private batchConflictFailure;
|
|
340
|
+
/** ONE preflight read for a batch — getMany when the index has it, per-path get otherwise. */
|
|
341
|
+
private batchPreread;
|
|
342
|
+
/** Run `fn` over `items` with bounded concurrency (Workers cap: 6 sockets). */
|
|
343
|
+
private boundedAll;
|
|
344
|
+
/**
|
|
345
|
+
* Native batch read (issue #808 follow-up) — the render fast path. Resolves the
|
|
346
|
+
* whole path set with ONE `treeIndex.getMany` (chunked `IN(…)`, which carries
|
|
347
|
+
* inline content when the index has it), so small cid-verified inline files are
|
|
348
|
+
* served with ZERO R2 gets; only the (few, large) non-inline entries fall back
|
|
349
|
+
* to bounded-concurrent `objectStore.get`. Mirrors the single-read handler's
|
|
350
|
+
* inline-verify → objects cascade per entry. File-oriented: getMany matches
|
|
351
|
+
* `kind='file'`, so directory / absent paths come back AFS_NOT_FOUND (callers
|
|
352
|
+
* reading directories use `list`/`read`).
|
|
353
|
+
*/
|
|
354
|
+
batchRead(entries: AFSBatchReadEntry[], _options?: AFSOperationOptions): Promise<AFSBatchReadResult>;
|
|
355
|
+
/**
|
|
356
|
+
* Native batch write — the CF-subrequest-budget merge (§4.3): eight-step
|
|
357
|
+
* order aligned point-for-point with the single write path (preread BEFORE
|
|
358
|
+
* share pre-io, so a stale ifMatch on a `.share` declaration yields 409,
|
|
359
|
+
* never a share error):
|
|
360
|
+
* 1 shape/decode/computeCID → 2 ONE preread (conflict/skip exit here —
|
|
361
|
+
* no share hook, no R2 upload) → 3 share pre-io (survivors) → 4 in-batch
|
|
362
|
+
* CID dedup → 5 unconditional R2 put (unique cids, bounded ≤6 —
|
|
363
|
+
* P0-measured wall-time) → 6 treeIndex.batchPutEntries (single db.batch)
|
|
364
|
+
* → 7 gcQueue removeMany/enqueue → 8 share post-io + per-entry results.
|
|
365
|
+
*/
|
|
366
|
+
batchWrite(entries: AFSBatchWriteEntry[], _options?: AFSOperationOptions): Promise<AFSBatchWriteResult>;
|
|
367
|
+
/** Write-echo entry — field-for-field the single-op writeHandler result. */
|
|
368
|
+
private buildBatchWriteData;
|
|
369
|
+
/** Build a failed AFSExecResult (shared across the three action handlers). */
|
|
370
|
+
private uploadErr;
|
|
371
|
+
/**
|
|
372
|
+
* Session ownership isolation (§9 / §10): a session belongs to THIS view only
|
|
373
|
+
* when its scope equals this provider's storage scope. A different-scope (or
|
|
374
|
+
* unknown) session is treated as not-found — never confirm another user's
|
|
375
|
+
* session exists, and never let one view commit into another.
|
|
376
|
+
*/
|
|
377
|
+
private ownsSession;
|
|
378
|
+
/**
|
|
379
|
+
* Validate an action-supplied `path`. Unlike `@Write` handlers, action args
|
|
380
|
+
* carry NO router-layer traversal protection — `args.entries[].path` is raw
|
|
381
|
+
* client input, so we MUST normalize + reject traversal / reserved virtual
|
|
382
|
+
* prefixes explicitly (design §10). Returns the tree path on success.
|
|
383
|
+
*/
|
|
384
|
+
private validateActionPath;
|
|
385
|
+
/**
|
|
386
|
+
* Action catalogue — the upload-plane + download-plane actions, always listed
|
|
387
|
+
* (protocol parity, T2.5). Each plane advertises its OWN capability flag:
|
|
388
|
+
* `grantCapability` for prepare-upload, the INDEPENDENT `downloadGrantCapability`
|
|
389
|
+
* for prepare-download (design §7.3 / Finding 4 — never reuse the upload flag,
|
|
390
|
+
* so the two planes can be advertised separately).
|
|
391
|
+
*/
|
|
392
|
+
listObjectPlaneActions(ctx: RouteContext): AFSListResult;
|
|
393
|
+
execPrepareUpload(_ctx: RouteContext, args: Record<string, unknown>): Promise<AFSExecResult>;
|
|
394
|
+
execPrepareDownload(_ctx: RouteContext, args: Record<string, unknown>): Promise<AFSExecResult>;
|
|
395
|
+
execCommitUpload(_ctx: RouteContext, args: Record<string, unknown>): Promise<AFSExecResult>;
|
|
396
|
+
execAbortUpload(_ctx: RouteContext, args: Record<string, unknown>): Promise<AFSExecResult>;
|
|
397
|
+
/**
|
|
398
|
+
* Resolve the immutable-merge-key set: `createdAt` is always preserved, plus
|
|
399
|
+
* any caller-supplied lifecycle fields (e.g. `status`).
|
|
400
|
+
*/
|
|
401
|
+
private resolveImmutableMergeKeys;
|
|
402
|
+
/** Extract the JSON record object from a write payload's `content`. */
|
|
403
|
+
private parseRecordBody;
|
|
404
|
+
/**
|
|
405
|
+
* Stamp the dedup identity into a write's meta so the writeHandler can project
|
|
406
|
+
* it onto the entry's `dedup_scope` / `dedup_key` columns (#1159). `dedupKey`
|
|
407
|
+
* stays in the metadata blob (observability / collection-query); on a merge
|
|
408
|
+
* we drop `createdAt` so the index keeps the original file ctime (R1,
|
|
409
|
+
* feed-sort §5.1).
|
|
410
|
+
*/
|
|
411
|
+
private stampDedupMeta;
|
|
412
|
+
/**
|
|
413
|
+
* Dedup-on-write core (#492 / #1159) — the `options.dedupBy` upsert behind the
|
|
414
|
+
* standard `write` / `batchWrite`. The record's `dedupBy` field (URL-valued)
|
|
415
|
+
* is normalized into a `dedupKey`; the record lands at a STABLE readable path
|
|
416
|
+
* (`{collection}/{uuid}.json`) and dedup resolves through the tree-index's
|
|
417
|
+
* `(scope, dedup_scope, dedup_key)` secondary UNIQUE index — NOT a
|
|
418
|
+
* cid-in-path filename (which silently orphaned records written under any
|
|
419
|
+
* other layout, #1159). On a hit the incoming record is MERGED
|
|
420
|
+
* (non-degrading) into the existing entry AT ITS REAL PATH. Concurrency-safe:
|
|
421
|
+
* a racing create collides on the UNIQUE index, and the loser re-queries the
|
|
422
|
+
* index and merges (bounded retry). Records missing the field are written
|
|
423
|
+
* normally under the collection (no dedup).
|
|
424
|
+
*/
|
|
425
|
+
private upsertByDedupKey;
|
|
426
|
+
/**
|
|
427
|
+
* One-time reindex/backfill seam (#1159 — run from a deferred one-shot
|
|
428
|
+
* script, NOT on the write hot path). Populates the dedup columns for
|
|
429
|
+
* EXISTING records under `collection` so pre-feature entries (old
|
|
430
|
+
* `{slug}.json` / `{uuid}/item.json` / `{cid}.json` layouts) become
|
|
431
|
+
* dedup-able — fixing the "an already-saved URL's first re-save duplicates"
|
|
432
|
+
* bug. Reads each record, extracts + normalizes `record[dedupBy]`, and writes
|
|
433
|
+
* the dedup columns INDEX-ONLY (no changelog / no cid change) via
|
|
434
|
+
* `TreeIndex.setDedupKey`. Records missing the field, and genuine
|
|
435
|
+
* pre-existing duplicates (which would violate the UNIQUE index), are
|
|
436
|
+
* skipped. Idempotent.
|
|
437
|
+
*/
|
|
438
|
+
reindexDedupKeys(collection: string, dedupBy: string): Promise<{
|
|
439
|
+
scanned: number;
|
|
440
|
+
indexed: number;
|
|
441
|
+
skipped: number;
|
|
442
|
+
}>;
|
|
443
|
+
/**
|
|
444
|
+
* Standard write, extended with the dedup-on-write upsert policy (#492 /
|
|
445
|
+
* #1159). When `options.dedupBy` (canonical) or the deprecated `dedupKey`
|
|
446
|
+
* alias is set the write becomes a secondary-index upsert (see
|
|
447
|
+
* {@link upsertByDedupKey}); otherwise it is the base provider's write.
|
|
448
|
+
*/
|
|
449
|
+
write(path: string, content: AFSWriteEntryPayload, options?: AFSWriteOptions): Promise<AFSWriteResult>;
|
|
450
|
+
/**
|
|
451
|
+
* The commit write — mirrors `batchWrite` steps 2/6/7/8 WITHOUT the R2 byte
|
|
452
|
+
* leg (existence is trusted, §8): preread → ifMatch/skip → batchPutEntries →
|
|
453
|
+
* GC bookkeeping → share hooks → per-entry results. `cid`/`size`/`mimeType`
|
|
454
|
+
* come from the SESSION record (the prepared contract, re-validated against
|
|
455
|
+
* the client's entries); `deviceId`/`mtime` are client provenance threaded to
|
|
456
|
+
* the changelog (echo防回环, §6.1).
|
|
457
|
+
*/
|
|
458
|
+
private commitSessionEntries;
|
|
459
|
+
/**
|
|
460
|
+
* Native batch delete — same merge without the R2 leg: ONE preread → GC
|
|
461
|
+
* enqueue (before delete, single-op ordering) → ONE atomic index batch →
|
|
462
|
+
* share delete hooks. FILE entries only (no directory fallback — sync
|
|
463
|
+
* never dir-deletes; a dir path fails per entry with 404).
|
|
464
|
+
*/
|
|
465
|
+
batchDelete(entries: AFSBatchDeleteEntry[], _options?: AFSOperationOptions): Promise<AFSBatchDeleteResult>;
|
|
466
|
+
statHandler(ctx: RouteContext<{
|
|
467
|
+
path?: string;
|
|
468
|
+
}>): Promise<AFSStatResult>;
|
|
469
|
+
searchHandler(ctx: RouteContext<{
|
|
470
|
+
path?: string;
|
|
471
|
+
}>, query: string, options?: AFSSearchOptions): Promise<{
|
|
472
|
+
data: AFSEntry[];
|
|
473
|
+
total: number;
|
|
474
|
+
}>;
|
|
475
|
+
explainHandler(ctx: RouteContext<{
|
|
476
|
+
path?: string;
|
|
477
|
+
}>): Promise<AFSExplainResult>;
|
|
478
|
+
/**
|
|
479
|
+
* Write content to the provider, bypassing D4 virtual path protection.
|
|
480
|
+
* Stores content to objectStore and treeIndex with the given deviceId.
|
|
481
|
+
*/
|
|
482
|
+
internalWrite(afsPath: string, opts: {
|
|
483
|
+
content: Uint8Array;
|
|
484
|
+
deviceId: string;
|
|
485
|
+
mtime?: number;
|
|
486
|
+
mimeType?: string;
|
|
487
|
+
metadata?: Record<string, unknown>;
|
|
488
|
+
}): Promise<{
|
|
489
|
+
cid: string;
|
|
490
|
+
oldCid?: string;
|
|
491
|
+
}>;
|
|
492
|
+
/**
|
|
493
|
+
* Delete a file from the provider, bypassing D4 virtual path protection.
|
|
494
|
+
*/
|
|
495
|
+
internalDelete(afsPath: string, opts: {
|
|
496
|
+
deviceId: string;
|
|
497
|
+
mtime?: number;
|
|
498
|
+
}): Promise<{
|
|
499
|
+
deleted: boolean;
|
|
500
|
+
}>;
|
|
501
|
+
capabilities(): CapabilitiesManifest;
|
|
502
|
+
}
|
|
503
|
+
//#endregion
|
|
504
|
+
export { type AFSMetadataContext, AFS_IFMATCH_ABSENT, type AppState, BLOCKLET_PUBLISH_MARKER, BatchOverBudgetError, BatchUnsupportedError, type BlockletPublishMarker, type BuildD1MigrationSqlOptions, type BuildManifestOptions, type BuildScopedAFS, CHANGELOG_DDL, CHANGELOG_INDEX_SQL, CHANGELOG_INSERT_SQL, CHANGELOG_ROW_KIND, CHANGELOG_SCOPE_CID_MIGRATION_SQL, CHANGELOG_TABLE_SQL, CHANGELOG_WIRE_EXTRA_FIELDS, CachingObjectStore, type ChangelogEntry, type ChangelogRowInput, type ChangelogWireExtra, CidByteCache, type CidByteCacheOptions, ConflictResolutionError, type ConflictResponse, type ConnectDIDSpaceOptions, CurrentObjectMissingError, type CurrentObjectSource, D1GCQueue, type D1MigrationSql, D1ResolveStore, D1ShareReconciler, D1ShareStore, D1TreeIndex, D1UploadSessionStore, D1VersionedScopeBackend, D1_DID_SPACE_SCHEMA_SQL, DEFAULT_GC_GRACE_MS, DEFAULT_INLINE_THRESHOLD, DEVICE_ID_FORMAT_RE, DEVICE_SYNC_STATE_INDEX_SQL, DEVICE_SYNC_STATE_TABLE_SQL, DIDSpaceBlockletDataBackend, type DIDSpaceBlockletDataBackendOptions, DIDSpaceClient, type DIDSpaceClientOptions, DIDSpaceProvider, DIDSpaceProviderOptions, DIDSpaceResolver, DIRTY_PATH_DDL, DIRTY_PATH_INDEX_SQL, DIRTY_PATH_TABLE_SQL, DIRTY_PATH_TRIGGER_SQL, type DirtyPathFollowerSource, type DirtyPathOp, type DirtyPathQueue, type DirtyPathRow, type DirtyPathStoredRow, type DomainResolveEntry, ENTRIES_CONTENT_TYPE_COLUMN_SQL, ENTRIES_CONTENT_TYPE_INDEX_DROP_SQL, ENTRIES_CONTENT_TYPE_INDEX_SQL, ENTRIES_DEDUP_INDEX_SQL, ENTRIES_DEDUP_KEY_COLUMN_SQL, ENTRIES_DEDUP_SCOPE_COLUMN_SQL, ENTRIES_INDEX_SQL, ENTRIES_INLINE_CONTENT_COLUMN_SQL, ENTRIES_METADATA_COLUMN_SQL, ENTRIES_TABLE_SQL, type EnsureScopeOptions, type EnsureScopeResult, type FileFingerprint, GC_QUEUE_INDEX_SQL, GC_QUEUE_TABLE_SQL, type GcQueue, type GcStats, HttpTransport, type HttpTransportConfig, type HttpTransportOptions, INGEST_DEVICE_ID, INLINE_CONTENT_HARD_CAP, type InlineCacheMode, type InlineContentOptions, LOCAL_CHANGELOG_DEFAULT_LIMIT, LOCAL_CHANGELOG_MAX_LIMIT, LibsqlVersionedScopeBackend, type ListDirtyPathOptions, type LoadedScopeContent, LocalChangelog, type LocalChangelogOptions, MANIFEST_FILE_KIND, MANIFEST_WIRE_EXTRA_FIELDS, MAX_DEVICE_ID_BYTES, MAX_ENTRIES_PER_SCOPE, type ManifestRowInput, type ManifestWireMeta, MemoryGcQueue, MemoryTreeIndex, MemoryVersionedScopeBackend, type NewUploadSession, type OrderedQueryParts, PREFIX_WATERMARK_TABLE_SQL, PRESIGN_MAX_EXPIRES_SEC, PULL_BATCH_LIMIT, PULL_FETCH_CONCURRENCY, PUSH_BATCH_LIMIT, PUSH_PROGRESS_FLUSH_INTERVAL, type ParsedTreeCursor, PrefixedTreeIndex, type PresignGetInput, type PresignPutInput, type PresignSigner, type PresignedGet, type PresignedPut, type PutOpts, RESOLVE_ENTRIES_INDEX_SQL, RESOLVE_ENTRIES_TABLE_SQL, type ReconcileReport, type ResolveEntry, type RpcBatchEntryResult, type RpcBatchResult, RpcUserSpaceAFS, type RpcUserSpaceAFSOptions, type RunGcOptions, SCOPE_META_FILE_COUNT_BACKFILL_SQL, SCOPE_META_FILE_COUNT_DELETE_ONE_SQL, SCOPE_META_FILE_COUNT_DELETE_RANGE_SQL, SCOPE_META_FILE_COUNT_TRIGGER_SQL, SCOPE_META_INDEX_SQL, SCOPE_META_TABLE_SQL, SCOPE_META_TOTAL_BYTES_BACKFILL_SQL, SCOPE_META_TOTAL_BYTES_COLUMN_SQL, SCOPE_META_TOTAL_BYTES_TRIGGER_SQL, SHARES_INDEX_SQL, SHARES_TABLE_SQL, SYNC_STATE_DDL, SYNC_STATE_INDEX_SQL, SYNC_STATE_KEYS, SYNC_STATE_TABLE_SQL, SYNC_WALL_CLOCK_BUDGET_MS, type ScopeMigrationOptions, type ScopeMigrationReport, type ServeShareOptions, type ShareEntry, type ShareLookup, ShareResolver, type ShareRow, type ShareStore, SqliteGcQueue, SqliteResolveStore, SqliteShareStore, SqliteUploadSessionStore, StaticReadonlyTransport, type StaticReadonlyTransportConfig, type StaticReadonlyTransportOptions, type SyncCloudAFS, type SyncDiff, type SyncDiffEntry, SyncEngine, type SyncEngineOptions, type SyncEngineProviderHandle, type SyncResult as SyncEngineResult, type SyncManifest, type SyncOptions, type SyncProgress, type SyncResult$1 as SyncResult, SyncStateStore, type SyncStateStoreOptions, type SyncStatus, type Transport, type TransportConfig, type TransportKind, type TreeEntry, type TreeIndex, type TreeIndexListEntriesResult, type TreeIndexListOptions, type TreeIndexListResult, type TreeKeysetCursor, UPLOAD_SESSIONS_INDEX_SQL, UPLOAD_SESSIONS_TABLE_SQL, UPLOAD_SESSION_ENTRIES_TABLE_SQL, UPLOAD_SESSION_TTL_MS, type Unsubscribe, type UploadSession, type UploadSessionEntry, type UploadSessionEntryInput, type UploadSessionEntryStatus, type UploadSessionStatus, type UploadSessionStore, VERSIONED_SCOPES_INDEX_SQL, VERSIONED_SCOPES_TABLE_SQL, type VersionedContentFile, VersionedContentIndex, type VersionedContentIndexOptions, VersionedContentStore, type VersionedContentStoreOptions, type VersionedPackageIdentity, type VersionedScopeBackend, type VersionedScopeMeta, WsTransport, type WsTransportConfig, type WsTransportOptions, ancestorDirs, applyDirtyUpsert, assertInlineThreshold, assertValidCid, attachMetadataContext, buildChangelogBinds, buildD1MigrationSql, buildKeysetCursor, buildManifest, buildOrderedQueryParts, cidToChecksumSha256, classifyMissingObject, classifyScopes, compareTreeSortValues, computeCID, computeDiff, connectDIDSpace, createWsTransport, decodeInlineText, decodeScopeHmacSecret, defaultAppState, deriveScope, detachMetadataContext, detectMimeType, fetchRemoteManifest, generateDesktopDeviceId, getMetadataContext, isPlainDidScope, isShareDeclarationPath, isTextMime, isValidDeviceId, keysetAfter, migrateD1Scopes, nameOf, normalizeDdl, normalizeId, normalizeItemUrl, objectKeyForCid, openDaemonShareStore, parentOf, parseChangelogEntry, parseManifestEntry, parseSyncStatus, parseTreeCursor, prefixRange, referencedAnywhereD1, referencedAnywhereLibsql, resolveVersionToken, rowToEntry, runGc, runWithConcurrency, serializeChangelogEntry, serializeManifestEntry, serializeSyncStatus, serveShare, syncDIDSpace, validateDeviceId, validateId, versionedScope, versionedScopeGroup };
|
|
505
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":"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"}
|