@alepha/bucket-s3 0.13.8

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Nicolas Foures
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # Alepha Bucket S3
2
+
3
+ S3-compatible storage implementation for the bucket file storage. Works with AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces, and more.
4
+
5
+ ## Installation
6
+
7
+ This package is part of the Alepha framework and can be installed via the all-in-one package:
8
+
9
+ ```bash
10
+ npm install alepha
11
+ ```
12
+
13
+ ## Module
14
+
15
+ Plugin for Alepha Bucket that provides S3-compatible storage capabilities.
16
+
17
+ Works with AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces, and other S3-compatible services.
18
+
19
+ ## API Reference
20
+
21
+ ### Providers
22
+
23
+ Providers are classes that encapsulate specific functionality and can be injected into your application. They handle initialization, configuration, and lifecycle management.
24
+
25
+ For more details, see the [Providers documentation](https://feunard.github.io/alepha/).
26
+
27
+ #### S3FileStorageProvider
28
+
29
+ Custom S3 endpoint URL for S3-compatible services.
30
+
31
+ Examples:
32
+ - Cloudflare R2: https://<account-id>.r2.cloudflarestorage.com
33
+ - MinIO: http://localhost:9000
34
+ - DigitalOcean Spaces: https://<region>.digitaloceanspaces.com
35
+
36
+ Leave empty for AWS S3.
37
+ /
38
+ S3_ENDPOINT: t.optional(t.string()),
39
+
40
+ /**
41
+ AWS region or "auto" for R2.
42
+
43
+ @default "us-east-1"
44
+ /
45
+ S3_REGION: t.optional(t.string()),
46
+
47
+ /**
48
+ Access key ID for S3 authentication.
49
+ /
50
+ S3_ACCESS_KEY_ID: t.string(),
51
+
52
+ /**
53
+ Secret access key for S3 authentication.
54
+ /
55
+ S3_SECRET_ACCESS_KEY: t.string(),
56
+
57
+ /**
58
+ Force path-style URLs (required for MinIO and some S3-compatible services).
59
+ Set to "true" to enable.
60
+ /
61
+ S3_FORCE_PATH_STYLE: t.optional(t.string()),
62
+ });
63
+
64
+ declare module "alepha" {
65
+ interface Env extends Partial<Static<typeof envSchema>> {}
66
+ }
67
+
68
+ /**
69
+ S3-compatible storage implementation of File Storage Provider.
70
+
71
+ Works with AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces, and other S3-compatible services.