@aws-sdk/s3-request-presigner 3.721.0 → 3.723.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-cjs/index.js +10 -9
- package/dist-es/presigner.js +1 -0
- package/package.json +13 -13
package/dist-cjs/index.js
CHANGED
|
@@ -39,7 +39,11 @@ var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
|
39
39
|
var SHA256_HEADER = "X-Amz-Content-Sha256";
|
|
40
40
|
|
|
41
41
|
// src/presigner.ts
|
|
42
|
-
var
|
|
42
|
+
var S3RequestPresigner = class {
|
|
43
|
+
static {
|
|
44
|
+
__name(this, "S3RequestPresigner");
|
|
45
|
+
}
|
|
46
|
+
signer;
|
|
43
47
|
constructor(options) {
|
|
44
48
|
const resolvedOptions = {
|
|
45
49
|
// Allow `signingName` because we want to support usecase of supply client's resolved config
|
|
@@ -107,12 +111,9 @@ var _S3RequestPresigner = class _S3RequestPresigner {
|
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
};
|
|
110
|
-
__name(_S3RequestPresigner, "S3RequestPresigner");
|
|
111
|
-
var S3RequestPresigner = _S3RequestPresigner;
|
|
112
114
|
|
|
113
115
|
// src/getSignedUrl.ts
|
|
114
116
|
var getSignedUrl = /* @__PURE__ */ __name(async (client, command, options = {}) => {
|
|
115
|
-
var _a, _b, _c;
|
|
116
117
|
let s3Presigner;
|
|
117
118
|
let region;
|
|
118
119
|
if (typeof client.config.endpointProvider === "function") {
|
|
@@ -121,15 +122,15 @@ var getSignedUrl = /* @__PURE__ */ __name(async (client, command, options = {})
|
|
|
121
122
|
command.constructor,
|
|
122
123
|
client.config
|
|
123
124
|
);
|
|
124
|
-
const authScheme =
|
|
125
|
-
if (
|
|
126
|
-
region =
|
|
125
|
+
const authScheme = endpointV2.properties?.authSchemes?.[0];
|
|
126
|
+
if (authScheme?.name === "sigv4a") {
|
|
127
|
+
region = authScheme?.signingRegionSet?.join(",");
|
|
127
128
|
} else {
|
|
128
|
-
region = authScheme
|
|
129
|
+
region = authScheme?.signingRegion;
|
|
129
130
|
}
|
|
130
131
|
s3Presigner = new S3RequestPresigner({
|
|
131
132
|
...client.config,
|
|
132
|
-
signingName: authScheme
|
|
133
|
+
signingName: authScheme?.signingName,
|
|
133
134
|
region: async () => region
|
|
134
135
|
});
|
|
135
136
|
} else {
|
package/dist-es/presigner.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SignatureV4MultiRegion } from "@aws-sdk/signature-v4-multi-region";
|
|
2
2
|
import { SHA256_HEADER, UNSIGNED_PAYLOAD } from "./constants";
|
|
3
3
|
export class S3RequestPresigner {
|
|
4
|
+
signer;
|
|
4
5
|
constructor(options) {
|
|
5
6
|
const resolvedOptions = {
|
|
6
7
|
service: options.signingName || options.service || "s3",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/s3-request-presigner",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.723.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
6
|
"build:cjs": "node ../../scripts/compilation/inline s3-request-presigner",
|
|
@@ -22,27 +22,27 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@aws-sdk/signature-v4-multi-region": "3.
|
|
26
|
-
"@aws-sdk/types": "3.
|
|
27
|
-
"@aws-sdk/util-format-url": "3.
|
|
28
|
-
"@smithy/middleware-endpoint": "^
|
|
29
|
-
"@smithy/protocol-http": "^
|
|
30
|
-
"@smithy/smithy-client": "^
|
|
31
|
-
"@smithy/types": "^
|
|
25
|
+
"@aws-sdk/signature-v4-multi-region": "3.723.0",
|
|
26
|
+
"@aws-sdk/types": "3.723.0",
|
|
27
|
+
"@aws-sdk/util-format-url": "3.723.0",
|
|
28
|
+
"@smithy/middleware-endpoint": "^4.0.0",
|
|
29
|
+
"@smithy/protocol-http": "^5.0.0",
|
|
30
|
+
"@smithy/smithy-client": "^4.0.0",
|
|
31
|
+
"@smithy/types": "^4.0.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@aws-sdk/client-s3": "3.
|
|
36
|
-
"@smithy/hash-node": "^
|
|
35
|
+
"@aws-sdk/client-s3": "3.723.0",
|
|
36
|
+
"@smithy/hash-node": "^4.0.0",
|
|
37
37
|
"@tsconfig/recommended": "1.0.1",
|
|
38
|
-
"@types/node": "^
|
|
38
|
+
"@types/node": "^18.19.69",
|
|
39
39
|
"concurrently": "7.0.0",
|
|
40
40
|
"downlevel-dts": "0.10.1",
|
|
41
41
|
"rimraf": "3.0.2",
|
|
42
|
-
"typescript": "~
|
|
42
|
+
"typescript": "~5.2.2"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
45
|
+
"node": ">=18.0.0"
|
|
46
46
|
},
|
|
47
47
|
"typesVersions": {
|
|
48
48
|
"<4.0": {
|