@effect-kit/storage 0.0.0-stage → 0.0.0
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 +204 -0
- package/README.md +369 -2
- package/dist/_virtual/_rolldown/runtime.js +17 -0
- package/dist/azure/account-admin.d.ts +116 -0
- package/dist/azure/account-admin.js +90 -0
- package/dist/azure/account-admin.js.map +1 -0
- package/dist/azure/admin.d.ts +68 -0
- package/dist/azure/admin.js +85 -0
- package/dist/azure/admin.js.map +1 -0
- package/dist/azure/archive.d.ts +95 -0
- package/dist/azure/archive.js +52 -0
- package/dist/azure/archive.js.map +1 -0
- package/dist/azure/events.d.ts +40 -0
- package/dist/azure/events.js +62 -0
- package/dist/azure/events.js.map +1 -0
- package/dist/azure/governance.d.ts +139 -0
- package/dist/azure/governance.js +59 -0
- package/dist/azure/governance.js.map +1 -0
- package/dist/azure/identity.d.ts +4 -0
- package/dist/azure/identity.js +8 -0
- package/dist/azure/identity.js.map +1 -0
- package/dist/azure/lifecycle.d.ts +21 -0
- package/dist/azure/lifecycle.js +193 -0
- package/dist/azure/lifecycle.js.map +1 -0
- package/dist/azure/signing.d.ts +17 -0
- package/dist/azure/signing.js +71 -0
- package/dist/azure/signing.js.map +1 -0
- package/dist/azure/uploads.d.ts +11 -0
- package/dist/azure/uploads.js +83 -0
- package/dist/azure/uploads.js.map +1 -0
- package/dist/azure.d.ts +427 -0
- package/dist/azure.js +77 -0
- package/dist/azure.js.map +1 -0
- package/dist/b2/admin.d.ts +149 -0
- package/dist/b2/admin.js +157 -0
- package/dist/b2/admin.js.map +1 -0
- package/dist/b2.d.ts +15 -0
- package/dist/b2.js +15 -0
- package/dist/b2.js.map +1 -0
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +11 -0
- package/dist/browser.js.map +1 -0
- package/dist/bun.d.ts +14 -0
- package/dist/bun.js +17 -0
- package/dist/bun.js.map +1 -0
- package/dist/cache.d.ts +18 -0
- package/dist/cache.js +116 -0
- package/dist/cache.js.map +1 -0
- package/dist/client/atoms/controller.d.ts +10 -0
- package/dist/client/atoms/controller.js +267 -0
- package/dist/client/atoms/controller.js.map +1 -0
- package/dist/client/atoms/state.d.ts +17 -0
- package/dist/client/atoms/state.js +11 -0
- package/dist/client/atoms/state.js.map +1 -0
- package/dist/client/atoms.d.ts +59 -0
- package/dist/client/atoms.js +39 -0
- package/dist/client/atoms.js.map +1 -0
- package/dist/client/fingerprint.js +28 -0
- package/dist/client/fingerprint.js.map +1 -0
- package/dist/client/store.d.ts +31 -0
- package/dist/client/store.js +56 -0
- package/dist/client/store.js.map +1 -0
- package/dist/client/transport.d.ts +11 -0
- package/dist/client/transport.js +78 -0
- package/dist/client/transport.js.map +1 -0
- package/dist/client.d.ts +259 -0
- package/dist/client.js +350 -0
- package/dist/client.js.map +1 -0
- package/dist/composition/layer.js +22 -0
- package/dist/composition/layer.js.map +1 -0
- package/dist/composition/representation/staging.js +46 -0
- package/dist/composition/representation/staging.js.map +1 -0
- package/dist/composition/representation/storage.js +188 -0
- package/dist/composition/representation/storage.js.map +1 -0
- package/dist/composition.d.ts +20 -0
- package/dist/composition.js +124 -0
- package/dist/composition.js.map +1 -0
- package/dist/compression.d.ts +16 -0
- package/dist/compression.js +38 -0
- package/dist/compression.js.map +1 -0
- package/dist/content.d.ts +590 -0
- package/dist/content.js +168 -0
- package/dist/content.js.map +1 -0
- package/dist/core/capabilities.d.ts +53 -0
- package/dist/core/capabilities.js +9 -0
- package/dist/core/capabilities.js.map +1 -0
- package/dist/core/contracts/multipart.d.ts +56 -0
- package/dist/core/contracts/resumable.d.ts +70 -0
- package/dist/core/errors.d.ts +55 -0
- package/dist/core/errors.js +55 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/object.d.ts +97 -0
- package/dist/core/object.js +55 -0
- package/dist/core/object.js.map +1 -0
- package/dist/core/ranges.d.ts +17 -0
- package/dist/core/ranges.js +27 -0
- package/dist/core/ranges.js.map +1 -0
- package/dist/core/requests.d.ts +185 -0
- package/dist/core/requests.js +42 -0
- package/dist/core/requests.js.map +1 -0
- package/dist/core/storage.d.ts +249 -0
- package/dist/core/storage.js +173 -0
- package/dist/core/storage.js.map +1 -0
- package/dist/deno.d.ts +14 -0
- package/dist/deno.js +17 -0
- package/dist/deno.js.map +1 -0
- package/dist/encryption/age.d.ts +14 -0
- package/dist/encryption/age.js +46 -0
- package/dist/encryption/age.js.map +1 -0
- package/dist/encryption.d.ts +16 -0
- package/dist/encryption.js +16 -0
- package/dist/encryption.js.map +1 -0
- package/dist/events.d.ts +57 -0
- package/dist/events.js +106 -0
- package/dist/events.js.map +1 -0
- package/dist/filesystem.d.ts +23 -0
- package/dist/filesystem.js +75 -0
- package/dist/filesystem.js.map +1 -0
- package/dist/gcs/admin.d.ts +470 -0
- package/dist/gcs/admin.js +206 -0
- package/dist/gcs/admin.js.map +1 -0
- package/dist/gcs/events.d.ts +41 -0
- package/dist/gcs/events.js +45 -0
- package/dist/gcs/events.js.map +1 -0
- package/dist/gcs/governance.d.ts +158 -0
- package/dist/gcs/governance.js +100 -0
- package/dist/gcs/governance.js.map +1 -0
- package/dist/gcs/lifecycle.d.ts +161 -0
- package/dist/gcs/lifecycle.js +174 -0
- package/dist/gcs/lifecycle.js.map +1 -0
- package/dist/gcs/post.d.ts +31 -0
- package/dist/gcs/post.js +70 -0
- package/dist/gcs/post.js.map +1 -0
- package/dist/gcs/signing.d.ts +10 -0
- package/dist/gcs/signing.js +61 -0
- package/dist/gcs/signing.js.map +1 -0
- package/dist/gcs/uploads.d.ts +10 -0
- package/dist/gcs/uploads.js +76 -0
- package/dist/gcs/uploads.js.map +1 -0
- package/dist/gcs.d.ts +888 -0
- package/dist/gcs.js +91 -0
- package/dist/gcs.js.map +1 -0
- package/dist/hetzner/admin.d.ts +112 -0
- package/dist/hetzner/admin.js +19 -0
- package/dist/hetzner/admin.js.map +1 -0
- package/dist/hetzner.d.ts +15 -0
- package/dist/hetzner.js +15 -0
- package/dist/hetzner.js.map +1 -0
- package/dist/http/api.d.ts +236 -0
- package/dist/http/api.js +54 -0
- package/dist/http/api.js.map +1 -0
- package/dist/http/download.js +99 -0
- package/dist/http/download.js.map +1 -0
- package/dist/http/schema.d.ts +3 -0
- package/dist/http/schema.js +4 -0
- package/dist/http.d.ts +35 -0
- package/dist/http.js +178 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +9 -0
- package/dist/internal/http/control-plane.js +71 -0
- package/dist/internal/http/control-plane.js.map +1 -0
- package/dist/internal/listing-cursor.js +44 -0
- package/dist/internal/listing-cursor.js.map +1 -0
- package/dist/internal/node/provider-errors.js +16 -0
- package/dist/internal/node/provider-errors.js.map +1 -0
- package/dist/internal/node/upload-body.js +111 -0
- package/dist/internal/node/upload-body.js.map +1 -0
- package/dist/internal/provider-response.js +14 -0
- package/dist/internal/provider-response.js.map +1 -0
- package/dist/internal/public-urls.js +30 -0
- package/dist/internal/public-urls.js.map +1 -0
- package/dist/internal/read-condition.js +11 -0
- package/dist/internal/read-condition.js.map +1 -0
- package/dist/internal/request-validation.js +24 -0
- package/dist/internal/request-validation.js.map +1 -0
- package/dist/internal/signing-request.js +22 -0
- package/dist/internal/signing-request.js.map +1 -0
- package/dist/internal/web-upload-body.js +71 -0
- package/dist/internal/web-upload-body.js.map +1 -0
- package/dist/lifecycle/configuration-state.js +26 -0
- package/dist/lifecycle/configuration-state.js.map +1 -0
- package/dist/lifecycle/metadata.js +28 -0
- package/dist/lifecycle/metadata.js.map +1 -0
- package/dist/lifecycle.d.ts +269 -0
- package/dist/lifecycle.js +72 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/migrations.d.ts +537 -0
- package/dist/migrations.js +296 -0
- package/dist/migrations.js.map +1 -0
- package/dist/minio/admin.d.ts +112 -0
- package/dist/minio/admin.js +19 -0
- package/dist/minio/admin.js.map +1 -0
- package/dist/minio.d.ts +15 -0
- package/dist/minio.js +15 -0
- package/dist/minio.js.map +1 -0
- package/dist/mirror.d.ts +830 -0
- package/dist/mirror.js +290 -0
- package/dist/mirror.js.map +1 -0
- package/dist/node.d.ts +14 -0
- package/dist/node.js +17 -0
- package/dist/node.js.map +1 -0
- package/dist/providers/azure/blocks.js +94 -0
- package/dist/providers/azure/blocks.js.map +1 -0
- package/dist/providers/azure/config.d.ts +41 -0
- package/dist/providers/azure/config.js +62 -0
- package/dist/providers/azure/config.js.map +1 -0
- package/dist/providers/azure/mapping.js +83 -0
- package/dist/providers/azure/mapping.js.map +1 -0
- package/dist/providers/azure/native.js +88 -0
- package/dist/providers/azure/native.js.map +1 -0
- package/dist/providers/azure/primitives.js +203 -0
- package/dist/providers/azure/primitives.js.map +1 -0
- package/dist/providers/azure/properties.d.ts +180 -0
- package/dist/providers/azure/properties.js +55 -0
- package/dist/providers/azure/properties.js.map +1 -0
- package/dist/providers/azure/transport.js +14 -0
- package/dist/providers/azure/transport.js.map +1 -0
- package/dist/providers/azure/validation.js +11 -0
- package/dist/providers/azure/validation.js.map +1 -0
- package/dist/providers/filesystem/envelope.js +56 -0
- package/dist/providers/filesystem/envelope.js.map +1 -0
- package/dist/providers/filesystem/identity.js +68 -0
- package/dist/providers/filesystem/identity.js.map +1 -0
- package/dist/providers/filesystem/layout.d.ts +15 -0
- package/dist/providers/filesystem/layout.js +112 -0
- package/dist/providers/filesystem/layout.js.map +1 -0
- package/dist/providers/filesystem/list.js +82 -0
- package/dist/providers/filesystem/list.js.map +1 -0
- package/dist/providers/filesystem/operations.js +134 -0
- package/dist/providers/filesystem/operations.js.map +1 -0
- package/dist/providers/gcs/config.d.ts +34 -0
- package/dist/providers/gcs/config.js +60 -0
- package/dist/providers/gcs/config.js.map +1 -0
- package/dist/providers/gcs/iam.js +45 -0
- package/dist/providers/gcs/iam.js.map +1 -0
- package/dist/providers/gcs/mapping.js +118 -0
- package/dist/providers/gcs/mapping.js.map +1 -0
- package/dist/providers/gcs/native.d.ts +11 -0
- package/dist/providers/gcs/native.js +122 -0
- package/dist/providers/gcs/native.js.map +1 -0
- package/dist/providers/gcs/primitives.js +194 -0
- package/dist/providers/gcs/primitives.js.map +1 -0
- package/dist/providers/gcs/resumable.js +145 -0
- package/dist/providers/gcs/resumable.js.map +1 -0
- package/dist/providers/gcs/tier.d.ts +176 -0
- package/dist/providers/gcs/tier.js +34 -0
- package/dist/providers/gcs/tier.js.map +1 -0
- package/dist/providers/gcs/transport.js +123 -0
- package/dist/providers/gcs/transport.js.map +1 -0
- package/dist/providers/gcs/upload.js +28 -0
- package/dist/providers/gcs/upload.js.map +1 -0
- package/dist/providers/gcs/validation.js +10 -0
- package/dist/providers/gcs/validation.js.map +1 -0
- package/dist/providers/r2-workers/binding.d.ts +102 -0
- package/dist/providers/r2-workers/body.js +82 -0
- package/dist/providers/r2-workers/body.js.map +1 -0
- package/dist/providers/r2-workers/list.js +62 -0
- package/dist/providers/r2-workers/list.js.map +1 -0
- package/dist/providers/r2-workers/mapping.js +140 -0
- package/dist/providers/r2-workers/mapping.js.map +1 -0
- package/dist/providers/r2-workers/multipart.js +121 -0
- package/dist/providers/r2-workers/multipart.js.map +1 -0
- package/dist/providers/r2-workers/primitives.js +80 -0
- package/dist/providers/r2-workers/primitives.js.map +1 -0
- package/dist/providers/s3/admin-configuration.d.ts +19 -0
- package/dist/providers/s3/admin-configuration.js +171 -0
- package/dist/providers/s3/admin-configuration.js.map +1 -0
- package/dist/providers/s3/bulk-delete.d.ts +43 -0
- package/dist/providers/s3/bulk-delete.js +58 -0
- package/dist/providers/s3/bulk-delete.js.map +1 -0
- package/dist/providers/s3/config.d.ts +43 -0
- package/dist/providers/s3/config.js +89 -0
- package/dist/providers/s3/config.js.map +1 -0
- package/dist/providers/s3/copy.d.ts +115 -0
- package/dist/providers/s3/copy.js +122 -0
- package/dist/providers/s3/copy.js.map +1 -0
- package/dist/providers/s3/lifecycle-validation.js +33 -0
- package/dist/providers/s3/lifecycle-validation.js.map +1 -0
- package/dist/providers/s3/listing.js +56 -0
- package/dist/providers/s3/listing.js.map +1 -0
- package/dist/providers/s3/metadata.d.ts +10 -0
- package/dist/providers/s3/metadata.js +90 -0
- package/dist/providers/s3/metadata.js.map +1 -0
- package/dist/providers/s3/multipart.d.ts +41 -0
- package/dist/providers/s3/multipart.js +299 -0
- package/dist/providers/s3/multipart.js.map +1 -0
- package/dist/providers/s3/native-models.d.ts +82 -0
- package/dist/providers/s3/native-models.js +91 -0
- package/dist/providers/s3/native-models.js.map +1 -0
- package/dist/providers/s3/object-mapping.js +114 -0
- package/dist/providers/s3/object-mapping.js.map +1 -0
- package/dist/providers/s3/primitives.d.ts +8 -0
- package/dist/providers/s3/primitives.js +235 -0
- package/dist/providers/s3/primitives.js.map +1 -0
- package/dist/providers/s3/profile.d.ts +25 -0
- package/dist/providers/s3/profile.js +46 -0
- package/dist/providers/s3/profile.js.map +1 -0
- package/dist/providers/s3/request-extension.js +29 -0
- package/dist/providers/s3/request-extension.js.map +1 -0
- package/dist/providers/s3/service.js +55 -0
- package/dist/providers/s3/service.js.map +1 -0
- package/dist/providers/s3/signing-credentials.js +32 -0
- package/dist/providers/s3/signing-credentials.js.map +1 -0
- package/dist/providers/s3/tags.d.ts +10 -0
- package/dist/providers/s3/tags.js +65 -0
- package/dist/providers/s3/tags.js.map +1 -0
- package/dist/providers/s3/tier.d.ts +171 -0
- package/dist/providers/s3/tier.js +100 -0
- package/dist/providers/s3/tier.js.map +1 -0
- package/dist/providers/s3/transfer-driver.js +72 -0
- package/dist/providers/s3/transfer-driver.js.map +1 -0
- package/dist/providers/s3/transport.js +94 -0
- package/dist/providers/s3/transport.js.map +1 -0
- package/dist/providers/s3/upload-body.js +10 -0
- package/dist/providers/s3/upload-body.js.map +1 -0
- package/dist/providers/s3/validation.js +31 -0
- package/dist/providers/s3/validation.js.map +1 -0
- package/dist/providers/s3/versions.d.ts +10 -0
- package/dist/providers/s3/versions.js +143 -0
- package/dist/providers/s3/versions.js.map +1 -0
- package/dist/providers/s3-compatible/config.d.ts +36 -0
- package/dist/providers/s3-compatible/config.js +174 -0
- package/dist/providers/s3-compatible/config.js.map +1 -0
- package/dist/providers/s3-compatible/service.js +48 -0
- package/dist/providers/s3-compatible/service.js.map +1 -0
- package/dist/providers/supabase/config.d.ts +20 -0
- package/dist/providers/supabase/config.js +41 -0
- package/dist/providers/supabase/config.js.map +1 -0
- package/dist/providers/supabase/mapping.js +60 -0
- package/dist/providers/supabase/mapping.js.map +1 -0
- package/dist/providers/supabase/primitives.js +205 -0
- package/dist/providers/supabase/primitives.js.map +1 -0
- package/dist/providers/supabase/transport.js +64 -0
- package/dist/providers/supabase/transport.js.map +1 -0
- package/dist/providers/supabase/tus.js +163 -0
- package/dist/providers/supabase/tus.js.map +1 -0
- package/dist/providers/tigris/configuration.js +118 -0
- package/dist/providers/tigris/configuration.js.map +1 -0
- package/dist/providers/tigris/snapshots.js +87 -0
- package/dist/providers/tigris/snapshots.js.map +1 -0
- package/dist/providers/tigris/transport.js +18 -0
- package/dist/providers/tigris/transport.js.map +1 -0
- package/dist/providers/vercel/config.d.ts +16 -0
- package/dist/providers/vercel/config.js +48 -0
- package/dist/providers/vercel/config.js.map +1 -0
- package/dist/providers/vercel/mapping.js +79 -0
- package/dist/providers/vercel/mapping.js.map +1 -0
- package/dist/providers/vercel/multipart.js +113 -0
- package/dist/providers/vercel/multipart.js.map +1 -0
- package/dist/providers/vercel/primitives.js +168 -0
- package/dist/providers/vercel/primitives.js.map +1 -0
- package/dist/providers/vercel/transport.js +32 -0
- package/dist/providers/vercel/transport.js.map +1 -0
- package/dist/providers/wasabi/compliance.d.ts +52 -0
- package/dist/providers/wasabi/compliance.js +89 -0
- package/dist/providers/wasabi/compliance.js.map +1 -0
- package/dist/providers/wasabi/xml.js +55 -0
- package/dist/providers/wasabi/xml.js.map +1 -0
- package/dist/r2/admin.d.ts +126 -0
- package/dist/r2/admin.js +138 -0
- package/dist/r2/admin.js.map +1 -0
- package/dist/r2/events.d.ts +41 -0
- package/dist/r2/events.js +37 -0
- package/dist/r2/events.js.map +1 -0
- package/dist/r2-workers.d.ts +24 -0
- package/dist/r2-workers.js +115 -0
- package/dist/r2-workers.js.map +1 -0
- package/dist/r2.d.ts +15 -0
- package/dist/r2.js +15 -0
- package/dist/r2.js.map +1 -0
- package/dist/react.d.ts +73 -0
- package/dist/react.js +49 -0
- package/dist/react.js.map +1 -0
- package/dist/representation.d.ts +24 -0
- package/dist/representation.js +7 -0
- package/dist/representation.js.map +1 -0
- package/dist/runtime/bun-filesystem.js +136 -0
- package/dist/runtime/bun-filesystem.js.map +1 -0
- package/dist/runtime/file-target.d.ts +10 -0
- package/dist/runtime/file-target.js +66 -0
- package/dist/runtime/file-target.js.map +1 -0
- package/dist/runtime/filesystem.d.ts +6 -0
- package/dist/runtime/filesystem.js +68 -0
- package/dist/runtime/filesystem.js.map +1 -0
- package/dist/runtime/node-hash.d.ts +4 -0
- package/dist/runtime/node-hash.js +31 -0
- package/dist/runtime/node-hash.js.map +1 -0
- package/dist/runtime/node-protection.d.ts +4 -0
- package/dist/runtime/node-protection.js +46 -0
- package/dist/runtime/node-protection.js.map +1 -0
- package/dist/runtime/portable-hash.d.ts +3 -0
- package/dist/runtime/portable-hash.js +31 -0
- package/dist/runtime/portable-hash.js.map +1 -0
- package/dist/runtime/session-store.d.ts +12 -0
- package/dist/runtime/session-store.js +19 -0
- package/dist/runtime/session-store.js.map +1 -0
- package/dist/runtime/web-protection.d.ts +7 -0
- package/dist/runtime/web-protection.js +54 -0
- package/dist/runtime/web-protection.js.map +1 -0
- package/dist/s3/admin.d.ts +183 -0
- package/dist/s3/admin.js +197 -0
- package/dist/s3/admin.js.map +1 -0
- package/dist/s3/archive.d.ts +25 -0
- package/dist/s3/archive.js +113 -0
- package/dist/s3/archive.js.map +1 -0
- package/dist/s3/events.d.ts +42 -0
- package/dist/s3/events.js +69 -0
- package/dist/s3/events.js.map +1 -0
- package/dist/s3/governance.d.ts +319 -0
- package/dist/s3/governance.js +108 -0
- package/dist/s3/governance.js.map +1 -0
- package/dist/s3/lifecycle.d.ts +4 -0
- package/dist/s3/lifecycle.js +5 -0
- package/dist/s3/post.d.ts +31 -0
- package/dist/s3/post.js +93 -0
- package/dist/s3/post.js.map +1 -0
- package/dist/s3/signing.d.ts +105 -0
- package/dist/s3/signing.js +198 -0
- package/dist/s3/signing.js.map +1 -0
- package/dist/s3/uploads.d.ts +11 -0
- package/dist/s3/uploads.js +173 -0
- package/dist/s3/uploads.js.map +1 -0
- package/dist/s3.d.ts +37 -0
- package/dist/s3.js +114 -0
- package/dist/s3.js.map +1 -0
- package/dist/scaleway/admin.d.ts +112 -0
- package/dist/scaleway/admin.js +19 -0
- package/dist/scaleway/admin.js.map +1 -0
- package/dist/scaleway.d.ts +15 -0
- package/dist/scaleway.js +15 -0
- package/dist/scaleway.js.map +1 -0
- package/dist/session-events.d.ts +22 -0
- package/dist/session-events.js +22 -0
- package/dist/session-events.js.map +1 -0
- package/dist/sessions/checkpoint.d.ts +423 -0
- package/dist/sessions/checkpoint.js +102 -0
- package/dist/sessions/checkpoint.js.map +1 -0
- package/dist/sessions/download.d.ts +17 -0
- package/dist/sessions/download.js +111 -0
- package/dist/sessions/download.js.map +1 -0
- package/dist/sessions/native-upload.js +168 -0
- package/dist/sessions/native-upload.js.map +1 -0
- package/dist/sessions/store.d.ts +40 -0
- package/dist/sessions/store.js +77 -0
- package/dist/sessions/store.js.map +1 -0
- package/dist/sessions/upload.d.ts +10 -0
- package/dist/sessions/upload.js +329 -0
- package/dist/sessions/upload.js.map +1 -0
- package/dist/sessions.d.ts +98 -0
- package/dist/sessions.js +268 -0
- package/dist/sessions.js.map +1 -0
- package/dist/spaces/admin.d.ts +112 -0
- package/dist/spaces/admin.js +19 -0
- package/dist/spaces/admin.js.map +1 -0
- package/dist/spaces.d.ts +15 -0
- package/dist/spaces.js +15 -0
- package/dist/spaces.js.map +1 -0
- package/dist/supabase/admin.d.ts +77 -0
- package/dist/supabase/admin.js +74 -0
- package/dist/supabase/admin.js.map +1 -0
- package/dist/supabase/s3.d.ts +311 -0
- package/dist/supabase/s3.js +153 -0
- package/dist/supabase/s3.js.map +1 -0
- package/dist/supabase/signing.d.ts +23 -0
- package/dist/supabase/signing.js +93 -0
- package/dist/supabase/signing.js.map +1 -0
- package/dist/supabase/tus-uploads.d.ts +13 -0
- package/dist/supabase/tus-uploads.js +109 -0
- package/dist/supabase/tus-uploads.js.map +1 -0
- package/dist/supabase/uploads.d.ts +5 -0
- package/dist/supabase/uploads.js +32 -0
- package/dist/supabase/uploads.js.map +1 -0
- package/dist/supabase.d.ts +100 -0
- package/dist/supabase.js +50 -0
- package/dist/supabase.js.map +1 -0
- package/dist/testing/body-failure.js +18 -0
- package/dist/testing/body-failure.js.map +1 -0
- package/dist/testing/conformance/assertions.d.ts +10 -0
- package/dist/testing/conformance/assertions.js +21 -0
- package/dist/testing/conformance/assertions.js.map +1 -0
- package/dist/testing/conformance/core-cases.js +107 -0
- package/dist/testing/conformance/core-cases.js.map +1 -0
- package/dist/testing/conformance/list-cases.js +72 -0
- package/dist/testing/conformance/list-cases.js.map +1 -0
- package/dist/testing/conformance/read-cases.js +105 -0
- package/dist/testing/conformance/read-cases.js.map +1 -0
- package/dist/testing/conformance.d.ts +23 -0
- package/dist/testing/conformance.js +37 -0
- package/dist/testing/conformance.js.map +1 -0
- package/dist/testing/faults.d.ts +258 -0
- package/dist/testing/faults.js +111 -0
- package/dist/testing/faults.js.map +1 -0
- package/dist/testing/memory-list.js +79 -0
- package/dist/testing/memory-list.js.map +1 -0
- package/dist/testing/memory-state.d.ts +18 -0
- package/dist/testing/memory-state.js +57 -0
- package/dist/testing/memory-state.js.map +1 -0
- package/dist/testing/memory-upload.js +123 -0
- package/dist/testing/memory-upload.js.map +1 -0
- package/dist/testing/memory.d.ts +23 -0
- package/dist/testing/memory.js +121 -0
- package/dist/testing/memory.js.map +1 -0
- package/dist/testing.d.ts +6 -0
- package/dist/testing.js +6 -0
- package/dist/tigris/events.d.ts +42 -0
- package/dist/tigris/events.js +42 -0
- package/dist/tigris/events.js.map +1 -0
- package/dist/tigris/native.d.ts +438 -0
- package/dist/tigris/native.js +166 -0
- package/dist/tigris/native.js.map +1 -0
- package/dist/tigris.d.ts +15 -0
- package/dist/tigris.js +15 -0
- package/dist/tigris.js.map +1 -0
- package/dist/transfers/budget.js +50 -0
- package/dist/transfers/budget.js.map +1 -0
- package/dist/transfers/copy.js +250 -0
- package/dist/transfers/copy.js.map +1 -0
- package/dist/transfers/dependencies.d.ts +10 -0
- package/dist/transfers/dependencies.js +11 -0
- package/dist/transfers/dependencies.js.map +1 -0
- package/dist/transfers/download.js +132 -0
- package/dist/transfers/download.js.map +1 -0
- package/dist/transfers/managed-runtime.d.ts +34 -0
- package/dist/transfers/managed-runtime.js +30 -0
- package/dist/transfers/managed-runtime.js.map +1 -0
- package/dist/transfers/models.d.ts +160 -0
- package/dist/transfers/native-upload.js +195 -0
- package/dist/transfers/native-upload.js.map +1 -0
- package/dist/transfers/part-receipts.js +32 -0
- package/dist/transfers/part-receipts.js.map +1 -0
- package/dist/transfers/planner.d.ts +19 -0
- package/dist/transfers/planner.js +153 -0
- package/dist/transfers/planner.js.map +1 -0
- package/dist/transfers/reader.js +81 -0
- package/dist/transfers/reader.js.map +1 -0
- package/dist/transfers/runtime.d.ts +19 -0
- package/dist/transfers/runtime.js +132 -0
- package/dist/transfers/runtime.js.map +1 -0
- package/dist/transfers/sources.d.ts +22 -0
- package/dist/transfers/sources.js +83 -0
- package/dist/transfers/sources.js.map +1 -0
- package/dist/transfers/upload.js +235 -0
- package/dist/transfers/upload.js.map +1 -0
- package/dist/transfers.d.ts +31 -0
- package/dist/transfers.js +82 -0
- package/dist/transfers.js.map +1 -0
- package/dist/uploads/driver.d.ts +22 -0
- package/dist/uploads/driver.js +18 -0
- package/dist/uploads/driver.js.map +1 -0
- package/dist/uploads/policy.d.ts +39 -0
- package/dist/uploads/schema.d.ts +278 -0
- package/dist/uploads/schema.js +167 -0
- package/dist/uploads/schema.js.map +1 -0
- package/dist/uploads/signed-driver.d.ts +8 -0
- package/dist/uploads/signed-driver.js +36 -0
- package/dist/uploads/signed-driver.js.map +1 -0
- package/dist/uploads/store.d.ts +26 -0
- package/dist/uploads/store.js +51 -0
- package/dist/uploads/store.js.map +1 -0
- package/dist/uploads/verification.js +86 -0
- package/dist/uploads/verification.js.map +1 -0
- package/dist/uploads.d.ts +518 -0
- package/dist/uploads.js +330 -0
- package/dist/uploads.js.map +1 -0
- package/dist/vercel/authorized-uploads.d.ts +7 -0
- package/dist/vercel/authorized-uploads.js +15 -0
- package/dist/vercel/authorized-uploads.js.map +1 -0
- package/dist/vercel/client.d.ts +16 -0
- package/dist/vercel/client.js +28 -0
- package/dist/vercel/client.js.map +1 -0
- package/dist/vercel/signing.d.ts +19 -0
- package/dist/vercel/signing.js +120 -0
- package/dist/vercel/signing.js.map +1 -0
- package/dist/vercel/uploads.d.ts +36 -0
- package/dist/vercel/uploads.js +161 -0
- package/dist/vercel/uploads.js.map +1 -0
- package/dist/vercel.d.ts +86 -0
- package/dist/vercel.js +46 -0
- package/dist/vercel.js.map +1 -0
- package/dist/wasabi/admin.d.ts +112 -0
- package/dist/wasabi/admin.js +19 -0
- package/dist/wasabi/admin.js.map +1 -0
- package/dist/wasabi/native.d.ts +200 -0
- package/dist/wasabi/native.js +132 -0
- package/dist/wasabi/native.js.map +1 -0
- package/dist/wasabi.d.ts +15 -0
- package/dist/wasabi.js +15 -0
- package/dist/wasabi.js.map +1 -0
- package/dist/workflows/content/collection.js +122 -0
- package/dist/workflows/content/collection.js.map +1 -0
- package/dist/workflows/content/references.js +113 -0
- package/dist/workflows/content/references.js.map +1 -0
- package/dist/workflows/content/schema.d.ts +58 -0
- package/dist/workflows/content/schema.js +64 -0
- package/dist/workflows/content/schema.js.map +1 -0
- package/dist/workflows/endpoint.js +16 -0
- package/dist/workflows/endpoint.js.map +1 -0
- package/dist/workflows/migrations/schema.d.ts +149 -0
- package/dist/workflows/migrations/schema.js +58 -0
- package/dist/workflows/migrations/schema.js.map +1 -0
- package/dist/workflows/mirror/operations.js +175 -0
- package/dist/workflows/mirror/operations.js.map +1 -0
- package/dist/workflows/mirror/schema.d.ts +68 -0
- package/dist/workflows/mirror/schema.js +57 -0
- package/dist/workflows/mirror/schema.js.map +1 -0
- package/dist/workflows/mirror/view.js +103 -0
- package/dist/workflows/mirror/view.js.map +1 -0
- package/dist/workflows/objects.js +54 -0
- package/dist/workflows/objects.js.map +1 -0
- package/dist/workflows/store.d.ts +13 -0
- package/dist/workflows/store.js +58 -0
- package/dist/workflows/store.js.map +1 -0
- package/package.json +513 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
|
204
|
+
Copyright 2026 Effect Kit Contributors
|
package/README.md
CHANGED
|
@@ -1,3 +1,370 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @effect-kit/storage
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object storage for **Effect v4**. Typed operations, scoped streams, managed transfers
|
|
4
|
+
and resumable workflows share one service across cloud providers and local storage.
|
|
5
|
+
|
|
6
|
+
Provider SDKs, runtime integrations and React bindings have separate optional imports.
|
|
7
|
+
Install only the peers your application uses.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @effect-kit/storage effect
|
|
13
|
+
pnpm add @effect-kit/storage effect
|
|
14
|
+
bun add @effect-kit/storage effect
|
|
15
|
+
yarn add @effect-kit/storage effect
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Requires Effect `^4.1.0` and ESM. Node.js integrations require Node **24.22.0+**.
|
|
19
|
+
Runtime adapters also target Bun, Deno and browsers with their matching Effect platform
|
|
20
|
+
packages. A runtime adapter does not make every provider SDK available on that runtime.
|
|
21
|
+
|
|
22
|
+
## Quick start
|
|
23
|
+
|
|
24
|
+
Provide a storage Layer and use the `Storage` service. Memory storage needs no cloud
|
|
25
|
+
credentials or optional peers:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { Effect } from "effect";
|
|
29
|
+
|
|
30
|
+
import { Storage } from "@effect-kit/storage";
|
|
31
|
+
import { MemoryStorage } from "@effect-kit/storage/testing";
|
|
32
|
+
|
|
33
|
+
const program = Effect.gen(function* () {
|
|
34
|
+
const storage = yield* Storage;
|
|
35
|
+
|
|
36
|
+
const saved = yield* storage.put({
|
|
37
|
+
key: "greetings/hello.txt",
|
|
38
|
+
body: new TextEncoder().encode("Hello from Effect"),
|
|
39
|
+
contentType: "text/plain",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
return yield* Storage.getText({ ref: saved.ref, maxBytes: 1024 });
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const greeting = await Effect.runPromise(program.pipe(Effect.provide(MemoryStorage.layer())));
|
|
46
|
+
console.log(greeting);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### AWS S3
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
pnpm add @aws-sdk/client-s3
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Use the official AWS SDK credential chain, or supply its credential provider explicitly.
|
|
56
|
+
Keep credentials in your server environment or identity integration:
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import { Config, Effect, Layer } from "effect";
|
|
60
|
+
|
|
61
|
+
import { S3Storage } from "@effect-kit/storage/s3";
|
|
62
|
+
|
|
63
|
+
export const StorageLive = Layer.unwrap(
|
|
64
|
+
Effect.gen(function* () {
|
|
65
|
+
return S3Storage.layer({
|
|
66
|
+
bucket: yield* Config.String("STORAGE_BUCKET"),
|
|
67
|
+
region: yield* Config.String("AWS_REGION"),
|
|
68
|
+
});
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The provider Layer supplies `Storage`, its native provider service and `TransferDriver`.
|
|
74
|
+
Reuse that Layer throughout the application. At a non-Effect boundary, build one
|
|
75
|
+
`ManagedRuntime` from your application Layer and dispose it at shutdown.
|
|
76
|
+
|
|
77
|
+
## Operations and streaming
|
|
78
|
+
|
|
79
|
+
The portable service exposes `put`, `get`, `head`, `delete` and `listPage`.
|
|
80
|
+
`Storage.getBytes`, `Storage.getText` and `Storage.exists` provide bounded convenience
|
|
81
|
+
operations; `Storage.list` follows pages as an Effect Stream.
|
|
82
|
+
|
|
83
|
+
`get` acquires a response inside a Scope. Consume its body before the Scope closes:
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import { Effect, Stream } from "effect";
|
|
87
|
+
|
|
88
|
+
import { Storage } from "@effect-kit/storage";
|
|
89
|
+
|
|
90
|
+
export const countBytes = Effect.scoped(
|
|
91
|
+
Effect.gen(function* () {
|
|
92
|
+
const storage = yield* Storage;
|
|
93
|
+
const response = yield* storage.get({ key: "assets/archive.bin" });
|
|
94
|
+
|
|
95
|
+
if (response._tag === "NotModified") return 0;
|
|
96
|
+
|
|
97
|
+
return yield* Stream.runFold(
|
|
98
|
+
response.body,
|
|
99
|
+
() => 0,
|
|
100
|
+
(total, chunk) => total + chunk.length,
|
|
101
|
+
);
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Upload bodies accept `Uint8Array` or an Effect Stream of byte chunks. Supply
|
|
107
|
+
`contentLength` for known-length streamed PUTs. Unknown-length handling is adapter-bound
|
|
108
|
+
and limited; managed transfers provide explicit resource and protocol policies.
|
|
109
|
+
|
|
110
|
+
Object references contain `storeId`, `key` and an optional native version. Preserve the
|
|
111
|
+
returned reference when addressing a particular object version. Keys remain opaque;
|
|
112
|
+
provider-specific restrictions are validated at that provider boundary.
|
|
113
|
+
|
|
114
|
+
## Conditions and capabilities
|
|
115
|
+
|
|
116
|
+
Use `storage.capabilities` to inspect supported ranges, conditions, versioned reads and
|
|
117
|
+
listing behavior. Unsupported guarantees fail explicitly:
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { Effect } from "effect";
|
|
121
|
+
|
|
122
|
+
import { Storage } from "@effect-kit/storage";
|
|
123
|
+
|
|
124
|
+
export const createOnly = Effect.gen(function* () {
|
|
125
|
+
const storage = yield* Storage;
|
|
126
|
+
|
|
127
|
+
return yield* storage.put({
|
|
128
|
+
key: "locks/claim",
|
|
129
|
+
body: new Uint8Array([1]),
|
|
130
|
+
condition: { _tag: "CreateOnly" },
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`IfMatch` uses an ETag for conditional operations. Range reads accept `Bounded`, `From`
|
|
136
|
+
and `Suffix` requests where supported. Listing is generally not a snapshot.
|
|
137
|
+
|
|
138
|
+
## Managed transfers
|
|
139
|
+
|
|
140
|
+
Install the matching Effect platform package for your execution runtime:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
pnpm add @effect/platform-node
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The Node runtime Layer supplies filesystem, path, secure randomness and hashing services.
|
|
147
|
+
Compose it with a provider and transfer policy:
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
import { Layer } from "effect";
|
|
151
|
+
|
|
152
|
+
import * as StorageNode from "@effect-kit/storage/node";
|
|
153
|
+
import { S3Storage } from "@effect-kit/storage/s3";
|
|
154
|
+
import { Transfers, UploadSource } from "@effect-kit/storage/transfers";
|
|
155
|
+
|
|
156
|
+
export function transferLayer(bucket: string, region: string) {
|
|
157
|
+
return Transfers.layer({
|
|
158
|
+
maxBytes: 256 * 1024 * 1024,
|
|
159
|
+
memoryBudgetBytes: 64 * 1024 * 1024,
|
|
160
|
+
partConcurrency: 2,
|
|
161
|
+
}).pipe(Layer.provide(S3Storage.layer({ bucket, region })), Layer.provide(StorageNode.layer));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export const upload = Transfers.upload({
|
|
165
|
+
key: "assets/hello.txt",
|
|
166
|
+
source: UploadSource.bytes(new TextEncoder().encode("Hello")),
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
`Transfers` provides `upload`, `download`, `copy`, `move`, `uploadMany` and `downloadMany`.
|
|
171
|
+
Sources can be bytes, files, one-shot streams or replayable stream factories. Receipts
|
|
172
|
+
include strategy, progress and a checksum. Downloads can verify an expected checksum;
|
|
173
|
+
`Transfers.downloadFile` stages and verifies bytes before publishing the destination.
|
|
174
|
+
|
|
175
|
+
A move may return `Copied` when destination verification succeeded but source deletion
|
|
176
|
+
failed. Cancellation cannot reverse a committed mutation. Unknown outcomes and incomplete
|
|
177
|
+
cleanup remain explicit; a retry never proves the previous attempt did not execute.
|
|
178
|
+
|
|
179
|
+
## Durable sessions and persistence
|
|
180
|
+
|
|
181
|
+
Ordinary storage and transfers do not require persistence. Add `UploadSessions` when
|
|
182
|
+
uploads or downloads must survive application restarts.
|
|
183
|
+
|
|
184
|
+
Sessions require protected checkpoints backed by Effect `KeyValueStore`, stable provider
|
|
185
|
+
configuration and replayable source bytes. Node, Bun and Deno expose filesystem-backed
|
|
186
|
+
`sessionStore` constructors:
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import { Layer, Redacted } from "effect";
|
|
190
|
+
|
|
191
|
+
import * as StorageNode from "@effect-kit/storage/node";
|
|
192
|
+
import { S3Storage } from "@effect-kit/storage/s3";
|
|
193
|
+
import { UploadSessions } from "@effect-kit/storage/sessions";
|
|
194
|
+
import { Transfers } from "@effect-kit/storage/transfers";
|
|
195
|
+
|
|
196
|
+
export function sessionLayer(options: {
|
|
197
|
+
bucket: string;
|
|
198
|
+
region: string;
|
|
199
|
+
directory: string;
|
|
200
|
+
key: Redacted.Redacted<Uint8Array>;
|
|
201
|
+
}) {
|
|
202
|
+
const transfers = Transfers.layer().pipe(
|
|
203
|
+
Layer.provide(S3Storage.layer({ bucket: options.bucket, region: options.region })),
|
|
204
|
+
);
|
|
205
|
+
const checkpoints = StorageNode.sessionStore({
|
|
206
|
+
directory: options.directory,
|
|
207
|
+
namespace: "uploads",
|
|
208
|
+
key: options.key,
|
|
209
|
+
ownership: "exclusive",
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
return UploadSessions.layer({ configurationId: "application-storage-v1" }).pipe(
|
|
213
|
+
Layer.provide(transfers),
|
|
214
|
+
Layer.provide(checkpoints),
|
|
215
|
+
Layer.provide(StorageNode.layer),
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Supply a securely generated **32-byte key**, retain it across restarts, and keep the
|
|
221
|
+
checkpoint directory private. `ownership: "exclusive"` means your application guarantees
|
|
222
|
+
one process owns the namespace at a time. It is not a distributed lock. Multiple owners
|
|
223
|
+
need an appropriate `SessionOwnership` implementation.
|
|
224
|
+
|
|
225
|
+
Session methods include `create`, `resume`, `complete`, `status`, `reconcile`, `abort`,
|
|
226
|
+
`deliverEvents` and `forget`, plus restartable download and batch operations. A session ID
|
|
227
|
+
identifies retained progress; it is not an authorization credential. Recovery support
|
|
228
|
+
depends on the provider's native protocol.
|
|
229
|
+
|
|
230
|
+
## Signing and browser uploads
|
|
231
|
+
|
|
232
|
+
Signing is a separate authority. For S3, install its signing peer and compose the signer
|
|
233
|
+
with the same provider Layer:
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
pnpm add @aws-sdk/s3-request-presigner
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
import { Effect, Layer } from "effect";
|
|
241
|
+
|
|
242
|
+
import { StorageSigning } from "@effect-kit/storage";
|
|
243
|
+
import type { ObjectRef } from "@effect-kit/storage";
|
|
244
|
+
import { S3Storage } from "@effect-kit/storage/s3";
|
|
245
|
+
import { S3Signing } from "@effect-kit/storage/s3/signing";
|
|
246
|
+
|
|
247
|
+
export function signingLayer(bucket: string, region: string) {
|
|
248
|
+
return S3Signing.layer.pipe(Layer.provide(S3Storage.layer({ bucket, region })));
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export const signedRead = (ref: ObjectRef) =>
|
|
252
|
+
Effect.flatMap(StorageSigning, (signing) =>
|
|
253
|
+
signing.sign({ ref, method: "GET", expiresInSeconds: 60 }),
|
|
254
|
+
);
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Signed URLs and headers are redacted bearer credentials. Browser use also requires the
|
|
258
|
+
provider's CORS configuration. URL expiry and application intent expiry have different
|
|
259
|
+
boundaries; already-issued provider authority may outlive an application session.
|
|
260
|
+
|
|
261
|
+
For application-authorized uploads, `StorageUploads` handles intents, authorization,
|
|
262
|
+
verification and publication. The `/http` entry point integrates those workflows with
|
|
263
|
+
Effect HttpApi. `/client` provides the browser client; `/client/atoms` and `/react` provide
|
|
264
|
+
Effect Atom state and hooks. The application supplies authentication, authorization,
|
|
265
|
+
persistence, private quarantine storage and publication behavior. Provider credentials
|
|
266
|
+
stay on the server.
|
|
267
|
+
|
|
268
|
+
Install the React peers when using the hooks:
|
|
269
|
+
|
|
270
|
+
```sh
|
|
271
|
+
pnpm add react @effect/atom-react scheduler
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
import { createElement } from "react";
|
|
276
|
+
|
|
277
|
+
import { RegistryProvider } from "@effect/atom-react";
|
|
278
|
+
|
|
279
|
+
import { UploadClient } from "@effect-kit/storage/client";
|
|
280
|
+
import { UploadAtoms } from "@effect-kit/storage/client/atoms";
|
|
281
|
+
import { useUpload } from "@effect-kit/storage/react";
|
|
282
|
+
|
|
283
|
+
const attachment = UploadAtoms.make({
|
|
284
|
+
layer: UploadClient.layer({ baseUrl: "/storage" }),
|
|
285
|
+
purpose: "attachment",
|
|
286
|
+
context: {},
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
function Attachment() {
|
|
290
|
+
const upload = useUpload(attachment);
|
|
291
|
+
|
|
292
|
+
return createElement("input", {
|
|
293
|
+
type: "file",
|
|
294
|
+
disabled: upload.isRunning,
|
|
295
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
296
|
+
const file = event.currentTarget.files?.[0];
|
|
297
|
+
if (file) upload.start(file);
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export const App = () => createElement(RegistryProvider, {}, createElement(Attachment));
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
This connects to your application-owned storage HTTP API. React requires React 19.
|
|
306
|
+
Create upload atoms once per intended upload lifetime and place consumers under the
|
|
307
|
+
matching `RegistryProvider`; command results and upload completion state are separate.
|
|
308
|
+
|
|
309
|
+
## Providers and optional imports
|
|
310
|
+
|
|
311
|
+
| Import | Integration / additional peer |
|
|
312
|
+
| -------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
313
|
+
| `/s3` | AWS S3; `@aws-sdk/client-s3` |
|
|
314
|
+
| `/r2`, `/minio`, `/tigris`, `/spaces`, `/b2`, `/wasabi`, `/scaleway`, `/hetzner` | Named S3-compatible profiles; `@aws-sdk/client-s3` |
|
|
315
|
+
| `/r2-workers` | Native Cloudflare R2 binding |
|
|
316
|
+
| `/gcs` | Google Cloud Storage; `@google-cloud/storage` |
|
|
317
|
+
| `/azure` | Azure Blob Storage; `@azure/storage-blob` |
|
|
318
|
+
| `/azure/identity` | Azure identity integration; `@azure/identity` |
|
|
319
|
+
| `/supabase` | Supabase Storage over Effect HTTP; optional tus support |
|
|
320
|
+
| `/supabase/s3` | Supabase S3 endpoint; `@aws-sdk/client-s3` |
|
|
321
|
+
| `/vercel` | Vercel Blob; `@vercel/blob` |
|
|
322
|
+
| `/filesystem` | Local filesystem; matching runtime Layer |
|
|
323
|
+
| `/testing` | Memory storage, fault injection and adapter conformance |
|
|
324
|
+
| `/node`, `/bun`, `/deno`, `/browser` | Matching `@effect/platform-*` package |
|
|
325
|
+
|
|
326
|
+
Native Tigris administration uses `@tigrisdata/storage`; Wasabi native administration
|
|
327
|
+
uses `fast-xml-parser`. S3 POST policies separately require `@aws-sdk/s3-presigned-post`.
|
|
328
|
+
The core import does not load these optional peers.
|
|
329
|
+
|
|
330
|
+
Additional modules cover lifecycle/version/metadata operations, provider administration,
|
|
331
|
+
events, prefix/read-only/routing views, caching with Effect Cache, migrations, mirroring,
|
|
332
|
+
content addressing, gzip and pluggable representation encryption. Administration uses
|
|
333
|
+
separate authority and does not provision resources during ordinary construction.
|
|
334
|
+
|
|
335
|
+
## Compatibility and guarantees
|
|
336
|
+
|
|
337
|
+
Capabilities depend on the service, region, account policy and configured adapter.
|
|
338
|
+
Live qualification is scoped to tested configurations and operations. Azure, GCS,
|
|
339
|
+
deployed native R2 Workers, Spaces, Wasabi, Scaleway and Hetzner live qualification is
|
|
340
|
+
currently deferred. Local emulator success does not certify those hosted services.
|
|
341
|
+
|
|
342
|
+
Vercel Blob's multipart API lacks public remote abort/inventory and durable handle
|
|
343
|
+
support. Supabase resumable uploads require the explicit `resumable` configuration and
|
|
344
|
+
appropriate RLS policies. Native versions, retention/governance, event delivery and
|
|
345
|
+
browser grants have their own provider-specific boundaries.
|
|
346
|
+
|
|
347
|
+
The optional age encryption adapter is not independently audited. Deployment key
|
|
348
|
+
management, distributed coordination and cross-system exactly-once guarantees remain
|
|
349
|
+
application responsibilities. Do not interpret local roundtrip tests as a security audit.
|
|
350
|
+
|
|
351
|
+
## Errors and observability
|
|
352
|
+
|
|
353
|
+
Expected failures use `StorageError`, with `reason`, `operation`, `provider` and
|
|
354
|
+
`mutationOutcome`. Handle reasons such as `NotFound`, `AccessDenied`,
|
|
355
|
+
`PreconditionFailed`, `Unsupported`, `IntegrityMismatch` and `TransportFailure` explicitly.
|
|
356
|
+
A timeout after a possible write can have `mutationOutcome: "unknown"`.
|
|
357
|
+
|
|
358
|
+
Transfers expose bounded progress, diagnostics and resource counters. Effect owns
|
|
359
|
+
execution, interruption and tracing; the application configures telemetry exporters.
|
|
360
|
+
Avoid logging raw provider credentials, signed URLs or protected checkpoints.
|
|
361
|
+
|
|
362
|
+
## Contributing and security
|
|
363
|
+
|
|
364
|
+
See the [repository](https://github.com/effect-kit/storage) for development and testing.
|
|
365
|
+
Report bugs through [GitHub issues](https://github.com/effect-kit/storage/issues).
|
|
366
|
+
For security-sensitive reports, use GitHub private vulnerability reporting when enabled;
|
|
367
|
+
keep credentials and exploit details out of public issues.
|
|
368
|
+
|
|
369
|
+
Licensed under [Apache-2.0](https://github.com/effect-kit/storage/blob/main/LICENSE).
|
|
370
|
+
Copyright 2026 Effect Kit Contributors.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) {
|
|
6
|
+
__defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!no_symbols) {
|
|
12
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
+
}
|
|
14
|
+
return target;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { __exportAll };
|