@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,212 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const require_cid = require('./cid.cjs');
|
|
3
|
+
require('./mime-utils.cjs');
|
|
4
|
+
const require_inline_content = require('./inline-content.cjs');
|
|
5
|
+
const require_object_key = require('./object-key.cjs');
|
|
6
|
+
let _aigne_afs_provider_utils = require("@aigne/afs-provider-utils");
|
|
7
|
+
|
|
8
|
+
//#region src/inline-content-migration.ts
|
|
9
|
+
const defaultSleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
10
|
+
/**
|
|
11
|
+
* Page over content-NULL rows and backfill the inline copy from R2. Returns
|
|
12
|
+
* stats; resumable across invocations (a fresh call re-scans from the start and
|
|
13
|
+
* re-selects whatever is still NULL).
|
|
14
|
+
*/
|
|
15
|
+
async function backfillInlineContent(backend, objectStore, opts = {}) {
|
|
16
|
+
const threshold = opts.threshold ?? require_inline_content.DEFAULT_INLINE_THRESHOLD;
|
|
17
|
+
const pageSize = opts.pageSize ?? 40;
|
|
18
|
+
const maxPages = opts.maxPages ?? Number.POSITIVE_INFINITY;
|
|
19
|
+
const retries = opts.retries ?? 2;
|
|
20
|
+
const throttleMs = opts.throttleMs ?? 0;
|
|
21
|
+
const sleep = opts.sleep ?? defaultSleep;
|
|
22
|
+
const log = opts.log ?? (() => {});
|
|
23
|
+
const stats = {
|
|
24
|
+
scanned: 0,
|
|
25
|
+
backfilled: 0,
|
|
26
|
+
skippedNonText: 0,
|
|
27
|
+
skippedMissing: 0,
|
|
28
|
+
skippedMismatch: 0,
|
|
29
|
+
deferredError: 0,
|
|
30
|
+
pages: 0,
|
|
31
|
+
lastCursor: "",
|
|
32
|
+
done: false
|
|
33
|
+
};
|
|
34
|
+
let cursor = "";
|
|
35
|
+
while (stats.pages < maxPages) {
|
|
36
|
+
const rows = await backend.selectCandidates(cursor, pageSize, threshold);
|
|
37
|
+
if (rows.length === 0) {
|
|
38
|
+
stats.done = true;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
stats.pages++;
|
|
42
|
+
for (const row of rows) {
|
|
43
|
+
stats.scanned++;
|
|
44
|
+
cursor = row.path;
|
|
45
|
+
stats.lastCursor = cursor;
|
|
46
|
+
const mime = (0, _aigne_afs_provider_utils.detectMimeType)(row.path);
|
|
47
|
+
if (!(0, _aigne_afs_provider_utils.isTextMime)(mime)) {
|
|
48
|
+
stats.skippedNonText++;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
let bytes = null;
|
|
52
|
+
let lastErr;
|
|
53
|
+
let absent = false;
|
|
54
|
+
for (let attempt = 0; attempt <= retries; attempt++) try {
|
|
55
|
+
const obj = await objectStore.get(require_object_key.objectKeyForCid(row.cid));
|
|
56
|
+
if (!obj) absent = true;
|
|
57
|
+
else bytes = new Uint8Array(await obj.arrayBuffer());
|
|
58
|
+
lastErr = void 0;
|
|
59
|
+
break;
|
|
60
|
+
} catch (e) {
|
|
61
|
+
lastErr = e;
|
|
62
|
+
if (attempt < retries) await sleep(throttleMs || 50);
|
|
63
|
+
}
|
|
64
|
+
if (lastErr !== void 0) {
|
|
65
|
+
stats.deferredError++;
|
|
66
|
+
log(`defer ${row.path}: R2 read error ${String(lastErr)}`);
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
if (absent) {
|
|
70
|
+
stats.skippedMissing++;
|
|
71
|
+
log(`skip ${row.path}: object ${row.cid} missing (404)`);
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const content = require_inline_content.decodeInlineText(bytes, mime ?? void 0);
|
|
75
|
+
if (content === null) {
|
|
76
|
+
stats.skippedNonText++;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (await require_cid.computeCID(content) !== row.cid) {
|
|
80
|
+
stats.skippedMismatch++;
|
|
81
|
+
log(`skip ${row.path}: cid mismatch (content hash != ${row.cid})`);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
await backend.backfillRow(row.path, content, mime ?? null);
|
|
85
|
+
stats.backfilled++;
|
|
86
|
+
if (throttleMs > 0) await sleep(throttleMs);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return stats;
|
|
90
|
+
}
|
|
91
|
+
const SELECT_SQL = "SELECT path, cid, size FROM ds_entries WHERE scope = ? AND kind = 'file' AND content IS NULL AND size <= ? AND path > ? ORDER BY path ASC LIMIT ?";
|
|
92
|
+
const UPDATE_SQL = "UPDATE ds_entries SET content = ?, mime_type = ? WHERE scope = ? AND path = ? AND content IS NULL";
|
|
93
|
+
/** D1 (Cloudflare) backend adapter — the same SQL the index uses. */
|
|
94
|
+
function makeD1InlineBackfillBackend(db, scope) {
|
|
95
|
+
return {
|
|
96
|
+
async selectCandidates(cursor, limit, threshold) {
|
|
97
|
+
return ((await db.prepare(SELECT_SQL).bind(scope, threshold, cursor, limit).all()).results ?? []).map((r) => ({
|
|
98
|
+
path: String(r.path),
|
|
99
|
+
cid: String(r.cid),
|
|
100
|
+
size: Number(r.size)
|
|
101
|
+
}));
|
|
102
|
+
},
|
|
103
|
+
async backfillRow(path, content, mimeType) {
|
|
104
|
+
await db.prepare(UPDATE_SQL).bind(content, mimeType, scope, path).run();
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
/** Node SQLite (libsql) backend adapter. */
|
|
109
|
+
function makeSqliteInlineBackfillBackend(db, scope) {
|
|
110
|
+
return {
|
|
111
|
+
async selectCandidates(cursor, limit, threshold) {
|
|
112
|
+
return (await db.execute({
|
|
113
|
+
sql: SELECT_SQL,
|
|
114
|
+
args: [
|
|
115
|
+
scope,
|
|
116
|
+
threshold,
|
|
117
|
+
cursor,
|
|
118
|
+
limit
|
|
119
|
+
]
|
|
120
|
+
})).rows.map((r) => ({
|
|
121
|
+
path: String(r.path),
|
|
122
|
+
cid: String(r.cid),
|
|
123
|
+
size: Number(r.size)
|
|
124
|
+
}));
|
|
125
|
+
},
|
|
126
|
+
async backfillRow(path, content, mimeType) {
|
|
127
|
+
await db.execute({
|
|
128
|
+
sql: UPDATE_SQL,
|
|
129
|
+
args: [
|
|
130
|
+
content,
|
|
131
|
+
mimeType,
|
|
132
|
+
scope,
|
|
133
|
+
path
|
|
134
|
+
]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
const DISTINCT_NULL_SCOPES_SQL = "SELECT DISTINCT scope FROM ds_entries WHERE kind = 'file' AND content IS NULL AND size <= ?";
|
|
140
|
+
/** Run one D1 HTTP query (with transient-error retry); returns the rows or throws. */
|
|
141
|
+
async function d1HttpQuery(cfg, sql, params) {
|
|
142
|
+
const f = cfg.fetchImpl ?? fetch;
|
|
143
|
+
const sleep = cfg.sleep ?? defaultSleep;
|
|
144
|
+
const maxRetries = cfg.maxRetries ?? 4;
|
|
145
|
+
const url = `https://api.cloudflare.com/client/v4/accounts/${cfg.accountId}/d1/database/${cfg.databaseId}/query`;
|
|
146
|
+
for (let attempt = 0;; attempt++) {
|
|
147
|
+
let status = 0;
|
|
148
|
+
let json;
|
|
149
|
+
let networkErr;
|
|
150
|
+
try {
|
|
151
|
+
const res = await f(url, {
|
|
152
|
+
method: "POST",
|
|
153
|
+
headers: {
|
|
154
|
+
authorization: `Bearer ${cfg.apiToken}`,
|
|
155
|
+
"content-type": "application/json"
|
|
156
|
+
},
|
|
157
|
+
body: JSON.stringify({
|
|
158
|
+
sql,
|
|
159
|
+
params
|
|
160
|
+
})
|
|
161
|
+
});
|
|
162
|
+
status = res.status;
|
|
163
|
+
json = await res.json();
|
|
164
|
+
} catch (e) {
|
|
165
|
+
networkErr = e;
|
|
166
|
+
}
|
|
167
|
+
if (!networkErr && status >= 200 && status < 300 && json?.success !== false) return json?.result?.[0]?.results ?? [];
|
|
168
|
+
const transient = networkErr != null || status >= 500 || status === 429;
|
|
169
|
+
const msg = networkErr ? `D1 HTTP network error: ${String(networkErr).slice(0, 160)}` : `D1 HTTP ${status}: ${JSON.stringify(json?.errors ?? json).slice(0, 200)}`;
|
|
170
|
+
if (!transient || attempt >= maxRetries) throw new Error(msg);
|
|
171
|
+
await sleep(Math.min(2e3, 200 * 2 ** attempt));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/** CF D1 HTTP-API backend adapter (offline mechanism A for staging/prod). */
|
|
175
|
+
function makeD1HttpInlineBackfillBackend(cfg) {
|
|
176
|
+
return {
|
|
177
|
+
async selectCandidates(cursor, limit, threshold) {
|
|
178
|
+
return (await d1HttpQuery(cfg, SELECT_SQL, [
|
|
179
|
+
cfg.scope,
|
|
180
|
+
threshold,
|
|
181
|
+
cursor,
|
|
182
|
+
limit
|
|
183
|
+
])).map((r) => ({
|
|
184
|
+
path: String(r.path),
|
|
185
|
+
cid: String(r.cid),
|
|
186
|
+
size: Number(r.size)
|
|
187
|
+
}));
|
|
188
|
+
},
|
|
189
|
+
async backfillRow(path, content, mimeType) {
|
|
190
|
+
await d1HttpQuery(cfg, UPDATE_SQL, [
|
|
191
|
+
content,
|
|
192
|
+
mimeType,
|
|
193
|
+
cfg.scope,
|
|
194
|
+
path
|
|
195
|
+
]);
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* List the distinct scopes that still have content-NULL file rows (≤ threshold)
|
|
201
|
+
* on a CF D1, so a bulk sweep can migrate each scope-aware. One HTTP query.
|
|
202
|
+
*/
|
|
203
|
+
async function listD1NullContentScopes(cfg, threshold = require_inline_content.DEFAULT_INLINE_THRESHOLD) {
|
|
204
|
+
return (await d1HttpQuery(cfg, DISTINCT_NULL_SCOPES_SQL, [threshold])).map((r) => String(r.scope));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
//#endregion
|
|
208
|
+
exports.backfillInlineContent = backfillInlineContent;
|
|
209
|
+
exports.listD1NullContentScopes = listD1NullContentScopes;
|
|
210
|
+
exports.makeD1HttpInlineBackfillBackend = makeD1HttpInlineBackfillBackend;
|
|
211
|
+
exports.makeD1InlineBackfillBackend = makeD1InlineBackfillBackend;
|
|
212
|
+
exports.makeSqliteInlineBackfillBackend = makeSqliteInlineBackfillBackend;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ObjectStore } from "./platform/r2/dist/types.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/inline-content-migration.d.ts
|
|
4
|
+
/** A content-NULL file row eligible for inline backfill. */
|
|
5
|
+
interface InlineBackfillCandidate {
|
|
6
|
+
path: string;
|
|
7
|
+
cid: string;
|
|
8
|
+
size: number;
|
|
9
|
+
}
|
|
10
|
+
/** Backend-specific SQL for the sweep (D1 vs Node SQLite). */
|
|
11
|
+
interface InlineBackfillBackend {
|
|
12
|
+
/**
|
|
13
|
+
* Select up to `limit` content-NULL FILE rows with `path > cursor` and
|
|
14
|
+
* `size <= threshold`, ordered by `path ASC` (the keyset cursor). Empty array
|
|
15
|
+
* ⇒ no more candidates after `cursor`.
|
|
16
|
+
*/
|
|
17
|
+
selectCandidates(cursor: string, limit: number, threshold: number): Promise<InlineBackfillCandidate[]>;
|
|
18
|
+
/**
|
|
19
|
+
* Set `content` + `mime_type` for `path` ONLY IF the row is still
|
|
20
|
+
* `content IS NULL` (idempotent — a concurrent/earlier fill wins). `mimeType`
|
|
21
|
+
* is `null` for extensionless / unknown-extension paths — stored as SQL NULL
|
|
22
|
+
* to match the write path (so `isTextMime(null)` stays true and the read path
|
|
23
|
+
* still serves the inline copy; an empty string would flip `isTextMime` false).
|
|
24
|
+
*/
|
|
25
|
+
backfillRow(path: string, content: string, mimeType: string | null): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
interface InlineBackfillOptions {
|
|
28
|
+
/** `size <= threshold` filter (default {@link DEFAULT_INLINE_THRESHOLD} = 2 KB). */
|
|
29
|
+
threshold?: number;
|
|
30
|
+
/** Rows per page = R2 GETs per page. Default 40 (free-tier 50-subrequest safe). */
|
|
31
|
+
pageSize?: number;
|
|
32
|
+
/** Cap pages this invocation (cross-invocation paging). Default unbounded. */
|
|
33
|
+
maxPages?: number;
|
|
34
|
+
/** Sleep (ms) after each R2 read to pace subrequests. Default 0. */
|
|
35
|
+
throttleMs?: number;
|
|
36
|
+
/** Bounded retries on a transient R2 error before deferring the row. Default 2. */
|
|
37
|
+
retries?: number;
|
|
38
|
+
/** Injectable sleep (tests pass a no-op). */
|
|
39
|
+
sleep?: (ms: number) => Promise<void>;
|
|
40
|
+
/** Progress / skip logger. */
|
|
41
|
+
log?: (msg: string) => void;
|
|
42
|
+
}
|
|
43
|
+
interface InlineBackfillStats {
|
|
44
|
+
scanned: number;
|
|
45
|
+
backfilled: number;
|
|
46
|
+
skippedNonText: number;
|
|
47
|
+
skippedMissing: number;
|
|
48
|
+
skippedMismatch: number;
|
|
49
|
+
deferredError: number;
|
|
50
|
+
pages: number;
|
|
51
|
+
lastCursor: string;
|
|
52
|
+
/** True when a page came back empty (the sweep reached the end). */
|
|
53
|
+
done: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Page over content-NULL rows and backfill the inline copy from R2. Returns
|
|
57
|
+
* stats; resumable across invocations (a fresh call re-scans from the start and
|
|
58
|
+
* re-selects whatever is still NULL).
|
|
59
|
+
*/
|
|
60
|
+
declare function backfillInlineContent(backend: InlineBackfillBackend, objectStore: ObjectStore, opts?: InlineBackfillOptions): Promise<InlineBackfillStats>;
|
|
61
|
+
/** D1 (Cloudflare) backend adapter — the same SQL the index uses. */
|
|
62
|
+
declare function makeD1InlineBackfillBackend(db: D1Database, scope: string): InlineBackfillBackend;
|
|
63
|
+
/**
|
|
64
|
+
* Minimal libsql client shape the SQLite adapter needs (Node `_metadata.db`).
|
|
65
|
+
* `args` is narrowed to `(string | number)[]` — exactly what the sweep binds —
|
|
66
|
+
* so a real `@libsql/client` `Client` is structurally assignable (a wider
|
|
67
|
+
* `unknown[]` is not assignable to libsql's `InValue[]`).
|
|
68
|
+
*/
|
|
69
|
+
interface LibsqlLike {
|
|
70
|
+
execute(stmt: {
|
|
71
|
+
sql: string;
|
|
72
|
+
args: (string | number | null)[];
|
|
73
|
+
}): Promise<{
|
|
74
|
+
rows: Array<Record<string, unknown>>;
|
|
75
|
+
}>;
|
|
76
|
+
}
|
|
77
|
+
/** Node SQLite (libsql) backend adapter. */
|
|
78
|
+
declare function makeSqliteInlineBackfillBackend(db: LibsqlLike, scope: string): InlineBackfillBackend;
|
|
79
|
+
/**
|
|
80
|
+
* CF D1 over the HTTP API (`POST /accounts/{acct}/d1/database/{db}/query`) — the
|
|
81
|
+
* OFFLINE realization of mechanism A for staging/prod CF: a Node process holds a
|
|
82
|
+
* Cloudflare API token with D1-edit and runs the SAME paged sweep SQL the worker
|
|
83
|
+
* would, while reading R2 objects out-of-band (the script supplies the
|
|
84
|
+
* ObjectStore — e.g. R2 presigned GET). `fetchImpl` is injectable for tests.
|
|
85
|
+
*/
|
|
86
|
+
interface D1HttpConfig {
|
|
87
|
+
accountId: string;
|
|
88
|
+
databaseId: string;
|
|
89
|
+
apiToken: string;
|
|
90
|
+
scope: string;
|
|
91
|
+
fetchImpl?: typeof fetch;
|
|
92
|
+
/**
|
|
93
|
+
* Bounded retries for TRANSIENT D1 HTTP failures (5xx — incl. the occasional
|
|
94
|
+
* `code 7500 internal error` — / 429 / network) with exponential backoff. A
|
|
95
|
+
* one-off CF hiccup must NOT abort a multi-thousand-row sweep. Permanent 4xx
|
|
96
|
+
* (auth/SQL) throw immediately. Default 4. `sleep` injectable for tests.
|
|
97
|
+
*/
|
|
98
|
+
maxRetries?: number;
|
|
99
|
+
sleep?: (ms: number) => Promise<void>;
|
|
100
|
+
}
|
|
101
|
+
/** CF D1 HTTP-API backend adapter (offline mechanism A for staging/prod). */
|
|
102
|
+
declare function makeD1HttpInlineBackfillBackend(cfg: D1HttpConfig): InlineBackfillBackend;
|
|
103
|
+
/**
|
|
104
|
+
* List the distinct scopes that still have content-NULL file rows (≤ threshold)
|
|
105
|
+
* on a CF D1, so a bulk sweep can migrate each scope-aware. One HTTP query.
|
|
106
|
+
*/
|
|
107
|
+
declare function listD1NullContentScopes(cfg: Omit<D1HttpConfig, "scope">, threshold?: number): Promise<string[]>;
|
|
108
|
+
//#endregion
|
|
109
|
+
export { D1HttpConfig, InlineBackfillBackend, InlineBackfillCandidate, InlineBackfillOptions, InlineBackfillStats, LibsqlLike, backfillInlineContent, listD1NullContentScopes, makeD1HttpInlineBackfillBackend, makeD1InlineBackfillBackend, makeSqliteInlineBackfillBackend };
|
|
110
|
+
//# sourceMappingURL=inline-content-migration.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-content-migration.d.cts","names":[],"sources":["../src/inline-content-migration.ts"],"mappings":";;;AAoEA;AAAA,UA5BiB,uBAAA;EACf,IAAA;EACA,GAAA;EACA,IAAA;AAAA;;UAIe,qBAAA;EA+Bf;;;;;EAzBA,gBAAA,CACE,MAAA,UACA,KAAA,UACA,SAAA,WACC,OAAA,CAAQ,uBAAA;EAyBO;;AAGpB;;;;;EApBE,WAAA,CAAY,IAAA,UAAc,OAAA,UAAiB,QAAA,kBAA0B,OAAA;AAAA;AAAA,UAGtD,qBAAA;EAsBf;EApBA,SAAA;EAsBA;EApBA,QAAA;EAuBA;EArBA,QAAA;EAqBI;EAnBJ,UAAA;EA6ByC;EA3BzC,OAAA;EA4BS;EA1BT,KAAA,IAAS,EAAA,aAAe,OAAA;EA4BlB;EA1BN,GAAA,IAAO,GAAA;AAAA;AAAA,UAGQ,mBAAA;EACf,OAAA;EACA,UAAA;EACA,cAAA;EACA,cAAA;EACA,eAAA;EACA,aAAA;EACA,KAAA;EACA,UAAA;EAgBS;EAdT,IAAA;AAAA;AAkHF;;;;;AAAA,iBAxGsB,qBAAA,CACpB,OAAA,EAAS,qBAAA,EACT,WAAA,EAAa,WAAA,EACb,IAAA,GAAM,qBAAA,GACL,OAAA,CAAQ,mBAAA;;iBAoGK,2BAAA,CAA4B,EAAA,EAAI,UAAA,EAAY,KAAA,WAAgB,qBAAA;;;AAsB5E;;;;UAAiB,UAAA;EACf,OAAA,CAAQ,IAAA;IAAQ,GAAA;IAAa,IAAA;EAAA,IAAqC,OAAA;IAChE,IAAA,EAAM,KAAA,CAAM,MAAA;EAAA;AAAA;;iBAKA,+BAAA,CACd,EAAA,EAAI,UAAA,EACJ,KAAA,WACC,qBAAA;;;;;AAHH;;;UA6BiB,YAAA;EACf,SAAA;EACA,UAAA;EACA,QAAA;EACA,KAAA;EACA,SAAA,UAAmB,KAAA;EA/BG;AA0BxB;;;;;EAYE,UAAA;EACA,KAAA,IAAS,EAAA,aAAe,OAAA;AAAA;;iBAgDV,+BAAA,CAAgC,GAAA,EAAK,YAAA,GAAe,qBAAA;;;;;iBAgB9C,uBAAA,CACpB,GAAA,EAAK,IAAA,CAAK,YAAA,YACV,SAAA,YACC,OAAA"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ObjectStore } from "./providers/platform/r2/dist/types.mjs";
|
|
2
|
+
import "./providers/platform/r2/dist/index.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/inline-content-migration.d.ts
|
|
5
|
+
/** A content-NULL file row eligible for inline backfill. */
|
|
6
|
+
interface InlineBackfillCandidate {
|
|
7
|
+
path: string;
|
|
8
|
+
cid: string;
|
|
9
|
+
size: number;
|
|
10
|
+
}
|
|
11
|
+
/** Backend-specific SQL for the sweep (D1 vs Node SQLite). */
|
|
12
|
+
interface InlineBackfillBackend {
|
|
13
|
+
/**
|
|
14
|
+
* Select up to `limit` content-NULL FILE rows with `path > cursor` and
|
|
15
|
+
* `size <= threshold`, ordered by `path ASC` (the keyset cursor). Empty array
|
|
16
|
+
* ⇒ no more candidates after `cursor`.
|
|
17
|
+
*/
|
|
18
|
+
selectCandidates(cursor: string, limit: number, threshold: number): Promise<InlineBackfillCandidate[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Set `content` + `mime_type` for `path` ONLY IF the row is still
|
|
21
|
+
* `content IS NULL` (idempotent — a concurrent/earlier fill wins). `mimeType`
|
|
22
|
+
* is `null` for extensionless / unknown-extension paths — stored as SQL NULL
|
|
23
|
+
* to match the write path (so `isTextMime(null)` stays true and the read path
|
|
24
|
+
* still serves the inline copy; an empty string would flip `isTextMime` false).
|
|
25
|
+
*/
|
|
26
|
+
backfillRow(path: string, content: string, mimeType: string | null): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
interface InlineBackfillOptions {
|
|
29
|
+
/** `size <= threshold` filter (default {@link DEFAULT_INLINE_THRESHOLD} = 2 KB). */
|
|
30
|
+
threshold?: number;
|
|
31
|
+
/** Rows per page = R2 GETs per page. Default 40 (free-tier 50-subrequest safe). */
|
|
32
|
+
pageSize?: number;
|
|
33
|
+
/** Cap pages this invocation (cross-invocation paging). Default unbounded. */
|
|
34
|
+
maxPages?: number;
|
|
35
|
+
/** Sleep (ms) after each R2 read to pace subrequests. Default 0. */
|
|
36
|
+
throttleMs?: number;
|
|
37
|
+
/** Bounded retries on a transient R2 error before deferring the row. Default 2. */
|
|
38
|
+
retries?: number;
|
|
39
|
+
/** Injectable sleep (tests pass a no-op). */
|
|
40
|
+
sleep?: (ms: number) => Promise<void>;
|
|
41
|
+
/** Progress / skip logger. */
|
|
42
|
+
log?: (msg: string) => void;
|
|
43
|
+
}
|
|
44
|
+
interface InlineBackfillStats {
|
|
45
|
+
scanned: number;
|
|
46
|
+
backfilled: number;
|
|
47
|
+
skippedNonText: number;
|
|
48
|
+
skippedMissing: number;
|
|
49
|
+
skippedMismatch: number;
|
|
50
|
+
deferredError: number;
|
|
51
|
+
pages: number;
|
|
52
|
+
lastCursor: string;
|
|
53
|
+
/** True when a page came back empty (the sweep reached the end). */
|
|
54
|
+
done: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Page over content-NULL rows and backfill the inline copy from R2. Returns
|
|
58
|
+
* stats; resumable across invocations (a fresh call re-scans from the start and
|
|
59
|
+
* re-selects whatever is still NULL).
|
|
60
|
+
*/
|
|
61
|
+
declare function backfillInlineContent(backend: InlineBackfillBackend, objectStore: ObjectStore, opts?: InlineBackfillOptions): Promise<InlineBackfillStats>;
|
|
62
|
+
/** D1 (Cloudflare) backend adapter — the same SQL the index uses. */
|
|
63
|
+
declare function makeD1InlineBackfillBackend(db: D1Database, scope: string): InlineBackfillBackend;
|
|
64
|
+
/**
|
|
65
|
+
* Minimal libsql client shape the SQLite adapter needs (Node `_metadata.db`).
|
|
66
|
+
* `args` is narrowed to `(string | number)[]` — exactly what the sweep binds —
|
|
67
|
+
* so a real `@libsql/client` `Client` is structurally assignable (a wider
|
|
68
|
+
* `unknown[]` is not assignable to libsql's `InValue[]`).
|
|
69
|
+
*/
|
|
70
|
+
interface LibsqlLike {
|
|
71
|
+
execute(stmt: {
|
|
72
|
+
sql: string;
|
|
73
|
+
args: (string | number | null)[];
|
|
74
|
+
}): Promise<{
|
|
75
|
+
rows: Array<Record<string, unknown>>;
|
|
76
|
+
}>;
|
|
77
|
+
}
|
|
78
|
+
/** Node SQLite (libsql) backend adapter. */
|
|
79
|
+
declare function makeSqliteInlineBackfillBackend(db: LibsqlLike, scope: string): InlineBackfillBackend;
|
|
80
|
+
/**
|
|
81
|
+
* CF D1 over the HTTP API (`POST /accounts/{acct}/d1/database/{db}/query`) — the
|
|
82
|
+
* OFFLINE realization of mechanism A for staging/prod CF: a Node process holds a
|
|
83
|
+
* Cloudflare API token with D1-edit and runs the SAME paged sweep SQL the worker
|
|
84
|
+
* would, while reading R2 objects out-of-band (the script supplies the
|
|
85
|
+
* ObjectStore — e.g. R2 presigned GET). `fetchImpl` is injectable for tests.
|
|
86
|
+
*/
|
|
87
|
+
interface D1HttpConfig {
|
|
88
|
+
accountId: string;
|
|
89
|
+
databaseId: string;
|
|
90
|
+
apiToken: string;
|
|
91
|
+
scope: string;
|
|
92
|
+
fetchImpl?: typeof fetch;
|
|
93
|
+
/**
|
|
94
|
+
* Bounded retries for TRANSIENT D1 HTTP failures (5xx — incl. the occasional
|
|
95
|
+
* `code 7500 internal error` — / 429 / network) with exponential backoff. A
|
|
96
|
+
* one-off CF hiccup must NOT abort a multi-thousand-row sweep. Permanent 4xx
|
|
97
|
+
* (auth/SQL) throw immediately. Default 4. `sleep` injectable for tests.
|
|
98
|
+
*/
|
|
99
|
+
maxRetries?: number;
|
|
100
|
+
sleep?: (ms: number) => Promise<void>;
|
|
101
|
+
}
|
|
102
|
+
/** CF D1 HTTP-API backend adapter (offline mechanism A for staging/prod). */
|
|
103
|
+
declare function makeD1HttpInlineBackfillBackend(cfg: D1HttpConfig): InlineBackfillBackend;
|
|
104
|
+
/**
|
|
105
|
+
* List the distinct scopes that still have content-NULL file rows (≤ threshold)
|
|
106
|
+
* on a CF D1, so a bulk sweep can migrate each scope-aware. One HTTP query.
|
|
107
|
+
*/
|
|
108
|
+
declare function listD1NullContentScopes(cfg: Omit<D1HttpConfig, "scope">, threshold?: number): Promise<string[]>;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { D1HttpConfig, InlineBackfillBackend, InlineBackfillCandidate, InlineBackfillOptions, InlineBackfillStats, LibsqlLike, backfillInlineContent, listD1NullContentScopes, makeD1HttpInlineBackfillBackend, makeD1InlineBackfillBackend, makeSqliteInlineBackfillBackend };
|
|
111
|
+
//# sourceMappingURL=inline-content-migration.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-content-migration.d.mts","names":[],"sources":["../src/inline-content-migration.ts"],"mappings":";;;;;UAwCiB,uBAAA;EACf,IAAA;EACA,GAAA;EACA,IAAA;AAAA;;UAIe,qBAAA;EA6Bf;;;;;EAvBA,gBAAA,CACE,MAAA,UACA,KAAA,UACA,SAAA,WACC,OAAA,CAAQ,uBAAA;EAyBJ;;;AAGT;;;;EApBE,WAAA,CAAY,IAAA,UAAc,OAAA,UAAiB,QAAA,kBAA0B,OAAA;AAAA;AAAA,UAGtD,qBAAA;EAqBf;EAnBA,SAAA;EAqBA;EAnBA,QAAA;EAqBA;EAnBA,QAAA;EAqBI;EAnBJ,UAAA;EA6BoB;EA3BpB,OAAA;;EAEA,KAAA,IAAS,EAAA,aAAe,OAAA;EA2BX;EAzBb,GAAA,IAAO,GAAA;AAAA;AAAA,UAGQ,mBAAA;EACf,OAAA;EACA,UAAA;EACA,cAAA;EACA,cAAA;EACA,eAAA;EACA,aAAA;EACA,KAAA;EACA,UAAA;EAgBC;EAdD,IAAA;AAAA;;AAkHF;;;;iBAxGsB,qBAAA,CACpB,OAAA,EAAS,qBAAA,EACT,WAAA,EAAa,WAAA,EACb,IAAA,GAAM,qBAAA,GACL,OAAA,CAAQ,mBAAA;;iBAoGK,2BAAA,CAA4B,EAAA,EAAI,UAAA,EAAY,KAAA,WAAgB,qBAAA;;;;AAsB5E;;;UAAiB,UAAA;EACf,OAAA,CAAQ,IAAA;IAAQ,GAAA;IAAa,IAAA;EAAA,IAAqC,OAAA;IAChE,IAAA,EAAM,KAAA,CAAM,MAAA;EAAA;AAAA;;iBAKA,+BAAA,CACd,EAAA,EAAI,UAAA,EACJ,KAAA,WACC,qBAAA;;;;;;AAHH;;UA6BiB,YAAA;EACf,SAAA;EACA,UAAA;EACA,QAAA;EACA,KAAA;EACA,SAAA,UAAmB,KAAA;EA/BG;;AA0BxB;;;;EAYE,UAAA;EACA,KAAA,IAAS,EAAA,aAAe,OAAA;AAAA;;iBAgDV,+BAAA,CAAgC,GAAA,EAAK,YAAA,GAAe,qBAAA;;;;;iBAgB9C,uBAAA,CACpB,GAAA,EAAK,IAAA,CAAK,YAAA,YACV,SAAA,YACC,OAAA"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { computeCID } from "./cid.mjs";
|
|
2
|
+
import { detectMimeType, isTextMime } from "./mime-utils.mjs";
|
|
3
|
+
import { DEFAULT_INLINE_THRESHOLD, decodeInlineText } from "./inline-content.mjs";
|
|
4
|
+
import { objectKeyForCid } from "./object-key.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/inline-content-migration.ts
|
|
7
|
+
const defaultSleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
8
|
+
/**
|
|
9
|
+
* Page over content-NULL rows and backfill the inline copy from R2. Returns
|
|
10
|
+
* stats; resumable across invocations (a fresh call re-scans from the start and
|
|
11
|
+
* re-selects whatever is still NULL).
|
|
12
|
+
*/
|
|
13
|
+
async function backfillInlineContent(backend, objectStore, opts = {}) {
|
|
14
|
+
const threshold = opts.threshold ?? DEFAULT_INLINE_THRESHOLD;
|
|
15
|
+
const pageSize = opts.pageSize ?? 40;
|
|
16
|
+
const maxPages = opts.maxPages ?? Number.POSITIVE_INFINITY;
|
|
17
|
+
const retries = opts.retries ?? 2;
|
|
18
|
+
const throttleMs = opts.throttleMs ?? 0;
|
|
19
|
+
const sleep = opts.sleep ?? defaultSleep;
|
|
20
|
+
const log = opts.log ?? (() => {});
|
|
21
|
+
const stats = {
|
|
22
|
+
scanned: 0,
|
|
23
|
+
backfilled: 0,
|
|
24
|
+
skippedNonText: 0,
|
|
25
|
+
skippedMissing: 0,
|
|
26
|
+
skippedMismatch: 0,
|
|
27
|
+
deferredError: 0,
|
|
28
|
+
pages: 0,
|
|
29
|
+
lastCursor: "",
|
|
30
|
+
done: false
|
|
31
|
+
};
|
|
32
|
+
let cursor = "";
|
|
33
|
+
while (stats.pages < maxPages) {
|
|
34
|
+
const rows = await backend.selectCandidates(cursor, pageSize, threshold);
|
|
35
|
+
if (rows.length === 0) {
|
|
36
|
+
stats.done = true;
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
stats.pages++;
|
|
40
|
+
for (const row of rows) {
|
|
41
|
+
stats.scanned++;
|
|
42
|
+
cursor = row.path;
|
|
43
|
+
stats.lastCursor = cursor;
|
|
44
|
+
const mime = detectMimeType(row.path);
|
|
45
|
+
if (!isTextMime(mime)) {
|
|
46
|
+
stats.skippedNonText++;
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
let bytes = null;
|
|
50
|
+
let lastErr;
|
|
51
|
+
let absent = false;
|
|
52
|
+
for (let attempt = 0; attempt <= retries; attempt++) try {
|
|
53
|
+
const obj = await objectStore.get(objectKeyForCid(row.cid));
|
|
54
|
+
if (!obj) absent = true;
|
|
55
|
+
else bytes = new Uint8Array(await obj.arrayBuffer());
|
|
56
|
+
lastErr = void 0;
|
|
57
|
+
break;
|
|
58
|
+
} catch (e) {
|
|
59
|
+
lastErr = e;
|
|
60
|
+
if (attempt < retries) await sleep(throttleMs || 50);
|
|
61
|
+
}
|
|
62
|
+
if (lastErr !== void 0) {
|
|
63
|
+
stats.deferredError++;
|
|
64
|
+
log(`defer ${row.path}: R2 read error ${String(lastErr)}`);
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
if (absent) {
|
|
68
|
+
stats.skippedMissing++;
|
|
69
|
+
log(`skip ${row.path}: object ${row.cid} missing (404)`);
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const content = decodeInlineText(bytes, mime ?? void 0);
|
|
73
|
+
if (content === null) {
|
|
74
|
+
stats.skippedNonText++;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (await computeCID(content) !== row.cid) {
|
|
78
|
+
stats.skippedMismatch++;
|
|
79
|
+
log(`skip ${row.path}: cid mismatch (content hash != ${row.cid})`);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
await backend.backfillRow(row.path, content, mime ?? null);
|
|
83
|
+
stats.backfilled++;
|
|
84
|
+
if (throttleMs > 0) await sleep(throttleMs);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return stats;
|
|
88
|
+
}
|
|
89
|
+
const SELECT_SQL = "SELECT path, cid, size FROM ds_entries WHERE scope = ? AND kind = 'file' AND content IS NULL AND size <= ? AND path > ? ORDER BY path ASC LIMIT ?";
|
|
90
|
+
const UPDATE_SQL = "UPDATE ds_entries SET content = ?, mime_type = ? WHERE scope = ? AND path = ? AND content IS NULL";
|
|
91
|
+
/** D1 (Cloudflare) backend adapter — the same SQL the index uses. */
|
|
92
|
+
function makeD1InlineBackfillBackend(db, scope) {
|
|
93
|
+
return {
|
|
94
|
+
async selectCandidates(cursor, limit, threshold) {
|
|
95
|
+
return ((await db.prepare(SELECT_SQL).bind(scope, threshold, cursor, limit).all()).results ?? []).map((r) => ({
|
|
96
|
+
path: String(r.path),
|
|
97
|
+
cid: String(r.cid),
|
|
98
|
+
size: Number(r.size)
|
|
99
|
+
}));
|
|
100
|
+
},
|
|
101
|
+
async backfillRow(path, content, mimeType) {
|
|
102
|
+
await db.prepare(UPDATE_SQL).bind(content, mimeType, scope, path).run();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/** Node SQLite (libsql) backend adapter. */
|
|
107
|
+
function makeSqliteInlineBackfillBackend(db, scope) {
|
|
108
|
+
return {
|
|
109
|
+
async selectCandidates(cursor, limit, threshold) {
|
|
110
|
+
return (await db.execute({
|
|
111
|
+
sql: SELECT_SQL,
|
|
112
|
+
args: [
|
|
113
|
+
scope,
|
|
114
|
+
threshold,
|
|
115
|
+
cursor,
|
|
116
|
+
limit
|
|
117
|
+
]
|
|
118
|
+
})).rows.map((r) => ({
|
|
119
|
+
path: String(r.path),
|
|
120
|
+
cid: String(r.cid),
|
|
121
|
+
size: Number(r.size)
|
|
122
|
+
}));
|
|
123
|
+
},
|
|
124
|
+
async backfillRow(path, content, mimeType) {
|
|
125
|
+
await db.execute({
|
|
126
|
+
sql: UPDATE_SQL,
|
|
127
|
+
args: [
|
|
128
|
+
content,
|
|
129
|
+
mimeType,
|
|
130
|
+
scope,
|
|
131
|
+
path
|
|
132
|
+
]
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
const DISTINCT_NULL_SCOPES_SQL = "SELECT DISTINCT scope FROM ds_entries WHERE kind = 'file' AND content IS NULL AND size <= ?";
|
|
138
|
+
/** Run one D1 HTTP query (with transient-error retry); returns the rows or throws. */
|
|
139
|
+
async function d1HttpQuery(cfg, sql, params) {
|
|
140
|
+
const f = cfg.fetchImpl ?? fetch;
|
|
141
|
+
const sleep = cfg.sleep ?? defaultSleep;
|
|
142
|
+
const maxRetries = cfg.maxRetries ?? 4;
|
|
143
|
+
const url = `https://api.cloudflare.com/client/v4/accounts/${cfg.accountId}/d1/database/${cfg.databaseId}/query`;
|
|
144
|
+
for (let attempt = 0;; attempt++) {
|
|
145
|
+
let status = 0;
|
|
146
|
+
let json;
|
|
147
|
+
let networkErr;
|
|
148
|
+
try {
|
|
149
|
+
const res = await f(url, {
|
|
150
|
+
method: "POST",
|
|
151
|
+
headers: {
|
|
152
|
+
authorization: `Bearer ${cfg.apiToken}`,
|
|
153
|
+
"content-type": "application/json"
|
|
154
|
+
},
|
|
155
|
+
body: JSON.stringify({
|
|
156
|
+
sql,
|
|
157
|
+
params
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
status = res.status;
|
|
161
|
+
json = await res.json();
|
|
162
|
+
} catch (e) {
|
|
163
|
+
networkErr = e;
|
|
164
|
+
}
|
|
165
|
+
if (!networkErr && status >= 200 && status < 300 && json?.success !== false) return json?.result?.[0]?.results ?? [];
|
|
166
|
+
const transient = networkErr != null || status >= 500 || status === 429;
|
|
167
|
+
const msg = networkErr ? `D1 HTTP network error: ${String(networkErr).slice(0, 160)}` : `D1 HTTP ${status}: ${JSON.stringify(json?.errors ?? json).slice(0, 200)}`;
|
|
168
|
+
if (!transient || attempt >= maxRetries) throw new Error(msg);
|
|
169
|
+
await sleep(Math.min(2e3, 200 * 2 ** attempt));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/** CF D1 HTTP-API backend adapter (offline mechanism A for staging/prod). */
|
|
173
|
+
function makeD1HttpInlineBackfillBackend(cfg) {
|
|
174
|
+
return {
|
|
175
|
+
async selectCandidates(cursor, limit, threshold) {
|
|
176
|
+
return (await d1HttpQuery(cfg, SELECT_SQL, [
|
|
177
|
+
cfg.scope,
|
|
178
|
+
threshold,
|
|
179
|
+
cursor,
|
|
180
|
+
limit
|
|
181
|
+
])).map((r) => ({
|
|
182
|
+
path: String(r.path),
|
|
183
|
+
cid: String(r.cid),
|
|
184
|
+
size: Number(r.size)
|
|
185
|
+
}));
|
|
186
|
+
},
|
|
187
|
+
async backfillRow(path, content, mimeType) {
|
|
188
|
+
await d1HttpQuery(cfg, UPDATE_SQL, [
|
|
189
|
+
content,
|
|
190
|
+
mimeType,
|
|
191
|
+
cfg.scope,
|
|
192
|
+
path
|
|
193
|
+
]);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* List the distinct scopes that still have content-NULL file rows (≤ threshold)
|
|
199
|
+
* on a CF D1, so a bulk sweep can migrate each scope-aware. One HTTP query.
|
|
200
|
+
*/
|
|
201
|
+
async function listD1NullContentScopes(cfg, threshold = DEFAULT_INLINE_THRESHOLD) {
|
|
202
|
+
return (await d1HttpQuery(cfg, DISTINCT_NULL_SCOPES_SQL, [threshold])).map((r) => String(r.scope));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
//#endregion
|
|
206
|
+
export { backfillInlineContent, listD1NullContentScopes, makeD1HttpInlineBackfillBackend, makeD1InlineBackfillBackend, makeSqliteInlineBackfillBackend };
|
|
207
|
+
//# sourceMappingURL=inline-content-migration.mjs.map
|