effect-cloudflare-r2-layer 1.0.42 → 1.0.44

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # effect-cloudflare-r2-layer
2
2
 
3
+ [![Open in Visual Studio Code](https://img.shields.io/static/v1?logo=visualstudiocode&label=&message=Open%20in%20Visual%20Studio%20Code&labelColor=2c2c32&color=007acc&logoColor=007acc)](https://github.dev/jpb06/effect-cloudflare-r2-layer)
4
+ ![Last commit](https://img.shields.io/github/last-commit/jpb06/effect-cloudflare-r2-layer?logo=git)
5
+ ![npm downloads](https://img.shields.io/npm/dw/effect-cloudflare-r2-layer?logo=npm&logoColor=red&label=npm%20downloads)
6
+ ![npm bundle size](https://img.shields.io/bundlephobia/min/effect-cloudflare-r2-layer)
7
+
3
8
  An effect layer to interact with Cloudware R2 storage service.
4
9
 
5
10
  <!-- readme-package-icons start -->
@@ -10,9 +10,9 @@ export interface FileStorage {
10
10
  readonly createBucket: (input: CreateBucketCommandInput) => Effect.Effect<CreateBucketCommandOutput, ConfigError.ConfigError | FileStorageError, never>;
11
11
  readonly bucketInfos: <TBucket extends string>(input: BucketInfosInput<TBucket>) => Effect.Effect<BucketInfosResult, ConfigError.ConfigError | FileStorageError | BucketNotFoundError, never>;
12
12
  readonly getFileUrl: <TBucket extends string>(fileName: string, bucket: TBucket) => Effect.Effect<string, FileStorageError | ConfigError.ConfigError>;
13
- readonly readAsRawBinary: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<ArrayBuffer, ConfigError.ConfigError | HttpClientError | FileStorageError, HttpClient<HttpClientError, Scope> | Scope>;
14
- readonly readAsJson: <TBucket extends string, TShape extends Record<string, unknown>>(bucketName: TBucket, documentKey: string) => Effect.Effect<TShape, ConfigError.ConfigError | HttpClientError | FileStorageError, HttpClient<HttpClientError, Scope> | Scope>;
15
- readonly readAsText: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<string, ConfigError.ConfigError | HttpClientError | FileStorageError, HttpClient<HttpClientError, Scope> | Scope>;
13
+ readonly readAsRawBinary: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<ArrayBuffer, ConfigError.ConfigError | HttpClientError | FileStorageError, HttpClient | Scope>;
14
+ readonly readAsJson: <TBucket extends string, TShape extends Record<string, unknown>>(bucketName: TBucket, documentKey: string) => Effect.Effect<TShape, ConfigError.ConfigError | HttpClientError | FileStorageError, HttpClient | Scope>;
15
+ readonly readAsText: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<string, ConfigError.ConfigError | HttpClientError | FileStorageError, HttpClient | Scope>;
16
16
  readonly uploadFile: <TBucket extends string>({ bucketName, documentKey, data, contentType, }: UploadFileInput<TBucket>) => Effect.Effect<PutObjectCommandOutput, ConfigError.ConfigError | FileStorageError, never>;
17
17
  readonly deleteFile: <TBucket extends string>({ bucketName, documentKey, }: DeleteFileInput<TBucket>) => Effect.Effect<DeleteObjectCommandOutput, ConfigError.ConfigError | FileStorageError, never>;
18
18
  }
@@ -21,9 +21,9 @@ export declare const FileStorageLayer: {
21
21
  createBucket: (input: CreateBucketCommandInput) => Effect.Effect<CreateBucketCommandOutput, FileStorageError | ConfigError.ConfigError, FileStorage>;
22
22
  bucketInfos: <TBucket extends string>(input: BucketInfosInput<TBucket>) => Effect.Effect<BucketInfosResult, BucketNotFoundError | FileStorageError | ConfigError.ConfigError, FileStorage>;
23
23
  getFileUrl: <TBucket extends string>(bucket: TBucket, fileName: string) => Effect.Effect<string, FileStorageError | ConfigError.ConfigError, FileStorage>;
24
- readAsRawBinary: <TBucket extends string>(bucket: TBucket, fileName: string) => Effect.Effect<ArrayBuffer, FileStorageError | ConfigError.ConfigError | HttpClientError, Scope | HttpClient<HttpClientError, Scope> | FileStorage>;
25
- readAsJson: <TBucket extends string, TShape extends Record<string, unknown>>(bucket: TBucket, fileName: string) => Effect.Effect<TShape, FileStorageError | ConfigError.ConfigError | HttpClientError, Scope | HttpClient<HttpClientError, Scope> | FileStorage>;
26
- readAsText: <TBucket extends string>(bucket: TBucket, fileName: string) => Effect.Effect<string, FileStorageError | ConfigError.ConfigError | HttpClientError, Scope | HttpClient<HttpClientError, Scope> | FileStorage>;
24
+ readAsRawBinary: <TBucket extends string>(bucket: TBucket, fileName: string) => Effect.Effect<ArrayBuffer, FileStorageError | ConfigError.ConfigError | HttpClientError, HttpClient | Scope | FileStorage>;
25
+ readAsJson: <TBucket extends string, TShape extends Record<string, unknown>>(bucket: TBucket, fileName: string) => Effect.Effect<TShape, FileStorageError | ConfigError.ConfigError | HttpClientError, HttpClient | Scope | FileStorage>;
26
+ readAsText: <TBucket extends string>(bucket: TBucket, fileName: string) => Effect.Effect<string, FileStorageError | ConfigError.ConfigError | HttpClientError, HttpClient | Scope | FileStorage>;
27
27
  uploadFile: <TBucket extends string>(input: UploadFileInput<TBucket>) => Effect.Effect<PutObjectCommandOutput, FileStorageError | ConfigError.ConfigError, FileStorage>;
28
28
  deleteFile: <TBucket extends string>(input: DeleteFileInput<TBucket>) => Effect.Effect<DeleteObjectCommandOutput, FileStorageError | ConfigError.ConfigError, FileStorage>;
29
29
  };
@@ -1,3 +1,3 @@
1
1
  import { HttpClient } from '@effect/platform';
2
2
  import { Effect } from 'effect';
3
- export declare const fetchFile: (bucketName: string, documentKey: string) => Effect.Effect<import("@effect/platform/HttpClientResponse").HttpClientResponse, import("../../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope | HttpClient.HttpClient<import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope>>;
3
+ export declare const fetchFile: (bucketName: string, documentKey: string) => Effect.Effect<import("@effect/platform/HttpClientResponse").HttpClientResponse, import("../../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, HttpClient.HttpClient | import("effect/Scope").Scope>;
@@ -1,2 +1,2 @@
1
1
  import { Effect } from 'effect';
2
- export declare const readAsJson: <TBucket extends string, TShape extends Record<string, unknown>>(bucketName: TBucket, documentKey: string) => Effect.Effect<TShape, import("../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope | import("@effect/platform/HttpClient").HttpClient<import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope>>;
2
+ export declare const readAsJson: <TBucket extends string, TShape extends Record<string, unknown>>(bucketName: TBucket, documentKey: string) => Effect.Effect<TShape, import("../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("@effect/platform/HttpClient").HttpClient | import("effect/Scope").Scope>;
@@ -1,2 +1,2 @@
1
1
  import { Effect } from 'effect';
2
- export declare const readAsRawBinary: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<ArrayBuffer, import("../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope | import("@effect/platform/HttpClient").HttpClient<import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope>>;
2
+ export declare const readAsRawBinary: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<ArrayBuffer, import("../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("@effect/platform/HttpClient").HttpClient | import("effect/Scope").Scope>;
@@ -1,2 +1,2 @@
1
1
  import { Effect } from 'effect';
2
- export declare const readAsText: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<string, import("../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope | import("@effect/platform/HttpClient").HttpClient<import("@effect/platform/HttpClientError").HttpClientError, import("effect/Scope").Scope>>;
2
+ export declare const readAsText: <TBucket extends string>(bucketName: TBucket, documentKey: string) => Effect.Effect<string, import("../../index.js").FileStorageError | import("effect/ConfigError").ConfigError | import("@effect/platform/HttpClientError").HttpClientError, import("@effect/platform/HttpClient").HttpClient | import("effect/Scope").Scope>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effect-cloudflare-r2-layer",
3
- "version": "1.0.42",
3
+ "version": "1.0.44",
4
4
  "author": "jpb06 <jp.bois.06@outlook.fr>",
5
5
  "description": "An effect layer to interact with Cloudware R2 storage service",
6
6
  "keywords": [
@@ -26,7 +26,7 @@
26
26
  "node": ">=20.x"
27
27
  },
28
28
  "scripts": {
29
- "update-deps": "taze -I",
29
+ "update-deps": "taze -f -I",
30
30
  "copy-package": "copyfiles package.json ./dist/",
31
31
  "copy-readme": "copyfiles README.md ./dist/",
32
32
  "build": "del-cli ./dist && bun build-esm && bun build-cjs",
@@ -48,7 +48,7 @@
48
48
  "dependencies": {
49
49
  "@aws-sdk/client-s3": "3.717.0",
50
50
  "@aws-sdk/s3-request-presigner": "3.717.0",
51
- "@effect/platform": "0.71.6",
51
+ "@effect/platform": "0.72.0",
52
52
  "dotenv": "16.4.7",
53
53
  "effect": "3.12.0"
54
54
  },
@@ -68,7 +68,7 @@
68
68
  "glob": "11.0.0",
69
69
  "readme-package-icons": "1.1.16",
70
70
  "taze": "0.18.0",
71
- "ts-paths-resolver": "1.2.11",
71
+ "ts-paths-resolver": "1.2.14",
72
72
  "tsx": "4.19.2",
73
73
  "vitest": "2.1.8",
74
74
  "vitest-mock-extended": "2.0.2"