@voltro/plugin-storage 0.69.1 → 0.71.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/dist/types.d.ts CHANGED
@@ -373,6 +373,15 @@ export declare interface StorageServiceShape {
373
373
  readonly bytes: Uint8Array;
374
374
  readonly ref: StorageRef;
375
375
  }, StorageError>;
376
+ /** Trusted server-side streamed read with the same tenant guard as get.
377
+ * Provider acquisition is lazy; callers must authorize private-object access.
378
+ * Providers without getStream fall back to a buffered provider read. */
379
+ readonly getStream: (id: string, opts?: {
380
+ readonly tenantId?: string | null;
381
+ }) => Effect.Effect<{
382
+ readonly stream: ByteStream;
383
+ readonly ref: StorageRef;
384
+ }, StorageError>;
376
385
  /** Direct/presigned URL for an object. For PUBLIC objects this is the
377
386
  * CDN/bucket URL (no app round-trip).
378
387
  *
@@ -462,8 +471,12 @@ export declare interface StorageServiceShape {
462
471
  * migration / "adopt this remote image"). The content-type comes from the
463
472
  * response unless overridden. NOTE: this fetches an arbitrary URL from the
464
473
  * server — pass only trusted URLs (SSRF); front it with an allow-list if the
465
- * URL is user-supplied. */
474
+ * URL is user-supplied. Reads are bounded by `limits.maxBytes` (64 MiB when
475
+ * absent) before the scanning/checksum/put pipeline. This is bounded
476
+ * buffering, not a zero-copy provider stream. Effect interruption cancels
477
+ * the HTTP read; an optional caller signal interrupts the entire ingest. */
466
478
  readonly ingestUrl: (url: string, opts?: {
479
+ readonly abortSignal?: AbortSignal;
467
480
  readonly contentType?: string;
468
481
  readonly tenantId?: string | null;
469
482
  readonly ownerId?: string | null;
@@ -624,7 +637,8 @@ export declare type Transcoder = (input: {
624
637
  }) => ReadonlyArray<Rendition> | Promise<ReadonlyArray<Rendition>> | Effect.Effect<ReadonlyArray<Rendition>>;
625
638
 
626
639
  export declare interface UploadLimits {
627
- /** Reject uploads larger than this many bytes. */
640
+ /** Reject uploads larger than this many bytes. URL ingestion enforces this
641
+ * while reading the response; absent a limit, ingestion caps at 64 MiB. */
628
642
  readonly maxBytes?: number;
629
643
  /** Allowed content types — exact (`application/pdf`) or wildcard
630
644
  * (`image/*`). Omit to allow any. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltro/plugin-storage",
3
- "version": "0.69.1",
3
+ "version": "0.71.0",
4
4
  "description": "File-storage plugin — one StorageProvider contract, switchable backends (S3 / MinIO / Azure / filesystem / memory / database). Public (CDN-direct) + private (access policy + per-object grants) objects, upload constraints, virus-scan hook, on-the-fly image transforms.",
5
5
  "keywords": [
6
6
  "voltro",
@@ -43,9 +43,9 @@
43
43
  "node": ">=24.0.0"
44
44
  },
45
45
  "dependencies": {
46
- "@voltro/database": "0.69.1",
47
- "@voltro/env": "0.69.1",
48
- "@voltro/protocol": "0.69.1"
46
+ "@voltro/database": "0.71.0",
47
+ "@voltro/env": "0.71.0",
48
+ "@voltro/protocol": "0.71.0"
49
49
  },
50
50
  "optionalDependencies": {
51
51
  "@aws-sdk/client-s3": "^3.1126.0",