ember-cli-deploy-s3-index 3.0.0 → 4.0.1
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 +17 -0
- package/README.md +6 -4
- package/index.js +8 -2
- package/lib/s3.js +19 -7
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
## 4.0.1 (2024-04-03)
|
|
6
|
+
|
|
7
|
+
#### :rocket: Enhancement
|
|
8
|
+
* Release changes in 4.0.0-0 prerelease.
|
|
9
|
+
* [#134](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/pull/134) Optionally ignore ACLs ([@khornberg](https://github.com/khornberg))
|
|
10
|
+
|
|
11
|
+
#### Committers: 1
|
|
12
|
+
- Kyle Hornberg ([@khornberg](https://github.com/khornberg))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 4.0.0-0 (2023-08-28)
|
|
16
|
+
|
|
17
|
+
Pre-release to verify aws sdk update
|
|
18
|
+
|
|
4
19
|
## 3.0.0 (2023-05-16)
|
|
5
20
|
|
|
6
21
|
#### :boom: Breaking Change
|
|
@@ -17,6 +32,8 @@
|
|
|
17
32
|
- Kelvin Luck ([@vitch](https://github.com/vitch))
|
|
18
33
|
- Luke Melia ([@lukemelia](https://github.com/lukemelia))
|
|
19
34
|
|
|
35
|
+
## 2.0.0 There was no 2.0
|
|
36
|
+
|
|
20
37
|
## [v1.0.1](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/tree/v1.0.1)
|
|
21
38
|
[Full Changelog](https://github.com/ember-cli-deploy/ember-cli-deploy-s3-index/compare/v1.0.0...v1.0.1)
|
|
22
39
|
|
package/README.md
CHANGED
|
@@ -110,6 +110,8 @@ A file matching this pattern will be uploaded to S3. The active key in S3 will b
|
|
|
110
110
|
|
|
111
111
|
The ACL to apply to the objects.
|
|
112
112
|
|
|
113
|
+
Set to `false` to not apply any ACLs.
|
|
114
|
+
|
|
113
115
|
*Default:* `'public-read'`
|
|
114
116
|
|
|
115
117
|
### cacheControl
|
|
@@ -140,9 +142,9 @@ A flag to specify whether the revision should be overwritten if it already exist
|
|
|
140
142
|
|
|
141
143
|
The underlying S3 library used to upload the files to S3. This allows the user to use the default upload client provided by this plugin but switch out the underlying library that is used to actually send the files.
|
|
142
144
|
|
|
143
|
-
The client specified MUST implement functions called `getObject` and `putObject`.
|
|
145
|
+
The client specified MUST implement functions called `getObject` and `putObject`. See [Using V2 API] (https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html#using_v2_commands).
|
|
144
146
|
|
|
145
|
-
*Default:* the default S3 library is
|
|
147
|
+
*Default:* the default S3 library is `@aws-sdk/s3-client` (AWS JS SDK v3). Please use this addon version < 3.0.0 if you want to use AWS JS SDK 2.0
|
|
146
148
|
|
|
147
149
|
### endpoint
|
|
148
150
|
|
|
@@ -151,7 +153,7 @@ or Openstack Swift
|
|
|
151
153
|
|
|
152
154
|
If `endpoint` set the `region` option will be ignored.
|
|
153
155
|
|
|
154
|
-
*Default:* `[region].s3.amazonaws.com`
|
|
156
|
+
*Default:* `[region].s3.amazonaws.com`
|
|
155
157
|
|
|
156
158
|
|
|
157
159
|
### serverSideEncryption
|
|
@@ -334,4 +336,4 @@ If you'd like to be able to preview a deployed revision before activation, you'l
|
|
|
334
336
|
[4]: https://github.com/ember-cli-deploy/ember-cli-deploy-build "ember-cli-deploy-build"
|
|
335
337
|
[5]: https://github.com/ember-cli/ember-cli-deploy "ember-cli-deploy"
|
|
336
338
|
[6]: https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data "ember-cli-deploy-revision-data"
|
|
337
|
-
[7]: https://docs.aws.amazon.com/
|
|
339
|
+
[7]: https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html "Setting AWS Credentials"
|
package/index.js
CHANGED
|
@@ -66,7 +66,6 @@ module.exports = {
|
|
|
66
66
|
var options = {
|
|
67
67
|
bucket: bucket,
|
|
68
68
|
prefix: prefix,
|
|
69
|
-
acl: acl,
|
|
70
69
|
cacheControl: cacheControl,
|
|
71
70
|
filePattern: filePattern,
|
|
72
71
|
filePath: filePath,
|
|
@@ -77,6 +76,10 @@ module.exports = {
|
|
|
77
76
|
urlEncodeSourceObject: urlEncodeSourceObject
|
|
78
77
|
};
|
|
79
78
|
|
|
79
|
+
if (acl) {
|
|
80
|
+
options.acl = acl;
|
|
81
|
+
}
|
|
82
|
+
|
|
80
83
|
if (serverSideEncryption) {
|
|
81
84
|
options.serverSideEncryption = serverSideEncryption;
|
|
82
85
|
}
|
|
@@ -99,12 +102,15 @@ module.exports = {
|
|
|
99
102
|
var options = {
|
|
100
103
|
bucket: bucket,
|
|
101
104
|
prefix: prefix,
|
|
102
|
-
acl: acl,
|
|
103
105
|
filePattern: filePattern,
|
|
104
106
|
revisionKey: revisionKey,
|
|
105
107
|
urlEncodeSourceObject: urlEncodeSourceObject,
|
|
106
108
|
};
|
|
107
109
|
|
|
110
|
+
if (acl) {
|
|
111
|
+
options.acl = acl;
|
|
112
|
+
}
|
|
113
|
+
|
|
108
114
|
if (serverSideEncryption) {
|
|
109
115
|
options.serverSideEncryption = serverSideEncryption;
|
|
110
116
|
}
|
package/lib/s3.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var { fromIni } = require('@aws-sdk/credential-providers');
|
|
4
|
+
var { S3 } = require('@aws-sdk/client-s3');
|
|
4
5
|
var CoreObject = require('core-object');
|
|
5
6
|
var RSVP = require('rsvp');
|
|
6
7
|
var fs = require('fs');
|
|
@@ -31,20 +32,31 @@ module.exports = CoreObject.extend({
|
|
|
31
32
|
var config = plugin.pluginConfig;
|
|
32
33
|
var profile = plugin.readConfig('profile');
|
|
33
34
|
var endpoint = plugin.readConfig('endpoint');
|
|
35
|
+
var credentials;
|
|
34
36
|
|
|
35
37
|
this._plugin = plugin;
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
var providedS3Client = plugin.readConfig("s3Client");
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
if (profile && !providedS3Client) {
|
|
43
|
+
this._plugin.log("Using AWS profile from config", { verbose: true });
|
|
44
|
+
credentials = fromIni({ profile: profile });
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
if (endpoint) {
|
|
43
|
-
this._plugin.log('Using endpoint from config', { verbose: true });
|
|
44
|
-
AWS.config.endpoint = new AWS.Endpoint(endpoint);
|
|
48
|
+
this._plugin.log('Using endpoint from config', { verbose: true });
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
this._client =
|
|
51
|
+
this._client = providedS3Client || new S3(config);
|
|
52
|
+
|
|
53
|
+
if (endpoint) {
|
|
54
|
+
this._client.config.endpoint = endpoint;
|
|
55
|
+
}
|
|
56
|
+
if (credentials) {
|
|
57
|
+
this._client.config.credentials = credentials;
|
|
58
|
+
}
|
|
59
|
+
|
|
48
60
|
},
|
|
49
61
|
|
|
50
62
|
upload: function(options) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ember-cli-deploy-s3-index",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Ember CLI Deploy plugin to deploy ember-cli's bootstrap index file to S3.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/**/*.js"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"aws-sdk": "^
|
|
21
|
+
"@aws-sdk/client-s3": "^3.385.0",
|
|
22
|
+
"@aws-sdk/credential-providers": "^3.391.0",
|
|
22
23
|
"core-object": "^3.0.0",
|
|
23
24
|
"ember-cli-deploy-plugin": "^0.2.9",
|
|
24
25
|
"mime-types": "^2.1.27",
|