@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
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//#region src/versioned-scope.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Versioned scope keys — Layer 1 generic contract (versioned package-content
|
|
4
|
+
* materialization, design §1.6/§0.4).
|
|
5
|
+
*
|
|
6
|
+
* A versioned content index materializes immutable, per-version package
|
|
7
|
+
* content (one "kind" of content per consumer) into a shared store keyed by:
|
|
8
|
+
*
|
|
9
|
+
* <kind>:<packageId>:<versionToken>
|
|
10
|
+
*
|
|
11
|
+
* The ingest / stale-check / cleanup machinery is KIND-AGNOSTIC — a new
|
|
12
|
+
* consumer picks a kind (e.g. `schema`, `locale`, `aup`, `seo`) and supplies
|
|
13
|
+
* a source-path mapping; the machinery never interprets the kind.
|
|
14
|
+
*
|
|
15
|
+
* Key contract (anti-collision + hot-path exactness):
|
|
16
|
+
* - The hot path looks rows up by EXACT scope key — no LIKE, no prefix scan,
|
|
17
|
+
* no injection surface. Therefore key construction MUST be unambiguous:
|
|
18
|
+
* components are percent-escaped (`%`, `:`, `/`) before joining.
|
|
19
|
+
* - `versionToken` = the package manifest's `version` when present;
|
|
20
|
+
* otherwise the content digest (`seedDigest`). NEVER an empty string or
|
|
21
|
+
* a stringified `undefined` (that would collide all unversioned packages).
|
|
22
|
+
* - `seedDigest` is NOT part of the key — it lives in an independent
|
|
23
|
+
* metadata column on the scope row, consulted only by dev-mode stale
|
|
24
|
+
* detection. Prod never computes digests on the read path.
|
|
25
|
+
* - Package identity is `{ id: manifest.id, version?: manifest.version }`
|
|
26
|
+
* (NOT `manifest.did` — that is a reserved field the runtime does not
|
|
27
|
+
* consume).
|
|
28
|
+
*/
|
|
29
|
+
/** Package identity for versioned-content scoping. */
|
|
30
|
+
interface VersionedPackageIdentity {
|
|
31
|
+
/** `manifest.id` — e.g. `"nimbus-demo"`. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** `manifest.version` when the package declares one. */
|
|
34
|
+
version?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build the canonical `<kind>:<packageId>:<versionToken>` scope key.
|
|
38
|
+
* Components are escaped so a separator INSIDE a component can never collide
|
|
39
|
+
* with the separator BETWEEN components. Throws on empty/non-string input.
|
|
40
|
+
*/
|
|
41
|
+
declare function versionedScope(kind: string, packageId: string, versionToken: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Build the group key for a (kind, packageId) pair — the same escaped prefix
|
|
44
|
+
* a {@link versionedScope} key starts with, WITHOUT the version token. Used
|
|
45
|
+
* as the opaque cleanup unit: building a new version's scope supersedes every
|
|
46
|
+
* sibling scope sharing this group.
|
|
47
|
+
*/
|
|
48
|
+
declare function versionedScopeGroup(kind: string, packageId: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the version token for a package: `manifest.version` when present,
|
|
51
|
+
* else the content digest. Throws when neither exists — an empty or
|
|
52
|
+
* `"undefined"` token would collide every unversioned package into one scope.
|
|
53
|
+
*/
|
|
54
|
+
declare function resolveVersionToken(identity: VersionedPackageIdentity, seedDigest: string | undefined): string;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { VersionedPackageIdentity, resolveVersionToken, versionedScope, versionedScopeGroup };
|
|
57
|
+
//# sourceMappingURL=versioned-scope.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-scope.d.cts","names":[],"sources":["../src/versioned-scope.ts"],"mappings":";;AA6BA;;;;;AAoBA;;;;;;;;;AAUA;;;;;AASA;;;;;;;;UAvCiB,wBAAA;;EAEf,EAAA;;EAEA,OAAA;AAAA;;;;;;iBAgBc,cAAA,CAAe,IAAA,UAAc,SAAA,UAAmB,YAAA;;;;;;;iBAUhD,mBAAA,CAAoB,IAAA,UAAc,SAAA;;;;;;iBASlC,mBAAA,CACd,QAAA,EAAU,wBAAA,EACV,UAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//#region src/versioned-scope.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Versioned scope keys — Layer 1 generic contract (versioned package-content
|
|
4
|
+
* materialization, design §1.6/§0.4).
|
|
5
|
+
*
|
|
6
|
+
* A versioned content index materializes immutable, per-version package
|
|
7
|
+
* content (one "kind" of content per consumer) into a shared store keyed by:
|
|
8
|
+
*
|
|
9
|
+
* <kind>:<packageId>:<versionToken>
|
|
10
|
+
*
|
|
11
|
+
* The ingest / stale-check / cleanup machinery is KIND-AGNOSTIC — a new
|
|
12
|
+
* consumer picks a kind (e.g. `schema`, `locale`, `aup`, `seo`) and supplies
|
|
13
|
+
* a source-path mapping; the machinery never interprets the kind.
|
|
14
|
+
*
|
|
15
|
+
* Key contract (anti-collision + hot-path exactness):
|
|
16
|
+
* - The hot path looks rows up by EXACT scope key — no LIKE, no prefix scan,
|
|
17
|
+
* no injection surface. Therefore key construction MUST be unambiguous:
|
|
18
|
+
* components are percent-escaped (`%`, `:`, `/`) before joining.
|
|
19
|
+
* - `versionToken` = the package manifest's `version` when present;
|
|
20
|
+
* otherwise the content digest (`seedDigest`). NEVER an empty string or
|
|
21
|
+
* a stringified `undefined` (that would collide all unversioned packages).
|
|
22
|
+
* - `seedDigest` is NOT part of the key — it lives in an independent
|
|
23
|
+
* metadata column on the scope row, consulted only by dev-mode stale
|
|
24
|
+
* detection. Prod never computes digests on the read path.
|
|
25
|
+
* - Package identity is `{ id: manifest.id, version?: manifest.version }`
|
|
26
|
+
* (NOT `manifest.did` — that is a reserved field the runtime does not
|
|
27
|
+
* consume).
|
|
28
|
+
*/
|
|
29
|
+
/** Package identity for versioned-content scoping. */
|
|
30
|
+
interface VersionedPackageIdentity {
|
|
31
|
+
/** `manifest.id` — e.g. `"nimbus-demo"`. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** `manifest.version` when the package declares one. */
|
|
34
|
+
version?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build the canonical `<kind>:<packageId>:<versionToken>` scope key.
|
|
38
|
+
* Components are escaped so a separator INSIDE a component can never collide
|
|
39
|
+
* with the separator BETWEEN components. Throws on empty/non-string input.
|
|
40
|
+
*/
|
|
41
|
+
declare function versionedScope(kind: string, packageId: string, versionToken: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Build the group key for a (kind, packageId) pair — the same escaped prefix
|
|
44
|
+
* a {@link versionedScope} key starts with, WITHOUT the version token. Used
|
|
45
|
+
* as the opaque cleanup unit: building a new version's scope supersedes every
|
|
46
|
+
* sibling scope sharing this group.
|
|
47
|
+
*/
|
|
48
|
+
declare function versionedScopeGroup(kind: string, packageId: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the version token for a package: `manifest.version` when present,
|
|
51
|
+
* else the content digest. Throws when neither exists — an empty or
|
|
52
|
+
* `"undefined"` token would collide every unversioned package into one scope.
|
|
53
|
+
*/
|
|
54
|
+
declare function resolveVersionToken(identity: VersionedPackageIdentity, seedDigest: string | undefined): string;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { VersionedPackageIdentity, resolveVersionToken, versionedScope, versionedScopeGroup };
|
|
57
|
+
//# sourceMappingURL=versioned-scope.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-scope.d.mts","names":[],"sources":["../src/versioned-scope.ts"],"mappings":";;AA6BA;;;;;AAoBA;;;;;;;;;AAUA;;;;;AASA;;;;;;;;UAvCiB,wBAAA;;EAEf,EAAA;;EAEA,OAAA;AAAA;;;;;;iBAgBc,cAAA,CAAe,IAAA,UAAc,SAAA,UAAmB,YAAA;;;;;;;iBAUhD,mBAAA,CAAoB,IAAA,UAAc,SAAA;;;;;;iBASlC,mBAAA,CACd,QAAA,EAAU,wBAAA,EACV,UAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
//#region src/versioned-scope.ts
|
|
2
|
+
/** Separator-escape: `%` → `%25`, `:` → `%3A`, `/` → `%2F`. */
|
|
3
|
+
function escapeComponent(raw, name) {
|
|
4
|
+
if (typeof raw !== "string" || raw.length === 0) throw new Error(`versionedScope: ${name} must be a non-empty string`);
|
|
5
|
+
return raw.replaceAll("%", "%25").replaceAll(":", "%3A").replaceAll("/", "%2F");
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Build the canonical `<kind>:<packageId>:<versionToken>` scope key.
|
|
9
|
+
* Components are escaped so a separator INSIDE a component can never collide
|
|
10
|
+
* with the separator BETWEEN components. Throws on empty/non-string input.
|
|
11
|
+
*/
|
|
12
|
+
function versionedScope(kind, packageId, versionToken) {
|
|
13
|
+
return `${escapeComponent(kind, "kind")}:${escapeComponent(packageId, "packageId")}:${escapeComponent(versionToken, "versionToken")}`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Build the group key for a (kind, packageId) pair — the same escaped prefix
|
|
17
|
+
* a {@link versionedScope} key starts with, WITHOUT the version token. Used
|
|
18
|
+
* as the opaque cleanup unit: building a new version's scope supersedes every
|
|
19
|
+
* sibling scope sharing this group.
|
|
20
|
+
*/
|
|
21
|
+
function versionedScopeGroup(kind, packageId) {
|
|
22
|
+
return `${escapeComponent(kind, "kind")}:${escapeComponent(packageId, "packageId")}`;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the version token for a package: `manifest.version` when present,
|
|
26
|
+
* else the content digest. Throws when neither exists — an empty or
|
|
27
|
+
* `"undefined"` token would collide every unversioned package into one scope.
|
|
28
|
+
*/
|
|
29
|
+
function resolveVersionToken(identity, seedDigest) {
|
|
30
|
+
if (identity.version) return identity.version;
|
|
31
|
+
if (seedDigest) return seedDigest;
|
|
32
|
+
throw new Error(`versionedScope: package "${identity.id}" has neither manifest.version nor a content digest — refusing to build an ambiguous scope key`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { resolveVersionToken, versionedScope, versionedScopeGroup };
|
|
37
|
+
//# sourceMappingURL=versioned-scope.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versioned-scope.mjs","names":[],"sources":["../src/versioned-scope.ts"],"sourcesContent":["/**\n * Versioned scope keys — Layer 1 generic contract (versioned package-content\n * materialization, design §1.6/§0.4).\n *\n * A versioned content index materializes immutable, per-version package\n * content (one \"kind\" of content per consumer) into a shared store keyed by:\n *\n * <kind>:<packageId>:<versionToken>\n *\n * The ingest / stale-check / cleanup machinery is KIND-AGNOSTIC — a new\n * consumer picks a kind (e.g. `schema`, `locale`, `aup`, `seo`) and supplies\n * a source-path mapping; the machinery never interprets the kind.\n *\n * Key contract (anti-collision + hot-path exactness):\n * - The hot path looks rows up by EXACT scope key — no LIKE, no prefix scan,\n * no injection surface. Therefore key construction MUST be unambiguous:\n * components are percent-escaped (`%`, `:`, `/`) before joining.\n * - `versionToken` = the package manifest's `version` when present;\n * otherwise the content digest (`seedDigest`). NEVER an empty string or\n * a stringified `undefined` (that would collide all unversioned packages).\n * - `seedDigest` is NOT part of the key — it lives in an independent\n * metadata column on the scope row, consulted only by dev-mode stale\n * detection. Prod never computes digests on the read path.\n * - Package identity is `{ id: manifest.id, version?: manifest.version }`\n * (NOT `manifest.did` — that is a reserved field the runtime does not\n * consume).\n */\n\n/** Package identity for versioned-content scoping. */\nexport interface VersionedPackageIdentity {\n /** `manifest.id` — e.g. `\"nimbus-demo\"`. */\n id: string;\n /** `manifest.version` when the package declares one. */\n version?: string;\n}\n\n/** Separator-escape: `%` → `%25`, `:` → `%3A`, `/` → `%2F`. */\nfunction escapeComponent(raw: string, name: string): string {\n if (typeof raw !== \"string\" || raw.length === 0) {\n throw new Error(`versionedScope: ${name} must be a non-empty string`);\n }\n return raw.replaceAll(\"%\", \"%25\").replaceAll(\":\", \"%3A\").replaceAll(\"/\", \"%2F\");\n}\n\n/**\n * Build the canonical `<kind>:<packageId>:<versionToken>` scope key.\n * Components are escaped so a separator INSIDE a component can never collide\n * with the separator BETWEEN components. Throws on empty/non-string input.\n */\nexport function versionedScope(kind: string, packageId: string, versionToken: string): string {\n return `${escapeComponent(kind, \"kind\")}:${escapeComponent(packageId, \"packageId\")}:${escapeComponent(versionToken, \"versionToken\")}`;\n}\n\n/**\n * Build the group key for a (kind, packageId) pair — the same escaped prefix\n * a {@link versionedScope} key starts with, WITHOUT the version token. Used\n * as the opaque cleanup unit: building a new version's scope supersedes every\n * sibling scope sharing this group.\n */\nexport function versionedScopeGroup(kind: string, packageId: string): string {\n return `${escapeComponent(kind, \"kind\")}:${escapeComponent(packageId, \"packageId\")}`;\n}\n\n/**\n * Resolve the version token for a package: `manifest.version` when present,\n * else the content digest. Throws when neither exists — an empty or\n * `\"undefined\"` token would collide every unversioned package into one scope.\n */\nexport function resolveVersionToken(\n identity: VersionedPackageIdentity,\n seedDigest: string | undefined,\n): string {\n if (identity.version) return identity.version;\n if (seedDigest) return seedDigest;\n throw new Error(\n `versionedScope: package \"${identity.id}\" has neither manifest.version nor a content digest — refusing to build an ambiguous scope key`,\n );\n}\n"],"mappings":";;AAqCA,SAAS,gBAAgB,KAAa,MAAsB;AAC1D,KAAI,OAAO,QAAQ,YAAY,IAAI,WAAW,EAC5C,OAAM,IAAI,MAAM,mBAAmB,KAAK,6BAA6B;AAEvE,QAAO,IAAI,WAAW,KAAK,MAAM,CAAC,WAAW,KAAK,MAAM,CAAC,WAAW,KAAK,MAAM;;;;;;;AAQjF,SAAgB,eAAe,MAAc,WAAmB,cAA8B;AAC5F,QAAO,GAAG,gBAAgB,MAAM,OAAO,CAAC,GAAG,gBAAgB,WAAW,YAAY,CAAC,GAAG,gBAAgB,cAAc,eAAe;;;;;;;;AASrI,SAAgB,oBAAoB,MAAc,WAA2B;AAC3E,QAAO,GAAG,gBAAgB,MAAM,OAAO,CAAC,GAAG,gBAAgB,WAAW,YAAY;;;;;;;AAQpF,SAAgB,oBACd,UACA,YACQ;AACR,KAAI,SAAS,QAAS,QAAO,SAAS;AACtC,KAAI,WAAY,QAAO;AACvB,OAAM,IAAI,MACR,4BAA4B,SAAS,GAAG,gGACzC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
-- Migration: tree_entries table + indexes
|
|
2
|
+
-- Source: D1TreeIndex.ensureTable() in d1-tree-index.ts
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS tree_entries (
|
|
5
|
+
scope TEXT NOT NULL,
|
|
6
|
+
path TEXT NOT NULL,
|
|
7
|
+
cid TEXT NOT NULL,
|
|
8
|
+
size INTEGER NOT NULL,
|
|
9
|
+
mtime INTEGER NOT NULL,
|
|
10
|
+
ctime INTEGER NOT NULL,
|
|
11
|
+
mime_type TEXT,
|
|
12
|
+
PRIMARY KEY (scope, path)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
CREATE INDEX IF NOT EXISTS idx_tree_mtime ON tree_entries(scope, mtime);
|
|
16
|
+
CREATE INDEX IF NOT EXISTS idx_tree_size ON tree_entries(scope, size);
|
|
17
|
+
CREATE INDEX IF NOT EXISTS idx_tree_mime ON tree_entries(scope, mime_type);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
-- Migration: entries table (v2) — replaces tree_entries
|
|
2
|
+
-- WITHOUT ROWID for direct PK lookup (no rowid indirection)
|
|
3
|
+
-- Adds parent/name/kind columns for efficient directory operations
|
|
4
|
+
|
|
5
|
+
CREATE TABLE IF NOT EXISTS entries (
|
|
6
|
+
scope TEXT NOT NULL,
|
|
7
|
+
path TEXT NOT NULL,
|
|
8
|
+
parent TEXT NOT NULL,
|
|
9
|
+
name TEXT NOT NULL,
|
|
10
|
+
kind TEXT NOT NULL DEFAULT 'file',
|
|
11
|
+
cid TEXT,
|
|
12
|
+
size INTEGER NOT NULL DEFAULT 0,
|
|
13
|
+
mime_type TEXT,
|
|
14
|
+
ctime INTEGER NOT NULL,
|
|
15
|
+
mtime INTEGER NOT NULL,
|
|
16
|
+
PRIMARY KEY (scope, path),
|
|
17
|
+
|
|
18
|
+
CHECK (LENGTH(path) <= 4096),
|
|
19
|
+
CHECK (LENGTH(name) <= 255),
|
|
20
|
+
CHECK (kind IN ('file', 'dir')),
|
|
21
|
+
CHECK (LENGTH(scope) <= 128)
|
|
22
|
+
) WITHOUT ROWID;
|
|
23
|
+
|
|
24
|
+
-- Directory listing: direct children by parent (most critical index)
|
|
25
|
+
CREATE INDEX IF NOT EXISTS idx_entries_children
|
|
26
|
+
ON entries(scope, parent, name);
|
|
27
|
+
|
|
28
|
+
-- CID reference queries (dedup, GC)
|
|
29
|
+
CREATE INDEX IF NOT EXISTS idx_entries_cid
|
|
30
|
+
ON entries(cid) WHERE cid IS NOT NULL;
|
|
31
|
+
|
|
32
|
+
-- Time-sorted queries (recent modifications, incremental sync)
|
|
33
|
+
CREATE INDEX IF NOT EXISTS idx_entries_mtime
|
|
34
|
+
ON entries(scope, mtime DESC);
|
|
35
|
+
|
|
36
|
+
-- Type-based statistics
|
|
37
|
+
CREATE INDEX IF NOT EXISTS idx_entries_kind
|
|
38
|
+
ON entries(scope, kind);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Migration: resolve_entries schema enhancement
|
|
2
|
+
-- Adds indexed columns to support efficient queries by owner and kind.
|
|
3
|
+
-- updated_at is set by the application layer (Date.now()) on every put().
|
|
4
|
+
|
|
5
|
+
ALTER TABLE resolve_entries ADD COLUMN owner TEXT;
|
|
6
|
+
ALTER TABLE resolve_entries ADD COLUMN kind TEXT;
|
|
7
|
+
ALTER TABLE resolve_entries ADD COLUMN updated_at INTEGER;
|
|
8
|
+
|
|
9
|
+
-- Index on owner for fast per-owner lookups
|
|
10
|
+
CREATE INDEX IF NOT EXISTS idx_resolve_owner ON resolve_entries(owner);
|
|
11
|
+
-- Index on kind for fast filtering by entry type
|
|
12
|
+
CREATE INDEX IF NOT EXISTS idx_resolve_kind ON resolve_entries(kind);
|
|
13
|
+
-- Index on updated_at for time-based queries and cache invalidation
|
|
14
|
+
CREATE INDEX IF NOT EXISTS idx_resolve_updated ON resolve_entries(updated_at);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
-- Phase 7: add created_at to resolve_entries (immutable, set once at insert time).
|
|
2
|
+
-- For existing rows, seed created_at from updated_at (best available approximation).
|
|
3
|
+
|
|
4
|
+
ALTER TABLE resolve_entries ADD COLUMN created_at INTEGER;
|
|
5
|
+
|
|
6
|
+
UPDATE resolve_entries
|
|
7
|
+
SET created_at = COALESCE(updated_at, CAST(strftime('%s', 'now') AS INTEGER) * 1000)
|
|
8
|
+
WHERE created_at IS NULL;
|
|
9
|
+
|
|
10
|
+
CREATE INDEX IF NOT EXISTS idx_resolve_created ON resolve_entries(created_at);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
-- Phase 2 Task 2.1: changelog table — event log for DID Space sync.
|
|
2
|
+
--
|
|
3
|
+
-- Each row records one content change (put or delete) to a DID Space scope.
|
|
4
|
+
-- Consumers:
|
|
5
|
+
-- - Cloudflare Worker (D1) — source of truth for cross-device sync
|
|
6
|
+
-- - desktop SQLite (libsql, metadata-db.ts) — local mirror for offline changelog
|
|
7
|
+
-- - mobile Swift SQLiteTreeIndex — local mirror
|
|
8
|
+
-- - mobile Kotlin SQLiteTreeIndex — local mirror
|
|
9
|
+
--
|
|
10
|
+
-- ALL FOUR RUNTIMES MUST CREATE BYTE-IDENTICAL DDL (after whitespace+case
|
|
11
|
+
-- normalisation). The CI parity check in
|
|
12
|
+
-- `scripts/check-changelog-ddl-parity.ts` enforces this. See
|
|
13
|
+
-- `src/changelog-schema.ts` for the shared TypeScript constants used by
|
|
14
|
+
-- d1-tree-index.ts and metadata-db.ts.
|
|
15
|
+
--
|
|
16
|
+
-- Schema-only migration. Task 2.1 does NOT add any put/delete hooks yet —
|
|
17
|
+
-- the table stays empty until Task 2.4 wires up the producer side.
|
|
18
|
+
|
|
19
|
+
CREATE TABLE IF NOT EXISTS ds_changelog (
|
|
20
|
+
seq INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
21
|
+
scope TEXT NOT NULL,
|
|
22
|
+
path TEXT NOT NULL,
|
|
23
|
+
op TEXT NOT NULL,
|
|
24
|
+
cid TEXT,
|
|
25
|
+
old_cid TEXT,
|
|
26
|
+
size INTEGER,
|
|
27
|
+
mtime INTEGER NOT NULL,
|
|
28
|
+
device_id TEXT NOT NULL,
|
|
29
|
+
CHECK (op IN ('put', 'delete'))
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
CREATE INDEX IF NOT EXISTS idx_changelog_scope_seq ON ds_changelog(scope, seq);
|
|
33
|
+
CREATE INDEX IF NOT EXISTS idx_changelog_scope_cid ON ds_changelog(scope, cid) WHERE cid IS NOT NULL;
|
|
34
|
+
CREATE INDEX IF NOT EXISTS idx_changelog_scope_old_cid ON ds_changelog(scope, old_cid) WHERE old_cid IS NOT NULL;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
-- Phase 2 Task 2.2: device_sync_state table — per-device sync progress (D1 only).
|
|
2
|
+
--
|
|
3
|
+
-- Each row records the highest changelog.seq a given device has acknowledged
|
|
4
|
+
-- within a given DID Space scope, plus heartbeat timestamps. Used by:
|
|
5
|
+
-- - Task 3.1 push subscriber — advance last_seq on successful delivery
|
|
6
|
+
-- - Task 3.7 device registration — track last_seen_at for GC strategy 1
|
|
7
|
+
-- - G16 GC Strategy 1 — retention window based on last_seen_at
|
|
8
|
+
--
|
|
9
|
+
-- UNLIKE changelog, this table lives ONLY in D1 (Cloudflare Worker).
|
|
10
|
+
-- Mobile runtimes (Swift / Kotlin / desktop) do NOT mirror it — they post
|
|
11
|
+
-- heartbeats via HTTP and read their own last_seq from their local
|
|
12
|
+
-- MetadataDB's changelog mirror.
|
|
13
|
+
--
|
|
14
|
+
-- The composite PRIMARY KEY (scope, device_id) makes this a regular rowid
|
|
15
|
+
-- table (no WITHOUT ROWID), so single-row updates stay cheap. An auxiliary
|
|
16
|
+
-- index on (scope, last_seen_at) supports GC scans that want to find the
|
|
17
|
+
-- oldest-seen device per scope.
|
|
18
|
+
|
|
19
|
+
CREATE TABLE IF NOT EXISTS device_sync_state (
|
|
20
|
+
scope TEXT NOT NULL,
|
|
21
|
+
device_id TEXT NOT NULL,
|
|
22
|
+
last_seq INTEGER NOT NULL DEFAULT 0,
|
|
23
|
+
last_sync_at INTEGER NOT NULL,
|
|
24
|
+
last_seen_at INTEGER NOT NULL,
|
|
25
|
+
PRIMARY KEY (scope, device_id)
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
CREATE INDEX IF NOT EXISTS idx_device_sync_state_scope_last_seen
|
|
29
|
+
ON device_sync_state(scope, last_seen_at);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
-- Phase 2 Task 2.3: scope_meta table — per-scope compaction metadata (D1 only).
|
|
2
|
+
--
|
|
3
|
+
-- One row per DID Space scope. Tracks compaction watermark and running
|
|
4
|
+
-- counters used by the sync endpoint + background GC:
|
|
5
|
+
-- - G5.a sync handler — reads compacted_below_seq; incoming pulls
|
|
6
|
+
-- with `since < compacted_below_seq` get a
|
|
7
|
+
-- 409 requireFullResync response
|
|
8
|
+
-- - G16 emergency compaction — advances compacted_below_seq + records
|
|
9
|
+
-- last_compaction_at when a scope exceeds
|
|
10
|
+
-- the changelog-row ceiling
|
|
11
|
+
-- - Observability/telemetry — total_changelog_writes counts rows ever
|
|
12
|
+
-- written (not current size — deletes don't
|
|
13
|
+
-- decrement it)
|
|
14
|
+
--
|
|
15
|
+
-- UNLIKE changelog, this table lives ONLY in D1 (Cloudflare Worker).
|
|
16
|
+
-- Mobile runtimes do not mirror it; they learn about compaction by
|
|
17
|
+
-- receiving a 409 from the sync endpoint and falling back to a full
|
|
18
|
+
-- manifest fetch.
|
|
19
|
+
--
|
|
20
|
+
-- Scopes are lazy-initialised: the row is NOT created on first changelog
|
|
21
|
+
-- write. It's only materialised when compaction first runs for the scope.
|
|
22
|
+
-- Until then, `getCompactedBelowSeq` returns 0 — the semantically correct
|
|
23
|
+
-- "nothing compacted yet" sentinel.
|
|
24
|
+
--
|
|
25
|
+
-- PRIMARY KEY on `scope` makes this a regular rowid table; lookups are
|
|
26
|
+
-- always by PK so no secondary indices are needed.
|
|
27
|
+
|
|
28
|
+
CREATE TABLE IF NOT EXISTS scope_meta (
|
|
29
|
+
scope TEXT PRIMARY KEY,
|
|
30
|
+
compacted_below_seq INTEGER NOT NULL DEFAULT 0,
|
|
31
|
+
last_compaction_at INTEGER NOT NULL DEFAULT 0,
|
|
32
|
+
total_changelog_writes INTEGER NOT NULL DEFAULT 0
|
|
33
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- DID Space Share index: materialised view of .share declaration files.
|
|
2
|
+
-- Source of truth is R2 .share files; this table can be fully rebuilt via D1ShareReconciler.
|
|
3
|
+
-- Owner-scoped identity key: UNIQUE(owner_did, decl_path). The same relative
|
|
4
|
+
-- decl_path is legitimately reusable across owners that share one D1 / one
|
|
5
|
+
-- daemon-global _shares.db; slug stays globally UNIQUE (public URL identifier).
|
|
6
|
+
-- This file MUST stay byte-equal (after DDL normalisation) to SHARES_TABLE_SQL +
|
|
7
|
+
-- SHARES_INDEX_SQL in src/d1-schema.ts — asserted by share-migration.test.ts.
|
|
8
|
+
CREATE TABLE IF NOT EXISTS ds_shares (
|
|
9
|
+
id TEXT PRIMARY KEY, -- nanoid(21) generated at reconcile time
|
|
10
|
+
owner_did TEXT NOT NULL, -- from write ctx (this.did in DIDSpaceProvider)
|
|
11
|
+
source_path TEXT NOT NULL, -- derived from .share file location
|
|
12
|
+
decl_path TEXT NOT NULL, -- .share file path (owner-scoped upsert key)
|
|
13
|
+
slug TEXT NOT NULL UNIQUE, -- public URL identifier (globally unique)
|
|
14
|
+
kind TEXT NOT NULL DEFAULT 'raw', -- 'raw' | 'web'
|
|
15
|
+
status TEXT NOT NULL DEFAULT 'active', -- 'active' | 'revoked'
|
|
16
|
+
decl_cid TEXT, -- CID of .share file for reconcile diff
|
|
17
|
+
config_json TEXT NOT NULL DEFAULT '{}', -- full parsed ShareDeclaration as JSON
|
|
18
|
+
created_at INTEGER NOT NULL,
|
|
19
|
+
updated_at INTEGER NOT NULL,
|
|
20
|
+
UNIQUE(owner_did, decl_path) -- owner-scoped identity key
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
CREATE INDEX IF NOT EXISTS idx_shares_owner_did ON ds_shares(owner_did);
|
|
24
|
+
CREATE INDEX IF NOT EXISTS idx_shares_owner_source ON ds_shares(owner_did, source_path);
|
|
25
|
+
CREATE INDEX IF NOT EXISTS idx_shares_slug ON ds_shares(slug);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
-- 0012: scope_meta.file_count — O(1) capacity guard (replaces the O(N²) scan).
|
|
2
|
+
--
|
|
3
|
+
-- D1TreeIndex.put() used to enforce the per-scope file cap with
|
|
4
|
+
-- `SELECT COUNT(*) FROM entries WHERE scope = ?` on EVERY new-file write. That
|
|
5
|
+
-- scans the whole scope each time, so a bulk sync of N files reads ~N²/2 D1
|
|
6
|
+
-- rows and blew past the free-tier 5M rows_read/day ceiling (503 "exceeded
|
|
7
|
+
-- limit"). We replace the scan with a single `scope_meta.file_count` read.
|
|
8
|
+
--
|
|
9
|
+
-- INCREMENT is a trigger (covers put + putBatch for free). DECREMENT is NOT a
|
|
10
|
+
-- trigger: Cloudflare D1 counts a statement's trigger side-effects in
|
|
11
|
+
-- `meta.changes`, and `deleteByPrefix` returns that value, so an AFTER-DELETE
|
|
12
|
+
-- trigger would inflate the documented count. `delete`/`deleteByPrefix`
|
|
13
|
+
-- instead decrement file_count with their own batch statement (see
|
|
14
|
+
-- d1-tree-index.ts). This file therefore creates only the INSERT trigger.
|
|
15
|
+
--
|
|
16
|
+
-- Provider lineage: 0010 already created scope_meta (4 columns), so this ADDS
|
|
17
|
+
-- the column. The Cloudflare runtime never ran 0010 (its 0100 schema omitted
|
|
18
|
+
-- scope_meta entirely) — its generated 0104_scope_meta_file_count.sql CREATEs
|
|
19
|
+
-- the table with this column instead. Both end at the same shape; the SQL is
|
|
20
|
+
-- sourced from the same @aigne/afs-did-space constants.
|
|
21
|
+
--
|
|
22
|
+
-- D1-only (mobile runtimes don't mirror scope_meta). NOT parity-checked.
|
|
23
|
+
|
|
24
|
+
ALTER TABLE scope_meta ADD COLUMN file_count INTEGER NOT NULL DEFAULT 0;
|
|
25
|
+
|
|
26
|
+
-- +1 on every new file row (upsert lazily creates the scope_meta row). Dir
|
|
27
|
+
-- rows and INSERT-OR-IGNORE no-ops never fire; an overwrite is an UPDATE on
|
|
28
|
+
-- entries, not an INSERT, so it correctly leaves the count alone.
|
|
29
|
+
CREATE TRIGGER IF NOT EXISTS trg_entries_file_count_insert
|
|
30
|
+
AFTER INSERT ON entries WHEN NEW.kind = 'file'
|
|
31
|
+
BEGIN
|
|
32
|
+
INSERT INTO scope_meta (scope, file_count) VALUES (NEW.scope, 1)
|
|
33
|
+
ON CONFLICT(scope) DO UPDATE SET file_count = file_count + 1;
|
|
34
|
+
END;
|
|
35
|
+
|
|
36
|
+
-- One-time backfill for scopes that already have files. Absolute (not +=) so
|
|
37
|
+
-- it is self-correcting against any write that fired the trigger between
|
|
38
|
+
-- trigger creation and this statement.
|
|
39
|
+
INSERT INTO scope_meta (scope, file_count)
|
|
40
|
+
SELECT scope, COUNT(*) FROM entries WHERE kind = 'file' GROUP BY scope
|
|
41
|
+
ON CONFLICT(scope) DO UPDATE SET file_count = excluded.file_count;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
-- 0013: scope_meta.total_bytes — O(1) per-scope BYTE quota running total
|
|
2
|
+
-- (upload-limits Phase 5, byte-quota D3).
|
|
3
|
+
--
|
|
4
|
+
-- Mirrors 0012's file_count so the byte quota (maxBytesPerScope, default OFF)
|
|
5
|
+
-- reads a single `scope_meta.total_bytes` row instead of a
|
|
6
|
+
-- `SELECT SUM(size) FROM entries WHERE scope = ?` full-scope scan on every
|
|
7
|
+
-- write — the same O(N) rows_read anti-pattern that blew the D1 free tier (the
|
|
8
|
+
-- 503 0012 fixed for file_count).
|
|
9
|
+
--
|
|
10
|
+
-- INCREMENT/UPDATE are triggers (cover put + putBatch + overwrite for free);
|
|
11
|
+
-- DECREMENT is NOT a trigger: D1 counts a statement's trigger side-effects in
|
|
12
|
+
-- `meta.changes`, and `deleteByPrefix` returns that value, so an AFTER-DELETE
|
|
13
|
+
-- trigger would inflate the documented count. `delete`/`deleteByPrefix` instead
|
|
14
|
+
-- decrement total_bytes with their own batch statement (see d1-tree-index.ts) —
|
|
15
|
+
-- exactly like file_count.
|
|
16
|
+
--
|
|
17
|
+
-- Provider lineage: 0010 created scope_meta, 0012 added file_count; this ADDS
|
|
18
|
+
-- total_bytes. The Cloudflare runtime CREATEs scope_meta with this column via
|
|
19
|
+
-- its generated schema instead; both end at the same shape, sourced from the
|
|
20
|
+
-- same @aigne/afs-did-space constants. The runtime also self-heals an older
|
|
21
|
+
-- scope_meta via a probe-then-ALTER in D1TreeIndex.ensureTable.
|
|
22
|
+
--
|
|
23
|
+
-- D1-only (mobile runtimes don't mirror scope_meta). NOT parity-checked.
|
|
24
|
+
|
|
25
|
+
ALTER TABLE scope_meta ADD COLUMN total_bytes INTEGER NOT NULL DEFAULT 0;
|
|
26
|
+
|
|
27
|
+
-- += NEW.size on every new file row (upsert lazily creates the scope_meta row).
|
|
28
|
+
CREATE TRIGGER IF NOT EXISTS trg_entries_total_bytes_insert
|
|
29
|
+
AFTER INSERT ON entries WHEN NEW.kind = 'file'
|
|
30
|
+
BEGIN
|
|
31
|
+
INSERT INTO scope_meta (scope, total_bytes) VALUES (NEW.scope, NEW.size)
|
|
32
|
+
ON CONFLICT(scope) DO UPDATE SET total_bytes = total_bytes + NEW.size;
|
|
33
|
+
END;
|
|
34
|
+
|
|
35
|
+
-- Overwrite (same path, new content/size) → += NEW.size - OLD.size. Floored at 0.
|
|
36
|
+
CREATE TRIGGER IF NOT EXISTS trg_entries_total_bytes_update
|
|
37
|
+
AFTER UPDATE ON entries WHEN NEW.kind = 'file' AND OLD.kind = 'file'
|
|
38
|
+
BEGIN
|
|
39
|
+
UPDATE scope_meta SET total_bytes = MAX(0, total_bytes + NEW.size - OLD.size)
|
|
40
|
+
WHERE scope = NEW.scope;
|
|
41
|
+
END;
|
|
42
|
+
|
|
43
|
+
-- One-time backfill for scopes that already have files. Absolute (not +=) so it
|
|
44
|
+
-- self-corrects against any write that fired the trigger mid-migration.
|
|
45
|
+
INSERT INTO scope_meta (scope, total_bytes)
|
|
46
|
+
SELECT scope, COALESCE(SUM(size), 0) FROM entries WHERE kind = 'file' GROUP BY scope
|
|
47
|
+
ON CONFLICT(scope) DO UPDATE SET total_bytes = excluded.total_bytes;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
-- 0014: Rename all DID Space Node SQLite tables to use module-prefix naming.
|
|
2
|
+
--
|
|
3
|
+
-- Convention:
|
|
4
|
+
-- ds_ = DID Space tables (entries, changelog, gc_queue, shares, …)
|
|
5
|
+
--
|
|
6
|
+
-- SQLite ALTER TABLE RENAME automatically updates trigger `ON tablename` clauses
|
|
7
|
+
-- but NOT trigger BODY SQL. The file_count and total_bytes triggers reference
|
|
8
|
+
-- `scope_meta` in their bodies — drop them before renaming scope_meta and
|
|
9
|
+
-- recreate with ds_* table names.
|
|
10
|
+
--
|
|
11
|
+
-- Provider lineage: 0001–0013 created all tables with unprefixed names.
|
|
12
|
+
-- This migration renames them all atomically for Node daemon databases.
|
|
13
|
+
|
|
14
|
+
-- ── Step 1: Drop triggers that reference scope_meta in their bodies ───────────
|
|
15
|
+
|
|
16
|
+
DROP TRIGGER IF EXISTS trg_entries_file_count_insert;
|
|
17
|
+
DROP TRIGGER IF EXISTS trg_entries_total_bytes_insert;
|
|
18
|
+
DROP TRIGGER IF EXISTS trg_entries_total_bytes_update;
|
|
19
|
+
|
|
20
|
+
-- ── Step 2: Rename DID Space tables ──────────────────────────────────────────
|
|
21
|
+
|
|
22
|
+
ALTER TABLE entries RENAME TO ds_entries;
|
|
23
|
+
ALTER TABLE resolve_entries RENAME TO ds_resolve_entries;
|
|
24
|
+
ALTER TABLE gc_queue RENAME TO ds_gc_queue;
|
|
25
|
+
ALTER TABLE shares RENAME TO ds_shares;
|
|
26
|
+
ALTER TABLE versioned_scopes RENAME TO ds_versioned_scopes;
|
|
27
|
+
ALTER TABLE changelog RENAME TO ds_changelog;
|
|
28
|
+
ALTER TABLE scope_meta RENAME TO ds_scope_meta;
|
|
29
|
+
ALTER TABLE prefix_watermark RENAME TO ds_prefix_watermark;
|
|
30
|
+
ALTER TABLE sync_state RENAME TO ds_sync_state;
|
|
31
|
+
|
|
32
|
+
-- device_sync_state: D1-only per the changelog-schema.ts comment — present in
|
|
33
|
+
-- some Node databases (migration 0009 applied it before it was marked D1-only).
|
|
34
|
+
-- Rename if it exists; callers use PRAGMA to check for its presence.
|
|
35
|
+
ALTER TABLE device_sync_state RENAME TO ds_device_sync_state;
|
|
36
|
+
|
|
37
|
+
-- ── Step 3: Recreate file_count trigger with new table names ─────────────────
|
|
38
|
+
-- Mirrors SCOPE_META_FILE_COUNT_TRIGGER_SQL but with ds_entries / ds_scope_meta.
|
|
39
|
+
|
|
40
|
+
CREATE TRIGGER IF NOT EXISTS trg_entries_file_count_insert
|
|
41
|
+
AFTER INSERT ON ds_entries WHEN NEW.kind = 'file'
|
|
42
|
+
BEGIN
|
|
43
|
+
INSERT INTO ds_scope_meta (scope, file_count) VALUES (NEW.scope, 1)
|
|
44
|
+
ON CONFLICT(scope) DO UPDATE SET file_count = file_count + 1;
|
|
45
|
+
END;
|
|
46
|
+
|
|
47
|
+
-- ── Step 4: Recreate total_bytes triggers with new table names ────────────────
|
|
48
|
+
-- Mirrors SCOPE_META_TOTAL_BYTES_TRIGGER_SQL but with ds_entries / ds_scope_meta.
|
|
49
|
+
|
|
50
|
+
CREATE TRIGGER IF NOT EXISTS trg_entries_total_bytes_insert
|
|
51
|
+
AFTER INSERT ON ds_entries WHEN NEW.kind = 'file'
|
|
52
|
+
BEGIN
|
|
53
|
+
INSERT INTO ds_scope_meta (scope, total_bytes) VALUES (NEW.scope, NEW.size)
|
|
54
|
+
ON CONFLICT(scope) DO UPDATE SET total_bytes = total_bytes + NEW.size;
|
|
55
|
+
END;
|
|
56
|
+
|
|
57
|
+
CREATE TRIGGER IF NOT EXISTS trg_entries_total_bytes_update
|
|
58
|
+
AFTER UPDATE ON ds_entries WHEN NEW.kind = 'file' AND OLD.kind = 'file'
|
|
59
|
+
BEGIN
|
|
60
|
+
UPDATE ds_scope_meta SET total_bytes = MAX(0, total_bytes + NEW.size - OLD.size)
|
|
61
|
+
WHERE scope = NEW.scope;
|
|
62
|
+
END;
|
package/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aigne/afs-did-space",
|
|
3
|
+
"version": "1.12.0-beta.5",
|
|
4
|
+
"description": "AIGNE AFS provider for DID-scoped persistent storage with CID-based content deduplication",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"author": "Arcblock <blocklet@arcblock.io> https://github.com/arcblock",
|
|
10
|
+
"homepage": "https://github.com/arcblock/arc",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/arcblock/arc"
|
|
14
|
+
},
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/arcblock/arc/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.mjs",
|
|
21
|
+
"types": "./dist/index.d.cts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"require": "./dist/index.cjs",
|
|
25
|
+
"import": "./dist/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./cloudflare": {
|
|
28
|
+
"require": "./dist/cloudflare.cjs",
|
|
29
|
+
"import": "./dist/cloudflare.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./ctime-backfill": {
|
|
32
|
+
"require": "./dist/ctime-backfill.cjs",
|
|
33
|
+
"import": "./dist/ctime-backfill.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./data-backend": {
|
|
36
|
+
"require": "./dist/data-backend.cjs",
|
|
37
|
+
"import": "./dist/data-backend.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./dedup-backfill": {
|
|
40
|
+
"require": "./dist/dedup-backfill.cjs",
|
|
41
|
+
"import": "./dist/dedup-backfill.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./inline-content-migration": {
|
|
44
|
+
"require": "./dist/inline-content-migration.cjs",
|
|
45
|
+
"import": "./dist/inline-content-migration.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./local": {
|
|
48
|
+
"require": "./dist/local.cjs",
|
|
49
|
+
"import": "./dist/local.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./space-resolver": {
|
|
52
|
+
"require": "./dist/space-resolver.cjs",
|
|
53
|
+
"import": "./dist/space-resolver.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./*": "./*"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist",
|
|
59
|
+
"migrations",
|
|
60
|
+
"LICENSE",
|
|
61
|
+
"README.md",
|
|
62
|
+
"CHANGELOG.md"
|
|
63
|
+
],
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@arcblock/did": "^1.30.24",
|
|
66
|
+
"@libsql/client": "^0.15.15",
|
|
67
|
+
"@noble/hashes": "^2.2.0",
|
|
68
|
+
"js-yaml": "^4.1.1",
|
|
69
|
+
"multiformats": "^13.3.1",
|
|
70
|
+
"ufo": "^1.6.3",
|
|
71
|
+
"zod": "^4.0.0",
|
|
72
|
+
"@aigne/afs": "^1.12.0-beta.5",
|
|
73
|
+
"@aigne/afs-fs": "^1.12.0-beta.5",
|
|
74
|
+
"@aigne/afs-http-mount": "^1.11.0-beta.13",
|
|
75
|
+
"@aigne/afs-kv": "^1.12.0-beta.5",
|
|
76
|
+
"@aigne/afs-provider-utils": "^1.12.0-beta.5",
|
|
77
|
+
"@aigne/afs-sqlite": "^1.12.0-beta.5",
|
|
78
|
+
"@aigne/afs-timing": "^1.12.0-beta.5"
|
|
79
|
+
},
|
|
80
|
+
"devDependencies": {
|
|
81
|
+
"@cloudflare/workers-types": "^4.20260301.1",
|
|
82
|
+
"@types/bun": "^1.3.6",
|
|
83
|
+
"@types/js-yaml": "^4.0.9",
|
|
84
|
+
"npm-run-all": "^4.1.5",
|
|
85
|
+
"rimraf": "^6.1.2",
|
|
86
|
+
"tsdown": "0.20.0-beta.3",
|
|
87
|
+
"typescript": "5.9.2",
|
|
88
|
+
"@aigne/afs-r2": "1.12.0-beta.5",
|
|
89
|
+
"@aigne/afs-session": "1.12.0-beta.5",
|
|
90
|
+
"@aigne/afs-testing": "1.12.0-beta.5",
|
|
91
|
+
"@aigne/typescript-config": "0.0.0"
|
|
92
|
+
},
|
|
93
|
+
"scripts": {
|
|
94
|
+
"build": "tsdown",
|
|
95
|
+
"check-types": "tsc --noEmit",
|
|
96
|
+
"clean": "rimraf dist coverage",
|
|
97
|
+
"generate:fixtures": "bun run scripts/generate-cid-fixtures.ts",
|
|
98
|
+
"pretest": "bun run generate:fixtures",
|
|
99
|
+
"test": "bun test",
|
|
100
|
+
"test:coverage": "bun test --coverage --coverage-reporter=lcov --coverage-reporter=text"
|
|
101
|
+
}
|
|
102
|
+
}
|