File tree 3 files changed +1196
-180
lines changed
3 files changed +1196
-180
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,15 @@ var _ = require('lodash');
9
9
module . exports = CoreObject . extend ( {
10
10
init : function ( options ) {
11
11
this . _super ( options ) ;
12
- var AWS = require ( 'aws-sdk' ) ;
12
+
13
+ const {
14
+ fromIni
15
+ } = require ( '@aws-sdk/credential-providers' ) ;
16
+
17
+ const {
18
+ S3
19
+ } = require ( '@aws-sdk/client-s3' ) ;
20
+
13
21
var s3Options = {
14
22
region : this . plugin . readConfig ( 'region' )
15
23
} ;
@@ -54,15 +62,15 @@ module.exports = CoreObject.extend({
54
62
55
63
if ( profile && ! this . plugin . readConfig ( 's3Client' ) ) {
56
64
this . plugin . log ( 'Using AWS profile from config' , { verbose : true } ) ;
57
- AWS . config . credentials = new AWS . SharedIniFileCredentials ( { profile : profile } ) ;
65
+ s3Options . credentials = fromIni ( { profile : profile } ) ;
58
66
}
59
67
60
68
if ( endpoint ) {
61
69
this . plugin . log ( 'Using endpoint from config' , { verbose : true } ) ;
62
- s3Options . endpoint = new AWS . Endpoint ( endpoint ) ;
70
+ s3Options . endpoint = endpoint ;
63
71
}
64
72
65
- this . _client = this . plugin . readConfig ( 's3Client' ) || new AWS . S3 ( s3Options ) ;
73
+ this . _client = this . plugin . readConfig ( 's3Client' ) || new S3 ( s3Options ) ;
66
74
} ,
67
75
68
76
upload : function ( options ) {
Original file line number Diff line number Diff line change 18
18
"test" : " node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/**/*-test.js"
19
19
},
20
20
"dependencies" : {
21
- "aws-sdk" : " ^2.1354.0" ,
21
+ "@aws-sdk/client-s3" : " ^3.525.0" ,
22
+ "@aws-sdk/credential-providers" : " ^3.525.0" ,
22
23
"chalk" : " ^4.1.0" ,
23
24
"core-object" : " ^3.1.5" ,
24
25
"ember-cli-deploy-plugin" : " ^0.2.9" ,
You can’t perform that action at this time.
0 commit comments