1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 | import { default as AmplifyCore, I18n } from 'aws-amplify';
|
15 | import dict from './AmplifyI18n';
|
16 |
|
17 | export { default as AmplifyTheme } from './AmplifyTheme';
|
18 | export { MapEntries as AmplifyMessageMapEntries } from './AmplifyMessageMap';
|
19 | export * from './AmplifyUI';
|
20 | export * from './Auth';
|
21 | export * from './API';
|
22 | export * from './Storage';
|
23 | export * from './Interactions';
|
24 |
|
25 | const configure = function(config) {
|
26 | const msg = [
|
27 | '',
|
28 | '\x1b[33mWarning: Amplify.configure() is deprecated from aws-amplify-react-native.',
|
29 | ' Please import aws-amplify package to configure AWS Amplify\x1b[0m',
|
30 | '',
|
31 | ' Example:',
|
32 | '',
|
33 | " \x1b[36mimport Amplify from 'aws-amplify';",
|
34 | " import aws_exports from './aws-exports';",
|
35 | '',
|
36 | ' Amplify.configure(aws_exports)\x1b[0m',
|
37 | '',
|
38 | ].join('\n');
|
39 | console.log(msg);
|
40 | AmplifyCore.configure(config);
|
41 | };
|
42 |
|
43 | const Amplify = {
|
44 | configure: configure,
|
45 | };
|
46 |
|
47 | export default Amplify;
|
48 |
|
49 | I18n.putVocabularies(dict);
|