File tree Expand file tree Collapse file tree 3 files changed +1196
-180
lines changed Expand file tree Collapse file tree 3 files changed +1196
-180
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,15 @@ var _ = require('lodash');
99module . exports = CoreObject . extend ( {
1010 init : function ( options ) {
1111 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+
1321 var s3Options = {
1422 region : this . plugin . readConfig ( 'region' )
1523 } ;
@@ -54,15 +62,15 @@ module.exports = CoreObject.extend({
5462
5563 if ( profile && ! this . plugin . readConfig ( 's3Client' ) ) {
5664 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 } ) ;
5866 }
5967
6068 if ( endpoint ) {
6169 this . plugin . log ( 'Using endpoint from config' , { verbose : true } ) ;
62- s3Options . endpoint = new AWS . Endpoint ( endpoint ) ;
70+ s3Options . endpoint = endpoint ;
6371 }
6472
65- this . _client = this . plugin . readConfig ( 's3Client' ) || new AWS . S3 ( s3Options ) ;
73+ this . _client = this . plugin . readConfig ( 's3Client' ) || new S3 ( s3Options ) ;
6674 } ,
6775
6876 upload : function ( options ) {
Original file line number Diff line number Diff line change 1818 "test" : " node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/**/*-test.js"
1919 },
2020 "dependencies" : {
21- "aws-sdk" : " ^2.1354.0" ,
21+ "@aws-sdk/client-s3" : " ^3.525.0" ,
22+ "@aws-sdk/credential-providers" : " ^3.525.0" ,
2223 "chalk" : " ^4.1.0" ,
2324 "core-object" : " ^3.1.5" ,
2425 "ember-cli-deploy-plugin" : " ^0.2.9" ,
You can’t perform that action at this time.
0 commit comments