@techbulls/encrypted-s3-store 1.0.2 → 1.0.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/dist/client.js +2 -2
- package/dist/types.d.ts +2 -2
- package/package.json +9 -11
package/dist/client.js
CHANGED
|
@@ -111,7 +111,7 @@ export class S3ObjectStore {
|
|
|
111
111
|
throw new Error('Body is required for upload');
|
|
112
112
|
}
|
|
113
113
|
/** Resolve mode: input.mode takes precedence, fallback to client default */
|
|
114
|
-
const mode = input?.
|
|
114
|
+
const mode = input?.Mode === 'encrypt' || input?.Mode === 'passthrough' ? input.Mode : this.mode;
|
|
115
115
|
/** Passthrough mode: upload without encryption */
|
|
116
116
|
if (mode === 'passthrough') {
|
|
117
117
|
return this.client.send(new PutObjectCommand({
|
|
@@ -201,7 +201,7 @@ export class S3ObjectStore {
|
|
|
201
201
|
throw new Error('No body returned from S3');
|
|
202
202
|
}
|
|
203
203
|
/** Resolve mode: input.mode takes precedence, fallback to client default */
|
|
204
|
-
const mode = input?.
|
|
204
|
+
const mode = input?.Mode === 'encrypt' || input?.Mode === 'passthrough' ? input.Mode : this.mode;
|
|
205
205
|
/** Passthrough mode: download without encryption */
|
|
206
206
|
if (mode === 'passthrough') {
|
|
207
207
|
return {
|
package/dist/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export type ModeType = 'encrypt' | 'passthrough';
|
|
|
31
31
|
* ```
|
|
32
32
|
*/
|
|
33
33
|
export interface IUpload extends PutObjectCommandInput {
|
|
34
|
-
|
|
34
|
+
Mode?: ModeType;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Download input options extending S3 GetObjectCommandInput.
|
|
@@ -51,5 +51,5 @@ export interface IUpload extends PutObjectCommandInput {
|
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
53
|
export interface IDownload extends GetObjectCommandInput {
|
|
54
|
-
|
|
54
|
+
Mode?: ModeType;
|
|
55
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techbulls/encrypted-s3-store",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,14 +11,6 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts"
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "tsc",
|
|
16
|
-
"lint": "eslint .",
|
|
17
|
-
"lint:fix": "eslint . --fix",
|
|
18
|
-
"format": "prettier --write .",
|
|
19
|
-
"format:check": "prettier --check .",
|
|
20
|
-
"prepublishOnly": "npm run build"
|
|
21
|
-
},
|
|
22
14
|
"keywords": [],
|
|
23
15
|
"author": "Aditya Chaphekar <aditya.chaphekar@techbulls.com>",
|
|
24
16
|
"license": "MIT",
|
|
@@ -27,7 +19,6 @@
|
|
|
27
19
|
"README.md",
|
|
28
20
|
"LICENSE.md"
|
|
29
21
|
],
|
|
30
|
-
"packageManager": "pnpm@10.19.0",
|
|
31
22
|
"devDependencies": {
|
|
32
23
|
"@eslint/js": "^9.39.2",
|
|
33
24
|
"@types/node": "^25.0.3",
|
|
@@ -43,5 +34,12 @@
|
|
|
43
34
|
"dependencies": {
|
|
44
35
|
"@aws-sdk/client-s3": "^3.958.0",
|
|
45
36
|
"@aws-sdk/types": "^3.957.0"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"lint:fix": "eslint . --fix",
|
|
42
|
+
"format": "prettier --write .",
|
|
43
|
+
"format:check": "prettier --check ."
|
|
46
44
|
}
|
|
47
|
-
}
|
|
45
|
+
}
|