@aws-sdk/cloudfront-signer 3.709.0 → 3.734.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 +11 -5
- package/dist-es/sign.js +6 -1
- package/package.json +4 -4
package/dist-cjs/index.js
CHANGED
|
@@ -114,7 +114,7 @@ function getSignedCookies({
|
|
|
114
114
|
__name(getSignedCookies, "getSignedCookies");
|
|
115
115
|
function getPolicyResources(policy) {
|
|
116
116
|
const parsedPolicy = typeof policy === "string" ? JSON.parse(policy) : policy;
|
|
117
|
-
return (
|
|
117
|
+
return (parsedPolicy?.Statement ?? []).map((s) => s.Resource);
|
|
118
118
|
}
|
|
119
119
|
__name(getPolicyResources, "getPolicyResources");
|
|
120
120
|
function getResource(url) {
|
|
@@ -131,9 +131,17 @@ function getResource(url) {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
__name(getResource, "getResource");
|
|
134
|
-
var
|
|
134
|
+
var CloudfrontSignBuilder = class {
|
|
135
|
+
static {
|
|
136
|
+
__name(this, "CloudfrontSignBuilder");
|
|
137
|
+
}
|
|
138
|
+
keyPairId;
|
|
139
|
+
privateKey;
|
|
140
|
+
passphrase;
|
|
141
|
+
policy;
|
|
142
|
+
customPolicy = false;
|
|
143
|
+
dateLessThan;
|
|
135
144
|
constructor({ privateKey, keyPairId, passphrase }) {
|
|
136
|
-
this.customPolicy = false;
|
|
137
145
|
this.keyPairId = keyPairId;
|
|
138
146
|
this.privateKey = privateKey;
|
|
139
147
|
this.policy = "";
|
|
@@ -287,8 +295,6 @@ var _CloudfrontSignBuilder = class _CloudfrontSignBuilder {
|
|
|
287
295
|
};
|
|
288
296
|
}
|
|
289
297
|
};
|
|
290
|
-
__name(_CloudfrontSignBuilder, "CloudfrontSignBuilder");
|
|
291
|
-
var CloudfrontSignBuilder = _CloudfrontSignBuilder;
|
|
292
298
|
// Annotate the CommonJS export names for ESM import in node:
|
|
293
299
|
|
|
294
300
|
0 && (module.exports = {
|
package/dist-es/sign.js
CHANGED
|
@@ -86,8 +86,13 @@ function getResource(url) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
class CloudfrontSignBuilder {
|
|
89
|
+
keyPairId;
|
|
90
|
+
privateKey;
|
|
91
|
+
passphrase;
|
|
92
|
+
policy;
|
|
93
|
+
customPolicy = false;
|
|
94
|
+
dateLessThan;
|
|
89
95
|
constructor({ privateKey, keyPairId, passphrase }) {
|
|
90
|
-
this.customPolicy = false;
|
|
91
96
|
this.keyPairId = keyPairId;
|
|
92
97
|
this.privateKey = privateKey;
|
|
93
98
|
this.policy = "";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/cloudfront-signer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.734.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 cloudfront-signer",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@smithy/url-parser": "^
|
|
25
|
+
"@smithy/url-parser": "^4.0.1",
|
|
26
26
|
"tslib": "^2.6.2"
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"concurrently": "7.0.0",
|
|
34
34
|
"downlevel-dts": "0.10.1",
|
|
35
35
|
"rimraf": "3.0.2",
|
|
36
|
-
"typescript": "~
|
|
36
|
+
"typescript": "~5.2.2"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
39
|
+
"node": ">=18.0.0"
|
|
40
40
|
},
|
|
41
41
|
"typesVersions": {
|
|
42
42
|
"<4.0": {
|