Skip to content

Commit

Permalink
Storage Pluggable architecture refactor (aws-amplify#2076)
Browse files Browse the repository at this point in the history
Storage pluggable architecture refactor
  • Loading branch information
Nidhi Sharma authored Nov 19, 2018
1 parent 1914b7b commit f96bfab
Show file tree
Hide file tree
Showing 14 changed files with 23,071 additions and 2,827 deletions.
11,139 changes: 11,139 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

3,641 changes: 1,787 additions & 1,854 deletions packages/aws-amplify/package-lock.json

Large diffs are not rendered by default.

8,589 changes: 8,589 additions & 0 deletions packages/core/package-lock.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions packages/core/src/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,21 @@ export default class Parser {
amplifyConfig.Auth = Auth;
}

// Storage
let storageConfig;
if (config['aws_user_files_s3_bucket']) {
storageConfig = {
AWSS3: {
bucket: config['aws_user_files_s3_bucket'],
region: config['aws_user_files_s3_bucket_region']
}
};
} else {
storageConfig = config ? config.Storage || config : {};
}
amplifyConfig.Analytics = Object.assign({}, amplifyConfig.Analytics, config.Analytics);
amplifyConfig.Auth = Object.assign({}, amplifyConfig.Auth, config.Auth);
amplifyConfig.Storage = Object.assign({}, storageConfig);
logger.debug('parse config', config, 'to amplifyconfig', amplifyConfig);
return amplifyConfig;
}
Expand Down
Loading

0 comments on commit f96bfab

Please sign in to comment.