@bymax-one/nest-storage 1.1.1 → 1.1.3
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/CHANGELOG.md +148 -1
- package/README.md +238 -53
- package/dist/server/index.cjs +538 -53
- package/dist/server/index.d.cts +175 -6
- package/dist/server/index.d.ts +175 -6
- package/dist/server/index.mjs +541 -56
- package/dist/shared/index.cjs +8 -1
- package/dist/shared/index.d.cts +6 -1
- package/dist/shared/index.d.ts +6 -1
- package/dist/shared/index.mjs +8 -1
- package/package.json +1 -1
package/dist/shared/index.cjs
CHANGED
|
@@ -14,12 +14,19 @@ var STORAGE_ERROR_CODES = {
|
|
|
14
14
|
STORAGE_OBJECT_NOT_FOUND: "STORAGE_OBJECT_NOT_FOUND",
|
|
15
15
|
STORAGE_PROVIDER_ERROR: "STORAGE_PROVIDER_ERROR",
|
|
16
16
|
STORAGE_SIGNED_URL_TTL_INVALID: "STORAGE_SIGNED_URL_TTL_INVALID",
|
|
17
|
+
// Reserved: kept so the code keeps its place in this frozen contract. Nothing throws it today;
|
|
18
|
+
// a `multipart.partSizeBytes` under the S3 minimum fails at init as STORAGE_INVALID_CONFIG.
|
|
17
19
|
STORAGE_PART_TOO_SMALL: "STORAGE_PART_TOO_SMALL",
|
|
18
20
|
STORAGE_INVALID_PART_COUNT: "STORAGE_INVALID_PART_COUNT",
|
|
19
21
|
STORAGE_BUCKET_UNDEFINED: "STORAGE_BUCKET_UNDEFINED",
|
|
20
22
|
STORAGE_MULTIPART_ABORTED: "STORAGE_MULTIPART_ABORTED",
|
|
21
23
|
STORAGE_INVALID_CONFIG: "STORAGE_INVALID_CONFIG",
|
|
22
|
-
STORAGE_TIMEOUT: "STORAGE_TIMEOUT"
|
|
24
|
+
STORAGE_TIMEOUT: "STORAGE_TIMEOUT",
|
|
25
|
+
STORAGE_LIFECYCLE_RULE_INVALID: "STORAGE_LIFECYCLE_RULE_INVALID",
|
|
26
|
+
STORAGE_LIFECYCLE_UNSUPPORTED: "STORAGE_LIFECYCLE_UNSUPPORTED",
|
|
27
|
+
STORAGE_LIFECYCLE_REJECTED: "STORAGE_LIFECYCLE_REJECTED",
|
|
28
|
+
STORAGE_NOT_MODIFIED: "STORAGE_NOT_MODIFIED",
|
|
29
|
+
STORAGE_PRECONDITION_FAILED: "STORAGE_PRECONDITION_FAILED"
|
|
23
30
|
};
|
|
24
31
|
|
|
25
32
|
// src/shared/constants/mime-types.constants.ts
|
package/dist/shared/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/** Outcome of an upload — returned to the caller. */
|
|
8
8
|
interface UploadResult {
|
|
9
|
-
/**
|
|
9
|
+
/** The object key relative to `keyPrefix`: pass it back to any method as is. */
|
|
10
10
|
key: string;
|
|
11
11
|
bucket: string;
|
|
12
12
|
etag: string;
|
|
@@ -90,6 +90,11 @@ declare const STORAGE_ERROR_CODES: {
|
|
|
90
90
|
readonly STORAGE_MULTIPART_ABORTED: "STORAGE_MULTIPART_ABORTED";
|
|
91
91
|
readonly STORAGE_INVALID_CONFIG: "STORAGE_INVALID_CONFIG";
|
|
92
92
|
readonly STORAGE_TIMEOUT: "STORAGE_TIMEOUT";
|
|
93
|
+
readonly STORAGE_LIFECYCLE_RULE_INVALID: "STORAGE_LIFECYCLE_RULE_INVALID";
|
|
94
|
+
readonly STORAGE_LIFECYCLE_UNSUPPORTED: "STORAGE_LIFECYCLE_UNSUPPORTED";
|
|
95
|
+
readonly STORAGE_LIFECYCLE_REJECTED: "STORAGE_LIFECYCLE_REJECTED";
|
|
96
|
+
readonly STORAGE_NOT_MODIFIED: "STORAGE_NOT_MODIFIED";
|
|
97
|
+
readonly STORAGE_PRECONDITION_FAILED: "STORAGE_PRECONDITION_FAILED";
|
|
93
98
|
};
|
|
94
99
|
/** Union of every stable storage error code. */
|
|
95
100
|
type StorageErrorCode = (typeof STORAGE_ERROR_CODES)[keyof typeof STORAGE_ERROR_CODES];
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
/** Outcome of an upload — returned to the caller. */
|
|
8
8
|
interface UploadResult {
|
|
9
|
-
/**
|
|
9
|
+
/** The object key relative to `keyPrefix`: pass it back to any method as is. */
|
|
10
10
|
key: string;
|
|
11
11
|
bucket: string;
|
|
12
12
|
etag: string;
|
|
@@ -90,6 +90,11 @@ declare const STORAGE_ERROR_CODES: {
|
|
|
90
90
|
readonly STORAGE_MULTIPART_ABORTED: "STORAGE_MULTIPART_ABORTED";
|
|
91
91
|
readonly STORAGE_INVALID_CONFIG: "STORAGE_INVALID_CONFIG";
|
|
92
92
|
readonly STORAGE_TIMEOUT: "STORAGE_TIMEOUT";
|
|
93
|
+
readonly STORAGE_LIFECYCLE_RULE_INVALID: "STORAGE_LIFECYCLE_RULE_INVALID";
|
|
94
|
+
readonly STORAGE_LIFECYCLE_UNSUPPORTED: "STORAGE_LIFECYCLE_UNSUPPORTED";
|
|
95
|
+
readonly STORAGE_LIFECYCLE_REJECTED: "STORAGE_LIFECYCLE_REJECTED";
|
|
96
|
+
readonly STORAGE_NOT_MODIFIED: "STORAGE_NOT_MODIFIED";
|
|
97
|
+
readonly STORAGE_PRECONDITION_FAILED: "STORAGE_PRECONDITION_FAILED";
|
|
93
98
|
};
|
|
94
99
|
/** Union of every stable storage error code. */
|
|
95
100
|
type StorageErrorCode = (typeof STORAGE_ERROR_CODES)[keyof typeof STORAGE_ERROR_CODES];
|
package/dist/shared/index.mjs
CHANGED
|
@@ -12,12 +12,19 @@ var STORAGE_ERROR_CODES = {
|
|
|
12
12
|
STORAGE_OBJECT_NOT_FOUND: "STORAGE_OBJECT_NOT_FOUND",
|
|
13
13
|
STORAGE_PROVIDER_ERROR: "STORAGE_PROVIDER_ERROR",
|
|
14
14
|
STORAGE_SIGNED_URL_TTL_INVALID: "STORAGE_SIGNED_URL_TTL_INVALID",
|
|
15
|
+
// Reserved: kept so the code keeps its place in this frozen contract. Nothing throws it today;
|
|
16
|
+
// a `multipart.partSizeBytes` under the S3 minimum fails at init as STORAGE_INVALID_CONFIG.
|
|
15
17
|
STORAGE_PART_TOO_SMALL: "STORAGE_PART_TOO_SMALL",
|
|
16
18
|
STORAGE_INVALID_PART_COUNT: "STORAGE_INVALID_PART_COUNT",
|
|
17
19
|
STORAGE_BUCKET_UNDEFINED: "STORAGE_BUCKET_UNDEFINED",
|
|
18
20
|
STORAGE_MULTIPART_ABORTED: "STORAGE_MULTIPART_ABORTED",
|
|
19
21
|
STORAGE_INVALID_CONFIG: "STORAGE_INVALID_CONFIG",
|
|
20
|
-
STORAGE_TIMEOUT: "STORAGE_TIMEOUT"
|
|
22
|
+
STORAGE_TIMEOUT: "STORAGE_TIMEOUT",
|
|
23
|
+
STORAGE_LIFECYCLE_RULE_INVALID: "STORAGE_LIFECYCLE_RULE_INVALID",
|
|
24
|
+
STORAGE_LIFECYCLE_UNSUPPORTED: "STORAGE_LIFECYCLE_UNSUPPORTED",
|
|
25
|
+
STORAGE_LIFECYCLE_REJECTED: "STORAGE_LIFECYCLE_REJECTED",
|
|
26
|
+
STORAGE_NOT_MODIFIED: "STORAGE_NOT_MODIFIED",
|
|
27
|
+
STORAGE_PRECONDITION_FAILED: "STORAGE_PRECONDITION_FAILED"
|
|
21
28
|
};
|
|
22
29
|
|
|
23
30
|
// src/shared/constants/mime-types.constants.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bymax-one/nest-storage",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Provider-agnostic S3-compatible object storage for NestJS. Works with AWS S3, DigitalOcean Spaces, Cloudflare R2, Backblaze B2, MinIO, Wasabi.",
|
|
5
5
|
"author": "Bymax One <support@bymax.one>",
|
|
6
6
|
"license": "MIT",
|